/* snuug.app. White only, clean and calm: one radius family, flat tinted cards (shadows only on the objects in them),
   colour only in pictures and the sun. The rooms are snuug-content's "Design with me" scenes, rendered with the
   app's subtle pixel finish by tools/rooms.py. Sections, in page order: bar, hero, feelings, how it works, numbers,
   FAQ, end, footer. One spacing scale for the whole page: --space between sections, --head between a section's
   heading and its content, --pad inside cards, --r for card corners. */
@font-face { font-family: "Snuug Inter"; src: url("../fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Snuug Pixel"; src: url("../fonts/pixel-operator.woff2") format("woff2"); font-display: swap; }

:root {
  --page: #FFFFFF; --surface: #F4F4F2; --tint: #ECECE9; --line: #E7E7E4; --ink: #151514; --muted: #6B6B66; --soft: #8E8E88; --good: #3F7D52;
  --shadow-lg: 0 2px 4px rgb(20 20 18 / 0.06), 0 40px 80px -30px rgb(20 20 18 / 0.32);
  --font: "Snuug Inter", "Inter", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --pixel: "Snuug Pixel", ui-monospace, monospace;
  --gutter: 20px; --max: 1200px;
  --space: clamp(88px, 10vw, 144px); --head: clamp(40px, 4.5vw, 64px); --pad: clamp(20px, 2vw, 28px); --r: 24px;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  color-scheme: light;
}
@media (min-width: 900px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--page); scroll-padding-top: 88px; }   /* the fixed bar is 66 px tall */
body { margin: 0; color: var(--ink); overflow-x: clip; font: 400 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
img, canvas { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.foot :focus-visible { outline-color: #FFF; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.display, .title { font-weight: 300; text-wrap: balance; }
.display { font-size: clamp(40px, 4.8vw, 70px); letter-spacing: -0.045em; line-height: 1.02; }
.title { font-size: clamp(34px, 4vw, 56px); letter-spacing: -0.04em; line-height: 1.05; }
.soft { color: var(--soft); }
.lede { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.label { font: 500 11px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.head { display: grid; justify-items: center; gap: 18px; max-width: 860px; margin: 0 auto; text-align: center; }
/* Sections: one --space between two sections, not two. */
section.s { padding-block: var(--space); }
section.s + section.s { padding-top: 0; }

/* Apple's badge. PLACEHOLDER until the official artwork: black, 40 px or taller, never animated. The badge and the
   button beside it share one height (50 px) and one corner (12 px, the corner of Apple's artwork at this height). */
.badge { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 18px 0 14px; border-radius: 12px; background: #000; color: #FFF; text-decoration: none; line-height: 1; font-family: -apple-system, system-ui, sans-serif; }
.badge svg { width: 22px; height: 26px; fill: #FFF; }
.badge span { display: grid; gap: 2px; }
.badge small { font-size: 10px; font-weight: 500; }
.badge b { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.micro { margin-top: 14px; font-size: 14px; color: var(--muted); }
.ghost { display: inline-flex; align-items: center; height: 50px; padding: 0 22px; border-radius: 12px; background: var(--tint); color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; transition: background-color 0.25s; }
.ghost:hover { background: #E2E2DE; }
.badge, .ghost { transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s, box-shadow 0.25s; }
.badge:active { transform: scale(0.97); transition-duration: 0.15s; }
/* A tactile press, as on ashore.ie: a touch smaller, and the light goes in (an inset shadow). Apple asks that its
   badge is never animated, so the badge keeps only the press it had. */
.ghost:active, .hero .ghost:active { transform: scale(0.98); box-shadow: inset 0 1px 3px rgb(20 20 18 / 0.16), inset 0 0 0 1px rgb(20 20 18 / 0.08); transition-duration: 0.12s; }

.chip { position: absolute; padding: 7px 11px; border-radius: 999px; background: rgb(255 255 255 / 0.85); color: #151514; font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.measure { position: absolute; padding: 7px 11px; border-radius: 999px; background: #151514; color: #FAFAF7; font: 400 16px/1 var(--pixel); white-space: nowrap; -webkit-font-smoothing: none; transition: opacity 0.3s; }

/* ---------- The bar: full width at the top, lined up with the page; a smaller floating glass pill once the page
   scrolls (page.js adds .scrolled). Three columns keep the nav in the true centre. In the pill, the button sits 8 px
   from the right end (concentric with the pill) and the wordmark gets more room on the left, because a flat-edged
   wordmark looks cramped where a round button does not. ---------- */
.top { position: fixed; inset: 10px 0 auto; z-index: 20; pointer-events: none; }
.top .bar { pointer-events: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; margin: 0 auto; padding: 0 10px;
  width: min(calc(100% - 2 * var(--gutter) + 36px), calc(var(--max) + 36px), calc(100% - 12px)); border-radius: 999px; border: 1px solid transparent;
  transition: width 0.6s var(--ease), height 0.6s var(--ease), background-color 0.4s, border-color 0.4s, box-shadow 0.6s var(--ease); }
.top.scrolled .bar { width: min(calc(100% - 24px), 780px); height: 56px; padding: 0 7px; background: rgb(255 255 255 / 0.86); border-color: rgb(20 20 18 / 0.06);
  box-shadow: 0 12px 32px -14px rgb(20 20 18 / 0.28); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.bar > a:first-child { justify-self: start; margin-left: 8px; transition: margin 0.6s var(--ease); }
.top.scrolled .bar > a:first-child { margin-left: 18px; }
.wordmark { display: block; width: 104px; height: 25px; color: var(--ink); transition: width 0.6s var(--ease), height 0.6s var(--ease); }
.top.scrolled .wordmark { width: 96px; height: 23px; }
/* The sun in the bar's wordmark twinkles, as the app's sun does when it opens (brand/README.md): soon after load,
   then every 8 s. It swaps two pixel frames (step timing), so it stays crisp. The frames are drawn in the bar's own
   <svg> (index.html), not in the shared <symbol>: the footer uses that symbol and must not twinkle, and an animation
   inside a <use> copy did not run in headless WebKit when tried (31 Oct 2026). */
/* BUG-281: the sun is drawn inline in the bar (index.html), so only it twinkles. */
.top .sun-a { animation: tw-a 8s step-end 0.8s infinite; }
.top .sun-b { opacity: 0; animation: tw-b 8s step-end 0.8s infinite; }
.top .sun { transform-box: fill-box; transform-origin: center; }
.bar > a:first-child { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* A bigger target for the logo and its sun (eggs.js): padding past the wordmark's right edge, taken back by the margin. */
.bar > a:first-child { padding: 12px 20px 12px 0; margin-block: -12px; margin-right: -20px; }
@keyframes tw-a { 0% { opacity: 0; } 1.6% { opacity: 1; } 3.2% { opacity: 0; } 4.4%, 100% { opacity: 1; } }
@keyframes tw-b { 0% { opacity: 1; } 1.6% { opacity: 0; } 3.2% { opacity: 1; } 4.4%, 100% { opacity: 0; } }
.nav { display: none; gap: 30px; font-size: 14.5px; color: var(--muted); }
.nav a { text-decoration: none; transition: color 0.2s; } .nav a:hover { color: var(--ink); }
.get { grid-column: 3; justify-self: end; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: #FFF; text-decoration: none; font-size: 15px; font-weight: 500; letter-spacing: -0.005em;
  transition: height 0.6s var(--ease), transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s, box-shadow 0.25s; }
@media (hover: hover) { .get:hover { background: #2B2B29; } }
.get:active { transform: scale(0.98); box-shadow: inset 0 2px 5px rgb(0 0 0 / 0.5); transition-duration: 0.12s; }
.get svg { width: 14px; height: 17px; fill: #FFF; }
.top.scrolled .get { height: 40px; }
@media (min-width: 900px) { .nav { display: flex; } }

.faq { max-width: 820px; margin: var(--head) auto 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; font-size: 19px; line-height: 1.35; letter-spacing: -0.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-weight: 300; font-size: 24px; line-height: 1; color: var(--muted); transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s; }
.faq summary:hover::after, .faq details[open] summary::after { color: var(--ink); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; max-width: 62ch; color: var(--muted); }
.faq details[open] p { animation: answer 0.45s var(--ease); }
@keyframes answer { from { opacity: 0; transform: translateY(-4px); } }

.end { text-align: center; }
.end .sun { display: block; width: 72px; height: 72px; margin: 0 auto 32px; cursor: default; }
.end .sun.rise { transform: translateY(32px); transition-duration: 1.4s; }
.end .sun.rise.in { transform: none; }
.end .sun .fa { animation: tw-a 9s step-end 3s infinite; }
.end .sun .fb { animation: tw-b 9s step-end 3s infinite; }
.end .sun.off use { animation-play-state: paused; }
.end .cta { justify-content: center; margin-top: 32px; }

/* Footer: black and white, the sun keeps its colour. */
/* Selected text takes the sun's honey, not the system blue; on the black footer, a stronger honey. Only text-level
   elements get it: WebKit also paints the gaps between selected blocks in the containing block's selection colour, so
   a section or layout box with a coloured ::selection fills its empty padding with a honey slab. */
::selection { background: transparent; }
:is(h1, h2, h3, h4, p, li, a, span, b, strong, em, small, label, button, summary, blockquote, figcaption, td, th, dt, dd, code, sup)::selection { background: rgb(242 169 59 / 0.3); color: var(--ink); }
.foot :is(p, li, a, span, b, small)::selection { background: rgb(242 169 59 / 0.55); color: #FFFFFF; }
.foot { background: #0B0B0C; color: #EDEDEB; padding: 64px 0 calc(32px + env(safe-area-inset-bottom)); overflow: hidden; }
.foot .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 32px; font-size: 14px; }
.foot .row + .row { margin-top: 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot nav a { text-decoration: none; color: #B5B5B0; transition: color 0.2s; } .foot nav a:hover { color: #FFF; }
/* A phone: the links in three columns of 44 px rows, so each is big enough for a finger. */
@media (max-width: 699px) {
  .foot nav { display: grid; grid-template-columns: repeat(3, max-content); gap: 0 28px; margin-block: -10px; }
  .foot nav a { display: flex; align-items: center; min-height: 44px; }
}
.foot .legal { max-width: 46ch; font-size: 11.5px; color: #8A8A85; }
.giant { display: block; width: 100%; height: auto; margin: 56px 0 8px; color: #FFFFFF;
  filter: drop-shadow(4px 4px 0 #2A2A2C) drop-shadow(4px 4px 0 #2A2A2C) drop-shadow(4px 4px 0 #2A2A2C) drop-shadow(4px 4px 0 #2A2A2C); }
/* The keys: each letter is a white cap over its own shadow, --e (4 screen px, in the drawing's units) down and to
   the right. A mouse over a key makes it hop; a press pushes the cap into its shadow, and it springs back.
   The sun at the end leans a little towards the pointer (--sx, --sy). */
.giant.keys { filter: none; overflow: visible; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.giant .base { fill: #2A2A2C; transform: translate(var(--e, 2px), var(--e, 2px)); }
.giant .cap { fill: currentColor; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.giant .key.down .cap { transform: translate(calc(var(--e, 2px) * 0.8), calc(var(--e, 2px) * 0.8)); transition-duration: 0.08s; }
.giant .hit { fill: transparent; }
.giant .fsun { transform: translate(var(--sx, 0px), var(--sy, 0px)); }
.giant .psun { transform-box: fill-box; transform-origin: center; }
.giant .psun .fb { opacity: 0; }

/* ---------- The suns' delights (common.js, eggs.js). Every small sun stacks two pixel frames, .fa and .fb (the
   twinkle frame); .lit shows the twinkle frame for a moment, over whatever its own twinkle is doing. ---------- */
.psun .fb { opacity: 0; }
.psun.lit .fa, .top .sun.lit .sun-a { opacity: 0 !important; }
.psun.lit .fb, .top .sun.lit .sun-b { opacity: 1 !important; }
/* The sparks: pixel squares in a layer over the page, removed when they fade (burst() in common.js). */
.sparks { position: fixed; inset: 0; z-index: 30; overflow: hidden; pointer-events: none; contain: strict; }
.sparks i { position: absolute; left: 0; top: 0; will-change: transform, opacity; }
/* Golden hour: a long press on the bar's sun, or "snug" typed anywhere, warms the whole page for a moment. The light
   multiplies, so white turns honey and ink stays ink. */
.golden { position: fixed; inset: 0; z-index: 40; pointer-events: none; mix-blend-mode: multiply; opacity: 0; transition: opacity 1.6s var(--ease);
  background: radial-gradient(120% 90% at 85% -10%, #FFC98A 0%, #FFDDB0 38%, #FFEBD2 70%, #FFF3E4 100%); }
.golden.on { opacity: 1; transition-duration: 0.9s; }

.rise { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.rise.in { opacity: 1; transform: none; }
/* Infinite animations pause off screen (how.js toggles .off). */
.holo-card.off .holo, .seal.off .glint { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .rise { opacity: 1; transform: none; }
  .top .sun-a, .top .sun-b, .end .sun use { animation: none; }
  .end .sun.rise { transform: none; }
}

/* "Leave Snuug?" before a link to another site (page.js): a small centred card, after Microsoft Copilot's "Open this
   link?" (Mobbin). The address shows in full, quietly, so the visitor sees where it goes. */
.leave { width: min(360px, calc(100vw - 40px)); padding: 26px 24px 20px; border: 0; border-radius: var(--r); background: #FFF; color: var(--ink); text-align: center;
  box-shadow: 0 0 0 1px rgb(20 20 18 / 0.06), 0 30px 70px -20px rgb(20 20 18 / 0.4); }
.leave::backdrop { background: rgb(20 20 18 / 0.28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.leave[open] { animation: leave-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1); }
.leave[open]::backdrop { animation: leave-fade 0.2s ease-out; }
@keyframes leave-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } }
@keyframes leave-fade { from { opacity: 0; } }
.leave-title { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; }
.leave-text { margin-top: 8px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.leave-host { color: var(--ink); font-weight: 500; }
.leave-url { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface); font-size: 12.5px; line-height: 1.4; color: var(--soft); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.leave-buttons { display: grid; gap: 6px; margin-top: 18px; }
.leave-buttons button { height: 44px; border: 0; border-radius: 999px; font: 500 15px/1 var(--font); cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.leave-go { background: var(--ink); color: #FFF; }
.leave-go:hover { background: #000; }
.leave-stay { background: none; color: var(--muted); }
.leave-stay:hover { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .leave[open], .leave[open]::backdrop { animation: none; } }
