/* Tsunami Digital — styles */
:root {
  --bg: #f6f7fb;
  --bg-2: #eceff7;
  --fg: #0c1020;
  --fg-2: rgba(12, 16, 32, 0.62);
  --fg-3: rgba(12, 16, 32, 0.42);
  --line: rgba(12, 16, 32, 0.08);
  --line-2: rgba(12, 16, 32, 0.14);
  --accent: oklch(58% 0.16 245);
  --accent-2: oklch(70% 0.14 220);
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 18px 50px -20px rgba(8, 14, 38, 0.18);
  --blur: 22px;
  --aura-1: oklch(72% 0.18 235 / 0.55);
  --aura-2: oklch(68% 0.20 280 / 0.45);
  --aura-3: oklch(78% 0.14 200 / 0.50);
  --motion: 1;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #06080f;
  --bg-2: #0a0e1a;
  --fg: #f0f2fa;
  --fg-2: rgba(240, 242, 250, 0.66);
  --fg-3: rgba(240, 242, 250, 0.42);
  --line: rgba(240, 242, 250, 0.08);
  --line-2: rgba(240, 242, 250, 0.16);
  --accent: oklch(72% 0.16 235);
  --accent-2: oklch(78% 0.13 215);
  --glass-bg: rgba(20, 26, 44, 0.45);
  --glass-bg-strong: rgba(20, 26, 44, 0.62);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 22px 60px -22px rgba(0, 0, 0, 0.6);
  --aura-1: oklch(58% 0.20 245 / 0.55);
  --aura-2: oklch(50% 0.22 280 / 0.45);
  --aura-3: oklch(62% 0.18 200 / 0.50);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
}

/* page-wide aura backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 50% at 12% 10%, var(--aura-1), transparent 60%),
    radial-gradient(50% 50% at 88% 6%, var(--aura-2), transparent 65%),
    radial-gradient(70% 60% at 50% 100%, var(--aura-3), transparent 60%);
  z-index: -2;
  filter: blur(40px);
  opacity: .9;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(rgba(120,140,180,.06) 1px, transparent 1px);
  background-size: 18px 18px;
  z-index: -1;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black, transparent 80%);
}
[data-theme="dark"] body::after {
  background-image: radial-gradient(rgba(180,200,240,.06) 1px, transparent 1px);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

::selection { background: var(--accent); color: white; }

.td-container {
  width: min(1200px, 100% - 48px);
  margin: 0 auto;
}
@media (max-width: 720px) {
  .td-container { width: min(1200px, 100% - 32px); }
}
@media (max-width: 480px) {
  .td-container { width: calc(100% - 36px); }
}

.td-section {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0;
}
@media (max-width: 600px) {
  .td-section { padding: 64px 0; }
}
@media (max-width: 880px) {
  .td-hero {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 90px;
    padding-bottom: 0;
    align-items: stretch;
    display: block;
    overflow: hidden;
  }
  .td-hero .td-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  .td-hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
  }
  .td-hero-bottom {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: max(8px, env(safe-area-inset-bottom));
  }
}
@media (max-width: 480px) {
  .td-hero .td-container {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  .td-hero-bottom { left: 18px; right: 18px; }
}

/* ── Glass primitive ──────────────────────────────────────────────────────── */
.td-glass {
  --b: var(--blur);
  position: relative;
  border-radius: 18px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--b)) saturate(180%);
  backdrop-filter: blur(var(--b)) saturate(180%);
  border: 0.5px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  isolation: isolate;
  overflow: hidden;
}
.td-glass::before {
  /* highlight sheen */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 40%);
  opacity: calc(.6 * var(--glass-intensity, 1));
  pointer-events: none;
  border-radius: inherit;
}
.td-glass::after {
  /* inner refraction edge */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.35), inset 0 -20px 30px -20px rgba(0,0,0,.08);
}
[data-theme="dark"] .td-glass::before {
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0) 50%);
}
[data-theme="dark"] .td-glass::after {
  box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.06), inset 0 -20px 30px -20px rgba(0,0,0,.4);
}
.td-glass-inner {
  position: relative;
  z-index: 1;
}

