:root {
  /* Palette pulled from the Trei logo — warm pastels + charcoal ink */
  --brand-primary: #8E7AA0;     /* muted lavender */
  --brand-primary-soft: #B49EC1;/* lighter lavender for gradients */
  --brand-cta: #E6A58A;          /* peach */
  --bg: #FAF6F2;                 /* cream */
  --surface: #FFFFFF;
  --surface-muted: #F3ECE4;      /* warm off-white panel */
  --text: #2A221F;               /* warm near-black */
  --text-muted: #6E6159;         /* warm taupe */
  --border: #EAE0D5;             /* soft sand */
  --shadow-sm: 0 1px 2px rgba(42, 34, 31, 0.05), 0 1px 3px rgba(42, 34, 31, 0.06);
  --shadow-md: 0 4px 12px rgba(42, 34, 31, 0.06), 0 2px 6px rgba(42, 34, 31, 0.04);
  --shadow-lg: 0 20px 40px rgba(42, 34, 31, 0.08), 0 8px 16px rgba(42, 34, 31, 0.04);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --header-h: 72px;
  --container: 1160px;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  /* Display tones for tiles / gradients / bars — harmonised with warm palette */
  --accent-blue: #6E8AB0;        /* dusted denim */
  --accent-amber: #D39242;       /* honey */
  --accent-slate: #7F6F66;       /* taupe */
  --accent-emerald: #6FA383;     /* sage */
  --accent-rose: #C97B86;        /* dusty rose */
  --accent-purple: #8E7AA0;      /* lavender (matches brand) */
  --accent-cyan: #7BA9B1;        /* dusty teal */
  --accent-teal: #719C90;        /* moss */
  --accent-orange: #D48067;      /* terracotta */
  /* Ink tones for pill / badge text — AA contrast on 14% tint over cream */
  --ink-blue: #3F5F82;
  --ink-amber: #7A4F18;
  --ink-slate: #4A3E36;
  --ink-emerald: #3C6A4C;
  --ink-rose: #934350;
  --ink-purple: #5C4A6D;
  --ink-cyan: #446F77;
  --ink-teal: #3F6458;
  --ink-orange: #8E4531;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Deep warm plum-charcoal — harmonises with the lavender+peach brand,
       and gives far more contrast/depth than the old muddy cocoa. */
    --bg: #16121C;
    --surface: #211A2A;
    --surface-muted: #2C2438;
    --text: #F6F1FA;
    --text-muted: #C3B7D2;
    --border: #39304A;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 8px 22px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 26px 52px rgba(0, 0, 0, 0.62), 0 8px 20px rgba(0, 0, 0, 0.4);
    /* Flip ink tokens to light accent tints for legibility on dark cocoa surfaces */
    --ink-blue:    color-mix(in srgb, var(--accent-blue)    35%, white);
    --ink-amber:   color-mix(in srgb, var(--accent-amber)   40%, white);
    --ink-slate:   color-mix(in srgb, var(--accent-slate)   30%, white);
    --ink-emerald: color-mix(in srgb, var(--accent-emerald) 35%, white);
    --ink-rose:    color-mix(in srgb, var(--accent-rose)    40%, white);
    --ink-purple:  color-mix(in srgb, var(--accent-purple)  35%, white);
    --ink-cyan:    color-mix(in srgb, var(--accent-cyan)    35%, white);
    --ink-teal:    color-mix(in srgb, var(--accent-teal)    35%, white);
    --ink-orange:  color-mix(in srgb, var(--accent-orange)  40%, white);
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
  .reveal, .reveal-hero > * { opacity: 1 !important; transform: none !important; }
}

