/* ===================================================================
   Anchovy Labs — Editorial Precision Design System
   Fraunces + DM Sans · OKLCH palette w/ hex fallbacks · Staggered reveal
   =================================================================== */

/* --- Design Tokens ------------------------------------------------ */
:root {
  /* Typography */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;

  /* Modular type scale — fluid headings, fixed body */
  --step-xs: 0.78rem;
  --step-sm: 0.885rem;
  --step-base: 1rem;
  --step-lg: clamp(1.22rem, 1.1rem + 0.52vw, 1.5rem);
  --step-xl: clamp(1.48rem, 1.24rem + 1.05vw, 2.15rem);
  --step-display: clamp(2.2rem, 1.4rem + 3.5vw, 4.4rem);

  /* Leading */
  --leading-tight: 1.14;
  --leading-snug: 1.25;
  --leading-body: 1.58;

  /* Spacing — 4pt base, semantic naming */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.25rem;
  --space-xl: clamp(3rem, 2.2rem + 2vw, 4.5rem);
  --space-2xl: clamp(4.5rem, 3.3rem + 3vw, 7rem);
  --space-3xl: clamp(6.5rem, 5rem + 4vw, 9.5rem);

  /* --- Colors — hex fallbacks (safe for all browsers) --- */
  --cream-0: #faf8f5;
  --cream-1: #f5f0e8;
  --cream-2: #eae4db;
  --cream-3: #dfd8cc;
  --ink-0: #3c3328;
  --ink-1: #5d5448;
  --ink-2: #807668;
  --line: #d4cdc3;
  --line-subtle: #e2ddd6;
  --accent: #2a6169;
  --accent-hover: #1a5260;
  --accent-soft: #e3eef1;
  --status-live: #2d7455;
  --status-live-bg: #e8f5ed;
  --status-review: #8b7a3e;
  --status-review-bg: #f5f0dc;
  --status-dev: #4d6e8a;
  --status-dev-bg: #e4ecf3;

  /* Shadows — rgba fallbacks */
  --shadow-sm: 0 1px 3px rgba(60, 51, 40, 0.06);
  --shadow-md: 0 4px 20px rgba(60, 51, 40, 0.08);
  --shadow-lg: 0 12px 40px rgba(60, 51, 40, 0.10);
  --shadow-card: 0 1px 2px rgba(60, 51, 40, 0.04), 0 4px 16px rgba(60, 51, 40, 0.06);
  --shadow-card-hover: 0 2px 4px rgba(60, 51, 40, 0.06), 0 12px 32px rgba(60, 51, 40, 0.10);

  /* Motion */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 140ms;
  --duration-med: 220ms;
  --duration-slow: 500ms;

  /* Layout */
  --page-max: 1120px;
  --page-gutter: 4vw;
  --page-gutter-min: 1.25rem;
}

/* --- OKLCH upgrade for modern browsers --- */
@supports (color: oklch(50% 0.1 0)) {
  :root {
    --cream-0: oklch(98% 0.008 82);
    --cream-1: oklch(96% 0.013 82);
    --cream-2: oklch(92% 0.018 80);
    --cream-3: oklch(88% 0.02 78);
    --ink-0: oklch(26% 0.025 70);
    --ink-1: oklch(38% 0.02 72);
    --ink-2: oklch(52% 0.018 72);
    --line: oklch(84% 0.016 78);
    --line-subtle: oklch(89% 0.012 80);
    --accent: oklch(42% 0.085 210);
    --accent-hover: oklch(36% 0.095 210);
    --accent-soft: oklch(94% 0.025 200);
    --status-live: oklch(46% 0.08 165);
    --status-live-bg: oklch(94% 0.03 165);
    --status-review: oklch(55% 0.09 85);
    --status-review-bg: oklch(95% 0.03 85);
    --status-dev: oklch(50% 0.07 232);
    --status-dev-bg: oklch(94% 0.025 232);
    --shadow-sm: 0 1px 3px oklch(30% 0.02 70 / 0.06);
    --shadow-md: 0 4px 20px oklch(30% 0.02 70 / 0.08);
    --shadow-lg: 0 12px 40px oklch(30% 0.02 70 / 0.10);
    --shadow-card: 0 1px 2px oklch(30% 0.02 70 / 0.04), 0 4px 16px oklch(30% 0.02 70 / 0.06);
    --shadow-card-hover: 0 2px 4px oklch(30% 0.02 70 / 0.06), 0 12px 32px oklch(30% 0.02 70 / 0.10);
  }
}

