/* =====================================================================
   Tidehand: styles
   Colours, fonts and spacing are set once below as "tokens" (variables).
   Change a token and it updates everywhere on the site.
   ===================================================================== */

:root {
  /* Brand colours */
  --bg:        #06121C;   /* deep ocean */
  --bg-2:      #081825;   /* slightly lighter band */
  --surface:   #0C1F2D;   /* cards */
  --surface-2: #11293A;   /* raised bits inside cards */
  --line:      rgba(241, 233, 218, 0.10);
  --line-2:    rgba(241, 233, 218, 0.18);
  --text:      #F1E9DA;   /* sand */
  --text-2:    #BAC6CA;   /* softer text */
  --text-3:    #8C9DA5;   /* labels */
  --teal:      #3CE3CF;   /* tide teal */
  --teal-2:    #7CF0E1;
  --teal-deep: #0B8F82;
  --on-teal:   #032420;
  --teal-a06:  rgba(60, 227, 207, 0.06);
  --teal-a12:  rgba(60, 227, 207, 0.12);
  --teal-a30:  rgba(60, 227, 207, 0.30);

  /* Fonts */
  --font-head: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Layout */
  --container: 1160px;
  --gutter: 16px;
  --radius: 20px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (min-width: 640px)  { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; margin: 0; color: var(--text); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--teal); color: var(--on-teal); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.mono { font-family: var(--font-mono); }
.hl { color: var(--teal); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--teal); color: var(--on-teal);
  padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 0.95rem/1.2 var(--font-body);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, transform .2s var(--ease), box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1rem; }
.btn-primary {
  background: var(--teal); color: var(--on-teal);
  box-shadow: 0 10px 34px -12px rgba(60, 227, 207, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { background: var(--teal-2); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-ghost {
  background: rgba(241, 233, 218, 0.03); color: var(--text);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--teal-a30); background: var(--teal-a06); }
.btn-ghost:active { transform: scale(0.98); }
.btn-hint { font-weight: 400; opacity: 0.75; }

/* ---------- Pills, eyebrows, headings ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px 7px 12px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(12, 31, 45, 0.7);
  font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.02em;
  color: var(--text);
  backdrop-filter: blur(6px);
}
.pulse {
  position: relative; width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal); flex: none;
}
.pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--teal); opacity: 0;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(0.5); opacity: 0.9; } 100% { transform: scale(1.8); opacity: 0; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.7; }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head h2, .partnership h2, .cta-card h2 {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  line-height: 1.08; letter-spacing: -0.03em;
  margin: 16px 0 16px;
  text-wrap: balance;
}
.lead { color: var(--text-2); font-size: clamp(1.05rem, 1.6vw, 1.1875rem); max-width: 60ch; }
.section-head.center .lead { margin-inline: auto; }

.section { position: relative; padding-block: clamp(72px, 9vw, 112px); }

/* ---------- Scroll reveal (only when JavaScript is on) ---------- */
.js .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s ease, transform .8s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease;
}
.site-header.is-scrolled {
  background: rgba(6, 18, 28, 0.82);
  border-bottom-color: var(--line);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; padding: 6px 0; border-radius: 8px; }
.brand img { height: 28px; width: auto; }
.main-nav { display: none; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a {
  display: inline-block; padding: 10px 14px; border-radius: 999px;
  color: var(--text-2); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  transition: color .2s ease, background-color .2s ease;
}
.main-nav a:hover { color: var(--text); background: rgba(241, 233, 218, 0.05); }
.label-short { display: none; }
@media (max-width: 420px) {
  .label-long { display: none; }
  .label-short { display: inline; }
  .brand img { height: 26px; }
}
@media (min-width: 940px) {
  .main-nav { display: block; }
  .brand img { height: 32px; }
}

/* =====================================================================
   1. HERO
   ===================================================================== */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 8vw, 88px) 0 clamp(24px, 5vw, 64px); margin-top: calc(var(--header-h) * -1); padding-top: calc(var(--header-h) + clamp(40px, 8vw, 88px)); }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(60, 227, 207, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 227, 207, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 20%, transparent 75%);
}
.glow {
  position: absolute; left: 50%; top: 38%; width: 1100px; height: 700px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(60, 227, 207, 0.13), transparent);
}
.waves { position: absolute; left: 0; top: 0; width: 100%; height: 820px; }
.wave path {
  fill: none; stroke: var(--teal); stroke-width: 1.4;
  vector-effect: non-scaling-stroke; stroke-linecap: round;
}
.wave { animation: drift 60s linear infinite; }
.w1 path { opacity: 0.22; }
.w2 { animation-duration: 78s; animation-direction: reverse; } .w2 path { opacity: 0.32; }
.w3 { animation-duration: 52s; } .w3 path { opacity: 0.16; }
.w4 { animation-duration: 90s; animation-direction: reverse; } .w4 path { opacity: 0.26; stroke: var(--text); }
.w5 { animation-duration: 70s; } .w5 path { opacity: 0.12; }
.wave path { animation: swell 9s ease-in-out infinite alternate; }
.w2 path { animation-duration: 11s; } .w3 path { animation-duration: 7s; } .w4 path { animation-duration: 13s; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-1440px); } }
@keyframes swell { from { transform: translateY(-10px); } to { transform: translateY(12px); } }

