/* playembercrown.com: the game's warm ember colours on the night (the wiki's palette, wiki/wiki.css). Phone first. */
:root {
  --bg: #0d0a0f; --bg2: #120d12; --panel: #1b130e; --panel2: #24180f; --line: #3d2c1e;
  --text: #f0e2c4; --dim: #c9b693; --faint: #8a7a62; --gold: #ffd9a0;
  --ember: #f29a2e; --ember2: #c2451e; --link: #ffc070; --gloam: #6d5a9c;
  --wrap: 1120px; --gut: 16px;
  --serif: Cinzel, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* OB-20: Cinzel from our own files (the game's client/public/fonts/, served at /play/fonts/; OFL licence beside them), not Google. */
@font-face { font-family: Cinzel; font-style: normal; font-weight: 500; font-display: swap; src: url(/play/fonts/cinzel-500.woff2) format("woff2"); }
@font-face { font-family: Cinzel; font-style: normal; font-weight: 700; font-display: swap; src: url(/play/fonts/cinzel-700.woff2) format("woff2"); }
@font-face { font-family: Cinzel; font-style: normal; font-weight: 900; font-display: swap; src: url(/play/fonts/cinzel-900.woff2) format("woff2"); }
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--text); font: 17px/1.6 var(--sans); background: var(--bg); overflow-x: hidden; }
img, svg, canvas { max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 900; line-height: 1.15; letter-spacing: .4px; margin: 0; }
h2 { font-size: clamp(28px, 4.4vw, 44px); color: var(--gold); }
h3 { font-size: 19px; color: var(--gold); font-weight: 700; }
p { margin: 0 0 14px; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.eyebrow { font: 700 13px/1 var(--sans); letter-spacing: 3px; text-transform: uppercase; color: var(--ember); margin: 0 0 14px; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--dim); max-width: 38em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--faint); font-size: 14px; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 34px; border-radius: 12px; font: 900 19px/1 var(--serif); letter-spacing: 2px; text-decoration: none !important; cursor: pointer; border: 0; white-space: nowrap; }
.btn-play { background: linear-gradient(#f7b04a, #c2451e); color: #1a0d05; box-shadow: 0 0 28px rgba(240, 138, 36, .35), inset 0 1px 0 rgba(255, 255, 255, .35); transition: box-shadow .2s, filter .2s; }
.btn-play:hover, .btn-play:focus-visible { filter: brightness(1.08); box-shadow: 0 0 44px rgba(240, 138, 36, .6), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-ghost { color: var(--gold); border: 1px solid rgba(255, 217, 160, .35); background: rgba(13, 10, 15, .45); backdrop-filter: blur(4px); font-size: 16px; padding: 14px 26px; }
.btn-ghost:hover { border-color: var(--ember); }
.btn-small { padding: 10px 16px; font-size: 14px; letter-spacing: 1px; border-radius: 9px; }

/* ---- top bar ---- */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px var(--gut); padding-top: max(10px, env(safe-area-inset-top)); transition: background .25s, border-color .25s; border-bottom: 1px solid transparent; }
.bar.solid, .bar.open, body:not(.page-home) .bar { background: rgba(13, 10, 15, .92); backdrop-filter: blur(8px); border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font: 700 18px var(--serif); letter-spacing: 1px; text-decoration: none !important; margin-right: auto; }
.brand b { color: var(--ember); font-weight: 700; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--dim); padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); text-decoration: none; }
.nav a[aria-current] { color: var(--gold); }
.menu { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: rgba(13, 10, 15, .6); padding: 10px; flex-direction: column; justify-content: space-between; cursor: pointer; }
.menu span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
@media (max-width: 820px) {
  .menu { display: flex; order: 3; }
  .bar .btn-small { order: 2; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; padding: 8px var(--gut) 16px; background: rgba(13, 10, 15, .97); border-bottom: 1px solid var(--line); }
  .bar.open .nav { display: flex; }
  .nav a { padding: 13px 10px; font-size: 17px; border-bottom: 1px solid rgba(61, 44, 30, .5); }
}
@media (max-width: 380px) { .brand span { display: none; } }

