/* ShelfSync's pages: a Thin Air page (the studio's width, header, type, motion and footer) worn in ShelfSync's own colours. Colours are the app's theme
   tokens (shelfsync-app/lib/ui/theme.dart): light and dark, following the visitor's system the way the app does. The phones mix both themes. */
@font-face { font-family: "Inter"; src: url("/assets/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("/assets/inter-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --cream: #fbf6ee;      /* page */
  --surface: #ffffff;    /* cards */
  --ink: #2b2a26;        /* cocoa */
  --muted: #6b655b;
  --line: #ede4d6;
  --accent: #8a2d5b;     /* beetroot */
  --accent-hover: #6e2148;
  --on-accent: #fbf6ee;
  --tint: #f3e4ea;
  --bezel: #2b2a26;
  --ring: transparent;
  --studio: #40826d;      /* Thin Air's viridian: the way back to the studio */
  --shadow: rgba(64, 42, 26, .5);
  --wrap: 1360px;                    /* the studio's grid: same width, gutters and header height as the homepage */
  --gutter: clamp(20px, 4.4vw, 72px);
  --bar: 72px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #1b1a18; --surface: #252320; --ink: #f1ebe2; --muted: #aaa295; --line: #35322d;
    --accent: #e08ab5; --accent-hover: #eba6c8; --on-accent: #1b1a18; --tint: #3a2731;
    --bezel: #0d0c0b; --ring: rgba(241, 235, 226, .12); --studio: #5fa98e; --shadow: rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 16px); }
html { scroll-behavior: smooth; }
body.ss {
  min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--cream); color: var(--ink);
  font: 17px/1.6 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.ss-wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.ss-skip { position: fixed; left: 16px; top: -60px; z-index: 30; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.ss-skip:focus { top: 12px; }

/* ---- header: sticky, cream glass ---- */
.ss-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--cream) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; padding-top: env(safe-area-inset-top, 0px); }
.ss-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--bar); }
.ss-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.02em; text-decoration: none; }
.app-icon { display: block; flex: none; border-radius: 23%; box-shadow: 0 0 0 1px var(--line); }
.ss-brand .app-icon { width: 32px; height: 32px; }
.ss-lockup { display: flex; align-items: center; gap: 16px; min-width: 0; }
/* The studio's own logo comes first, in ShelfSync's ink with Thin Air's green; pointing at it turns it all green. */
.ss-studio { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.ss-studio .sym { width: 52px; }
.ss-studio .word { width: 112px; }
.ss-studio .peak, .ss-studio .glyph { fill: var(--ink); transition: fill .3s; }
.ss-studio .curl, .ss-studio .glyph.accent { fill: var(--studio); }
.ss-studio:hover .peak, .ss-studio:hover .glyph, .ss-studio:focus-visible .peak, .ss-studio:focus-visible .glyph { fill: var(--studio); }
.ss-slash { color: var(--line); font-size: 26px; font-weight: 300; line-height: 1; }
.ss-nav { display: flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 500; }
.ss-nav a:not(.ss-btn) { color: var(--muted); text-decoration: none; }
.ss-nav a:not(.ss-btn):hover { color: var(--ink); }

/* ---- pills, like the app's buttons ---- */
.ss-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; transition: background-color .15s ease; }
.ss-btn:hover { background: var(--accent-hover); }
.ss-btn.small { min-height: 40px; padding: 0 18px; font-size: 15px; white-space: nowrap; }
.ss-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.ss-link::after { content: " \2192"; }
.ss-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.ss-pill { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--tint); color: var(--accent); font-size: 14px; font-weight: 600; }
.fine { font-size: 14px; color: var(--muted); }

/* ---- phones: real screens in a CSS frame ---- */
.phone { display: block; width: 100%; padding: 6px; border-radius: 32px; background: var(--bezel);
  box-shadow: 0 0 0 1px var(--ring), 0 44px 70px -40px var(--shadow), 0 12px 24px -18px var(--shadow); }
