/*
 * Ruuya web design system — faithful sibling of Ruuya Design Language v2
 * (Quiet Page / Night Room, Source Serif 4 + Commissioner, RuyaCloudSea,
 * RuyaMetrics 4 px grid, zero cream, zero orange/amber/peach, zero scripts,
 * zero external origins).
 */

/* ------------------------------------------------------------------ Fonts (self-hosted OFL) */

@font-face {
  font-family: "Source Serif 4 Display";
  src: url("/assets/fonts/SourceSerif4Display-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4 Subhead";
  src: url("/assets/fonts/SourceSerif4Subhead-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/SourceSerif4-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/SourceSerif4-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/SourceSerif4-Medium.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Commissioner";
  src: url("/assets/fonts/Commissioner-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Commissioner";
  src: url("/assets/fonts/Commissioner-Medium.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ Tokens: Quiet Page (light) */

:root {
  --bg: #f0f7f9;
  --surface: #e3eaec;
  --surface-pressed: #d7dee0;
  --elevated: #f9fdfe;
  --text: #111d23;
  --secondary: #555b5d;
  --tertiary: #63696b;
  --hairline: rgba(17, 29, 35, 0.14);
  --hairline-w: 1px;
  --icon-muted: #7c8487;
  --accent: #56708a;
  --accent-text: #3f5a70;
  --action: #111d23;
  --action-pressed: #2a3840;
  --on-action: #f0f7f9;

  /* Sky & cloud sea (RuyaCloudSea light) */
  --sky-0: #d7e2e8;
  --sky-1: #e7ecec;
  --sky-2: #ecf3f5;
  --sky-3: #e9f0f2;
  --sky-4: #eceeef;
  --melt-tint: #e3eaec;
  --cloud-far: url("/assets/sky/sky-far-light.webp");
  --cloud-mid: url("/assets/sky/sky-mid-light.webp");
  --cloud-near: url("/assets/sky/sky-near-light.webp");
  --sky-sun-opacity: 0.92;

  /* Surface elevation */
  --header-bg: rgba(240, 247, 249, 0.78);
  --card-shadow: 0 1px 2px rgba(17, 29, 35, 0.04), 0 16px 40px -24px rgba(17, 29, 35, 0.16);
  --painting-shadow: 0 2px 6px rgba(17, 29, 35, 0.08), 0 28px 60px -24px rgba(17, 29, 35, 0.28);
  --mark-bg: rgba(240, 247, 249, 0.94);
  --mark-rim: rgba(124, 132, 135, 0.7);
  --painting-filter: none;

  /* Type stacks */
  --font-display: "Source Serif 4 Display", "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-subhead: "Source Serif 4 Subhead", "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Commissioner", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Metrics (RuyaMetrics 4px grid) */
  --gutter: 24px;
  --measure-doc: 680px;
  --measure-home: 1020px;
  --radius-painting: 16px;
  --radius-row: 20px;
  --radius-card: 28px;

  color-scheme: light dark;
}

/* ------------------------------------------------------------------ Tokens: Night Room (dark) */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1519;
    --surface: #222d31;
    --surface-pressed: #2c383d;
    --elevated: #15232a;
    --text: #e6edef;
    --secondary: #a3aeb0;
    --tertiary: #8c979a;
    --hairline: rgba(230, 237, 239, 0.12);
    --icon-muted: #7f8a8d;
    --accent: #8fafc0;
    --accent-text: #a9bed0;
    --action: #a9c0cc;
    --action-pressed: #93a9b5;
    --on-action: #111d23;

    /* Sky & cloud sea (RuyaCloudSea dark) */
    --sky-0: #060e12;
    --sky-1: #09141a;
    --sky-2: #0e1c23;
    --sky-3: #16262e;
    --sky-4: #0b1519;
    --melt-tint: #0b1519;
    --cloud-far: url("/assets/sky/sky-far-dark.webp");
    --cloud-mid: url("/assets/sky/sky-mid-dark.webp");
    --cloud-near: url("/assets/sky/sky-near-dark.webp");
    --sky-sun-opacity: 0;

    --header-bg: rgba(11, 21, 25, 0.78);
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.22), 0 20px 44px -24px rgba(0, 0, 0, 0.55);
    --painting-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 32px 68px -24px rgba(0, 0, 0, 0.72);
    --mark-bg: rgba(21, 35, 42, 0.94);
    --mark-rim: rgba(127, 138, 141, 0.7);
    /* Subtle RuyaNightGrade-inspired evening cool-down over daylight paintings */
    --painting-filter: brightness(0.86) saturate(0.92) contrast(1.03);
  }
}

/* ------------------------------------------------------------------ Increase Contrast (RuyaPalette.strengthened) */

@media (prefers-contrast: more) {
  :root {
    --secondary: #313b40;
    --tertiary: #555b5d;
    --hairline: rgba(17, 29, 35, 0.3);
    --hairline-w: 1.5px;
  }

  .beat-card,
  .lenses-card,
  .promise-card {
    background: var(--elevated);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body.page-home footer.site {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-color-scheme: dark) and (prefers-contrast: more) {
  :root {
    --secondary: #c7cfd1;
    --tertiary: #a3aeb0;
    --hairline: rgba(230, 237, 239, 0.26);
    --hairline-w: 1.5px;
  }
}

/* ------------------------------------------------------------------ Base & Script Metrics */

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle misty top atmospheric wash on document pages */
body.page-doc,
body.page-404 {
  background-image: linear-gradient(180deg, var(--sky-0) 0%, var(--sky-2) 120px, var(--bg) 320px);
  background-repeat: no-repeat;
}

a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--accent-text) 42%, transparent);
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

a:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* Non-Latin & tall-script leading adjustments (RuyaType.swift §2.3) */
:lang(ar), :lang(fa), :lang(ur),
:lang(hi), :lang(bn), :lang(th),
:lang(gu), :lang(pa), :lang(kn),
:lang(ml), :lang(or), :lang(ta), :lang(te) {
  line-height: 1.82;
}

:lang(ar) h1, :lang(fa) h1, :lang(ur) h1,
:lang(he) h1, :lang(hi) h1, :lang(bn) h1,
:lang(th) h1, :lang(ja) h1, :lang(ko) h1, :lang(zh) h1,
:lang(gu) h1, :lang(pa) h1, :lang(kn) h1,
:lang(ml) h1, :lang(or) h1, :lang(ta) h1, :lang(te) h1,
:lang(ar) h2, :lang(fa) h2, :lang(ur) h2,
:lang(he) h2, :lang(hi) h2, :lang(bn) h2,
:lang(th) h2, :lang(ja) h2, :lang(ko) h2, :lang(zh) h2 {
  letter-spacing: 0;
  line-height: 1.38;
}

/* ------------------------------------------------------------------ Header */

header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
  border-bottom: var(--hairline-w) solid var(--hairline);
}

.site-header-inner {
  max-width: var(--measure-doc);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
}

body.page-home .site-header-inner {
  max-width: var(--measure-home);
}

header.site .brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  padding: 0;
  margin-inline-start: -8px;
}