/* ---- hero ---- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-start; justify-content: center; background: #07060c; text-align: center; overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 55% 40% at 50% 26%, rgba(7, 6, 12, .6), rgba(7, 6, 12, 0) 70%), linear-gradient(rgba(13, 10, 15, 0) 84%, var(--bg)); }
.hero-in { padding: clamp(96px, 15vh, 150px) var(--gut) 40px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hero .logo { width: min(620px, 90vw); height: auto; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .6)); }
.hero-line { margin: 0; font: 700 clamp(22px, 3.4vw, 34px)/1.2 var(--serif); color: var(--gold); text-shadow: 0 2px 14px rgba(0, 0, 0, .85); max-width: 22em; }
.hero .lead { margin: 0 auto; color: #e6d4b2; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.invite-note { margin: 4px 0 0; max-width: 34em; padding: 12px 16px; border: 1px solid var(--ember); border-radius: 12px; background: rgba(13, 10, 15, .78); color: var(--text); font-size: 15px; line-height: 1.5; }
.invite-note b { color: var(--gold); }
.invite-note code { color: var(--gold); font-weight: 700; letter-spacing: 1px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.hero-cta .btn-play { font-size: 22px; padding: 17px 54px; }
.scroll-cue { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: var(--faint); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; }
/* Phones and tall screens (Kellen, Dec 1: "the sky needs to continue up through the Embercrown title, and the bottom
   of the image needs to align with the next section"): one picture fills the whole hero, as on a PC. The night sky
   and its stars run up behind the title, the words sit in the sky (compact, both buttons on one row), Crownhold and
   its fires sit along the bottom, and the bottom fades straight into the next section. A short screen makes the hero
   taller instead of putting the words over the city. */
@media (max-aspect-ratio: 1/1) {
  .hero { min-height: max(100svh, 720px); }
  .hero::after { background: radial-gradient(ellipse 90% 34% at 50% 30%, rgba(7, 6, 12, .55), rgba(7, 6, 12, 0) 75%), linear-gradient(rgba(13, 10, 15, 0) 80%, var(--bg)); }
  .hero-in { padding: 84px var(--gut) 0; gap: 10px; }
  .hero .logo { width: min(440px, 80vw); }
  .hero-line { font-size: clamp(18px, 5.2vw, 26px); }
  .hero .lead { font-size: 15px; line-height: 1.5; }
  .hero-cta { flex-wrap: nowrap; margin-top: 4px; }
  .hero-cta .btn-play { font-size: 17px; padding: 14px 24px; }
  .hero-cta .btn-ghost { font-size: 13px; padding: 13px 14px; }
  .scroll-cue { display: none; }
}

/* hero art motion */
.hero-art .embers circle { animation: rise 7s linear infinite; opacity: 0; }
@keyframes rise { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(var(--dx, 0), -220px); opacity: 0; } }
.hero-art .tw { animation: twinkle 4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .15; } }
.hero-art .flicker { animation: flicker 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes flicker { 0%, 100% { transform: scale(.78) translate(0, 5px); } 40% { transform: scale(.74, .84) translate(0, 4px); } 70% { transform: scale(.8, .74) translate(0, 6px); } }
.hero-art .win { animation: glowwin 5s ease-in-out infinite; }
@keyframes glowwin { 50% { opacity: .6; } }
.hero-art .mist { animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(60px); } }
@media (prefers-reduced-motion: reduce) { .hero-art * { animation: none !important; } .hero-art .embers circle { opacity: .7; } }

/* ---- sections ---- */
section { padding: clamp(64px, 10vw, 120px) 0; position: relative; }
.split { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } .split.flip > :first-child { order: 2; } }
.frame { margin: 0; position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, .55), 0 0 0 6px rgba(27, 19, 14, .7); background: var(--panel); }
.frame img { display: block; width: 100%; height: auto; image-rendering: auto; }
.frame figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; font-size: 13px; color: var(--dim); background: linear-gradient(rgba(13, 10, 15, 0), rgba(13, 10, 15, .9)); }