.phone img { width: 100%; border-radius: 26px; }

/* ---- hero ---- */
.ss-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: center;
  padding-top: clamp(32px, 6vw, 80px); padding-bottom: clamp(56px, 9vw, 120px); }
.ss-hero h1 { margin-top: 22px; font-size: clamp(44px, 6.2vw, 104px); line-height: .96; letter-spacing: -.055em; font-weight: 600; max-width: 11ch; }
.ss-hero .lead { margin-top: 24px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--muted); max-width: 34ch; }
.ss-actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.ss-hero .fine { margin-top: 18px; }
.ss-stage { display: grid; place-items: center; min-height: clamp(380px, 44vw, 600px); }
.ss-stage::before { content: ""; grid-area: 1 / 1; width: min(94%, 540px); aspect-ratio: 1; border-radius: 50%; background: var(--tint); }
.ss-stage .phone { grid-area: 1 / 1; width: clamp(140px, 15vw, 228px); }
.ss-stage .l { translate: -72% 7%; rotate: -7deg; }
.ss-stage .r { translate: 72% 7%; rotate: 7deg; }
.ss-stage .c { z-index: 1; }

/* ---- sections ---- */
.ss-section { padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(64px, 9vw, 120px); }
.ss-section + .ss-section { padding-top: 0; }
.ss-section h2 { font-size: clamp(36px, 5.4vw, 92px); line-height: .96; letter-spacing: -.055em; font-weight: 600; max-width: 14ch; }
.ss-section .intro { margin-top: 16px; font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); max-width: 52ch; }

