/* Crownfall site. Colours and glass come from the game's own HUD and menus (docs/ART_BIBLE.md §11). */
:root{
  color-scheme:dark;
  --bg:#0f0b0a;--bg-glow:#3a2815;
  --text:#f2ead8;--muted:#c6beac;--gold:#f2d58a;--accent:#d6b46a;--ink:#1c150b;
  --glass:rgba(18,22,28,.62);--edge:rgba(255,255,255,.14);--edge-top:rgba(255,255,255,.3);
  --heal:#6be27a;--valour:#ff9a4d;--swift:#7ed0ff;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,"Times New Roman",serif;
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --max:72rem;--r:1.25rem
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:1rem}
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}@view-transition{navigation:auto}}
body{margin:0;background:var(--bg);color:var(--text);font:400 1.0625rem/1.65 var(--sans);overflow-wrap:break-word}
img{display:block;max-width:100%;height:auto}
a{color:var(--gold);text-underline-offset:.18em}
a:hover{color:#fff3cf}
:focus-visible{outline:3px solid var(--gold);outline-offset:3px;border-radius:.25rem}
.skip{position:absolute;left:1rem;top:-4rem;z-index:10;background:var(--gold);color:var(--ink);padding:.6rem 1rem;border-radius:.5rem;font-weight:600}
.skip:focus{top:.75rem}
.wrap{max-width:var(--max);margin:0 auto;padding:0 1rem}
.narrow{max-width:46rem}

/* Bars */
header,footer{border:0 solid rgba(242,213,138,.16)}
header{border-bottom-width:1px;background:rgba(12,10,11,.8)}
footer{border-top-width:1px;color:var(--muted);font-size:.95rem}
.bar{display:flex;align-items:center;justify-content:space-between;gap:.5rem 1rem;padding-block:.85rem;flex-wrap:wrap}
.brand{display:block;text-decoration:none}
.brand img{display:block;height:clamp(32px,6vw,42px);width:auto}
/* The App Store button in the bar: small, gold, never on a line of its own; on a phone the hero's button is right below */
.btn.get{display:none;min-height:2.25rem;padding:.3rem .95rem;border-radius:.6rem;font-size:.9rem;white-space:nowrap;box-shadow:inset 0 1px 0 rgba(255,255,255,.55)}
@media (min-width:48rem){.btn.get{display:inline-flex}header nav{margin-left:auto}}
nav{display:flex;flex-wrap:wrap;gap:0 clamp(.8rem,3vw,1.15rem)}
nav a{display:inline-block;padding:.4rem 0;color:var(--muted);text-decoration:none}
nav a:hover,nav a[aria-current]{color:var(--text)}
/* Language picker: one quiet row under the footer links, wrapping on a phone */
.langs{flex-basis:100%;gap:0 1rem;padding-top:.35rem;border-top:1px solid rgba(242,213,138,.08);font-size:.9rem}
.langs a{padding:.3rem 0}
.langs a[aria-current]{text-decoration:underline;text-decoration-color:var(--accent);text-decoration-thickness:1px}

/* Type */
h1,h2,h3{font-family:var(--serif);font-weight:600;line-height:1.15;margin:0}
h2{font-size:clamp(1.75rem,4.6vw,2.6rem);color:var(--text);text-wrap:balance}
h3{font-size:1.3rem;color:var(--gold)}
p{margin:.75rem 0 0}
.center{text-align:center}

/* The ornament from the game's title screen: a line, a diamond, a line */
.orn{--l:rgba(242,234,216,.4);position:relative;height:.7rem;max-width:16rem;margin-top:.7rem;background:linear-gradient(90deg,var(--l) calc(50% - .8rem),transparent 0 calc(50% + .8rem),var(--l) 0) center/100% 1px no-repeat}
.orn::after{content:"";position:absolute;left:50%;top:50%;width:.5rem;height:.5rem;border:1.5px solid var(--gold);transform:translate(-50%,-50%) rotate(45deg)}

/* Buttons, after the game's New Match button and gold-rimmed toggles */
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:3rem;padding:.65rem 1.4rem;border-radius:.8rem;background:linear-gradient(#e6c478,#d6b46a);color:var(--ink);font-weight:600;text-align:center;text-decoration:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 .5rem 1.5rem rgba(214,180,106,.18)}
.btn:hover{background:var(--gold);color:var(--ink)}
.btn.ghost{background:var(--glass);color:var(--gold);box-shadow:inset 0 0 0 1.5px var(--accent),inset 0 1px 0 var(--edge-top);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.btn.ghost:hover{background:rgba(32,30,30,.72);color:#fff3cf}

/* First screen: the title scene from the game, as large as the window, with the logo in its sky */
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.poster{position:relative;display:grid;min-height:min(74svh,56.25vw + 6rem);overflow:hidden;align-items:start;justify-items:center}
.poster-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 60%;transform-origin:50% 60%}
.poster::after{content:"";grid-area:1/1;align-self:stretch;width:100%;background:linear-gradient(rgba(15,11,10,.25),transparent 30%,transparent 62%,var(--bg))}
.poster-copy{grid-area:1/1;position:relative;z-index:1;align-self:stretch;display:flex;flex-direction:column;align-items:center;width:100%;padding:clamp(1rem,3vw,3rem) 1rem clamp(1.5rem,4vw,3.5rem);text-align:center}
.poster-copy::before{content:"";position:absolute;z-index:-1;left:50%;top:52%;width:min(130%,62rem);height:88%;transform:translate(-50%,-50%);background:radial-gradient(closest-side,rgba(12,9,8,.62),rgba(12,9,8,.34) 55%,transparent);pointer-events:none}
.poster-copy h1{margin:0}
.poster-logo{width:min(78vw,clamp(20rem,34vw,46rem));filter:drop-shadow(0 .4rem 1.2rem rgba(0,0,0,.55))}
.sell{margin:clamp(.4rem,1vw,1rem) 0 0;font:600 clamp(1.6rem,2.8vw,3.2rem)/1.15 var(--serif);text-shadow:0 2px 14px rgba(0,0,0,.8);text-wrap:balance}
.soon{margin-top:.6rem;color:var(--gold);font-weight:600;font-size:clamp(1rem,1.5vw,1.4rem);text-shadow:0 1px 8px rgba(0,0,0,.8)}
.cta{display:flex;justify-content:center;flex-wrap:wrap;gap:.75rem;margin-top:1.1rem}
.cta .btn{flex:0 1 16rem}

/* Rails: a row on a wide screen; on a phone, cards to swipe through, the next one showing at the edge */
.rail{display:flex;gap:.75rem;margin:0;padding:0;list-style:none;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
.rail::-webkit-scrollbar{display:none}
.rail>li{flex:0 0 min(82%,22rem);scroll-snap-align:start}
@media (min-width:60rem){.rail{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);overflow:visible}}

/* The story, in four pictures from the film */
.story{padding:clamp(1rem,2.5vw,2rem) 1rem 0}
.tales{max-width:110rem;margin-inline:auto}
.tales li{overflow:hidden;background:var(--glass);border:1px solid var(--edge);border-radius:var(--r)}
.tales img{width:100%;aspect-ratio:16/9;object-fit:cover}
.tales div{padding:.7rem .9rem .85rem}
.tales h3{color:var(--text);font-size:clamp(1.1rem,1.25vw,1.45rem)}
.tales p{margin-top:.25rem;color:var(--muted);font-size:1rem}

/* The game in play: six screenshots from an iPhone, whole and uncropped, as the HUD is the point; three by two on a wide screen */
.plays{margin-top:1rem}
.plays>li{flex-basis:min(86%,30rem);overflow:hidden;background:var(--glass);border:1px solid var(--edge);border-radius:var(--r)}
.plays img{display:block;width:100%;aspect-ratio:2868/1320}
@media (min-width:60rem){.plays{grid-auto-flow:row;grid-template-columns:repeat(3,minmax(0,1fr))}}

/* The three: a portrait each, framed on her, with her colour as a line and a glow along the top */
.trio{margin-top:1rem}
.trio li{--c:var(--gold);position:relative;overflow:hidden;background:var(--glass);border:1px solid var(--edge);border-radius:var(--r)}
.trio li::before{content:"";position:absolute;inset:0 0 auto;z-index:1;height:2px;background:var(--c);box-shadow:0 0 1.1rem .2rem var(--c);opacity:.85}
.trio .heal{--c:var(--heal);--x:50%}.trio .valour{--c:var(--valour);--x:45%}.trio .swift{--c:var(--swift);--x:52%}
.trio img{width:100%;aspect-ratio:4/3;object-fit:cover;object-position:var(--x) 0}
.trio div{padding:.75rem 1rem .9rem}
.trio h3{color:var(--c);font-size:1.15rem}
.trio p{margin-top:.2rem;color:var(--muted);font-size:.98rem}

.missions{color:var(--muted)}
.missions li{margin-top:.5rem}
.missions strong{color:var(--text)}
.modes{display:grid;gap:.6rem;margin:1rem 0 0;padding:0;list-style:none;grid-template-columns:minmax(0,1fr)}
.modes li{display:grid;grid-template-columns:1.5rem minmax(0,1fr);column-gap:.85rem;align-content:start;padding:.9rem 1rem}
.modes .sign{grid-row:span 2;margin-top:.05rem;color:var(--gold)}
.modes h3{font-size:1.1rem}
.modes p{margin-top:.15rem;color:var(--muted);font-size:.98rem}
@media (min-width:36rem){.modes{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:60rem){.modes{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Sections */
.sec{padding-block:clamp(1.5rem,3vw,2.5rem)}
.band{background:linear-gradient(rgba(58,40,21,.34),rgba(28,20,16,.42));border-block:1px solid rgba(242,213,138,.1)}
.split{display:grid;gap:1.25rem;align-items:center;margin-top:1.25rem}
@media (min-width:52rem){.split{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.25rem}}
.shot{margin:0}
.shot img{width:100%;border-radius:var(--r);box-shadow:0 0 0 1px var(--edge),0 1rem 2.5rem rgba(0,0,0,.45)}

/* Glass panels, as in the game */
.steps li,.modes li{background:var(--glass);border:1px solid var(--edge);border-top-color:var(--edge-top);border-radius:var(--r)}
ol.steps,ul.plain{list-style:none;margin:0;padding:0}

.steps{display:grid;gap:.6rem;counter-reset:s;grid-template-columns:minmax(0,1fr)}
@media (min-width:30rem){.steps{grid-template-columns:repeat(2,minmax(0,1fr))}}
ol.steps{margin-top:1rem}
@media (min-width:60rem){.steps{grid-template-columns:repeat(4,minmax(0,1fr))}}
.steps li{padding:.9rem 1rem;counter-increment:s}
.steps h3::before{content:counter(s);display:inline-grid;place-items:center;width:1.6em;height:1.6em;margin-right:.5em;border:1px solid var(--accent);border-radius:50%;font:600 .8em/1 var(--sans);vertical-align:.1em}
.steps p{color:var(--muted)}

.plain li{margin-top:.6rem}

details{border-bottom:1px solid var(--edge)}
.orn+details{margin-top:1.25rem;border-top:1px solid var(--edge)}
summary{position:relative;padding:.95rem 2rem .95rem 0;cursor:pointer;font:600 1.15rem/1.3 var(--serif);list-style:none}
summary::-webkit-details-marker{display:none}
summary::after{content:"";position:absolute;right:.4rem;top:1.25rem;width:.55rem;height:.55rem;border:solid var(--gold);border-width:0 2px 2px 0;transform:rotate(45deg)}
details[open] summary::after{transform:rotate(-135deg);top:1.5rem}
summary:hover{color:var(--gold)}
details p{margin:0 0 1rem;color:var(--muted)}

.closing{padding-block:clamp(1.5rem,3vw,2.5rem);text-align:center;background:radial-gradient(44rem 22rem at 50% 100%,var(--bg-glow),transparent 72%)}
.closing-logo{width:min(60vw,18rem);margin:0 auto 1rem}
.closing .orn{margin:.7rem auto 1.25rem}

/* Support and privacy */
.doc{max-width:46rem;margin:2rem auto 3rem;padding:clamp(1.25rem,5vw,2.75rem);background:var(--glass);border:1px solid var(--edge);border-top-color:var(--edge-top);border-radius:var(--r)}
.doc h1{font-size:clamp(2rem,6vw,2.5rem);letter-spacing:.02em;margin:0 0 1rem}
.doc h2{font-size:1.35rem;color:var(--gold);margin-top:2.25rem}
.doc p{color:var(--muted)}
.doc strong{color:var(--text)}
.meta{color:var(--muted);font-size:.95rem}
body:has(.doc){background:radial-gradient(70rem 32rem at 50% 0,var(--bg-glow),transparent 70%) no-repeat,var(--bg)}
.homes{justify-content:center;gap:.25rem 1.25rem;margin-top:1.25rem}

/* Motion, only for those who want it and browsers that can tie it to scrolling; otherwise everything is simply there.
   The art drifts as the title screen's camera does, and each section fades and rises as it comes into view. */
@media (prefers-reduced-motion:no-preference){
  .modes li{transition:transform .2s ease,border-color .2s ease}
  .modes li:hover,.modes li:focus-within{transform:translateY(-2px);border-color:rgba(242,213,138,.3)}
  @supports (animation-timeline:view()){
    .poster-art{animation:drift 40s ease-in-out infinite alternate}
    .sec>.wrap,.closing>.wrap{animation:rise linear both;animation-timeline:view();animation-range:entry 0% entry 10rem}
  }
}
@keyframes drift{to{transform:scale(1.06)}}
@keyframes rise{from{opacity:0;transform:translateY(12px)}}
