/* Rocky River Apps: shared studio stylesheet (every page). Rooms live in rooms.v3.css.
   Layers: fonts, tokens (primitives, then roles), base, chrome, components, studio pages, media.
   Rule: colour values live only in token blocks; components use var(--role). */

/* ---------- Fonts ---------- */
/* Atkinson Hyperlegible Next (Braille Institute / Applied Design Works), SIL OFL 1.1. Variable 400-800, Latin.
   Metric-matched Arial fallbacks per weight (from the logo team), so the swap does not move text. */
@font-face {
  font-family: "Atkinson Hyperlegible Next"; src: url("/assets/fonts/atkinson-hyperlegible-next-latin-var.v1.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face { font-family: "Atkinson Hyperlegible Next Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 400; size-adjust: 98.85%; ascent-override: 99.55%; descent-override: 31.97%; line-gap-override: 0%; }
@font-face { font-family: "Atkinson Hyperlegible Next Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 500; size-adjust: 101.91%; ascent-override: 96.56%; descent-override: 31.01%; line-gap-override: 0%; }
@font-face { font-family: "Atkinson Hyperlegible Next Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600; size-adjust: 96.70%; ascent-override: 101.76%; descent-override: 32.68%; line-gap-override: 0%; }
@font-face { font-family: "Atkinson Hyperlegible Next Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 700; size-adjust: 98.86%; ascent-override: 99.53%; descent-override: 31.96%; line-gap-override: 0%; }
@font-face { font-family: "Atkinson Hyperlegible Next Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 800; size-adjust: 102.59%; ascent-override: 95.91%; descent-override: 30.80%; line-gap-override: 0%; }

/* ---------- Tokens ---------- */
:root {
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible Next Fallback", system-ui, sans-serif; /* family swap: this line */

  /* Studio primitives (logo team sheet) */
  --granite: #23272D;
  --granite-2: #4E5660;
  --snowfield: #F2F4F3;
  --white: #FFFFFF;
  --rule-paper: #D4D9D7;
  --stone-paper: #DCE1DF;   /* the closing mark on paper */
  --river: #1D6CB3;         /* studio colour: buttons, focus */
  --river-ink: #1B66AA;     /* River for link text: 5.4:1 on paper */
  --river-light: #62B3EC;   /* the cut; links and focus on dark */
  --graphite: #181B1F;
  --graphite-2: #22262B;
  --rule-night: #33373D;
  --stone-night: #2A2E34;   /* the closing mark on graphite */
  --frost: #E4E8EB;
  --mist: #A8B0B9;
  --shade: rgb(20 24 30 / .16);
  --shade-night: rgb(0 0 0 / .45);
  --mask: #000;
  --icon-night: #0B0C0D;    /* the tile iOS draws behind a dark-mode icon */

  /* Roles (light) */
  --bg: var(--snowfield);
  --surface: var(--white);
  --ink: var(--granite);
  --ink-2: var(--granite-2);
  --ink-3: var(--granite-2);
  --rule: var(--rule-paper);
  --link: var(--river-ink);
  --focus: var(--river);
  --ring: var(--river);      /* focus ring on studio ground around a room-coloured element (doors) */
  --btn-bg: var(--river);
  --btn-ink: var(--white);
  --mark-ink: var(--granite);
  --mark-cut: var(--river-light);
  --closing-mark: var(--stone-paper);
  --shadow: var(--shade);
  --icon-tile: transparent;

  /* Lockup choice. One line here and one line in brand-sprite.v3.svg (#rr-site-lockup):
     "Rocky River" = 5.722 (current). "Rocky River Apps" = 7.931. */
  --lockup-aspect: 5.722;

  /* Type scale (rem, fluid) */
  --step--1: .9375rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.25rem, 1.05rem + .6vw, 1.5rem);
  --step-3: clamp(1.625rem, 1.3rem + 1vw, 2rem);
  --step-4: clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem);
  --step-5: clamp(2.5rem, 1.2rem + 4.4vw, 4.75rem);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 75rem;
  --radius: 1.5rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--graphite);
    --surface: var(--graphite-2);
    --ink: var(--frost);
    --ink-2: var(--mist);
    --ink-3: var(--mist);
    --rule: var(--rule-night);
    --link: var(--river-light);
    --focus: var(--river-light);
    --ring: var(--river-light);
    --btn-bg: var(--river-light);
    --btn-ink: var(--graphite);
    --mark-ink: var(--frost);
    --mark-cut: none; /* one-colour mark on dark grounds: the cut is a gap */
    --closing-mark: var(--stone-night);
    --shadow: var(--shade-night);
    --icon-tile: var(--icon-night);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-0); line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, figure, dl, dd, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: .25rem; }
h1, h2, h3 { text-wrap: balance; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: .75rem; top: -4rem; z-index: 10; padding: .625rem 1rem; background: var(--ink); color: var(--bg); border-radius: .375rem; }
.skip:focus { top: .75rem; }

/* ---------- Header ---------- */
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 1.5rem; padding-block: 1.125rem; }
.brand { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--mark-ink); --rr-cut: var(--mark-cut); }
.lockup { display: block; height: 2rem; width: auto; aspect-ratio: var(--lockup-aspect); }
.nav ul { display: flex; gap: .25rem clamp(.25rem, 1.5vw, 1rem); margin-inline: -.625rem; }
.nav a { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; padding-inline: .625rem; color: var(--ink); font-weight: 500; text-decoration: none; }
.nav a:hover, .nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35em; }