.ss-screens { list-style: none; margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.ss-screens li { display: grid; align-content: start; }
.ss-screens h3 { margin-top: 24px; }
/* Each screen rises out of the bottom of its own tile, cropped, so the phones sit on something instead of floating. */
.ss-tile { display: flex; justify-content: center; aspect-ratio: 10 / 11; overflow: hidden; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); }
.ss-tile .phone { flex: none; width: 66%; height: max-content; margin-top: 11%; }
/* Hover: the phone slides up out of its tile, showing more of the screen (aero-hover-rise: 5% of its own height, no scale). */
.ss-tile { transition: border-color .4s ease; }
.ss-tile .phone { --aero-hover-distance: 5%; --aero-hover-scale: 1; --aero-hover-duration: .6s; --aero-hover-easing: cubic-bezier(.16, 1, .3, 1); }
@media (hover: hover) { .ss-tile:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); } }
.ss-screens h3 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.ss-screens p { margin-top: 8px; color: var(--muted); max-width: 34ch; }
.ss-more { margin-top: clamp(48px, 6vw, 72px); padding-top: 32px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.ss-more dt { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.ss-more dd { margin-top: 8px; color: var(--muted); max-width: 48ch; }

.ss-data { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start;
  padding-top: clamp(40px, 5vw, 56px); border-top: 1px solid var(--line); }
.ss-data .ss-link { display: inline-block; margin-top: 24px; }
.ss-data ul { list-style: none; display: grid; gap: 18px; }
.ss-data li { position: relative; padding-left: 30px; font-size: 18px; line-height: 1.5; }
.ss-data li::before { content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3.5 9.4l3.6 3.6 7.4-8' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3.5 9.4l3.6 3.6 7.4-8' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---- try the app ---- */
.ss-try { margin-top: clamp(36px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.ss-steps { list-style: none; counter-reset: step; display: grid; }
/* Number and title share one row and centre on each other; the text hangs under the title. */
.ss-steps li { counter-increment: step; position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 18px; align-items: center; padding-bottom: 28px; }
.ss-steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--tint); color: var(--accent); font-weight: 700; font-size: 17px; line-height: 1; font-variant-numeric: tabular-nums; }
.ss-steps li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 52px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--line); }
.ss-steps strong { font-size: 20px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.ss-steps span { grid-column: 2; margin-top: 6px; color: var(--muted); max-width: 48ch; }
.ss-get { padding: 32px; border-radius: 32px; background: var(--surface); border: 1px solid var(--line); display: grid; justify-items: start; }
.ss-get .app-icon { width: 64px; height: 64px; }
.ss-get h3 { margin-top: 20px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.ss-get p { margin-top: 6px; color: var(--muted); }
.ss-get .ss-btn { margin-top: 24px; width: 100%; }
.ss-get .fine { margin-top: 12px; justify-self: center; }
.ss-links { list-style: none; margin-top: clamp(40px, 6vw, 64px); display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.ss-links a { display: grid; align-content: start; height: 100%; padding: 20px 20px 22px; border-radius: 20px; border: 1px solid var(--line); text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease; }
.ss-links a:hover { background: var(--surface); border-color: transparent; }
.ss-links strong { color: var(--accent); font-weight: 600; }
.ss-links strong::after { content: " \2192"; }
.ss-links span { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }

/* ---- footer: the studio's own (as on every Thin Air page): the call to write, then © and links ---- */
.ss-foot { padding-bottom: max(28px, env(safe-area-inset-bottom, 0px)); font-size: 14px; color: var(--muted); }
.ss-cta { padding-block: 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.ss-cta h2 { font-size: 20px; letter-spacing: -.03em; font-weight: 600; color: var(--ink); }
.ss-cta a { font-size: 20px; font-weight: 600; letter-spacing: -.03em; color: var(--ink); text-decoration: underline; text-decoration-color: var(--studio); text-decoration-thickness: 2px; text-underline-offset: 6px; overflow-wrap: anywhere; }
.ss-foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 24px; }
.ss-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.ss-foot a { color: var(--muted); text-decoration: none; }
.ss-foot nav a:hover, .ss-credit a:hover { color: var(--studio); }
.ss-credit { margin-top: 10px; font-size: 13px; }
.ss-credit a { text-decoration: underline; text-underline-offset: 3px; }

/* ---- the privacy policy: same frame, a document column with its contents alongside ---- */
.ss-doc { padding-top: clamp(32px, 6vw, 72px); padding-bottom: clamp(48px, 7vw, 96px); }
.ss-doc-head { max-width: 760px; }
.ss-doc h1 { margin-top: 20px; font-size: clamp(44px, 6.2vw, 104px); line-height: .96; letter-spacing: -.055em; font-weight: 600; }
.ss-doc .summary { margin-top: 24px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--muted); }
.ss-doc-grid { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: 260px minmax(0, 720px); gap: clamp(32px, 6vw, 96px); align-items: start; }
.ss-toc { position: sticky; top: calc(var(--bar) + 24px); max-height: calc(100dvh - var(--bar) - 48px); overflow-y: auto; }
.ss-toc h2 { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ss-toc ol { margin-top: 14px; list-style: none; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.ss-toc a { display: flex; gap: 10px; padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 15px; line-height: 1.4; }
.ss-toc a span { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 1.2em; }
.ss-toc a:hover, .ss-toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--accent); }
.ss-toc a { transition: color .2s, border-color .2s; }
.ss-doc-body section { scroll-margin-top: calc(var(--bar) + 24px); }
.ss-doc-body section + section { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--line); }
.ss-doc-body h2 { display: flex; align-items: baseline; gap: 14px; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -.025em; font-weight: 700; }
.ss-doc-body h2 span { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--tint); color: var(--accent);
  font-size: 16px; line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums; translate: 0 -3px; }
.ss-doc-body section > * + * { margin-top: 14px; }
.ss-doc-body h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin-top: 32px !important; }
.ss-doc-body ul { padding-left: 1.15em; display: grid; gap: 10px; }
.ss-doc-body li::marker { color: var(--accent); }
.ss-doc-body strong { font-weight: 600; }
.ss-doc-body a, .ss-doc .summary a { color: var(--accent); overflow-wrap: anywhere; }
.ss-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; font-size: 15px; line-height: 1.5; }
.ss-table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--tint); }
.ss-table td { padding: 14px 18px; vertical-align: top; border-bottom: 1px solid var(--line); }
.ss-table tr:last-child td { border-bottom: 0; }
.ss-table td:first-child { font-weight: 600; width: 34%; }