/* --- Reset & Base ------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--step-base);
  line-height: var(--leading-body);
  font-kerning: normal;
  color: var(--ink-0);
  background: var(--cream-1);
  -webkit-font-smoothing: antialiased;
}

/* Subtle radial tints on the page background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 24rem at 85% -5%, rgba(213, 232, 237, 0.25), transparent 70%),
    radial-gradient(42rem 24rem at -8% 8%, rgba(243, 240, 225, 0.35), transparent 75%),
    radial-gradient(50rem 30rem at 50% 100%, rgba(227, 221, 210, 0.2), transparent 60%);
}

@supports (color: oklch(50% 0.1 0)) {
  body::before {
    background:
      radial-gradient(60rem 24rem at 85% -5%, oklch(93% 0.028 200 / 0.25), transparent 70%),
      radial-gradient(42rem 24rem at -8% 8%, oklch(95.5% 0.02 100 / 0.35), transparent 75%),
      radial-gradient(50rem 30rem at 50% 100%, oklch(91% 0.015 78 / 0.2), transparent 60%);
  }
}

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

/* Readable measure for prose */
p, li, blockquote, td {
  max-width: 65ch;
}

/* --- Links & Interactive ------------------------------------------ */
a {
  color: var(--accent);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.2em;
  transition: color var(--duration-fast) var(--ease-out-quart);
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --- Typography --------------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink-0);
  text-wrap: balance;
}

h1 {
  font-family: var(--font-display);
  font-size: var(--step-display);
  line-height: var(--leading-tight);
  font-weight: 480;
  letter-spacing: -0.01em;
  max-width: 20ch;
  margin-left: -0.03em;
}

h2 {
  font-family: var(--font-display);
  font-size: var(--step-xl);
  line-height: var(--leading-snug);
  font-weight: 460;
  letter-spacing: -0.005em;
  margin-left: -0.02em;
}

h3 {
  font-family: var(--font-display);
  font-size: var(--step-lg);
  line-height: var(--leading-snug);
  font-weight: 520;
}

/* --- Layout: Masthead --------------------------------------------- */
.masthead-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  background: rgba(245, 240, 232, 0.92);
  border-bottom: 1px solid rgba(212, 205, 195, 0.5);
}

@supports (color: oklch(50% 0.1 0)) {
  .masthead-wrap {
    background: oklch(96% 0.013 82 / 0.92);
    border-bottom-color: oklch(86% 0.014 80 / 0.5);
  }
}

.masthead {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0.88rem var(--page-gutter-min);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-xs) var(--space-md);
}

@media (min-width: 600px) {
  .masthead {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }
}

.brand {
  text-decoration: none;
  color: var(--ink-0);
  font-family: var(--font-body);
  font-size: var(--step-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand:hover {
  color: var(--ink-0);
}

.nav-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
}

.nav-list a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: var(--step-sm);
  padding-bottom: 0.14rem;
  border-bottom: 1px solid transparent;
  transition:
    color var(--duration-fast) var(--ease-out-quart),
    border-color var(--duration-fast) var(--ease-out-quart);
}

.nav-list a[aria-current="page"],
.nav-list a:hover {
  color: var(--ink-0);
  border-color: var(--line);
}

/* --- Layout: Page ------------------------------------------------- */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-2xl) var(--page-gutter-min) var(--space-3xl);
}

@media (min-width: 600px) {
  .page {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }
}

/* --- Hero --------------------------------------------------------- */
.hero {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--line-subtle);
}

.hero h1 {
  position: relative;
}

.hero h1::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: var(--space-sm);
}