.hero-inner { position: relative; text-align: center; }
.hero-title {
  font-size: clamp(2.75rem, 8.4vw, 5.75rem);
  line-height: 1.02; letter-spacing: -0.045em;
  max-width: 12ch; margin: 28px auto 24px;
  text-wrap: balance;
}
.hero-title .hl {
  position: relative; display: inline-block;
  padding: 0 0.1em; margin: 0 -0.02em;
}
/* the "selected word" box with corner handles */
.hero-title .hl::before {
  content: ""; position: absolute; inset: 0.06em -0.02em -0.02em;
  border: 1px solid rgba(60, 227, 207, 0.55); border-radius: 4px;
  background:
    linear-gradient(var(--teal), var(--teal)) left top / 7px 7px no-repeat,
    linear-gradient(var(--teal), var(--teal)) right top / 7px 7px no-repeat,
    linear-gradient(var(--teal), var(--teal)) left bottom / 7px 7px no-repeat,
    linear-gradient(var(--teal), var(--teal)) right bottom / 7px 7px no-repeat,
    rgba(60, 227, 207, 0.07);
  background-origin: border-box;
  pointer-events: none;
}
/* the little collaborator tag */
.hero-title .hl[data-tag]::after {
  content: attr(data-tag);
  position: absolute; right: 0; top: 0; transform: translate(45%, -85%);
  padding: 5px 11px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font: 500 12px/1 var(--font-mono); letter-spacing: 0.02em; white-space: nowrap;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.6);
  animation: bob 5s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }

.hero-sub { max-width: 620px; margin: 0 auto; color: var(--text-2); font-size: clamp(1.0625rem, 2vw, 1.25rem); text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.reassure {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 22px;
  font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-3);
}
.reassure li { display: inline-flex; align-items: center; gap: 6px; }
.reassure .icon { width: 16px; height: 16px; color: var(--teal); stroke-width: 2.2; }
@media (max-width: 520px) {
  .hero-actions .btn { width: 100%; }
}