header.site .brand img {
  display: block;
  height: 44px;
  width: auto;
  margin: -4px 0;
}

header.site .brand .brand-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  header.site .brand .brand-light {
    display: none;
  }
  header.site .brand .brand-dark {
    display: block;
  }
}

header.site nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.33;
  letter-spacing: 0.003em;
}

header.site nav a {
  color: var(--secondary);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  transition: background-color 180ms ease, color 180ms ease;
}

header.site nav a:hover {
  color: var(--text);
  background: var(--surface);
}

header.site nav a[hreflang] {
  color: var(--accent-text);
}

/* ------------------------------------------------------------------ Document Reader (Privacy, Health, Support, Terms) */

main {
  flex: 1 0 auto;
}

body.page-doc main,
body.page-404 main {
  width: 100%;
  max-width: calc(var(--measure-doc) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 48px var(--gutter) 72px;
}

body.page-doc h1,
body.page-404 h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(34px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.018em;
  margin: 0 0 24px;
  color: var(--text);
}

body.page-doc h2 {
  font-family: var(--font-subhead);
  font-weight: 400;
  font-size: clamp(23px, 3.2vw, 28px);
  line-height: 1.24;
  letter-spacing: -0.01em;
  margin: 44px 0 12px;
  padding-top: 24px;
  border-top: var(--hairline-w) solid var(--hairline);
  color: var(--text);
}

body.page-doc h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

body.page-doc h3 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.4;
  margin: 28px 0 8px;
  color: var(--text);
}

body.page-doc p,
body.page-404 p {
  margin: 0 0 16px;
}

body.page-doc strong {
  font-weight: 600;
}

body.page-doc ul,
body.page-doc ol {
  margin: 0 0 20px;
  padding-inline-start: 22px;
}

body.page-doc li {
  margin: 0 0 10px;
}

body.page-doc li::marker {
  color: var(--accent);
}

.table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
  border: var(--hairline-w) solid var(--hairline);
  border-radius: var(--radius-row);
  background: var(--elevated);
  box-shadow: var(--card-shadow);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
}

thead {
  background: var(--surface);
}

th,
td {
  text-align: start;
  vertical-align: top;
  padding: 14px 16px;
  border-bottom: var(--hairline-w) solid var(--hairline);
}

tr:last-child td {
  border-bottom: 0;
}