/* ── Nav ───────────────────────────────────────────────────────────────────── */
.td-nav {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: top .4s cubic-bezier(.2,.7,.2,1);
}
.td-nav.is-scrolled { top: 10px; }
.td-nav-inner {
  pointer-events: auto;
  width: min(1100px, calc(100% - 28px));
  border-radius: 999px;
  --b: 26px;
}
.td-nav.is-scrolled .td-nav-inner {
  background: var(--glass-bg-strong);
}
.td-nav-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 12px 9px 18px;
}
.td-nav-row > .td-nav-links { flex: 1; }
.td-nav-row > .td-nav-tools { margin-left: auto; }
.td-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--fg);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.td-brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
}
.td-logo-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.td-brand-name {
  font-family: "Inter Tight", "Inter", sans-serif;
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  line-height: 1;
  gap: 6px;
}
.td-brand-name b {
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 17px;
  color: var(--fg);
}
.td-brand-name span {
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.035em;
  color: var(--fg-2);
}
@media (max-width: 480px) {
  .td-brand-name { gap: 5px; }
  .td-brand-name b { font-size: 16px; }
  .td-brand-name span { font-size: 16px; }
}

.td-nav-links {
  display: flex;
  justify-content: center;
  gap: 2px;
}
.td-nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--fg-2);
  border-radius: 999px;
  transition: color .25s ease;
}
.td-nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(12,16,32,.05);
  opacity: 0;
  transition: opacity .25s ease;
}
[data-theme="dark"] .td-nav-link::before { background: rgba(255,255,255,.06); }
.td-nav-link:hover { color: var(--fg); }
.td-nav-link:hover::before { opacity: 1; }
.td-nav-link.is-active { color: var(--fg); }
.td-nav-link.is-active::before {
  opacity: 1;
  background: rgba(12,16,32,.08);
  box-shadow: 0 0 0 0.5px rgba(255,255,255,.5) inset;
}
[data-theme="dark"] .td-nav-link.is-active::before { background: rgba(255,255,255,.10); }
.td-nav-link span { position: relative; z-index: 1; }

.td-nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.td-icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(12,16,32,.04);
  color: var(--fg-2);
  cursor: pointer;
  transition: background .25s, color .25s;
}
[data-theme="dark"] .td-icon-btn { background: rgba(255,255,255,.06); }
.td-icon-btn:hover { background: rgba(12,16,32,.10); color: var(--fg); }
[data-theme="dark"] .td-icon-btn:hover { background: rgba(255,255,255,.12); }

.td-lang {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(12,16,32,.05);
  border: 0.5px solid var(--line);
}
[data-theme="dark"] .td-lang { background: rgba(255,255,255,.05); }
.td-lang-btn {
  position: relative;
  z-index: 1;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  border-radius: 999px;
  cursor: pointer;
  transition: color .3s ease;
}
.td-lang-btn.is-active { color: var(--bg); }
[data-theme="dark"] .td-lang-btn.is-active { color: var(--bg); }
.td-lang-pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--fg);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 2px 8px -2px rgba(0,0,0,.2);
}
.td-lang-pill[data-pos="en"] { left: 3px; transform: translateX(0); }
.td-lang-pill[data-pos="hr"] { left: 3px; transform: translateX(100%); }

.td-burger {
  display: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(12,16,32,.04);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.td-burger span {
  display: block;
  width: 14px;
  height: 1.4px;
  background: var(--fg);
  border-radius: 2px;
}

.td-mobile {
  display: flex;
  flex-direction: column;
  padding: 8px 10px 14px;
  gap: 2px;
  border-top: 0.5px solid var(--line);
  margin-top: 4px;
  animation: td-mobile-in .35s cubic-bezier(.2,.7,.2,1);
}
@keyframes td-mobile-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.td-mobile a {
  padding: 13px 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--fg-2);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .25s, color .25s;
}
.td-mobile a::after {
  content: "\2192";
  font-size: 14px;
  color: var(--fg-3);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .25s, transform .25s;
}
.td-mobile a:hover, .td-mobile a.is-active {
  background: rgba(12,16,32,.06);
  color: var(--fg);
}
[data-theme="dark"] .td-mobile a:hover,
[data-theme="dark"] .td-mobile a.is-active { background: rgba(255,255,255,.06); }
.td-mobile a.is-active::after { opacity: 1; transform: translateX(0); color: var(--accent); }
.td-burger { transition: background .25s; }
.td-burger[aria-expanded="true"] { background: var(--fg); }
.td-burger[aria-expanded="true"] span { background: var(--bg); }
.td-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.td-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.td-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.td-burger span { transition: transform .3s, opacity .2s, background .25s; }