/* ---- Animations ------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); }
  60%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); }
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-emerald) 20%, transparent); }
  50%      { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent-emerald) 0%, transparent); }
}

/* Hero entrance — staggered */
.reveal-hero > * {
  opacity: 0;
  animation: fadeUp 600ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.reveal-hero > .hero-mark  { animation-name: scaleIn; animation-delay:  40ms; }
.reveal-hero > .eyebrow    { animation-delay: 160ms; }
.reveal-hero > .hero-title { animation-delay: 240ms; }
.reveal-hero > .hero-sub   { animation-delay: 340ms; }
.reveal-hero > .hero-ctas  { animation-delay: 440ms; }
.reveal-hero > .hero-meta  { animation-delay: 540ms; }

/* Scroll-triggered card reveal (toggled by IntersectionObserver) */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-visible {
  animation: fadeUp 520ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

a:focus-visible,
button:focus-visible,
.badge:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-primary) 70%, transparent);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--text) 6%, transparent),
    0 2px 4px rgba(15, 23, 42, 0.08);
}
.brand-logo-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.nav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav a {
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 15px;
  transition: color 160ms ease, background 160ms ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav a:hover {
  color: var(--text);
  background: var(--surface-muted);
}
.nav .nav-cta {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.nav .nav-cta:hover {
  border-color: color-mix(in srgb, var(--brand-primary) 45%, var(--border));
}

/* Hero */
.hero {
  padding: 72px 0 56px;
  position: relative;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -200px 0 auto 0;
  height: 620px;
  background:
    radial-gradient(760px 340px at 12% 22%, color-mix(in srgb, var(--brand-primary) 34%, transparent), transparent 68%),
    radial-gradient(560px 300px at 88% 8%, color-mix(in srgb, var(--brand-cta) 30%, transparent), transparent 70%),
    radial-gradient(420px 420px at 62% 40%, color-mix(in srgb, var(--accent-cyan) 14%, transparent), transparent 72%);
  z-index: -1;
  pointer-events: none;
  filter: saturate(115%);
}
.hero-mark {
  width: 104px;
  height: 104px;
  border-radius: 24px;
  overflow: hidden;
  margin: 0 0 24px;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--text) 7%, transparent),
    0 16px 32px rgba(15, 23, 42, 0.12),
    0 4px 8px rgba(15, 23, 42, 0.06);
}
.hero-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin: 0 0 28px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-emerald) 20%, transparent);
  animation: dotPulse 2.4s ease-in-out infinite;
}
.hero-title {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 20px;
  max-width: 18ch;
}
.grad-text {
  background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-cta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-sub {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0 0 32px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: transform 160ms ease, box-shadow 200ms ease, background 160ms ease, color 160ms ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-cta) 100%);
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-primary) 30%, transparent);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--brand-primary) 40%, transparent);
  filter: brightness(1.04);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-muted); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
}
.hero-meta strong {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero-meta .sep {
  color: color-mix(in srgb, var(--text-muted) 45%, transparent);
}

/* Agency layer */
.agency-intro,
.service-strip,
.audience-section,
.audit-offer,
.process-section,
.portfolio-proof,
.home-cta {
  padding: 42px 0;
}
.agency-copy {
  max-width: 760px;
  margin-bottom: 24px;
}
.agency-copy h2,
.two-column-section h2,
.audit-panel h2,
.home-cta-inner h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.agency-copy p,
.two-column-section p,
.audit-panel p,
.home-cta-inner p {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
}
.eyebrow-inline {
  display: inline-flex;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-blue);
}
.metric-grid,
.service-grid,
.proof-grid,
.process-grid {
  display: grid;
  gap: 16px;
}
.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.metric,
.service-item,
.proof-item,
.process-grid li,
.audit-panel,
.home-cta-inner {
  background:
    linear-gradient(180deg, color-mix(in srgb, white 4%, transparent), transparent 40%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, white 7%, transparent),
    var(--shadow-sm);
  transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 200ms ease, border-color 200ms ease;
}
.service-item:hover,
.proof-item:hover,
.metric:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent, var(--brand-primary)) 40%, var(--border));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, white 8%, transparent),
    var(--shadow-md);
}
.metric {
  padding: 20px;
}
.metric strong {
  display: block;
  color: var(--text);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.metric span {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 8px;
}
.service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.service-item,
.proof-item {
  padding: 22px;
}
.service-item[data-accent="blue"] { --accent: var(--accent-blue); --ink: var(--ink-blue); }
.service-item[data-accent="emerald"] { --accent: var(--accent-emerald); --ink: var(--ink-emerald); }
.service-item[data-accent="orange"] { --accent: var(--accent-orange); --ink: var(--ink-orange); }
.service-item[data-accent="purple"] { --accent: var(--accent-purple); --ink: var(--ink-purple); }
.service-item h3,
.proof-item h3,
.process-grid h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.service-item p,
.proof-item p,
.process-grid p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}
.service-link,
.proof-item a {
  display: inline-flex;
  margin-top: 16px;
  min-height: 36px;
  align-items: center;
  color: var(--ink, var(--brand-primary));
  font-weight: 700;
  font-size: 14px;
}
.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}
.audience-tags,
.check-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.audience-tags li,
.check-grid li {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.audit-panel {
  display: grid;
  gap: 22px;
  padding: 28px;
}
.check-grid li {
  background: var(--surface-muted);
}
.process-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.process-grid li {
  padding: 22px;
}
.process-grid li > span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  background: var(--brand-primary);
  font-weight: 700;
  font-family: var(--font-mono);
}
.proof-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.home-cta-inner {
  padding: 30px;
  background: color-mix(in srgb, var(--surface) 78%, var(--surface-muted));
}
.home-cta-inner .hero-ctas {
  margin: 22px 0 0;
}

