/* SonaR public site. Paper and ink, Instrument Serif over DM Sans. */
:root {
  --ink: #101112;
  --paper: #f7f6f2;
  --line: #d8d6d0;
  --muted: #4f5251;
  --on-dark: #f3f1ea;
  --on-dark-muted: #b9b6ad;
  --on-dark-line: #34363a;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  --gutter: 5vw;
  /* Hero shading: a band at the top for the nav, and a gradient behind the text block (.hero-foot::before). No full overlay.
     Strengths were measured so the white text keeps WCAG AA contrast over the brightest snow and cloud
     (4.5:1 for small text, 3:1 for large) at 1440px and 390px. Re-measure if the photo or hero text changes. */
  --hero-shade: 8, 9, 10;
  --hero-top: 0.6;
  --hero-top-hold: 0.5;
  --hero-top-hold-at: 12%;
  --hero-top-end: 20%;
  --hero-lead: 120px;
  --hero-mid: 0.65;
  --hero-bottom: 0.7;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.eyebrow { margin: 0 0 24px; font-size: 12px; font-weight: 400; letter-spacing: 0.32em; text-transform: uppercase; }
.muted { color: var(--muted); }

.skip { position: absolute; left: -999px; top: 0; z-index: 10; background: var(--ink); color: #fff; padding: 12px 16px; }
.skip:focus { left: 16px; top: 16px; }

/* Hero */
/* A flex column: nav row at the top, text block pushed to the bottom. Nothing is absolutely positioned except the
   photo and shading, so the text can never ride up into the nav; the hero grows taller if its content needs it. */
.hero { position: relative; display: flex; flex-direction: column; min-height: 560px; min-height: max(68vh, 560px); min-height: max(68svh, 560px); overflow: hidden; background: var(--ink); color: #fff; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(var(--hero-shade), var(--hero-top)) 0%, rgba(var(--hero-shade), var(--hero-top-hold)) var(--hero-top-hold-at), rgba(var(--hero-shade), 0) var(--hero-top-end));
}
.hero-bar { position: relative; width: 100%; padding-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { font: 400 38px/1 var(--serif); letter-spacing: -0.02em; color: #fff; }
.hero nav, .masthead nav { display: flex; flex-wrap: wrap; gap: 32px; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; }
.hero nav a, .masthead nav a { color: #fff; }
.hero nav .login { padding: 10px 18px; margin: -10px 0; border: 1px solid rgba(255, 255, 255, 0.7); }
.hero nav .login:hover { background: #fff; color: var(--ink); text-decoration: none; }
.hero-foot { position: relative; z-index: 1; margin-top: auto; padding-top: 32px; padding-bottom: 72px; }
/* The bottom gradient is attached to the text block, so it always sits behind the text whatever the hero's height:
   it fades in over --hero-lead above the block and is at full strength from the top of the block down. */
.hero-foot::before {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; top: calc(-1 * var(--hero-lead)); pointer-events: none;
  background: linear-gradient(to bottom, rgba(var(--hero-shade), 0) 0, rgba(var(--hero-shade), var(--hero-mid)) var(--hero-lead), rgba(var(--hero-shade), var(--hero-bottom)) 100%);
}
.hero-foot-inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.hero-copy { max-width: 820px; }
.hero-copy .eyebrow { color: #e4e1d8; }
.hero h1 { margin: 0; font: 400 clamp(44px, min(6.4vw, 11vh), 104px)/0.96 var(--serif); font-size: clamp(44px, min(6.4vw, 11svh), 104px); letter-spacing: -0.025em; color: #fff; }
.hero-sub { margin: 20px 0 0; max-width: 46ch; font: 300 20px/1.45 var(--sans); color: #e4e1d8; }
.hero-link { display: inline-block; margin-top: 18px; padding-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.6); font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: #fff; }
.hero-link:hover { text-decoration: none; border-bottom-color: #fff; }
.hero-place { margin: 0; font-size: 11px; line-height: 1.9; letter-spacing: 0.22em; text-transform: uppercase; text-align: right; color: #e4e1d8; }

/* Shorter hero for inner pages with a photo (About) */
.hero-short { min-height: max(45vh, 360px); min-height: max(45svh, 360px); }
/* The short hero has less room above the nav to fade over, so its top band holds a little longer. */
.hero-short { --hero-top: 0.65; --hero-top-hold: 0.55; --hero-top-hold-at: 20%; --hero-top-end: 30%; }
.hero-short .hero-photo { object-position: center 72%; }
.hero-short h1 { font-size: clamp(40px, min(5.2vw, 9vh), 80px); font-size: clamp(40px, min(5.2vw, 9svh), 80px); }
.hero nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }

/* Statement */
.statement { padding-top: 80px; padding-bottom: 64px; }
.statement-text { margin: 0; max-width: 22ch; font: italic 400 clamp(36px, 4.6vw, 56px)/1.04 var(--serif); letter-spacing: -0.02em; }

/* Approach: three points joined by a line. Inline SVG, horizontal on desktop and vertical on phones. */
.approach-band { border-top: 1px solid var(--line); }
.approach { padding-top: 64px; padding-bottom: 64px; }
.approach-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.approach-steps li { position: relative; padding: 36px 32px 0 0; }
.approach-mark { position: absolute; left: 0; top: 0; width: 100%; height: 15px; overflow: visible; }
.approach-mark line { stroke: var(--ink); stroke-width: 1; }
.approach-mark circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.approach-mark .v { display: none; }
.approach-steps h3 { margin: 0 0 8px; font: italic 400 clamp(30px, 3vw, 40px)/1.1 var(--serif); }
.approach-steps p { margin: 0; max-width: 30ch; font-size: 16px; line-height: 1.6; color: var(--muted); }

/* Kept rows */
.row { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); }
.row picture { flex: 1 1 520px; min-width: 0; }
.row img { width: 100%; height: 400px; object-fit: cover; }
.row-copy { flex: 1 1 420px; min-width: 0; padding: 48px var(--gutter); display: flex; flex-direction: column; justify-content: center; }
.row-reverse { flex-direction: row-reverse; }
.numeral { margin: 0 0 20px; font-size: 13px; font-weight: 500; letter-spacing: 0.3em; }
.row-copy h2 { margin: 0 0 20px; font: italic 400 clamp(38px, 4vw, 48px)/1.05 var(--serif); }
.row-copy p:last-child { margin: 0; max-width: 40ch; font-size: 17px; line-height: 1.65; color: var(--muted); }

/* At a glance (home): facts only, never returns or performance */
.glance-band { border-top: 1px solid var(--line); }
.glance { padding-top: 64px; padding-bottom: 64px; }
.figures { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.figures div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.figures dd { margin: 0; font: 400 clamp(52px, 5.6vw, 80px)/1 var(--serif); letter-spacing: -0.02em; }
.figures dt { margin-top: 12px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

/* Principles */
.principles-band { border-top: 1px solid var(--line); }
.principles { list-style: none; margin: 0 auto; padding-top: 64px; padding-bottom: 64px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.principles li { padding-top: 18px; border-top: 1px solid var(--ink); font: 400 26px/1.15 var(--serif); }

/* Write */
.write { background: var(--ink); color: var(--on-dark); }
.write-inner { padding-top: 64px; padding-bottom: 64px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 40px; }
.write .eyebrow { margin-bottom: 16px; color: #e4e1d8; }
.write h2 { margin: 0; font: 400 clamp(46px, 5.4vw, 84px)/0.95 var(--serif); letter-spacing: -0.02em; color: #fff; }
.write-note { margin: 18px 0 0; font-size: 17px; color: var(--on-dark-muted); }
.write-meta { font-size: 15px; line-height: 1.9; letter-spacing: 0.12em; text-transform: uppercase; }
.write-meta a { color: #fff; }
.write-meta p { margin: 0; color: var(--on-dark-muted); }

/* Footer */
.site-footer { background: var(--ink); color: #a9a69d; border-top: 1px solid var(--on-dark-line); }
.footer-inner { padding-top: 40px; padding-bottom: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; font-size: 13px; line-height: 1.6; }
.footer-inner p { margin: 0; }
.footer-inner p:first-child { max-width: 64ch; }
.footer-inner a { color: var(--on-dark); }
.footer-meta { text-align: right; }
.footer-meta p + p { margin-top: 4px; }

/* About */
.intro-text { max-width: 30ch; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.15; }
.about-sections { padding-bottom: 64px; }
.about-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; padding: 48px 0; border-top: 1px solid var(--line); }
.about-row h2 { margin: 0; font: italic 400 clamp(36px, 3.6vw, 48px)/1.05 var(--serif); }
.about-body p { margin: 0 0 16px; max-width: 60ch; font-size: 17px; line-height: 1.7; color: #2b2d2d; }
.about-body p:last-child { margin-bottom: 0; }
.facts-band { border-top: 1px solid var(--line); }
.facts-wrap { padding-top: 64px; padding-bottom: 64px; }
.facts { margin: 0; max-width: 720px; }
.facts div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font: 400 24px/1.3 var(--serif); }

/* Inner pages (privacy, 404): dark masthead, then paper */
.inner-page { min-height: 100svh; display: flex; flex-direction: column; }
.inner-page main { flex: 1 0 auto; }
.masthead { background: var(--ink); color: #fff; padding-bottom: 32px; }
.page-intro { padding-top: 112px; padding-bottom: 56px; }
.page-intro h1 { margin: 0; max-width: 18ch; font: italic 400 clamp(44px, 5.4vw, 84px)/1 var(--serif); letter-spacing: -0.02em; }
.page-intro .lede { margin: 28px 0 0; max-width: 56ch; font-size: 17px; line-height: 1.65; color: var(--muted); }
.prose { padding-bottom: 120px; }
.prose > div { max-width: 68ch; border-top: 1px solid var(--line); padding-top: 24px; }
.prose h2 { margin: 48px 0 12px; font: 400 32px/1.15 var(--serif); }
.prose h2:first-child { margin-top: 24px; }
.prose p, .prose li { font-size: 17px; line-height: 1.7; color: #2b2d2d; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 1.2em; }
.prose a, .page-intro a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.notfound { padding-bottom: 160px; }
.notfound a { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; }

/* Phones */
@media (max-width: 700px) {
  /* Phones: the home hero is taller and drops the coordinates, so the text sits lower and more of the photo stays clear. */
  :root { --gutter: 22px; }
  .hero:not(.hero-short) { min-height: max(78vh, 560px); min-height: max(78svh, 560px); }
  .hero-place { display: none; }
  .hero-foot { padding-bottom: 40px; }
  .hero nav { gap: 20px; }
  .wordmark { font-size: 32px; }
  .statement { padding-top: 56px; padding-bottom: 48px; }
  .row picture { flex-basis: 100%; }
  .row img { height: 260px; }
  .row-copy { padding: 32px var(--gutter) 40px; }
  .hero-sub { font-size: 17px; }
  .approach { padding-top: 48px; padding-bottom: 48px; }
  .approach-steps { grid-template-columns: 1fr; }
  .approach-steps li { padding: 0 0 32px 36px; }
  .approach-steps li:last-child { padding-bottom: 0; }
  .approach-mark { top: 9px; width: 15px; height: 100%; }
  .approach-mark .h { display: none; }
  .approach-mark .v { display: inline; }
  .glance { padding-top: 48px; padding-bottom: 48px; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .about-sections { padding-bottom: 48px; }
  .about-row { grid-template-columns: 1fr; gap: 16px; padding: 32px 0; }
  .facts-wrap { padding-top: 48px; padding-bottom: 48px; }
  .facts div { grid-template-columns: 112px minmax(0, 1fr); gap: 16px; }
  .footer-meta { text-align: left; }
  .principles { padding-top: 48px; padding-bottom: 48px; }
  .write-inner { padding-top: 48px; padding-bottom: 48px; }
  .page-intro { padding-top: 72px; }
  .prose { padding-bottom: 80px; }
  .notfound { padding-bottom: 112px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Approach draw-in: driven by scrolling, only where supported and only if reduced motion is not requested.
   Elsewhere the diagram simply shows complete. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .approach-steps { view-timeline: --approach block; }
    .approach-mark line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: approach-draw linear both; animation-timeline: --approach; }
    .approach-mark circle { transform-box: fill-box; transform-origin: center; animation: approach-dot linear both; animation-timeline: --approach; }
    /* Finishes while the diagram is still in the lower part of the screen. */
    .approach-steps li:nth-child(1) circle { animation-range: cover 2% cover 6%; }
    .approach-steps li:nth-child(1) line { animation-range: cover 5% cover 12%; }
    .approach-steps li:nth-child(2) circle { animation-range: cover 11% cover 15%; }
    .approach-steps li:nth-child(2) line { animation-range: cover 14% cover 21%; }
    .approach-steps li:nth-child(3) circle { animation-range: cover 20% cover 24%; }
  }
}
@keyframes approach-draw { to { stroke-dashoffset: 0; } }
@keyframes approach-dot { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