@media (max-width: 880px) {
  .td-nav-links { display: none; }
  .td-brand { display: none; }
  .td-burger { display: flex; width: 38px; height: 38px; }
  .td-nav-inner { border-radius: 26px; }
  .td-nav-row { padding: 12px 14px; gap: 10px; }
  .td-nav-tools { gap: 6px; }
  .td-icon-btn { width: 36px; height: 36px; }
  .td-lang { padding: 3px; }
  .td-lang-btn { padding: 6px 11px; font-size: 11px; letter-spacing: 0.08em; }
}
@media (max-width: 480px) {
  .td-nav { top: 10px; }
  .td-nav-inner { width: calc(100% - 20px); }
  .td-nav-row { padding: 11px 12px; gap: 8px; }
}

/* Hide stray mobile panel on desktop */
@media (min-width: 881px) {
  .td-mobile { display: none !important; }
}

/* ── Eyebrow / common bits ────────────────────────────────────────────────── */
.td-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  font-weight: 500;
}
.td-eyebrow-sm { font-size: 11px; }
.td-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent);
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.td-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 120px;
  padding-bottom: 10px;
}
.td-hero-aura {
  position: absolute;
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  top: 0;
  left: 50%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--aura-1), transparent 65%);
  filter: blur(80px);
  pointer-events: none;
  transform: translate(-50%, -30%);
  transition: transform .4s ease-out;
  z-index: 0;
}
.td-hero-aura-2 {
  background: radial-gradient(circle at 50% 50%, var(--aura-2), transparent 60%);
  top: 30%;
  left: 70%;
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
}
.td-hero .td-container { position: relative; z-index: 1; }

.td-hero-title {
  font-family: "Inter Tight", "Inter", system-ui, sans-serif;
  font-size: clamp(44px, 9.2vw, 132px);
  line-height: 0.96;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin: 22px 0 0;
  color: var(--fg);
  text-wrap: balance;
  word-break: break-word;
  display: flex;
  flex-direction: column;
}
@media (max-width: 880px) {
  .td-hero-title {
    font-size: clamp(44px, 14vw, 92px);
    margin-top: 14px;
    line-height: 0.96;
    letter-spacing: -0.04em;
  }
}
.td-hero-word {
  display: inline-block;
  margin-right: 0;
}
.td-hero-title .td-hero-word:last-child span,
.td-contact-title .td-hero-word:last-child span {
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  padding: 0.18em 0.1em;
  margin: -0.18em -0.1em;
}
.td-hero-sub {
  margin: 28px 0 0;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 56ch;
  text-wrap: pretty;
}
.td-hero-cta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}
.td-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
  text-transform: uppercase;
}
.td-hero-meta-item { display: inline-flex; align-items: center; gap: 8px; }
.td-meta-dot { width: 5px; height: 5px; border-radius: 999px; background: var(--fg-3); }

.td-hero-bottom {
  margin-top: 56px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.td-hero-scroll-cue { display: none; }

@media (max-width: 880px) {
  .td-hero-sub {
    margin-top: 22px;
    font-size: 15px;
    line-height: 1.55;
    max-width: 38ch;
  }
  .td-hero-cta {
    margin-top: auto;
    padding-top: 28px;
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .td-hero-cta .td-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 18px;
    font-size: 14px;
  }
  .td-hero-bottom {
    margin-top: 0;
    padding-top: 14px;
    padding-bottom: 8px;
    border-top: 1px solid var(--line);
    align-items: center;
    flex-wrap: nowrap;
    gap: 16px;
  }
  .td-hero-meta {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    flex: 1 1 auto;
    min-width: 0;
  }
  .td-hero-meta-item {
    font-size: 11px;
    letter-spacing: 0.06em;
  }
  .td-hero-scroll-cue {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--fg-2);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    flex-shrink: 0;
  }
  .td-hero-scroll-cue svg { animation: td-arrow-bob 2.4s ease-in-out infinite; }
  .td-scroll-hint { display: none; }

  /* Softer atmosphere so text reads cleanly */
  .td-hero-aura {
    width: 88vw;
    height: 88vw;
    filter: blur(54px);
    opacity: .8;
  }
  .td-hero-aura-2 {
    width: 78vw;
    height: 78vw;
    filter: blur(54px);
    opacity: .75;
  }
}