.hero-kicker {
  display: block;
  color: var(--accent);
  font-size: var(--step-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.lede {
  margin-top: var(--space-md);
  color: var(--ink-1);
  font-size: var(--step-lg);
  line-height: 1.5;
  max-width: 54ch;
}

.hero-aside {
  color: var(--ink-2);
  font-size: var(--step-sm);
  line-height: 1.6;
}

/* --- Sections ----------------------------------------------------- */
.section {
  margin-top: var(--space-2xl);
}

.section + .section {
  margin-top: var(--space-3xl);
}

.section-intro {
  margin-top: var(--space-sm);
  color: var(--ink-1);
  max-width: 58ch;
}

/* --- Metrics (By The Numbers) ------------------------------------- */
.metrics {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: var(--space-lg);
}

.metrics li {
  padding: var(--space-md);
  background: var(--cream-0);
  border: 1px solid var(--line-subtle);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.metric-value {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.8rem + 2.5vw, 3.6rem);
  font-weight: 380;
  line-height: 1;
  color: var(--ink-0);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--space-xs);
}

.metric-label {
  color: var(--ink-1);
  font-size: var(--step-sm);
  line-height: 1.4;
}

/* --- Featured App Tiles (Home) ------------------------------------ */
.featured-apps {
  margin-top: var(--space-lg);
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 640px) {
  .featured-apps {
    grid-template-columns: 1fr;
  }
}

.app-tile {
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: auto auto 1fr auto;
  column-gap: var(--space-sm);
  row-gap: var(--space-3xs);
  padding: var(--space-md);
  background: var(--cream-0);
  border: 1px solid var(--line-subtle);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition:
    box-shadow var(--duration-med) var(--ease-out-quart),
    transform var(--duration-med) var(--ease-out-quart);
}

.app-tile:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.app-tile .app-tile-icon {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--line-subtle);
  object-fit: cover;
}

.app-tile .status {
  grid-column: 2;
  align-self: center;
}

.app-tile h3 {
  grid-column: 2;
  font-family: var(--font-display);
  font-size: var(--step-lg);
}

.app-tile h3 a {
  color: var(--ink-0);
  text-decoration: none;
}

.app-tile h3 a:hover {
  color: var(--accent);
}

.app-tile > p:not(.status) {
  grid-column: 1 / -1;
  margin: var(--space-3xs) 0 0;
  color: var(--ink-1);
  font-size: var(--step-sm);
  line-height: 1.5;
}

.app-tile .cta-inline {
  grid-column: 1 / -1;
  margin-top: var(--space-2xs);
}

/* Status badges */
.status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem 0.2rem 0.5rem;
  border-radius: 20px;
}

.status::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status.live {
  color: var(--status-live);
  background: var(--status-live-bg);
}
.status.review {
  color: var(--status-review);
  background: var(--status-review-bg);
}
.status.dev {
  color: var(--status-dev);
  background: var(--status-dev-bg);
}

/* CTA link with arrow */
.cta-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  font-size: var(--step-sm);
  transition:
    color var(--duration-fast) var(--ease-out-quart),
    gap var(--duration-med) var(--ease-out-expo);
}

.cta-inline:hover {
  color: var(--accent-hover);
  gap: 0.6rem;
}

.cta-inline svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

/* --- Infrastructure Pillar ---------------------------------------- */
.infra-pillar .hero-kicker {
  margin-bottom: var(--space-2xs);
}


.infra-brief {
  margin-top: var(--space-xl);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-left: calc(-1 * var(--space-md));
}

.infra-brief > .infra-block {
  margin-top: var(--space-md);
  margin-left: var(--space-md);
  width: calc(50% - var(--space-md));
}