th {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

td {
  color: var(--text);
}

td strong {
  font-weight: 500;
}

blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-inline-start: 2.5px solid var(--accent);
  background: var(--elevated);
  border-radius: 0 16px 16px 0;
  color: var(--secondary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.58;
}

[dir="rtl"] blockquote {
  border-radius: 16px 0 0 16px;
}

blockquote p:last-child,
blockquote ul:last-child {
  margin-bottom: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface);
  padding: 0.12em 0.42em;
  border-radius: 6px;
}

/* ------------------------------------------------------------------ Home: Living Sky & Bottom ~40% Cloud Sea */

body.page-home main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Fixed sky + bottom ~40% cloud sea backdrop (RuyaCloudSea / RuyaLivingBackground) */
.home-sky {
  --cloud-sea-h: clamp(220px, 40vh, 460px);
  --cloud-sea-h: clamp(220px, 40dvh, 460px);
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-0) 0%, var(--sky-1) 34%, var(--sky-2) 60%, var(--sky-3) 78%, var(--sky-4) 100%);
}

/* Low mist sun (Quiet Page day only, RuyaCloudSea.sunCentre), gently above far cloud horizon */
.hero-sun {
  position: absolute;
  left: 72%;
  bottom: calc(var(--cloud-sea-h) * 0.90);
  width: clamp(280px, 38vw, 480px);
  aspect-ratio: 600 / 160;
  transform: translateX(-50%);
  background: url("/assets/sky/sky-sun.webp") center / contain no-repeat;
  opacity: calc(var(--sky-sun-opacity) * 0.9);
  pointer-events: none;
  z-index: 1;
}

/* Three drifting cloud bands anchored along the bottom ~40% of the viewport ("Bulutların üstünde") */
.hero-clouds {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.cloud {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--cloud-h);
  background-repeat: repeat-x;
  background-position: 0 bottom;
  background-size: auto 100%;
  will-change: background-position;
}

.cloud-far {
  --cloud-h: calc(var(--cloud-sea-h) * 0.42);
  --cloud-w: calc(var(--cloud-h) * 780 / 212);
  bottom: calc(var(--cloud-sea-h) * 0.60);
  background-image: var(--cloud-far);
  animation: cloud-drift-far 180s linear infinite;
}

.cloud-mid {
  --cloud-h: calc(var(--cloud-sea-h) * 0.48);
  --cloud-w: calc(var(--cloud-h) * 1170 / 300);
  bottom: calc(var(--cloud-sea-h) * 0.24);
  background-image: var(--cloud-mid);
  animation: cloud-drift-mid 150s linear infinite;
}

.cloud-near {
  --cloud-h: calc(var(--cloud-sea-h) * 0.62);
  --cloud-w: calc(var(--cloud-h) * 1170 / 432);
  bottom: -2px;
  background-image: var(--cloud-near);
  animation: cloud-drift-near 100s linear infinite;
}

@keyframes cloud-drift-far {
  from { background-position-x: 0; }
  to { background-position-x: calc(var(--cloud-w) * -1); }
}

@keyframes cloud-drift-mid {
  from { background-position-x: calc(var(--cloud-w) * -0.27); }
  to { background-position-x: calc(var(--cloud-w) * -1.27); }
}

@keyframes cloud-drift-near {
  from { background-position-x: calc(var(--cloud-w) * -0.25); }
  to { background-position-x: calc(var(--cloud-w) * -1.25); }
}

.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  min-height: calc(100dvh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(28px, 4.5dvh, 52px) var(--gutter) clamp(120px, 22dvh, 200px);
  background: transparent;
}

.hero-inner {
  position: relative;
  z-index: 4;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Signature square dream painting + lower-trailing lens reading mark */
.painting-frame {
  position: relative;
  width: min(260px, 74vw);
  width: min(clamp(200px, 28dvh, 280px), 74vw);
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-painting);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--painting-shadow);
}

.painting-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--painting-filter);
}

.reading-mark {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--mark-bg);
  border: 1px solid var(--mark-rim);
  display: grid;
  place-items: center;
  color: var(--text);
}