@keyframes td-arrow-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

.td-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 56px;
  overflow: hidden;
  z-index: 1;
}
.td-scroll-line {
  display: block;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--fg-2), transparent);
  animation: td-scroll calc(2.4s / max(var(--motion), 0.001)) ease-in-out infinite;
}
@keyframes td-scroll {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.td-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  border: 0;
  transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
  position: relative;
  isolation: isolate;
}
.td-btn span { white-space: nowrap; }
.td-btn-primary {
  background: var(--fg);
  color: var(--bg);
  box-shadow: 0 8px 22px -10px var(--fg), 0 0 0 0.5px var(--line-2);
}
.td-btn-primary:hover { transform: translateY(-1px); }
.td-btn-ghost {
  color: var(--fg);
  background: rgba(12,16,32,.04);
  border: 0.5px solid var(--line);
}
[data-theme="dark"] .td-btn-ghost { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.10); }
.td-btn-ghost:hover { background: rgba(12,16,32,.08); }
[data-theme="dark"] .td-btn-ghost:hover { background: rgba(255,255,255,.10); }

/* ── Section heads ─────────────────────────────────────────────────────────── */
.td-sec-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.td-sec-title {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: clamp(36px, 5.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 16px 0 0;
  text-wrap: balance;
}
.td-sec-sub {
  margin: 18px 0 0;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 56ch;
  text-wrap: pretty;
}
@media (max-width: 600px) {
  .td-sec-head { margin-bottom: 36px; }
  .td-sec-title { font-size: clamp(30px, 8vw, 44px); }
  .td-sec-sub { margin-top: 14px; }
}

/* ── Services ──────────────────────────────────────────────────────────────── */
.td-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 940px) { .td-services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .td-svc-card .td-glass-inner { min-height: 200px; padding: 22px 20px; }
  .td-svc-num { margin-bottom: 24px; }
}

.td-svc-card { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.td-svc-card:hover { transform: translateY(-3px); }
.td-svc-card .td-glass-inner {
  padding: 26px 24px 24px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.td-svc-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-bottom: 36px;
}
.td-svc-title {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0 0 10px;
}
.td-svc-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-2);
}
.td-svc-arrow {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(12,16,32,.05);
  color: var(--fg-2);
  transition: transform .35s ease, background .25s ease, color .25s ease;
}
[data-theme="dark"] .td-svc-arrow { background: rgba(255,255,255,.06); }
.td-svc-card:hover .td-svc-arrow {
  background: var(--accent);
  color: white;
  transform: translate(2px, -2px) rotate(-8deg);
}

/* ── Process / Work ────────────────────────────────────────────────────────── */
.td-work { padding-top: clamp(40px, 8vw, 100px); }
.td-process {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 0.5px solid var(--line);
}
.td-process-row {
  display: grid;
  grid-template-columns: 100px 1fr 60px;
  align-items: start;
  gap: 28px;
  padding: 36px 4px;
  border-bottom: 0.5px solid var(--line);
  transition: background .4s ease;
  position: relative;
}
.td-process-row:hover {
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--accent) 6%, transparent), transparent);
}
.td-process-num span {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
}
.td-process-title {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: -6px 0 10px;
}
.td-process-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 60ch;
}
.td-process-rail {
  height: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.td-process-tick {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line-2);
  transition: background .25s, border-color .25s, transform .35s;
}
.td-process-arrow { display: none; }
.td-process-row:hover .td-process-tick {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.2);
}

@media (max-width: 720px) {
  .td-process-row { grid-template-columns: 60px 1fr; gap: 16px; padding: 28px 0; }
  .td-process-rail { display: none; }
}