/* ---------- Components ---------- */
.page-head { padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(2rem, 4vw, 3.5rem); }
.page-head h1 { font-size: var(--step-4); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; word-spacing: -.04em; max-width: 10.5em; }
.lede { margin-top: 1.25rem; font-size: var(--step-2); line-height: 1.45; color: var(--ink-2); max-width: 36em; }
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section + .section { border-top: 1px solid var(--rule); }
.section h2, .h2 { font-size: var(--step-3); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; word-spacing: -.04em; }
.section h2 + p { margin-top: .875rem; color: var(--ink-2); font-size: var(--step-1); max-width: 34em; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .625rem 1.25rem; border-radius: .75rem; background: var(--btn-bg); color: var(--btn-ink); font-weight: 700; text-decoration: none; }
.button:hover { text-decoration: underline; }
.button--quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--rule); }
.buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.more { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; }
.status { position: relative; padding-left: 1rem; font-size: var(--step--1); font-weight: 600; text-wrap: pretty; }
.status::before { content: ""; position: absolute; left: 0; top: .5em; width: .5rem; height: .5rem; border-radius: 50%; border: 2px solid currentColor; }
.status[data-state="shipping"]::before { background: currentColor; }
.badge { display: inline-block; position: relative; z-index: 1; border-radius: .5rem; line-height: 0; }
.badge img { width: 8.25rem; height: 2.75rem; } /* Apple's badge at a 44 px target; never recoloured */
.icon { border-radius: 22.37%; background: var(--icon-tile); }

/* Long-form reading (privacy, terms) */
.prose { max-width: 38em; padding-bottom: clamp(3rem, 6vw, 5rem); }
.prose h2 { font-size: var(--step-2); font-weight: 700; line-height: 1.2; margin-top: 2.75rem; scroll-margin-top: 1.5rem; }
.prose h3 { font-size: var(--step-1); font-weight: 700; margin-top: 2rem; }
.prose p, .prose ul, .prose ol { margin-top: 1rem; }
.prose ul { padding-left: 1.25rem; list-style: disc; }
.prose ol { padding-left: 1.5rem; list-style: decimal; }
.prose li + li { margin-top: .5rem; }
.prose a { overflow-wrap: anywhere; }
.updated { margin-top: 1rem; color: var(--ink-2); }
.toc { margin-top: 2rem; padding: 1.25rem 1.5rem; border-radius: 1rem; background: var(--surface); max-width: 38em; }
.toc h2 { font-size: var(--step-0); font-weight: 700; margin: 0; }
.toc ul { columns: 2 14rem; column-gap: 2rem; margin-top: .5rem; }
.toc a { display: inline-block; min-width: 2.75rem; padding-block: .7rem; margin-block: -.35rem; }
.url { overflow-wrap: anywhere; }