@supports (display: grid) {
  .infra-brief {
    margin-left: 0;
    display: -ms-grid;
    display: grid;
    gap: var(--space-md);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .infra-brief > .infra-block {
    margin-top: 0;
    margin-left: 0;
    width: auto;
  }
}

@media (max-width: 700px) {
  .infra-brief > .infra-block {
    width: calc(100% - var(--space-md));
  }
}

@media (max-width: 700px) {
  @supports (display: grid) {
    .infra-brief {
      grid-template-columns: 1fr;
    }
  }
}

.infra-block {
  padding-top: 1rem;
  padding-top: var(--space-md);
  padding-right: 1rem;
  padding-right: var(--space-md);
  padding-bottom: 1.5rem;
  padding-bottom: var(--space-lg);
  padding-left: 1rem;
  padding-left: var(--space-md);
  background-color: #faf8f5;
  background-color: oklch(98% 0.008 82);
  border-width: 1px;
  border-style: solid;
  border-color: #e2ddd6;
  border-color: oklch(89% 0.012 80);
  -webkit-border-radius: 0.5rem;
  -webkit-border-radius: 8px;
  border-radius: 0.5rem;
  border-radius: 8px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.infra-block h3 {
  font-family: var(--font-body);
  font-size: var(--step-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #3c3328;
  color: oklch(26% 0.025 70);
  margin-bottom: var(--space-2xs);
}

.infra-block p {
  margin: 0;
  color: #5d5448;
  color: oklch(38% 0.02 72);
  font-size: var(--step-sm);
  line-height: 1.55;
}
.infra-coda {
  margin-top: var(--space-lg);
  color: var(--ink-2);
  font-size: var(--step-sm);
  font-style: italic;
  max-width: 60ch;
}

/* --- App Portfolio (apps.html) ------------------------------------ */
.app-entry {
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--cream-0);
  border: 1px solid var(--line-subtle);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition:
    box-shadow var(--duration-med) var(--ease-out-quart),
    transform var(--duration-med) var(--ease-out-quart);
}

.app-entry:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.apps-list {
  margin-top: var(--space-xl);
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 700px) {
  .apps-list {
    grid-template-columns: 1fr;
  }
}

.app-entry-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid var(--line-subtle);
  object-fit: cover;
  flex-shrink: 0;
}

.app-entry-header .app-title-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
}

.app-copy {
  display: grid;
  gap: var(--space-xs);
}

.app-title-group h2 {
  font-family: var(--font-display);
  font-size: var(--step-xl);
  font-weight: 480;
}

.app-copy p {
  margin: 0;
  color: var(--ink-1);
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin-top: var(--space-2xs);
}

.pill-link {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: var(--step-xs);
  font-weight: 500;
  color: var(--ink-1);
  transition:
    border-color var(--duration-fast) var(--ease-out-quart),
    color var(--duration-fast) var(--ease-out-quart),
    background var(--duration-fast) var(--ease-out-quart);
}

.pill-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* --- Team (about.html) -------------------------------------------- */
.team-layout {
  margin-top: var(--space-xl);
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 640px) {
  .team-layout {
    grid-template-columns: 1fr;
  }
}

.person {
  display: grid;
  justify-items: center;
  text-align: center;
  align-content: start;
  gap: var(--space-xs);
  padding: var(--space-lg) var(--space-md);
  background: var(--cream-0);
  border: 1px solid var(--line-subtle);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition:
    box-shadow var(--duration-med) var(--ease-out-quart),
    transform var(--duration-med) var(--ease-out-quart);
}

.person:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.team-photo {
  width: 140px;
  height: 140px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 3px solid var(--cream-2);
  border-radius: 50%;
  margin-bottom: var(--space-2xs);
}

.role {
  font-size: var(--step-xs);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.person > p:last-child {
  color: var(--ink-1);
  font-size: var(--step-sm);
  text-align: left;
  line-height: 1.5;
}

/* --- FAQ (support.html) ------------------------------------------- */
.faq-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: var(--space-xl);
}

.faq-item {
  padding: var(--space-md);
  border: 1px solid var(--line-subtle);
  border-radius: 8px;
  background: var(--cream-0);
  box-shadow: var(--shadow-sm);
}

.faq-item h3 {
  font-family: var(--font-body);
  font-size: var(--step-base);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.faq-item p {
  margin: 0;
  color: var(--ink-1);
  font-size: var(--step-sm);
}

/* --- Privacy (privacy.html) --------------------------------------- */
.policy-copy p,
.policy-copy li {
  color: var(--ink-1);
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-lg);
  font-size: var(--step-sm);
}

.policy-table th,
.policy-table td {
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
  padding: 0.75rem 0.7rem;
}