/* ── Projects ──────────────────────────────────────────────────────────────── */
.td-proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 980px) { .td-proj-grid { grid-template-columns: repeat(2, 1fr); } }

.td-proj-card {
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.td-proj-card:hover { transform: translateY(-4px); }
.td-proj-card .td-glass-inner {
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.td-proj-art {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
}
.td-proj-art-grain {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 4px),
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.18), transparent 60%);
  mix-blend-mode: overlay;
}
.td-proj-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 50% at 70% 30%, rgba(255,255,255,.20), transparent 60%);
  mix-blend-mode: screen;
  transition: opacity .5s ease;
}
.td-proj-card:hover .td-proj-art::after { opacity: .7; }
.td-proj-art-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  color: white;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255,255,255,.3);
  z-index: 1;
}
.td-proj-body {
  padding: 18px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.td-proj-kind {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  text-transform: uppercase;
}
.td-proj-title {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: 20px;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 2px 0 4px;
}
.td-proj-desc {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg-2);
}
.td-proj-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  align-self: flex-start;
  padding-top: 8px;
  border-top: 0.5px solid var(--line);
  width: 100%;
  justify-content: space-between;
}
.td-proj-link svg { transition: transform .3s ease; }
.td-proj-link:hover svg { transform: translate(2px, -2px); }

/* ── Contact ───────────────────────────────────────────────────────────────── */
.td-contact { padding-bottom: clamp(60px, 10vw, 120px); }
.td-contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
}
@media (max-width: 880px) {
  .td-contact-grid { grid-template-columns: 1fr; align-items: start; }
}
.td-contact-title {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: clamp(36px, 6.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin: 16px 0 0;
  text-wrap: balance;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  display: flex;
  flex-direction: column;
}
@media (max-width: 600px) {
  .td-contact-title { font-size: clamp(34px, 11vw, 56px); }
}
.td-contact-sub { max-width: 46ch; }
.td-contact-cta { margin-top: 28px; }
.td-contact-note {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 16px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.005em;
  color: var(--fg-3);
  font-weight: 400;
}
.td-contact-note-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: oklch(70% 0.16 145);
  box-shadow: 0 0 0 4px color-mix(in oklab, oklch(70% 0.16 145) 22%, transparent);
  flex-shrink: 0;
  animation: td-note-pulse 2.4s ease-in-out infinite;
}
@keyframes td-note-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .8; transform: scale(1.15); }
}

.td-contact-card .td-glass-inner {
  padding: 24px 26px;
}
@media (max-width: 600px) {
  .td-contact-card .td-glass-inner { padding: 18px 18px; }
  .td-contact-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
  .td-contact-row dt { font-size: 10px; }
  .td-contact-row dd { font-size: 14px; }
  .td-contact-cta { width: 100%; justify-content: center; }
  .td-contact-note { font-size: 12px; margin-top: 14px; justify-content: center; width: 100%; }
}
.td-contact-list { margin: 0; }
.td-contact-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--line);
}
.td-contact-row:last-child { border-bottom: 0; }
.td-contact-row dt {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 2px 0 0;
}
.td-contact-row dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.td-contact-row dd a:hover { color: var(--accent); }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.td-footer {
  padding: 40px 0 56px;
  border-top: 0.5px solid var(--line);
  font-size: 12px;
  color: var(--fg-3);
}
.td-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.td-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.td-footer-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.td-dot-sep {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: var(--fg-3);
}
@media (max-width: 600px) {
  .td-footer { padding: 36px 0 44px; font-size: 12.5px; }
  .td-footer-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }
  .td-footer-brand {
    flex-direction: column;
    gap: 4px;
    color: var(--fg-2);
    letter-spacing: -0.005em;
  }
  .td-footer-brand .td-brand-mark { display: none; }
  .td-footer-name { font-weight: 500; }
  .td-footer-meta {
    flex-direction: column;
    gap: 6px;
    color: var(--fg-3);
  }
  .td-footer-meta .td-dot-sep { display: none; }
}