/* the story */
.story { background: radial-gradient(ellipse 80% 60% at 20% 40%, rgba(194, 69, 30, .12), transparent 70%), var(--bg); }
.story blockquote { margin: 22px 0 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--ember); font: 500 19px/1.5 var(--serif); color: var(--gold); }

/* the hearths, as a row of fires */
.hearths { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 30px 0 0; padding: 0; list-style: none; max-width: 520px; }
.hearths li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--faint); text-align: center; line-height: 1.2; }
.hearths i { width: 26px; height: 32px; background: #3a2a22; clip-path: path("M13,0 C17,6 25,11 25,20 C25,27 19,32 13,32 C7,32 1,27 1,20 C1,15 5,12 6,7 C8,10 10,12 13,13 C14,9 15,5 13,0 Z"); }
.hearths li.lit i { background: linear-gradient(#ffd98a, #f59b2e 50%, #e4571b); filter: drop-shadow(0 0 6px #f08a24); }
.hearths li.lit { color: var(--gold); }

/* gallery */
.gallery { background: linear-gradient(var(--bg), var(--bg2)); }
.shots { display: grid; gap: 14px; margin-top: 34px; }
@media (min-width: 760px) { .shots { grid-template-columns: repeat(6, 1fr); } .shots .frame:nth-child(1) { grid-column: span 4; grid-row: span 2; } .shots .frame:nth-child(n+2) { grid-column: span 2; } .shots .frame:nth-child(n+4) { grid-column: span 2; } }
.shots .frame { margin: 0; cursor: zoom-in; }
.shots .frame img { aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s; }
.shots .frame:hover img { transform: scale(1.03); }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(5, 4, 7, .9); }
.lightbox img { display: block; max-width: 96vw; max-height: 86vh; border-radius: 10px; }
.lightbox p { color: var(--dim); text-align: center; margin: 10px 0 0; font-size: 14px; }

/* combat: the three styles side by side */
.combat { background: radial-gradient(ellipse 70% 60% at 80% 30%, rgba(194, 69, 30, .14), transparent 70%), var(--bg); }
.styles { display: grid; gap: 14px; margin-top: 34px; }
@media (min-width: 760px) { .styles { grid-template-columns: repeat(3, 1fr); } }
.styles .frame img { aspect-ratio: 16 / 9; object-fit: cover; }
.styles figcaption b { color: var(--gold); }

/* features */
.features { display: grid; gap: 14px; margin-top: 36px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
@media (min-width: 900px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: 22px 22px 20px; border-radius: 14px; background: linear-gradient(var(--panel), #150f0b); border: 1px solid var(--line); }
.feature .ico { font-size: 26px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: rgba(242, 154, 46, .1); border: 1px solid rgba(242, 154, 46, .3); margin-bottom: 14px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--dim); font-size: 15.5px; margin: 0; }

/* creatures, drawn by the game's own art code */
.bestiary { background: radial-gradient(ellipse 70% 70% at 50% 100%, rgba(109, 90, 156, .16), transparent 70%), var(--bg2); }
.creatures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 34px; }
@media (min-width: 560px) { .creatures { grid-template-columns: repeat(5, 1fr); } }
.creature { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 12px; border-radius: 14px; background: rgba(27, 19, 14, .6); border: 1px solid var(--line); color: var(--text); text-align: center; font-size: 14px; }
.creature:hover { border-color: var(--ember); text-decoration: none; transform: translateY(-2px); }
.creature { transition: transform .2s, border-color .2s; }
.creature canvas { width: 96px; height: 96px; }
.creature span { color: var(--faint); font-size: 12px; }

/* call to action band */
.band { text-align: center; background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(240, 138, 36, .2), transparent 70%), var(--bg); border-top: 1px solid var(--line); }
.band .lead { margin: 14px auto 26px; }

/* plans (membership) */
.page-head { padding: 130px 0 40px; text-align: center; background: radial-gradient(ellipse 70% 100% at 50% 0, rgba(194, 69, 30, .22), transparent 70%); }
.page-head .lead { margin: 16px auto 0; }
.plans { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); max-width: 900px; margin: 0 auto; }
.plan { position: relative; display: flex; flex-direction: column; padding: 28px 26px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.plan.member { background: linear-gradient(165deg, #2b1a10, #170f0b 60%); border-color: rgba(242, 154, 46, .55); box-shadow: 0 0 50px rgba(240, 138, 36, .12); }
.plan .tag { position: absolute; top: -12px; right: 20px; font: 700 12px/1 var(--sans); letter-spacing: 1.5px; text-transform: uppercase; padding: 7px 12px; border-radius: 99px; background: var(--ember); color: #1a0d05; }
.plan h3 { font-size: 24px; }
.plan .price { font: 900 34px/1.1 var(--serif); color: var(--text); margin: 14px 0 4px; }
.plan .price small { font: 500 15px var(--sans); color: var(--faint); }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; flex: 1; }
.plan li { position: relative; padding: 7px 0 7px 28px; color: var(--dim); border-bottom: 1px solid rgba(61, 44, 30, .5); font-size: 15.5px; }
.plan li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 12px; height: 14px; background: var(--ember); clip-path: path("M6,0 C8,3 12,5 12,9 C12,12 9,14 6,14 C3,14 0,12 0,9 C0,6 3,4 3,2 C4,4 5,5 6,6 C7,4 7,2 6,0 Z"); }
.plan .btn { width: 100%; }
.btn[aria-disabled="true"] { background: var(--panel2); color: var(--faint); box-shadow: none; cursor: default; border: 1px solid var(--line); }

/* text pages, FAQ */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 28px; margin: 44px 0 14px; }
.prose p, .prose li { color: var(--dim); }
.prose ul { padding-left: 20px; }
/* OB-3: the Privacy Policy and Terms of Service (/privacy/, /terms/, from site/legal/*.md) */
.legal { padding: 110px 0 50px; }
.legal h1 { font-size: clamp(32px, 6vw, 50px); color: var(--gold); margin: 0 0 10px; }
.legal h2 { font-size: clamp(22px, 3.4vw, 28px); margin: 38px 0 12px; }
.legal p b, .legal li b { color: var(--text); }
.legal .table { overflow-x: auto; margin: 0 0 16px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--dim); }
.legal th { color: var(--text); font-weight: 700; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 30px 14px 0; position: relative; font-weight: 600; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 22px; color: var(--ember); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--dim); margin: 0 0 16px; padding-top: 2px; }
.faq summary { font-weight: 700; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 10px 0 0; }
.card { display: block; padding: 20px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.card:hover { border-color: var(--ember); text-decoration: none; }
.card b { display: block; font: 700 17px var(--serif); color: var(--gold); margin-bottom: 4px; }
.card span { color: var(--dim); font-size: 15px; }

/* footer */
.foot { border-top: 1px solid var(--line); background: #0a080b; padding: 44px 0 24px; }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.foot-brand { display: flex; gap: 12px; align-items: center; }
.foot-brand b { display: block; font: 700 18px var(--serif); }
.foot-brand span { color: var(--faint); font: 500 12px var(--serif); letter-spacing: 2px; text-transform: uppercase; }
.foot-links { display: flex; flex-wrap: wrap; gap: 40px; }
.foot-links div { display: flex; flex-direction: column; gap: 8px; }
.foot-links h4 { font: 700 12px var(--sans); letter-spacing: 2px; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.foot-links a { color: var(--dim); font-size: 15px; overflow-wrap: anywhere; }
.copy { max-width: var(--wrap); margin: 30px auto 0; padding: 0 var(--gut); color: #5d5040; font-size: 13px; }