.reading-mark svg {
  width: 18px;
  height: 18px;
  display: block;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(36px, 5.6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin: clamp(22px, 3.2dvh, 36px) 0 14px;
  color: var(--text);
  text-shadow: 0 1px 18px color-mix(in srgb, var(--bg) 72%, transparent);
  max-width: 15ch;
}

.hero p.lede {
  font-family: var(--font-serif);
  font-size: clamp(19px, 2.4vw, 21px);
  line-height: 1.56;
  color: var(--secondary);
  text-shadow: 0 1px 14px color-mix(in srgb, var(--bg) 78%, transparent);
  margin: 0 0 clamp(20px, 3dvh, 28px);
  max-width: 44ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

/* Exact 52px capsule pills (RuyaMetrics.Height.action) */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease, color 180ms ease;
}

.pill-primary {
  background: var(--action);
  color: var(--on-action);
}

.pill-primary:hover {
  background: var(--action-pressed);
  color: var(--on-action);
}

.pill-tonal {
  background: var(--surface);
  color: var(--text);
  border: var(--hairline-w) solid var(--hairline);
}

.pill-tonal:hover {
  background: var(--surface-pressed);
  color: var(--text);
}

.hero-caption {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0.003em;
  color: var(--secondary);
  text-shadow: 0 1px 12px color-mix(in srgb, var(--bg) 90%, transparent);
  margin: 0;
}

/* ------------------------------------------------------------------ Home Sections */

.home-section {
  max-width: var(--measure-home);
  margin: 0 auto;
  padding: 48px var(--gutter);
}

.home-section-head {
  max-width: 580px;
  margin: 0 auto 36px;
  text-align: center;
}

.home-section-head h2 {
  font-family: var(--font-subhead);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--text);
}

.home-section-head p {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.58;
  color: var(--secondary);
  margin: 0;
}

/* Three quiet onboarding beats */
.beats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.beat-card {
  background: color-mix(in srgb, var(--elevated) 92%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: var(--hairline-w) solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 20px 20px 28px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
}

.beat-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-painting);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 24px;
}

.beat-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--painting-filter);
}

.beat-card h3 {
  font-family: var(--font-subhead);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.24;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--text);
}

.beat-card p {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.58;
  color: var(--secondary);
  margin: 0;
}

/* Seven Lenses card (exact thin-stroke RuyaLensGlyph SVGs) */
.lenses-card {
  background: color-mix(in srgb, var(--elevated) 92%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: var(--hairline-w) solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 36px 32px;
  box-shadow: var(--card-shadow);
}

.lenses-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lens-item {
  flex: 1 1 260px;
  max-width: 296px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-row);
  background: var(--bg);
  border: var(--hairline-w) solid var(--hairline);
}

.lens-glyph {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--elevated);
  border: var(--hairline-w) solid var(--hairline);
  display: grid;
  place-items: center;
  color: var(--accent-text);
}

.lens-glyph svg {
  width: 20px;
  height: 20px;
  display: block;
}

.lens-copy {
  min-width: 0;
}

.lens-name {
  display: block;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
}

.lens-note {
  display: block;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.38;
  color: var(--secondary);
  margin-top: 2px;
}

/* Privacy promise surface */
.promise-card {
  background: color-mix(in srgb, var(--elevated) 92%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: var(--hairline-w) solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 40px 36px;
  box-shadow: var(--card-shadow);
}

.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 32px;
  margin: 28px 0 32px;
  padding: 24px 0;
  border-top: var(--hairline-w) solid var(--hairline);
  border-bottom: var(--hairline-w) solid var(--hairline);
}

.promise-point h3 {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 8px;
  color: var(--text);
}

.promise-point p {
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.56;
  color: var(--secondary);
  margin: 0;
}

.promise-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  margin: 0;
}

/* ------------------------------------------------------------------ Footer */

footer.site {
  width: 100%;
  max-width: calc(var(--measure-doc) + var(--gutter) * 2);
  margin: auto auto 0;
  padding: 24px var(--gutter) 48px;
  border-top: var(--hairline-w) solid var(--hairline);
  color: var(--secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
}

body.page-home footer.site {
  position: relative;
  z-index: 1;
  max-width: none;
  margin-top: 24px;
  padding: 24px max(var(--gutter), calc((100% - var(--measure-home)) / 2 + var(--gutter))) 44px;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

footer.site p {
  margin: 0 0 8px;
}

footer.site p:last-child {
  margin-bottom: 0;
  color: var(--tertiary);
}

footer.site a {
  color: var(--secondary);
  text-decoration-color: color-mix(in srgb, var(--secondary) 35%, transparent);
}

footer.site a:hover {
  color: var(--text);
}

/* ------------------------------------------------------------------ Responsive & Reduced Motion */

@media (max-width: 860px) {
  .beats-grid,
  .promise-grid {
    grid-template-columns: 1fr;
  }

  .beat-card {
    padding: 18px 18px 24px;
  }

  .lenses-card,
  .promise-card {
    padding: 28px 22px;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 20px;
  }

  .hero {
    padding: clamp(20px, 3.5dvh, 36px) var(--gutter) clamp(112px, 20dvh, 180px);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .pill {
    width: 100%;
  }

  .site-header-inner {
    padding: 10px var(--gutter);
  }

  header.site .brand img {
    height: 38px;
  }

  .lens-item {
    max-width: none;
  }

  header.site nav a {
    padding: 6px 10px;
    font-size: 14px;
  }

  th,
  td {
    padding: 11px 12px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cloud {
    animation: none;
  }

  a,
  .pill {
    transition: none;
  }
}
