/* Someday · web. The app's Opal look: warm black, the box lights the room, lime for the one action,
   Instrument Serif for titles, Inter for the rest (Shared/Theme.swift, design/moods/opal/kit.css). */

@font-face{font-family:"Instrument Serif";src:url(fonts/InstrumentSerif-Regular.woff2) format("woff2");font-display:swap}
/* the logo's face (Shared/Fonts, as Font.mark in the app): "someday", lowercase, never italic */
@font-face{font-family:"Syne Mono";src:url(fonts/SyneMono-Regular.ttf) format("truetype");font-display:swap}
@font-face{font-family:"Inter";src:url(fonts/Inter.woff2) format("woff2");font-weight:100 900;font-display:swap}

:root{
  --bg:#0B0A09; --ink:#F4F2ED; --ink2:rgba(244,242,237,.78); --dim:rgba(244,242,237,.55); --mute:rgba(244,242,237,.34);
  --hair:rgba(244,242,237,.10); --peach:#FFE3C8; --onlime:#111;
  --glow:255,196,138;           /* the box's light, set per box */
  --serif:"Instrument Serif",ui-serif,Georgia,serif;
  color-scheme:dark;
}
*{box-sizing:border-box}
html{background:var(--bg);-webkit-text-size-adjust:100%}
body{margin:0;min-height:100vh;min-height:100svh;color:var(--ink);background:var(--bg);
  font-family:Inter,-apple-system,system-ui,sans-serif;font-size:17px;line-height:1.4;letter-spacing:-.011em;
  -webkit-font-smoothing:antialiased;font-feature-settings:"cv05","cv08","ss03"}
h1,p{margin:0}
h1{text-wrap:balance}
p{text-wrap:pretty}
a{color:inherit}

/* the room: a warm rock with the box's light in it */
.room{position:fixed;inset:0;z-index:0;pointer-events:none;
  background:
    radial-gradient(60% 34% at 50% var(--gy,34%), rgba(var(--glow),var(--ga,0)), transparent 72%),
    radial-gradient(90% 60% at 50% 30%, #2B2622 0%, #0B0A09 78%);
  transition:background .8s ease}
.grain{position:fixed;inset:0;z-index:0;pointer-events:none;opacity:.06;mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>")}

.page{position:relative;z-index:1;min-height:100vh;min-height:100svh;display:flex;flex-direction:column;
  width:100%;max-width:460px;margin:0 auto;
  padding:max(18px,env(safe-area-inset-top)) 24px max(20px,env(safe-area-inset-bottom))}

/* the wordmark as OpalWordmark draws it: Syne Mono at 0.8 of the old serif size, kerning -0.045 of it */
.wm{display:block;text-align:center;font:400 21px/1 "Syne Mono",ui-monospace,monospace;letter-spacing:-.056em;text-decoration:none;
  padding:10px 0 0;white-space:nowrap}

main{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:12px 0 28px}

/* the box: the app's baked still, closed on its podium (App/Resources/BakedBoxes.xcassets, 720×528), lit in its own
   colour (`accent`). It stands still: it rests on its podium, so it doesn't float. */
.stage{position:relative;width:min(88vw,360px);aspect-ratio:720/528;display:grid;place-items:center}
.stage::before{content:"";position:absolute;left:14%;right:14%;top:-8%;bottom:22%;border-radius:50%;
  background:radial-gradient(closest-side, rgba(var(--glow),.34), rgba(var(--glow),0));filter:blur(22px);
  opacity:0;transition:opacity .9s ease}
.stage.lit::before{opacity:1}
.box{position:relative;width:100%;height:100%;object-fit:contain;opacity:0;filter:blur(10px);transform:translateY(8px) scale(.98);
  transition:opacity .7s ease, filter .7s ease, transform .9s cubic-bezier(.2,.8,.2,1)}
.box.in{opacity:1;filter:none;transform:none}
.box.dim{opacity:.45}
.box.dim.in{opacity:.45}

.words{margin-top:14px;min-height:118px;display:flex;flex-direction:column;align-items:center}
.title{font:400 38px/1.05 var(--serif);letter-spacing:-.012em;max-width:340px}
.sub{margin-top:12px;font-size:19px;line-height:1.35;color:var(--dim);max-width:320px;text-wrap:balance}
.reveal{opacity:0;filter:blur(6px);transform:translateY(6px);transition:opacity .6s ease .15s,filter .6s ease .15s,transform .6s ease .15s}
.ready .reveal{opacity:1;filter:none;transform:none}
.ready .sub.reveal{transition-delay:.28s}

/* skeleton while the cover loads */
.skel{display:flex;flex-direction:column;align-items:center;gap:12px;padding-top:6px}
.skel i{display:block;height:20px;border-radius:10px;background:rgba(244,242,237,.08);animation:pulse 1.6s ease-in-out infinite}
.skel i:nth-child(1){width:240px;height:30px}
.skel i:nth-child(2){width:180px;height:30px}
.skel i:nth-child(3){width:150px;margin-top:6px}
.ready .skel{display:none}
@keyframes pulse{50%{opacity:.5}}

/* actions */
.actions{display:flex;flex-direction:column;align-items:stretch;gap:6px;width:100%}
.actions.reveal{transition-delay:.4s}
.btn{height:58px;border-radius:999px;display:flex;align-items:center;justify-content:center;gap:10px;
  font:600 17px/1 Inter,system-ui,sans-serif;letter-spacing:-.015em;text-decoration:none;border:0;width:100%;
  -webkit-tap-highlight-color:transparent;cursor:pointer;transition:transform .15s ease, filter .15s ease}
.btn:active{transform:scale(.98)}
.btn.lime{color:var(--onlime);background:linear-gradient(180deg,#F1FCC8 0%,#E2F79A 44%,#D1E97E 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75),inset 0 -1px 0 rgba(0,0,0,.08),0 14px 34px -10px rgba(226,247,154,.45)}
.btn.lime:hover{filter:brightness(1.04)}
.btn svg{width:19px;height:19px;flex:none;margin-top:-2px}
.second{min-height:48px;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:500;
  color:var(--ink2);text-decoration:none;border-radius:999px;-webkit-tap-highlight-color:transparent}
a.second:hover{color:var(--ink)}
.second.note{font-weight:400;color:var(--dim);font-size:15px}
.btn:focus-visible,.second:focus-visible,.wm:focus-visible{outline:2px solid #E2F79A;outline-offset:3px}

/* bigger screens: same column, more air */
@media (min-width:700px){
  .page{max-width:680px;justify-content:center;padding-top:96px;padding-bottom:64px}
  .wm{position:absolute;left:0;right:0;top:40px}
  main{flex:0 0 auto;padding:0}
  .stage{width:420px}
  .words{min-height:0}
  .title{font-size:54px;max-width:600px}
  .sub{font-size:20px}
  .actions{margin-top:36px;max-width:400px;align-self:center}
}
@media (max-height:700px) and (max-width:699px){
  .stage{width:min(72vw,280px)}
  .title{font-size:34px}
}

@media (prefers-reduced-motion:reduce){
  .box,.reveal,.stage::before{transition:opacity .3s ease}
  .box,.reveal{filter:none;transform:none}
  .skel i{animation:none}
}