.policy-table th {
  color: var(--ink-0);
  font-weight: 700;
  font-size: var(--step-xs);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.policy-table td {
  color: var(--ink-1);
}

/* --- Footer ------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
  background: var(--cream-2);
}

.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter-min);
  display: grid;
  gap: var(--space-md) var(--space-xl);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

@media (min-width: 600px) {
  .footer-inner {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }
}

.footer-inner h2 {
  font-family: var(--font-body);
  font-size: var(--step-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: var(--space-2xs);
}

.footer-inner p {
  margin: 0;
  color: var(--ink-1);
  font-size: var(--step-sm);
}

.footer-inner a {
  color: var(--ink-1);
}

.footer-inner a:hover {
  color: var(--accent);
}

.copyright {
  max-width: var(--page-max);
  margin: var(--space-md) auto 0;
  padding: var(--space-sm) var(--page-gutter-min) 0;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: var(--step-xs);
}

@media (min-width: 600px) {
  .copyright {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }
}

/* --- Staggered Page-Load Animation -------------------------------- */
.page-load [data-reveal] {
  opacity: 0;
  -webkit-transform: translate3d(0, 18px, 0);
  transform: translate3d(0, 18px, 0);
  -webkit-animation: rise-fade 700ms var(--ease-out-expo) forwards;
  animation: rise-fade 700ms var(--ease-out-expo) forwards;
  -webkit-animation-delay: calc(100ms + (var(--i, 0) * 65ms));
  animation-delay: calc(100ms + (var(--i, 0) * 65ms));
}

@-webkit-keyframes rise-fade {
  to {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

@keyframes rise-fade {
  to {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

/* --- Scroll-triggered reveal -------------------------------------- */
[data-scroll-reveal] {
  opacity: 0;
  -webkit-transform: translate3d(0, 24px, 0);
  transform: translate3d(0, 24px, 0);
  -webkit-transition:
    opacity 600ms var(--ease-out-expo),
    -webkit-transform 600ms var(--ease-out-expo);
  transition:
    opacity 600ms var(--ease-out-expo),
    transform 600ms var(--ease-out-expo);
}

[data-scroll-reveal].is-visible {
  opacity: 1;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

/* Stagger children within a revealed section */
[data-scroll-reveal] [data-stagger] {
  opacity: 0;
  -webkit-transform: translate3d(0, 16px, 0);
  transform: translate3d(0, 16px, 0);
  -webkit-transition:
    opacity 500ms var(--ease-out-expo),
    -webkit-transform 500ms var(--ease-out-expo);
  transition:
    opacity 500ms var(--ease-out-expo),
    transform 500ms var(--ease-out-expo);
}

[data-scroll-reveal].is-visible [data-stagger] {
  opacity: 1;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  transition-delay: calc(var(--stagger, 0) * 80ms);
}

/* --- Responsive: Desktop asymmetric hero -------------------------- */
@media (min-width: 880px) {
  .hero--split {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    column-gap: var(--space-2xl);
    align-items: end;
  }

  .hero--split .lede {
    grid-column: 1;
  }

  .hero-aside {
    grid-column: 2;
    grid-row: 1 / -1;
    justify-self: end;
    align-self: start;
    margin-top: 0.5rem;
    max-width: 26ch;
    border-left: 2px solid var(--line);
    padding-left: var(--space-sm);
  }
}

/* --- Responsive: Mobile ------------------------------------------- */
@media (max-width: 700px) {
  .masthead {
    padding-top: 0.72rem;
    padding-bottom: 0.72rem;
  }

  .page {
    padding-top: var(--space-xl);
  }

  .app-entry {
    grid-template-columns: 1fr;
  }

  .app-icon {
    width: 56px;
    height: 56px;
  }

  .app-tile {
    grid-template-columns: 48px 1fr;
  }

  .app-tile .app-tile-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .team-photo {
    width: 120px;
    height: 120px;
  }

  .policy-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* --- Reduced Motion ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .page-load [data-reveal] {
    opacity: 1;
    transform: none;
    animation: none;
  }

  [data-scroll-reveal] {
    opacity: 1;
    transform: none;
  }

  [data-scroll-reveal] [data-stagger] {
    opacity: 1;
    transform: none;
  }
}