/* --- Hero app drawing --- */
.hero-visual { position: relative; max-width: 1100px; margin: clamp(48px, 6vw, 72px) auto 0; text-align: left; }
.window {
  background: linear-gradient(180deg, #0F2535 0%, #0A1C29 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.flow-window { max-width: 600px; margin: 0 auto; overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(241, 233, 218, 0.16); }
.window-title { font-size: 0.75rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.75rem; color: var(--teal);
  padding: 4px 10px; border-radius: 999px; background: var(--teal-a06); border: 1px solid rgba(60, 227, 207, 0.2);
}
.status .pulse { width: 6px; height: 6px; }

.flow-steps { padding: 8px; }
.flow-steps li {
  --d: 0s;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 12px 12px; border-radius: 12px;
  font-size: 0.9375rem; color: var(--text);
  animation: rowActive 9s var(--d) infinite;
}
.flow-steps li:nth-child(2) { --d: 0.9s; }
.flow-steps li:nth-child(3) { --d: 1.8s; }
.flow-steps li:nth-child(4) { --d: 2.7s; }
.flow-steps li:nth-child(5) { --d: 3.6s; }
.flow-steps li + li { position: relative; }
.flow-steps li + li::before { /* the thin connector between the dots */
  content: ""; position: absolute; left: 23px; top: -10px; height: 20px; width: 1px; background: var(--line-2);
}
.step-dot {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--teal); border: 1px solid var(--teal);
  animation: dotDone 9s var(--d) infinite;
}
.step-dot svg { width: 14px; height: 14px; fill: none; stroke: var(--on-teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; animation: tickDone 9s var(--d) infinite; }
.step-meta {
  font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--text-3);
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line);
}
.flow-steps li:nth-child(3) .step-meta { color: var(--teal); border-color: rgba(60, 227, 207, 0.35); background: var(--teal-a06); }
.flow-steps li:nth-child(4) .step-meta { color: var(--text); border-color: rgba(241, 233, 218, 0.35); background: rgba(241, 233, 218, 0.06); }
/* Default (and reduced-motion) state = all steps done. The animation replays the run. */
@keyframes dotDone {
  0%, 4%   { background: transparent; border-color: var(--line-2); }
  10%, 86% { background: var(--teal); border-color: var(--teal); }
  94%, 100%{ background: transparent; border-color: var(--line-2); }
}
@keyframes tickDone { 0%, 6% { opacity: 0; } 12%, 86% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes rowActive { 0%, 5% { background: transparent; } 9% { background: var(--teal-a06); } 20%, 100% { background: transparent; } }

.float-card { padding: 16px; }
.chat-card { width: 300px; display: grid; gap: 10px; }
.bubble { font-size: 0.875rem; line-height: 1.45; padding: 10px 13px; border-radius: 14px; max-width: 92%; }
.bubble-in { background: var(--surface-2); color: var(--text); border-bottom-left-radius: 4px; }
.bubble-out {
  justify-self: end; background: var(--teal-a12); border: 1px solid rgba(60, 227, 207, 0.22);
  color: var(--text); border-bottom-right-radius: 4px; position: relative;
}
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: typing 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.bubble-out .typing { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); opacity: 0; animation: typingShow 9s infinite; }
.bubble-out .bubble-text { animation: textShow 9s infinite; }
@keyframes typingShow { 0%, 20% { opacity: 1; } 24%, 100% { opacity: 0; } }
@keyframes textShow { 0%, 22% { opacity: 0; } 28%, 100% { opacity: 1; } }

.check-card { width: 220px; }
.check-title { font-size: 0.75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; }
.check-card li { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; padding: 5px 0; }
.tick { width: 18px; height: 18px; border-radius: 5px; background: var(--teal); display: grid; place-items: center; flex: none; }
.tick svg { width: 12px; height: 12px; fill: none; stroke: var(--on-teal); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

/* Desktop: three windows side by side (chat · flow · checklist), no overlap */
@media (min-width: 1024px) {
  .hero-visual {
    display: grid; gap: 20px; align-items: center;
    grid-template-columns: 250px minmax(0, 560px) 220px;
    grid-template-areas: "chat flow check";
    justify-content: center;
  }
  .flow-window { grid-area: flow; width: 100%; margin: 0; }
  .chat-card { grid-area: chat; width: auto; align-self: end; margin-bottom: 24px; animation: float 8s ease-in-out infinite; }
  .check-card { grid-area: check; width: auto; align-self: start; margin-top: 24px; animation: float 9s ease-in-out -3s infinite; }
}
/* Tablet & phone: flow window with the chat underneath */
@media (max-width: 1023px) {
  .hero-visual { display: grid; gap: 14px; max-width: 600px; }
  .flow-window { width: 100%; }
  .chat-card { width: auto; }
  .check-card { display: none; }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* =====================================================================
   2. THE PROBLEM
   ===================================================================== */
.problem { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); padding-top: clamp(48px, 6vw, 72px); }
.problem-list {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.problem-item, .why-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.problem-item h3 { font-size: 1.0625rem; margin: 16px 0 6px; letter-spacing: -0.01em; }
.problem-item p { font-size: 0.9375rem; color: var(--text-2); line-height: 1.55; }
.icon-tile {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--teal-a06); border: 1px solid rgba(60, 227, 207, 0.2); color: var(--teal);
}
.icon-tile .icon { width: 22px; height: 22px; }

.flow-compare {
  display: grid; gap: 16px; align-items: center; margin-top: clamp(40px, 6vw, 64px);
  grid-template-columns: 1fr;
}
@media (min-width: 820px) { .flow-compare { grid-template-columns: 1fr auto 1fr; gap: 20px; } }
.compare-panel {
  margin: 0; padding: 20px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
  min-height: 260px; display: flex; flex-direction: column;
}
.compare-panel.after { border-color: rgba(60, 227, 207, 0.28); background: linear-gradient(180deg, rgba(60, 227, 207, 0.07), var(--surface) 70%); }
.compare-panel figcaption { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.compare-panel.after figcaption { color: var(--teal); }
.compare-arrow { display: grid; place-items: center; color: var(--teal); }
.compare-arrow svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 819px) { .compare-arrow svg { transform: rotate(90deg); } }

.messy { position: relative; flex: 1; min-height: 200px; margin-top: 12px; }
.messy-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.messy-lines path { fill: none; stroke: var(--text); stroke-opacity: 0.22; stroke-width: 1.3; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; }
.node {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--font-mono); font-size: 0.75rem; white-space: nowrap;
  padding: 6px 10px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2);
}
.messy-nodes li:nth-child(1) { left: 16%; top: 18%; rotate: -5deg; }
.messy-nodes li:nth-child(2) { left: 74%; top: 26%; rotate: 4deg; }
.messy-nodes li:nth-child(3) { left: 50%; top: 52%; rotate: -2deg; }
.messy-nodes li:nth-child(4) { left: 22%; top: 80%; rotate: 3deg; }
.messy-nodes li:nth-child(5) { left: 82%; top: 76%; rotate: -4deg; }
.messy-nodes li:nth-child(n+6) { display: none; }