/* ---- narrower screens ---- */
@media (max-width: 960px) {
  .ss-doc-grid { grid-template-columns: minmax(0, 1fr); }
  .ss-toc { position: static; max-height: none; padding: 20px 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
  .ss-toc ol { columns: 2; column-gap: 24px; display: block; border-left: 0; }
  .ss-toc a { padding-left: 0; border-left: 0; break-inside: avoid; }
}
@media (max-width: 860px) {
  .ss-hero, .ss-data, .ss-try { grid-template-columns: minmax(0, 1fr); }
  .ss-hero { padding-top: 24px; }
  .ss-stage { min-height: 0; padding-block: 16px; }
  .ss-stage .phone { width: min(34vw, 200px); padding: 5px; border-radius: 24px; }
  .ss-stage .phone img { border-radius: 19px; }
  .ss-stage .l { translate: -68% 6%; } .ss-stage .r { translate: 68% 6%; }
  .ss-more { grid-template-columns: minmax(0, 1fr); }
  /* The three screens become a row you swipe through. */
  .ss-screens { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(72vw, 280px); overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); padding-bottom: 8px; scrollbar-width: none; }
  .ss-screens::-webkit-scrollbar { display: none; }
  .ss-screens li { scroll-snap-align: start; }
}
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .ss-studio .word { display: none; }
  .ss-lockup { gap: 10px; }
  .ss-studio .sym { width: 44px; }
  /* Phones: the app icon alone stands for ShelfSync in the header (the word stays for screen readers). */
  .ss-top .ss-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ss-lockup { gap: 10px; }
  .ss-toc ol { columns: 1; }
  /* Tables become one block per row on a phone: the first cell as its title, the rest under it. */
  .ss-table, .ss-table tbody, .ss-table tr, .ss-table td { display: block; width: 100% !important; }
  .ss-table thead { display: none; }
  .ss-table tr { padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .ss-table tr:last-child { border-bottom: 0; }
  .ss-table td { padding: 0; border: 0; }
  .ss-table td + td { margin-top: 4px; color: var(--muted); }
}

/* ---- motion (Aero): the hero phones fan out once on load, and blocks rise in on scroll ---- */
.ss-stage { --aero-easing: cubic-bezier(.16, 1, .3, 1); }
.ss-stage .l, .ss-stage .r { --aero-duration: 1.1s; --aero-delay: .25s; --aero-fan-x: 4%; --aero-fan-y: 12%; --aero-fan-rot: 1deg; }
.ss-stage .c { --aero-duration: .9s; --aero-fan-y: 6%; }
/* Headings travel further than bodies (the studio's scroll reveal, as on the homepage); the elements carry .aero-scrub .aero-fade-up. */
.ss-section h2, .ss-doc-head h1 { --aero-distance: 7vh; }
.ss-section .intro, .ss-screens li, .ss-more, .ss-data ul, .ss-try, .ss-links { --aero-distance: 3vh; }

/* ---- Page transitions: Aero's (ShelfSync is a sheet: it slides in over the homepage from the right, and between
   ShelfSync's own pages it's a quick cross-fade). Here, only what carries across: the Thin Air mark, the phones and
   the app icon. ---- */
@view-transition { navigation: auto; }
.ss-stage { view-transition-name: ss-phones; }
.ss-top .ss-brand .app-icon { view-transition-name: ss-icon; }
.ss-top .ss-studio .sym { view-transition-name: ta-sym; }
::view-transition-group(ta-sym), ::view-transition-group(ss-phones), ::view-transition-group(ss-icon) { animation-duration: .65s; animation-timing-function: cubic-bezier(.65, 0, .25, 1); }