/* Section heads */
.section-head {
  margin-bottom: 32px;
}
.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  font-weight: 700;
}
.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 17px;
}

/* Apps bento */
.apps {
  padding: 32px 0 80px;
}
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background:
    linear-gradient(180deg, color-mix(in srgb, white 4%, transparent), transparent 42%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, white 7%, transparent),
    var(--shadow-sm);
  overflow: hidden;
  grid-column: span 2;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms ease, border-color 220ms ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
  opacity: 0.85;
  transition: height 220ms ease, opacity 220ms ease;
}
.card[data-accent="blue"]   { --accent: var(--accent-blue);    --ink: var(--ink-blue); }
.card[data-accent="amber"]  { --accent: var(--accent-amber);   --ink: var(--ink-amber); }
.card[data-accent="slate"]  { --accent: var(--accent-slate);   --ink: var(--ink-slate); }
.card[data-accent="emerald"]{ --accent: var(--accent-emerald); --ink: var(--ink-emerald); }
.card[data-accent="rose"]   { --accent: var(--accent-rose);    --ink: var(--ink-rose); }
.card[data-accent="purple"] { --accent: var(--accent-purple);  --ink: var(--ink-purple); }
.card[data-accent="cyan"]   { --accent: var(--accent-cyan);    --ink: var(--ink-cyan); }
.card[data-accent="teal"]   { --accent: var(--accent-teal);    --ink: var(--ink-teal); }
.card[data-accent="orange"] { --accent: var(--accent-orange);  --ink: var(--ink-orange); }
.card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
    var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.card:hover::before { opacity: 1; height: 4px; }

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--text) 6%, transparent),
    0 2px 4px rgba(15, 23, 42, 0.06);
}
.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.icon-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, white));
}

.card-body h3 {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 6px 0 6px;
  font-weight: 700;
}
.card-body h3 .card-link {
  color: inherit;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1.5px;
  transition: background-size 220ms ease, color 220ms ease;
}
.card:hover .card-body h3 .card-link,
.card-body h3 .card-link:focus-visible {
  background-size: 100% 1.5px;
  color: var(--ink, var(--text));
}
.card-body .alias {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.75em;
  letter-spacing: -0.005em;
}
.card-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink, var(--text));
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
  padding: 5px 10px;
  border-radius: 999px;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: 8px;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}