.clean { position: relative; flex: 1; display: grid; align-items: center; min-height: 200px; }
.clean-line { position: absolute; left: 12%; right: 12%; top: calc(50% - 12px); height: 2px; background: linear-gradient(90deg, var(--teal-a30), var(--teal), var(--teal-a30)); border-radius: 2px; }
.packet {
  position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%;
  background: #E9FFFC; box-shadow: 0 0 0 4px rgba(60, 227, 207, 0.25), 0 0 18px 4px rgba(60, 227, 207, 0.6);
  animation: travel 3.6s var(--ease) infinite;
}
@keyframes travel { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.clean-nodes { position: relative; display: flex; justify-content: space-between; }
.clean-nodes li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.node-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--bg); border: 2px solid var(--teal); box-shadow: 0 0 16px rgba(60, 227, 207, 0.45); }
.node-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text); }

.closing {
  max-width: 30ch; margin: clamp(40px, 6vw, 64px) auto 0; text-align: center;
  font-family: var(--font-head); font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.3; letter-spacing: -0.02em;
  text-wrap: balance;
}

/* =====================================================================
   3. WHAT WE DO
   ===================================================================== */
.services { background: var(--bg-2); border-block: 1px solid var(--line); }
.service-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .service-grid { grid-template-columns: 1fr 1fr; } }
.service-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  transition: border-color .3s ease, transform .3s var(--ease);
}
.service-card:hover { border-color: rgba(60, 227, 207, 0.3); }
.service-body { padding: 22px 24px 26px; }
.service-body .tag { font-size: 0.75rem; color: var(--teal); letter-spacing: 0.08em; }
.service-body h3 { font-size: clamp(1.2rem, 2vw, 1.375rem); margin: 8px 0 8px; letter-spacing: -0.015em; }
.service-body p { color: var(--text-2); }

.mock {
  position: relative; height: 200px; display: grid; place-items: center; padding: 24px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 80% at 50% 100%, rgba(60, 227, 207, 0.09), transparent 70%),
    linear-gradient(rgba(241, 233, 218, 0.035) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(241, 233, 218, 0.035) 1px, transparent 1px) 0 0 / 22px 22px,
    #0A1A27;
}

