/* solstone.app — the shared site system: the sun-arc ground, the header, the
   footer, three buttons, the panels, the one early-days notice, and the
   width scale. Load after tokens.css (and tokens-dark.css on a page that has a dark
   appearance), and after base.css where a page still uses it.

   Type: the named text styles (display, heading, lede, body, eyebrow, text
   action, meta), published at /brand/system#type and set out below. Comfortaa
   Bold for the page title, Inter for everything else. Inter is self-hosted here;
   the site never loads a font service. */

@font-face { font-family: 'Inter'; src: url('inter-latin.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('inter-latin-bold.woff2') format('woff2'); font-weight: 600 700; font-style: normal; font-display: swap; }

:root {
  /* width scale: one content width, one prose width */
  --w-content: 1120px;
  --w-prose: 640px;
  --gutter: clamp(16px, 4vw, 32px);
  --band-gap: clamp(20px, 4vw, 40px);

  /* the sheet text sits on over the sun arc: one opaque paper surface, no blur,
     no stack of floating cards. The sun shows around it, never through it. */
  --sheet: var(--cream-bright);
  --sheet-solid: var(--cream-bright);
  --sheet-line: var(--hairline);
  --panel-shadow: 0 1px 2px rgb(90 60 20 / 0.04), 0 8px 24px -12px rgb(90 60 20 / 0.14);
  --pop-shadow: 0 1px 2px rgb(90 60 20 / 0.06), 0 10px 30px rgb(90 60 20 / 0.10);

  /* sun-arc engine values (read by sunarc.js) */
  --sunarc-ground-light-day: #FEFCF8;
  --sunarc-arc-angle: 36deg;
  --sunarc-bow-ratio: 0.07919;
  --sunarc-diameter-ratio: 1.6180339887;
  --sunarc-overshoot: 1;
  --sunarc-envelope-edge: 0.22;
  --sunarc-peak-opacity: 0.55;
  --sunarc-peak-opacity-dark: 0.20;
  --sunarc-twilight-minutes: 30;
  --sunarc-ground-light-night: #AEA393;
  --sunarc-ground-light-deep: #8C806E;
  --sunarc-ground-dark-day: #392E26;
  --sunarc-ground-dark-night: #2E241C;
  --sunarc-ground-dark-deep: #281E17;
  --sunarc-glow-color: #FFCC33;
  --sunarc-glow-radius-ratio: 1.6180339887;
  --sunarc-glow-day-alpha: 0.22;
  --sunarc-glow-mid-stop: 38%;
  --sunarc-glow-mid-ratio: 0.45;
  --sunarc-twilight-radius-ratio: 2.6180339887;
  --sunarc-twilight-alpha-dark: 0.62;
  --sunarc-twilight-alpha-light: 0.95;
  --sunarc-twilight-sink: 0.10;
  --sunarc-true-dark-min: 180;
  --sunarc-sunrise: #FFF3CF;
}
/* a page with a dark appearance carries body.both; its containers follow the owner's setting */
@media (prefers-color-scheme: dark) {
  body.both {
    --sheet: var(--cream);
    --sheet-solid: var(--cream);
    --sheet-line: var(--hairline);
    --panel-shadow: 0 1px 2px rgb(0 0 0 / 0.20), 0 8px 24px -12px rgb(0 0 0 / 0.30);
    --pop-shadow: 0 1px 2px rgb(0 0 0 / 0.20), 0 10px 30px rgb(0 0 0 / 0.22);
  }
}

/* ---- the ground stack: sunrise gradient (the light day ground) → twilight → halo → sun ---- */
body.sun, body.sunrise { background: var(--sunarc-mixed, var(--sunarc-ground-light-day)); }
.ground-sunrise {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: var(--sunrise-day, 1);
  background:
    radial-gradient(ellipse 900px 420px at 50% -140px, rgb(255 204 51 / 0.30) 0%, rgb(255 204 51 / 0) 70%),
    linear-gradient(180deg, #FFF3CF 0%, #FCF3E0 24%, #FEFCF8 58%, #FFFFFF 100%);
}
.sunarc { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.sunarc-twilight, .sunarc-glow, .sunarc-sun { position: absolute; pointer-events: none; opacity: 0; }
.sunarc-sun svg { width: 100%; height: 100%; display: block; }
.page { position: relative; z-index: 2; width: 100%; min-height: 100vh; display: flex; flex-direction: column; }
.page > main { flex: 1 0 auto; }

/* ---- layout ---- */
.wrap { width: min(var(--w-content), 100% - 2 * var(--gutter)); margin-inline: auto; }
/* Panels: each band is its own paper panel, and the sun arc shows in the gaps
   between them, so the page keeps a rhythm and text never sits on the sun. A panel
   is an opaque surface with a quiet edge, not frosted glass; inside it, objects (a
   quoted answer, a product shot, a service) may be cards, but nothing nests deeper. */
.band, .notice-wrap {
  background: var(--sheet); border: 1px solid var(--sheet-line); border-radius: 18px;
  box-shadow: var(--panel-shadow);
}

/* ---- buttons: three and no more (the third, .btn-text, is the text action) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-sm, 9px); border: 0;
  font-family: var(--font-body); font-weight: 600; font-size: 17px; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn-primary { background: var(--orange); color: var(--ink-on-brand, #1A1A1A); }
.btn-primary:hover { background: #DB8330; color: var(--ink-on-brand, #1A1A1A); }
.btn-secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--hairline-2); }
.btn-secondary:hover { border-color: var(--ink-faint); color: var(--ink); }
.btn-text { font-family: var(--font-body); font-size: 16px; font-weight: 700; line-height: 1.4; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- store badges: the official App Store and Google Play artwork, unaltered.
   Same visible height; Apple's minimum is 40px on screen. ---- */
.store-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.store-badge { display: inline-block; line-height: 0; border-radius: 9px; }
.store-badge img { height: 48px; width: auto; display: block; }

/* ---- header ----
   A small panel like the bands below it. It is its own stacking context so the
   open menu panel paints above the page. */
.site-header { position: relative; z-index: 10; padding-top: 12px; width: min(var(--w-content), 100% - 2 * var(--gutter)); margin-inline: auto; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px 10px 18px; border-radius: 16px; background: var(--sheet); border: 1px solid var(--sheet-line); box-shadow: var(--panel-shadow); }
.site-header .lockup { display: block; line-height: 0; padding: 4px 0; }
.site-header .lockup img { height: 32px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn), .site-menu nav a { color: var(--ink); text-decoration: none; font-family: var(--font-body); font-size: 15px; font-weight: 500; padding: 10px 12px; border-radius: 8px; }
.site-nav a:not(.btn):hover { background: rgb(26 26 26 / 0.05); }
.site-nav a[aria-current="page"]:not(.btn) { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--orange); }
.site-nav .btn { margin-left: 8px; }
.header-actions, .site-menu { display: none; }
.site-menu { position: relative; }
.site-header details.site-menu { border: 0; margin: 0; padding: 0; }
.site-menu summary { list-style: none; cursor: pointer; min-height: 40px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--hairline-2); border-radius: var(--radius-sm, 9px); font: 600 15px var(--font-body); color: var(--ink); padding: 0 12px; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu[open] nav { position: absolute; right: 0; top: 48px; z-index: 5; display: flex; flex-direction: column; min-width: 220px; padding: 8px; border-radius: 14px; background: var(--sheet-solid); border: 1px solid var(--sheet-line); box-shadow: var(--pop-shadow); }
.site-menu[open] nav a { padding: 12px; }
@media (max-width: 860px) {
  .site-nav { display: none; }
  .header-actions { display: flex; gap: 8px; align-items: center; }
  .site-menu { display: inline-block; }
  .site-header .lockup img { height: 28px; }
  .site-header .bar { padding: 8px 8px 8px 14px; }
}
@media (max-width: 360px) {
  .site-header .lockup img { height: 24px; }
  .site-header .bar { gap: 8px; padding: 8px 6px 8px 10px; }
  .header-actions { gap: 6px; }
  .header-actions .btn-sm { padding: 0 12px; font-size: 14px; }
  .site-menu summary { padding: 0 10px; font-size: 14px; }
}

/* ---- the one early-days notice: its own small panel on the orange wash ---- */
.early-days {
  display: block; max-width: none; width: auto; margin: 0; text-align: left; font-style: normal;
  padding: clamp(18px, 3vw, 26px) clamp(22px, 4vw, 44px); border: 0; border-radius: 0;
  background: none; color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.55;
}
.early-days .stage-label { font-family: var(--font-display); font-weight: 700; color: var(--ink); margin-right: 6px; }
.early-days a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.notice-wrap { width: min(var(--w-content), 100% - 2 * var(--gutter)); margin: var(--band-gap) auto 0; background: var(--orange-wash); border-color: var(--hairline-2); box-shadow: none; }

/* ---- footer ---- */
.site-footer { width: min(var(--w-content), 100% - 2 * var(--gutter)); margin: var(--band-gap) auto 0; padding: 0 0 28px; font-family: var(--font-body); text-align: left; color: var(--ink); }
.site-footer .footer-row { padding: 22px; background: var(--sheet); border: 1px solid var(--sheet-line); border-radius: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 24px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.site-footer nav a { color: var(--ink); text-decoration: none; padding: 6px 0; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer .fine { font-size: 13.5px; line-height: 1.5; color: var(--ink-faint); max-width: 46ch; margin: 0; }
.site-footer .fine a { color: var(--ink-faint); }

/* ---- the page: type, links, bands ----
   Every page carries body.sun.both and these defaults. Ink links with an
   underline. Orange is a tint behind words, and the only orange words are the
   eyebrow and the text action. The h1 is the display style, the h2 the heading,
   .lede the lede and .file-line the meta style; the named classes follow. */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:where(.band) { margin-top: var(--band-gap); }
:where(.band-inner) { padding: clamp(22px, 4vw, 44px); }
:where(.page) h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; color: var(--ink); text-transform: lowercase; }
:where(.page) h2 { font-family: var(--font-body); font-weight: 700; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 12px; }
:where(.page) h3 { font-family: var(--font-body); font-weight: 600; font-size: 18px; line-height: 1.3; color: var(--ink); margin: 22px 0 6px; }
:where(.page) p + p { margin-top: 12px; }
:where(.lead, .lede) { margin-top: 14px; font-size: 19px; line-height: 1.55; color: var(--ink-soft); max-width: 40em; }
:where(.muted) { color: var(--ink-soft); }
:where(.page) pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 0.87rem/1.65 var(--font-mono); background: var(--cream-bright); border: 1px solid var(--hairline-2); color: var(--ink); border-radius: 9px; padding: 14px; margin-top: 12px; }
:where(.page) code { font-family: var(--font-mono); font-size: 0.9em; overflow-wrap: anywhere; }
:where(.band details) { border-top: 1px solid var(--hairline); margin-top: 18px; }
:where(.band details summary) { cursor: pointer; padding: 12px 0; min-height: 44px; font-weight: 600; color: var(--ink); }
:where(.detail-body) { padding: 0 0 10px; }
:where(.actions) { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 22px; }
:where(.file-line) { flex-basis: 100%; font-size: 13.5px; line-height: 1.5; color: var(--ink-faint); margin: 0; }
:where(.links) { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 22px; }
:where(.links a) { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
:where(.links a:hover) { text-decoration: underline; }
:where(.prose-col) { max-width: calc(var(--w-prose) + 2 * clamp(22px, 4vw, 44px)); }
/* A band holding only a prose column is that column's width, on the shared left edge, with the sun beside it. */
@media (min-width: 861px) {
  .band:has(> .band-inner.prose-col:only-child) {
    width: calc(var(--w-prose) + 2 * clamp(22px, 4vw, 44px));
    margin-left: calc((100% - min(var(--w-content), 100% - 2 * var(--gutter))) / 2);
    margin-right: auto;
  }
}

/* ---- the named text styles ----
   The brand system's type scale, published at /brand/system#type. The defaults
   above already wear them (h1, h2, body, .lede, .file-line, .btn-text); these
   classes put one on any other element that plays the role. Only the eyebrow
   and the text action are orange, in text ink, never the logo's orange. */
.ts-eyebrow { display: flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: 13px; font-weight: 700; line-height: 1.3; letter-spacing: 0; text-transform: none; color: var(--orange-text-aa); }
.ts-eyebrow::before { content: ""; flex: none; width: 18px; height: 2px; border-radius: 2px; background: var(--orange); }
.ts-display { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; color: var(--ink); text-transform: lowercase; }
.ts-heading { font-family: var(--font-body); font-weight: 700; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
.ts-lede { font-family: var(--font-body); font-size: 19px; line-height: 1.55; color: var(--ink-soft); }
.ts-body { font-family: var(--font-body); font-size: 17px; line-height: 1.6; color: var(--ink); }
.ts-action { font-family: var(--font-body); font-size: 16px; font-weight: 700; line-height: 1.4; }
a.ts-action, .ts-action a, .btn-text { color: var(--orange-text-aa); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a.ts-action:hover, .ts-action a:hover, .btn-text:hover { color: var(--orange-text-aa); text-decoration-thickness: 2px; }
.ts-meta { font-family: var(--font-body); font-size: 13.5px; line-height: 1.5; color: var(--ink-faint); }

@media (max-width: 640px) {
  .btn-block-sm { width: 100%; white-space: normal; text-align: center; line-height: 1.25; padding-block: 12px; }
}

/* ---- accessibility helpers ---- */
.skip-link { position: fixed; top: 0; transform: translateY(-120%); left: 0.5rem; z-index: 1000; background: var(--ink); color: var(--paper); font-family: var(--font-body); padding: 0.6rem 1rem; border-radius: 0 0 6px 6px; text-decoration: none; }
.skip-link:focus { transform: none; }
main:focus { outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