.badge img {
  width: auto;
  display: block;
}
/* Tuned per brand: Google Play PNG has internal padding so it fills 48px;
   Apple's SVG is tighter so it reads heavier — render at 42px to match. */
.badge-play img  { height: 48px; }
.badge-apple img { height: 42px; }
.badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.badge-soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 8px;
}
.badge-web {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
}
.badge-web:hover {
  border-color: var(--accent, #ffd166);
  color: var(--accent, #ffd166);
}
.card-soon {
  background: var(--surface-muted);
}
.card-soon .card-icon {
  filter: saturate(0.4) opacity(0.85);
}
.card-soon::after {
  content: "Coming soon";
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--ink, var(--text));
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  animation: breathe 2.6s ease-in-out infinite;
}

/* About */
.about {
  padding: 40px 0 80px;
}
.about-wrap {
  max-width: 780px;
  margin: 0 0 40px;
}
.about h2 {
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.about-wrap p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

/* Principles grid */
.principles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.principle {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms ease, border-color 220ms ease;
}
.principle[data-accent="purple"]  { --accent: var(--accent-purple);  --ink: var(--ink-purple); }
.principle[data-accent="emerald"] { --accent: var(--accent-emerald); --ink: var(--ink-emerald); }
.principle[data-accent="amber"]   { --accent: var(--accent-amber);   --ink: var(--ink-amber); }
.principle[data-accent="cyan"]    { --accent: var(--accent-cyan);    --ink: var(--ink-cyan); }
.principle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.principle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--ink, var(--text));
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}
.principle h3 {
  margin: 4px 0 0;
  font-size: 16px;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--text);
}
.principle p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 56px;
  background: var(--surface);
}
.footer-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
}
.footer-contact p {
  margin: 0 0 4px;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.footer-contact .mail,
.footer-contact .whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid color-mix(in srgb, var(--brand-primary) 40%, transparent);
  padding-bottom: 2px;
  min-height: 32px;
}
.footer-contact .whatsapp {
  color: var(--text);
  border-color: color-mix(in srgb, #25D366 50%, transparent);
}
.footer-contact .whatsapp svg {
  color: #25D366;
}
.footer-contact .mail:hover {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.footer-contact .whatsapp:hover {
  color: #128C7E;
  border-color: #25D366;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.footer-nav a:hover {
  background: var(--surface-muted);
  color: var(--text);
}

/* Tablet */
@media (max-width: 960px) {
  .nav {
    max-width: calc(100vw - 88px);
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { scroll-snap-align: start; flex: 0 0 auto; white-space: nowrap; }
  .metric-grid,
  .service-grid,
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .proof-grid,
  .two-column-section {
    grid-template-columns: 1fr;
  }
  .bento {
    grid-template-columns: repeat(4, 1fr);
  }
  .card {
    grid-column: span 2;
    grid-row: auto;
  }
  .principles { grid-template-columns: repeat(2, 1fr); }
}

/* Phablet — keep 2-col for small cards to reduce scroll */
@media (max-width: 640px) {
  .hero { padding: 56px 0 40px; }
  .agency-intro,
  .service-strip,
  .audience-section,
  .audit-offer,
  .process-section,
  .portfolio-proof,
  .home-cta {
    padding: 32px 0;
  }
  .metric-grid,
  .service-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }
  .audit-panel,
  .home-cta-inner {
    padding: 22px;
  }
  .bento { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card { grid-column: auto; padding: 18px; }
  .card-body h3 { font-size: 17px; }
  .card-body p  { font-size: 14px; }
  .card-actions { gap: 8px; }
  .badge { height: 42px; }
  .badge-play img  { height: 42px; }
  .badge-apple img { height: 36px; }
  .badge-soon { height: 42px; padding: 0 12px; font-size: 12.5px; }
  .hero-meta { font-size: 13px; gap: 6px 10px; }
  .nav { gap: 2px; }
  .nav a { padding: 8px 10px; font-size: 14px; }
  .footer-wrap { flex-direction: column; align-items: flex-start; }
}

/* Small phone — collapse bento fully */
@media (max-width: 440px) {
  .bento { grid-template-columns: 1fr; }
  .card { grid-column: auto; }
  .principles { grid-template-columns: 1fr; }
}

/* ---------- policy-page: shared layout for privacy / terms / etc. ---------- */
.policy-page { padding: 48px 0 96px; }
.policy-page-inner { max-width: 720px; margin: 0 auto; }
.policy-page .policy-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8E7AA0;
  margin-bottom: 8px;
}
.policy-page h1 {
  font-size: clamp(1.6rem, 2.2vw + 1rem, 2.2rem);
  line-height: 1.2;
  margin: 0 0 8px;
  font-weight: 700;
}
.policy-page .policy-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}
.policy-page h2 {
  margin: 36px 0 10px;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
}
.policy-page p,
.policy-page li {
  line-height: 1.65;
  font-size: 1rem;
}
.policy-page p { margin: 0 0 14px; }
.policy-page ul { padding-left: 1.4em; margin: 12px 0 16px; }
.policy-page ul li { margin-bottom: 6px; }
.policy-page strong { font-weight: 600; }
.policy-page a {
  color: #8E7AA0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.policy-page a:hover { text-decoration-thickness: 2px; }
@media (prefers-color-scheme: dark) {
  .policy-page a { color: #C4A8DA; }
  .policy-page .policy-eyebrow { color: #C4A8DA; }
}
.policy-page .callout {
  background: rgba(142, 122, 160, 0.08);
  border-left: 3px solid #8E7AA0;
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin: 14px 0;
  font-size: 0.95rem;
}
.policy-page .callout strong { display: block; margin-bottom: 4px; }
@media (prefers-color-scheme: dark) {
  .policy-page .callout { background: rgba(196, 168, 218, 0.06); border-left-color: #C4A8DA; }
}
.policy-page section + section { margin-top: 4px; }
.policy-page-back {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 24px;
}
.policy-page-back:hover { color: #8E7AA0; }
.policy-page h3 {
  margin: 22px 0 6px;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
}
.policy-page table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 14px 0 18px;
  font-size: 0.95rem;
  overflow-x: auto;
}
.policy-page th,
.policy-page td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(142, 122, 160, 0.18);
  vertical-align: top;
}
.policy-page th {
  font-weight: 600;
  background: rgba(142, 122, 160, 0.06);
  border-bottom-color: rgba(142, 122, 160, 0.28);
}
@media (prefers-color-scheme: dark) {
  .policy-page th { background: rgba(196, 168, 218, 0.05); border-bottom-color: rgba(196, 168, 218, 0.22); }
  .policy-page td { border-bottom-color: rgba(196, 168, 218, 0.12); }
}
.policy-page .policy-toc {
  margin: 12px 0 24px;
  padding: 14px 18px 14px 36px;
  background: rgba(142, 122, 160, 0.05);
  border-radius: 12px;
  font-size: 0.95rem;
}
.policy-page .policy-toc li { margin-bottom: 4px; }
@media (prefers-color-scheme: dark) {
  .policy-page .policy-toc { background: rgba(196, 168, 218, 0.04); }
}

@media (max-width: 640px) {
  .policy-page table {
    display: block;
  }

  .policy-page th,
  .policy-page td {
    min-width: 96px;
  }

  .policy-page th:first-child,
  .policy-page td:first-child {
    min-width: 180px;
  }
}

/* Legal / proprietor footer additions */
.footer-legal-owner {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  opacity: 0.62;
  line-height: 1.4;
}
.footer-nav.footer-legal {
  margin-top: 10px;
  opacity: 0.85;
}
.footer-nav.footer-legal a {
  font-size: 0.82rem;
}

/* Team / people section */
.team { padding: 64px 0; }
.team-wrap { max-width: 640px; margin: 0 auto 32px; text-align: center; }
.team-wrap h2 { margin: 0 0 12px; }
.team-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: 760px; margin-inline: auto;
}
.team-card {
  border: 1px solid rgba(142,122,160,0.25);
  border-radius: 16px; padding: 24px;
  background: rgba(142,122,160,0.05);
}
.team-card h3 { margin: 0 0 4px; }
.team-role {
  margin: 0 0 12px; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.02em; text-transform: uppercase; opacity: 0.65;
}
.team-link { display: inline-block; margin-top: 8px; font-weight: 600; text-decoration: none; }
.team-link:hover { text-decoration: underline; }

/* Pricing competitive callout */
.pricing-note {
  border: 1px solid rgba(142,122,160,0.3);
  border-left: 4px solid #8E7AA0;
  border-radius: 12px;
  padding: 20px 24px;
  background: rgba(142,122,160,0.06);
}
.pricing-note h2 { margin: 0 0 8px; font-size: 1.15rem; }
.pricing-note p { margin: 0; }

/* ============================================================
   Agency conversion components
   ============================================================ */

/* Hero trust microcopy */
.hero-trust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: -28px 0 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.hero-trust svg { color: var(--accent-emerald); flex: none; }

/* Proof strip (condensed product grid) */
.proof-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.ptile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  min-height: 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, color-mix(in srgb, white 4%, transparent), transparent 60%),
    var(--surface);
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 6%, transparent);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.ptile:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand-primary) 45%, var(--border));
  box-shadow: var(--shadow-md);
}
.ptile img,
.ptile .ptile-fallback {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex: none;
  object-fit: cover;
}
.ptile-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.ptile span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proof-strip-note {
  margin: 22px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}