/* Dashboard */
.mock-dashboard { grid-template-columns: auto 1fr; gap: 14px; place-items: stretch; padding: 26px 28px; }
.mock-side { display: grid; align-content: start; gap: 9px; width: 54px; padding: 10px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.mock-side i { height: 8px; border-radius: 4px; background: rgba(241, 233, 218, 0.14); }
.mock-side i.on { background: var(--teal); }
.mock-main { display: grid; grid-template-rows: auto 1fr; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.mock-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mock-tiles span { height: 26px; border-radius: 7px; background: rgba(241, 233, 218, 0.07); border: 1px solid var(--line); }
.mock-tiles span:first-child { background: var(--teal-a12); border-color: rgba(60, 227, 207, 0.3); }
.mock-bars { display: flex; align-items: flex-end; gap: 7px; height: 100%; min-height: 60px; }
.mock-bars i {
  flex: 1; height: var(--h); border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--teal), rgba(60, 227, 207, 0.25));
  transform-origin: bottom; transition: transform 1s var(--ease);
}
.js .service-card:not(.is-visible) .mock-bars i { transform: scaleY(0.2); }
.mock-bars i:nth-child(2) { transition-delay: .05s; } .mock-bars i:nth-child(3) { transition-delay: .1s; }
.mock-bars i:nth-child(4) { transition-delay: .15s; } .mock-bars i:nth-child(5) { transition-delay: .2s; }
.mock-bars i:nth-child(6) { transition-delay: .25s; } .mock-bars i:nth-child(7) { transition-delay: .3s; }

/* Automation */
.mock-automation { grid-auto-flow: column; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 0; padding: 24px clamp(20px, 5vw, 44px); }
.auto-node {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2);
}
.auto-node svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auto-node.hub { width: 68px; height: 68px; border-radius: 18px; border-color: rgba(60, 227, 207, 0.45); background: #0B2230; box-shadow: 0 0 30px -4px rgba(60, 227, 207, 0.45); }
.auto-node.hub svg { width: 40px; height: 40px; }
.auto-node.hub path:first-child { stroke: var(--teal); }
.auto-node.hub path:last-child { stroke: var(--text); }
.auto-link { justify-self: stretch; position: relative; height: 2px; margin: 0 6px; background: repeating-linear-gradient(90deg, rgba(60, 227, 207, 0.55) 0 6px, transparent 6px 12px); }
.auto-link .packet { width: 8px; height: 8px; margin-top: -4px; animation-duration: 2.4s; }
.auto-link .packet.d2 { animation-delay: 1.2s; }
.auto-toggle {
  position: absolute; right: 16px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.6875rem; color: var(--teal);
}
.switch { width: 30px; height: 18px; border-radius: 999px; background: var(--teal); position: relative; }
.switch::after { content: ""; position: absolute; right: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--on-teal); }