/* Home: the studio line above the doors */
.hello { padding-block: clamp(1.25rem, 3vw, 2.25rem) clamp(3rem, 6vw, 4.5rem); }
.hello h1 { font-size: var(--step-4); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; word-spacing: -.04em; }
.hello .lede { margin-top: .75rem; font-size: var(--step-1); max-width: 48em; }
.hello-head { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.news-feed { margin-top: 1.5rem; color: var(--ink-2); max-width: 40em; }
.nf-doors { padding-bottom: clamp(3rem, 6vw, 5rem); }
.h3 { font-size: var(--step-1); font-weight: 700; line-height: 1.25; }
.status-block { margin-top: 2rem; }

/* Studio sections */
.news { display: grid; gap: 0; margin-top: 2rem; max-width: 52rem; }
.news li { display: grid; grid-template-columns: minmax(9rem, 1fr) minmax(0, 3fr); gap: .25rem 2rem; padding-block: 1.125rem; border-top: 1px solid var(--rule); }
.news time { color: var(--ink-2); }
.closing { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1rem clamp(2rem, 5vw, 5rem); align-items: baseline; }
.closing h2 { font-size: var(--step-4); font-weight: 800; letter-spacing: -.02em; word-spacing: -.04em; line-height: 1.05; }
.closing p { color: var(--ink-2); font-size: var(--step-1); max-width: 30em; }
.beliefs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem clamp(2rem, 5vw, 4rem); margin-top: 2rem; }
.beliefs h3 { font-size: var(--step-1); font-weight: 700; }
.beliefs p { margin-top: .375rem; color: var(--ink-2); }
.mark-story { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem clamp(2rem, 6vw, 6rem); align-items: center; }
.mark-story svg { width: min(100%, 22rem); height: auto; aspect-ratio: 49.5 / 43.5; color: var(--mark-ink); --rr-cut: var(--mark-cut); justify-self: center; }
.mark-story blockquote { font-size: var(--step-3); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.mark-story p { margin-top: 1rem; color: var(--ink-2); font-size: var(--step-1); }
.mark-story blockquote p { margin: 0; color: var(--ink); font-size: inherit; }
.faq { margin-top: 1.5rem; max-width: 46rem; }
.faq dt { font-weight: 700; margin-top: 1.5rem; font-size: var(--step-1); }
.faq dd { margin-top: .375rem; color: var(--ink-2); }
.checklist { margin-top: 1rem; padding-left: 1.25rem; list-style: disc; color: var(--ink-2); max-width: 40rem; }
.checklist li + li { margin-top: .375rem; }

/* ---------- Footer: a service desk, then the closing mark ---------- */
.site-footer { border-top: 1px solid var(--rule); overflow: clip; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 7fr) repeat(2, minmax(0, 2fr)); gap: 2.5rem 2rem; padding-block: 3.5rem 0; }
.site-footer h2 { font-size: var(--step--1); font-weight: 700; color: var(--ink-2); }
.desk-rows { margin-top: .75rem; }
.desk-row { display: grid; grid-template-columns: 2.5rem minmax(7.5rem, 11rem) minmax(0, 1fr); align-items: center; gap: .25rem 1rem; padding-block: .375rem; border-bottom: 1px solid var(--rule); }
.desk-links { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 5rem) minmax(0, 5rem); align-items: center; column-gap: clamp(.75rem, 2vw, 1.5rem); } /* fixed columns: the per-app links line up */
.desk-row .icon { width: 2.5rem; height: 2.5rem; }
.desk-row a, .site-footer nav a { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; color: var(--ink); text-decoration: none; }
.desk-row a:hover, .site-footer nav a:hover { text-decoration: underline; }
.desk-row .desk-name { font-weight: 700; }
.desk-row .soon { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink-2); }
.desk-email { margin-top: 1rem; color: var(--ink-2); }
.desk-email a { display: inline-block; padding-block: .7rem; margin-block: -.7rem; }
.site-footer nav ul { margin-top: .5rem; }
.foot-legal { grid-column: 1 / -1; display: grid; gap: .625rem; padding-top: 1.75rem; border-top: 1px solid var(--rule); font-size: var(--step--1); color: var(--ink-3); }
.foot-legal p { max-width: 62rem; }
.foot-mark { --fm: clamp(10rem, 20vw, 15rem); grid-column: 1 / -1; justify-self: end; display: block; width: var(--fm); height: auto; aspect-ratio: 49.5 / 43.5; margin-block: 1.5rem 0; margin-right: calc((100% - 100vw) / 2 - var(--fm) * .28); color: var(--closing-mark); --rr-cut: none; } /* the closing stone: base on the page's floor, bleeding off the right edge */

/* ---------- Media ---------- */
@media (max-width: 900px) {
  .closing, .mark-story { grid-template-columns: minmax(0, 1fr); }
  .site-footer .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .site-header .wrap { column-gap: 1rem; padding-block: .75rem; }
  .lockup { height: 1.5rem; }
  .nav ul { gap: 0; margin-inline: -.5rem; }
  .nav a { padding-inline: .5rem; font-size: 1rem; }
  .lede { font-size: 1.125rem; }
  .beliefs { grid-template-columns: minmax(0, 1fr); }
  .news li { grid-template-columns: minmax(0, 1fr); }
  .desk-row { grid-template-columns: 2.5rem minmax(0, 1fr); row-gap: 0; }
  .desk-row .desk-links { grid-column: 2; column-gap: .75rem; grid-template-columns: minmax(0, 6.5rem) minmax(0, 4.25rem) minmax(0, 4.75rem); }
  .section { padding-block: 2.5rem; }
  .hello { padding-bottom: 2.5rem; }
  .news { margin-top: 1rem; }
  .news li { padding-block: .625rem; gap: 0; }
  .news-feed { margin-top: 1rem; }
  .foot-mark { --fm: 8rem; margin-top: .5rem; }
  .site-footer .wrap { row-gap: 1.75rem; }
  .site-footer nav a { min-height: 2.75rem; }
  .foot-legal { padding-top: 1.25rem; }
  .closing h2 { font-size: 2rem; }
  .site-footer .wrap { padding-top: 2.5rem; }
}
@media (forced-colors: active) {
  .status::before { forced-color-adjust: none; border-color: CanvasText; background: Canvas; }
  .status[data-state="shipping"]::before { background: CanvasText; }
  .foot-mark { color: GrayText; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