.proof-strip-note a { color: var(--brand-primary); font-weight: 600; }

/* Testimonials + results */
.testimonials { padding: 42px 0; }
.results-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.result-stat {
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, color-mix(in srgb, white 4%, transparent), transparent 45%),
    var(--surface);
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 7%, transparent), var(--shadow-sm);
}
.result-stat strong {
  display: block;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-cta));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.result-stat span {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 14px;
}
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.testi-card {
  position: relative;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.testi-card > p {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}
.testi-card footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.testi-name { font-weight: 700; }
.testi-role { color: var(--text-muted); font-size: 14px; }
.testi-card.is-placeholder {
  border-style: dashed;
  background: transparent;
  box-shadow: none;
}
.testi-card.is-placeholder > p { color: var(--text-muted); font-style: italic; }
.testi-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-muted);
}
.testi-card:not(.is-placeholder) .testi-tag { display: none; }

/* FAQ */
.faq { padding: 42px 0; }
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 200ms ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--text-muted);
  line-height: 1.65;
}
.faq-item a { color: var(--brand-primary); font-weight: 600; }

/* Responsive */
@media (max-width: 860px) {
  .results-row,
  .testi-grid { grid-template-columns: 1fr; }
  .proof-strip { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 480px) {
  .proof-strip { grid-template-columns: 1fr 1fr; }
  .hero-trust { margin-top: -20px; align-items: flex-start; }
}

/* Mobile nav: keep the primary CTA pinned right while links scroll under it */
@media (max-width: 960px) {
  .nav .nav-cta {
    position: sticky;
    right: 0;
    z-index: 1;
    /* opaque backing + left fade so scrolled links don't collide with the CTA */
    background: var(--surface);
    box-shadow:
      -16px 0 14px -8px color-mix(in srgb, var(--bg) 92%, transparent),
      var(--shadow-sm);
  }
}

/* ============================================================
   Concise spacing + motion pass
   ============================================================ */

/* Tighter vertical rhythm so the page scans faster */
.agency-intro,
.service-strip,
.audience-section,
.audit-offer,
.process-section,
.home-cta,
.testimonials,
.faq { padding: 34px 0; }
.agency-intro { padding-top: 24px; padding-bottom: 8px; }
.apps { padding: 30px 0 64px; }

/* Staggered entrance for grid items (they each carry .reveal) */
.service-grid > .reveal:nth-child(2),
.process-grid > .reveal:nth-child(2) { animation-delay: 70ms; }
.service-grid > .reveal:nth-child(3),
.process-grid > .reveal:nth-child(3) { animation-delay: 140ms; }
.service-grid > .reveal:nth-child(4),
.process-grid > .reveal:nth-child(4) { animation-delay: 210ms; }

/* Results stats stagger in when their row reveals */
.results-row.is-visible .result-stat {
  animation: fadeUp 460ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.results-row.is-visible .result-stat:nth-child(2) { animation-delay: 90ms; }
.results-row.is-visible .result-stat:nth-child(3) { animation-delay: 180ms; }

/* Proof-strip tiles ripple in row by row (6-col desktop wave) */
.proof-strip.is-visible .ptile {
  animation: fadeUp 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.proof-strip.is-visible .ptile:nth-child(6n + 2) { animation-delay: 40ms; }
.proof-strip.is-visible .ptile:nth-child(6n + 3) { animation-delay: 80ms; }
.proof-strip.is-visible .ptile:nth-child(6n + 4) { animation-delay: 120ms; }
.proof-strip.is-visible .ptile:nth-child(6n + 5) { animation-delay: 160ms; }
.proof-strip.is-visible .ptile:nth-child(6n)     { animation-delay: 200ms; }

/* Ambient hero glow drift */
@keyframes glowFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
  50%      { transform: translate3d(0, -14px, 0) scale(1.04); opacity: 0.9; }
}
.hero::before {
  animation: glowFloat 16s ease-in-out infinite;
  will-change: transform;
}

/* Softer, springier card/tile hover */
.ptile:hover { transform: translateY(-3px) scale(1.01); }

/* Proof-strip: container just fades; the tiles do the ripple entrance */
@keyframes fadeOnly { from { opacity: 0; } to { opacity: 1; } }
.proof-strip.reveal.is-visible {
  animation: fadeOnly 280ms ease forwards;
  transform: none;
}

/* Collapsible "products shipped" proof strip */
.proof-details { margin-top: 4px; }
.proof-details > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background:
    linear-gradient(180deg, color-mix(in srgb, white 5%, transparent), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  transition: border-color 160ms ease, transform 160ms ease;
}
.proof-details > summary::-webkit-details-marker { display: none; }
.proof-details > summary::after {
  content: "";
  width: 9px; height: 9px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 220ms ease;
  margin-left: 2px;
}
.proof-details[open] > summary::after { transform: rotate(-135deg); }
.proof-details > summary:hover {
  border-color: color-mix(in srgb, var(--brand-primary) 45%, var(--border));
  transform: translateY(-1px);
}
.proof-details[open] > summary { margin-bottom: 16px; }
.proof-details .proof-strip { margin-top: 0; }
/* Ripple the tiles in when the panel opens */
.proof-details[open] .ptile {
  animation: fadeUp 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.proof-details[open] .ptile:nth-child(6n + 2) { animation-delay: 30ms; }
.proof-details[open] .ptile:nth-child(6n + 3) { animation-delay: 60ms; }
.proof-details[open] .ptile:nth-child(6n + 4) { animation-delay: 90ms; }
.proof-details[open] .ptile:nth-child(6n + 5) { animation-delay: 120ms; }
.proof-details[open] .ptile:nth-child(6n)     { animation-delay: 150ms; }

/* Generic collapsibles reuse the proof-details pill; ensure reveal content
   inside an opened panel is visible (observer can't reach display:none items). */
details[open] .reveal { opacity: 1; transform: none; }
.proof-details.section-collapse { margin-top: 18px; }
.proof-details.section-collapse[open] { margin-bottom: 4px; }