/* Chat */
.mock-chat { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 10px; padding: 24px clamp(24px, 8vw, 64px); }
.mock-chat .line { height: 26px; border-radius: 13px; display: block; }
.mock-chat .in { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.mock-chat .out { align-self: flex-end; background: var(--teal-a12); border: 1px solid rgba(60, 227, 207, 0.3); border-bottom-right-radius: 4px; }
.w70 { width: 70%; } .w60 { width: 60%; } .w45 { width: 45%; }
.typing-line { width: 64px; display: grid !important; place-items: center; }

/* Website */
.mock-site { padding: 22px clamp(24px, 7vw, 56px) 0; place-items: end stretch; }
.mock-site > div:first-child { border-radius: 12px 12px 0 0; }
.site-bar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 12px 12px 0 0; }
.url { flex: 1; height: 14px; border-radius: 7px; background: rgba(241, 233, 218, 0.07); }
.site-body {
  display: grid; justify-items: center; gap: 9px; padding: 22px 16px 26px;
  background: linear-gradient(180deg, #0D2432, #0B1D2A); border: 1px solid var(--line-2); border-bottom: 0;
}
.s-title { width: 64%; height: 12px; border-radius: 6px; background: rgba(241, 233, 218, 0.55); }
.s-title.short { width: 40%; background: var(--teal); }
.s-text { width: 56%; height: 8px; border-radius: 4px; background: rgba(241, 233, 218, 0.14); margin-top: 4px; }
.s-btn { width: 30%; height: 18px; border-radius: 999px; background: var(--teal); margin-top: 6px; box-shadow: 0 6px 16px -6px rgba(60, 227, 207, 0.8); }

/* =====================================================================
   4. HAND IN HAND WITH AI
   ===================================================================== */
.partnership { overflow: hidden; }
.partnership::before {
  content: ""; position: absolute; right: -10%; top: 50%; width: 800px; height: 800px; transform: translateY(-50%);
  background: radial-gradient(closest-side, rgba(60, 227, 207, 0.08), transparent);
  pointer-events: none;
}
.partnership-inner { position: relative; display: grid; gap: clamp(40px, 6vw, 72px); align-items: center; }
@media (min-width: 900px) { .partnership-inner { grid-template-columns: 1.05fr 1fr; } }
.prose { display: grid; gap: 16px; color: var(--text-2); font-size: 1.0625rem; max-width: 58ch; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
@media (max-width: 460px) { .duo { grid-template-columns: 1fr; } }
.duo-col { border-radius: 16px; padding: 16px 18px; }
.hand-col { border: 1px solid rgba(241, 233, 218, 0.18); background: rgba(241, 233, 218, 0.03); }
.tide-col { border: 1px solid rgba(60, 227, 207, 0.3); background: var(--teal-a06); }
.duo-label { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.hand-col .duo-label { color: var(--text); }
.tide-col .duo-label { color: var(--teal); }
.duo li { position: relative; padding-left: 16px; font-size: 0.9375rem; color: var(--text-2); line-height: 1.5; }
.duo li + li { margin-top: 6px; }
.duo li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hand-col li::before { background: var(--text); }
.tide-col li::before { background: var(--teal); }
.name-note { margin-top: 22px; font-family: var(--font-head); font-size: 1.0625rem; color: var(--text); }

.partnership-visual { max-width: 480px; width: 100%; margin: 0 auto; }
.partnership-visual svg { width: 100%; height: auto; overflow: visible; }
.pv-ring { fill: none; stroke: var(--line-2); stroke-width: 1; }
.pv-ring.faint { stroke: var(--line); stroke-dasharray: 3 7; }
.pv-wave path { fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; }
.pv-wave.a { animation: pvA 9s linear infinite; } .pv-wave.a path { opacity: 0.85; }
.pv-wave.b { animation: pvB 13s linear infinite reverse; } .pv-wave.b path { opacity: 0.45; }
.pv-wave.c { animation: pvC 7s linear infinite; } .pv-wave.c path { opacity: 0.3; stroke-width: 1.4; }
@keyframes pvA { to { transform: translateX(240px); } }
@keyframes pvB { to { transform: translateX(320px); } }
@keyframes pvC { to { transform: translateX(160px); } }
.pv-hand { fill: var(--text); }
.pv-nodes circle { fill: #E9FFFC; filter: drop-shadow(0 0 6px rgba(60, 227, 207, 0.95)); animation: nodePulse 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.pv-nodes circle:nth-child(2) { animation-delay: .4s; } .pv-nodes circle:nth-child(3) { animation-delay: .8s; } .pv-nodes circle:nth-child(4) { animation-delay: 1.2s; }
@keyframes nodePulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.7; } }
.pv-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.24em; fill: var(--text-3); }

/* =====================================================================
   5. HOW IT WORKS
   ===================================================================== */
.process { background: var(--bg-2); border-block: 1px solid var(--line); }
.steps { position: relative; display: grid; gap: 28px; counter-reset: step; }
.step { position: relative; }
.step-num {
  position: relative; z-index: 1;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.875rem; color: var(--teal);
  background: var(--bg-2); border: 1px solid rgba(60, 227, 207, 0.45);
  box-shadow: 0 0 0 6px var(--bg-2), 0 0 24px -6px rgba(60, 227, 207, 0.6);
}
.step h3 { font-size: 1.25rem; margin: 20px 0 8px; letter-spacing: -0.015em; }
.step p { color: var(--text-2); font-size: 0.975rem; }

/* Mobile: vertical line on the left */
@media (max-width: 859px) {
  .steps { padding-left: 0; }
  .step { display: grid; grid-template-columns: 48px 1fr; column-gap: 18px; }
  .step-num { grid-row: span 2; }
  .step h3 { margin-top: 10px; }
  .steps::before { content: ""; position: absolute; left: 24px; top: 24px; bottom: 24px; width: 1px; background: linear-gradient(var(--teal-a30), var(--line)); }
}
/* Desktop: 4 columns with a line running through the numbers */
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .steps::before { content: ""; position: absolute; left: 24px; right: 24px; top: 24px; height: 1px; background: linear-gradient(90deg, rgba(60, 227, 207, 0.5), rgba(60, 227, 207, 0.12)); }
}