/* ── Mobile swipe: services + projects + work ────────────────────────────── */
@media (max-width: 600px) {
  .td-services-grid,
  .td-proj-grid,
  .td-process {
    display: flex;
    flex-direction: row;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 16px;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    margin: 0 -16px;
    padding: 4px 16px 6px;
    scrollbar-width: none;
  }
  .td-services-grid::-webkit-scrollbar,
  .td-proj-grid::-webkit-scrollbar,
  .td-process::-webkit-scrollbar { width: 0; height: 0; display: none; }

  .td-services-grid > *,
  .td-proj-grid > *,
  .td-process > * {
    flex: 0 0 82%;
    max-width: 82%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    /* cards may sit off-screen horizontally and never trigger IntersectionObserver — force visible */
    opacity: 1 !important;
    transform: none !important;
  }

  /* Work rows become glass cards on mobile — match services cards */
  .td-process { border-top: 0; list-style: none; }
  .td-process-row {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    gap: 0;
    min-height: 200px;
    padding: 22px 20px;
    border: 0.5px solid var(--glass-border);
    border-radius: 18px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
    backdrop-filter: blur(var(--blur)) saturate(180%);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    isolation: isolate;
  }
  .td-process-row::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 40%);
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
  }
  [data-theme="dark"] .td-process-row::before {
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0) 50%);
  }
  .td-process-row:hover { background: var(--glass-bg); }
  .td-process-row > * { position: relative; z-index: 1; }
  .td-process-rail { display: none; }

  .td-process-arrow {
    display: grid;
    place-items: center;
    position: absolute;
    top: 22px;
    right: 22px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(12,16,32,.05);
    color: var(--fg-2);
    z-index: 1;
    transition: transform .35s ease, background .25s ease, color .25s ease;
  }
  [data-theme="dark"] .td-process-arrow { background: rgba(255,255,255,.06); }
  .td-process-row:hover .td-process-arrow {
    background: var(--accent);
    color: white;
    transform: translate(2px, -2px) rotate(-8deg);
  }

  .td-process-num { margin: 0 0 24px; }
  .td-process-num span {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--fg-3);
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    font-weight: 400;
    line-height: 1;
    display: inline-block;
  }

  .td-process-body { display: flex; flex-direction: column; gap: 10px; }
  .td-process-title {
    font-family: "Inter Tight", "Inter", sans-serif;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 500;
    margin: 0;
  }
  .td-process-desc {
    font-size: 14px;
    line-height: 1.55;
    color: var(--fg-2);
    margin: 0;
  }
}

@media (max-width: 480px) {
  .td-services-grid,
  .td-proj-grid,
  .td-process {
    margin: 0 -18px;
    padding-left: 18px;
    padding-right: 18px;
    scroll-padding-left: 18px;
  }
  .td-services-grid > *,
  .td-proj-grid > *,
  .td-process > * {
    flex-basis: 86%;
    max-width: 86%;
  }
}