/* =====================================================================
   6. WHY TIDEHAND
   ===================================================================== */
.why-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .why-grid { grid-template-columns: 1fr 1fr; } }
.why-card { padding: 28px; transition: border-color .3s ease; }
.why-card:hover { border-color: rgba(60, 227, 207, 0.3); }
.why-card:first-child { background: linear-gradient(135deg, rgba(60, 227, 207, 0.1), var(--surface) 60%); border-color: rgba(60, 227, 207, 0.3); }
.why-card h3 { font-size: 1.25rem; margin: 18px 0 8px; letter-spacing: -0.015em; }
.why-card p { color: var(--text-2); }

/* =====================================================================
   7. FAQ
   ===================================================================== */
.faq { background: var(--bg-2); border-block: 1px solid var(--line); }
.faq-inner { display: grid; gap: 24px; }
@media (min-width: 900px) {
  .faq-inner { grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
  .faq-inner .section-head { position: sticky; top: calc(var(--header-h) + 32px); }
}
.faq-list { border-top: 1px solid var(--line-2); }
.faq-item { border-bottom: 1px solid var(--line-2); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 2px; min-height: 44px;
  font-family: var(--font-head); font-size: clamp(1.0625rem, 1.8vw, 1.1875rem); font-weight: 500; letter-spacing: -0.01em;
  transition: color .2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--teal); }
.plus { position: relative; width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); transition: border-color .2s ease, background-color .2s ease; }
.plus::before, .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.6px; margin: -0.8px 0 0 -6px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease); }
.plus::after { transform: rotate(90deg); }
.faq-item[open] .plus { border-color: var(--teal-a30); background: var(--teal-a06); color: var(--teal); }
.faq-item[open] .plus::after { transform: rotate(0deg); }
.faq-answer { padding: 0 52px 24px 2px; color: var(--text-2); max-width: 64ch; }
.faq-item[open] .faq-answer { animation: fadeDown .35s var(--ease); }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* =====================================================================
   8. FINAL CTA
   ===================================================================== */
.cta-card {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 64px) clamp(56px, 8vw, 96px);
  border-radius: 28px; border: 1px solid rgba(60, 227, 207, 0.25);
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(60, 227, 207, 0.16), transparent 70%),
    linear-gradient(180deg, #0C2231, #081825);
}
.cta-card > *:not(.cta-waves) { position: relative; }
.cta-card h2 { font-size: clamp(2.1rem, 5.4vw, 3.75rem); max-width: 16ch; margin-inline: auto; }
.cta-card .lead { margin: 0 auto; }
.cta-waves { position: absolute; inset: 0; pointer-events: none; opacity: 0.7; }
.cta-waves svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 260px; }
.cta-waves .wave path { stroke-width: 1.2; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
@media (max-width: 560px) {
  .cta-actions .btn { width: 100%; }
  .btn-hint { display: none; }
}
.location { display: inline-flex; align-items: center; gap: 8px; margin-top: 30px; font-size: 0.8125rem; color: var(--text-3); text-wrap: balance; }
.location .icon { width: 16px; height: 16px; color: var(--teal); }

/* =====================================================================
   9. FOOTER
   ===================================================================== */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 44px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.footer-brand img { height: 28px; width: auto; }
.footer-brand p { margin-top: 10px; font-size: 0.8125rem; color: var(--text-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--text-2); text-decoration: none; padding: 8px 0; display: inline-block; }
.footer-links a:hover { color: var(--teal); }
.copyright { color: var(--text-3); font-size: 0.875rem; }
@media (max-width: 640px) { .footer-inner { flex-direction: column; align-items: flex-start; } }

.noscript { position: fixed; inset: auto 0 0 0; padding: 14px 16px; background: var(--teal); color: var(--on-teal); text-align: center; z-index: 60; }
.no-js [data-list], .no-js .hero-visual { display: none; }

/* =====================================================================
   Reduced motion: keep everything still and show the final state
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .bubble-out .typing { display: none; }
}