/* ── Reveal on scroll ─────────────────────────────────────────────────────── */
.td-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.td-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Tsunami sweep — first-load reveal ───────────────────────────────────── */
.td-sweep {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(96deg, transparent 0%, transparent 50%, #000 55%, #000 100%);
          mask-image: linear-gradient(96deg, transparent 0%, transparent 50%, #000 55%, #000 100%);
  -webkit-mask-size: 250% 100%;
          mask-size: 250% 100%;
  -webkit-mask-position: 100% 0;
          mask-position: 100% 0;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  transition: background-color .28s ease,
              -webkit-mask-position .8s cubic-bezier(.65, .04, .2, 1),
                      mask-position .8s cubic-bezier(.65, .04, .2, 1);
}
.td-sweep.is-curtain-up {
  background: var(--bg);
}

/* Title card — wordmark on black */
.td-sweep-brand {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .35s cubic-bezier(.2, .7, .2, 1);
}
.td-sweep.is-titling .td-sweep-brand {
  opacity: 1;
  transform: none;
}
.td-sweep.is-curtain-up .td-sweep-brand {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .22s ease, transform .28s ease;
}
.td-sweep-brand-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
  text-align: center;
}
/* Eyebrow on the title card — reuses .td-eyebrow, overrides colors for black bg */
.td-sweep-eyebrow {
  font-size: 15px;
  letter-spacing: 0.12em;
  color: rgba(240, 242, 250, 0.62);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .3s ease, transform .4s cubic-bezier(.2, .7, .2, 1);
}
.td-sweep-eyebrow .td-dot {
  background: oklch(72% 0.16 235);
  box-shadow: 0 0 0 4px color-mix(in oklab, oklch(72% 0.16 235) 22%, transparent);
}
.td-sweep.is-titling .td-sweep-eyebrow {
  opacity: 1;
  transform: none;
}

.td-sweep-divider {
  width: 120px;
  height: 1px;
  margin: 8px 0 4px;
  background: linear-gradient(90deg, transparent, rgba(240, 242, 250, 0.55), transparent);
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform .42s cubic-bezier(.2, .7, .2, 1) .28s;
}
.td-sweep.is-titling .td-sweep-divider { transform: scaleX(1); }

.td-sweep-coords {
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: rgba(240, 242, 250, 0.4);
  opacity: 0;
  transition: opacity .4s ease;
}
.td-sweep.is-titling .td-sweep-coords {
  opacity: 1;
  transition: opacity .45s ease .9s;
}

.td-sweep-brand-text {
  font-family: "Inter Tight", "Inter", system-ui, sans-serif;
  font-size: clamp(40px, 7.5vw, 100px);
  letter-spacing: -0.04em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0.32em;
  color: #f0f2fa;
}
.td-sweep-brand-text b {
  font-weight: 700;
  letter-spacing: -0.045em;
}
.td-sweep-brand-text span {
  font-weight: 400;
  color: rgba(240, 242, 250, 0.62);
}

/* Tagline — matches the hero h1's typographic treatment */
.td-sweep-tagline {
  font-family: "Inter Tight", "Inter", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 36px);
  letter-spacing: -0.018em;
  line-height: 1.3;
  color: rgba(240, 242, 250, 0.78);
  min-height: 1.4em;
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}
.td-sweep-tagline-word.is-italic {
  font-family: "Fraunces", "Times New Roman", serif;
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.005em;
  color: rgba(240, 242, 250, 0.95);
}
.td-sweep-tagline .td-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(1px);
  transition: opacity .18s ease, transform .18s ease;
  white-space: pre;
}
.td-sweep-tagline .td-char.is-on {
  opacity: 1;
  transform: none;
}
.td-sweep.is-leaving {
  -webkit-mask-position: 0% 0;
          mask-position: 0% 0;
}
.td-sweep-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, transparent, var(--fg-2) 30%, var(--fg-2) 70%, transparent);
  opacity: .85;
  transition: transform .4s cubic-bezier(.5, 0, .2, 1), opacity .35s ease;
}
.td-sweep.is-drawing .td-sweep-line { transform: scaleX(1); }
.td-sweep.is-leaving .td-sweep-line {
  opacity: 0;
  transition: transform .4s cubic-bezier(.5, 0, .2, 1), opacity .3s ease .55s;
}

/* Hide post-sweep hero items while the sweep is covering them */
html.td-booting .td-hero-aura,
html.td-booting .td-hero .td-eyebrow,
html.td-booting .td-hero-cta {
  opacity: 0;
}
html.td-booting .td-hero-cta {
  transform: translateY(8px);
}

/* Phase 2 — settle */
html.td-booted .td-hero-aura {
  opacity: 1;
  transition: opacity .8s ease;
}
html.td-booted .td-hero .td-eyebrow {
  opacity: 1;
  transition: opacity .25s ease;
}
html.td-booted .td-hero-cta {
  opacity: 1;
  transform: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1);
  transition-delay: .05s;
}

/* Eyebrow typewriter chars */
.td-hero .td-eyebrow .td-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .25s ease, transform .25s ease;
  white-space: pre;
}
.td-hero .td-eyebrow .td-char.is-on {
  opacity: 1;
  transform: none;
}

/* respect motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .td-reveal { opacity: 1; transform: none; }
  .td-sweep { display: none !important; }
  html.td-booting .td-hero-aura,
  html.td-booting .td-hero .td-eyebrow,
  html.td-booting .td-hero-cta {
    opacity: 1 !important;
    transform: none !important;
  }
}
