/* Hearthtail. Colours, type and button shapes follow the game's UI kit (SoftUiKit.cs). */
@font-face { font-family: Fredoka; src: url(/assets/fonts/fredoka-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Nunito; src: url(/assets/fonts/nunito-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Nunito; src: url(/assets/fonts/nunito-700.woff2) format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: Lora; src: url(/assets/fonts/lora-var.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --ink: #3B2C20;
  --muted: #6B5847;
  --paper: #FFF8EA;
  --linen: #FFFDF6;
  --well: #FFF0D4;
  --rule: #EBD9B8;
  --lip: #E6D5B8;
  --ember: #D46A10;
  --ember-deep: #A0540F;
  --brass: #F0A530;
  --leaf: #2E7A3C;
  --leaf-lip: #1F5A2B;
  --leaf-bright: #3E9B4F;
  --sky: #1F6FA6;
  --coral: #B8432F;
  --plum: #6A45AE;
  --display: Fredoka, "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: Lora, Georgia, serif;
  --gutter: clamp(1.125rem, 4vw, 3rem);
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.6 var(--body); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--ember-deep); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--linen); padding: .6rem 1rem; border-radius: 999px; }
.skip:focus { top: 1rem; }
.wrap { max-width: 76rem; margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 50rem; }
.lede { max-width: var(--measure); color: var(--muted); font-size: 1.2rem; margin-top: .9rem; }

/* Paper card and chunky buttons, as in the game's menus. */
.card { background: var(--paper); border: 2px solid var(--rule); border-radius: 26px; box-shadow: 0 0 0 6px var(--linen), 0 14px 30px -12px rgba(59, 44, 32, .35); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.4rem; padding: .7rem 1.6rem; border: 0; border-radius: 999px; font: 600 1.15rem/1.1 var(--display); text-decoration: none; cursor: pointer; background: var(--linen); color: var(--ink); box-shadow: 0 5px 0 var(--lip); transition: transform .08s ease, box-shadow .08s ease; }
.button-leaf { background: var(--leaf); color: #fff; box-shadow: 0 5px 0 var(--leaf-lip); }
.button-leaf:hover { color: #fff; background: #2A7037; }
.button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--leaf-lip); }
.button-small { min-height: 2.6rem; padding: .4rem 1.1rem; font-size: 1rem; box-shadow: 0 4px 0 var(--leaf-lip); }
.button[disabled] { opacity: .7; cursor: progress; }

/* Masthead */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem var(--gutter); }
.masthead-over { position: absolute; inset: 0 0 auto; z-index: 5; }
.brand { display: flex; align-items: center; gap: .6rem; font: 600 1.45rem/1 var(--display); color: var(--ember-deep); text-decoration: none; }
.brand img { border-radius: 12px; box-shadow: 0 2px 0 var(--lip); }
.masthead-over .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.masthead nav { display: flex; align-items: center; gap: clamp(.8rem, 2.4vw, 2rem); font-weight: 700; }
.masthead nav a:not(.button) { color: var(--ink); text-decoration: none; }
.masthead nav a:not(.button):hover { text-decoration: underline; }
@media (max-width: 760px) { .masthead nav a:not(.button) { display: none; } }

/* Hero: the valley painting, full bleed, with the words in its open sky. */
.hero { position: relative; min-height: min(100svh, 56rem); background: radial-gradient(ellipse at 20% 30%, #FFF3D6, var(--paper) 70%); display: grid; align-items: center; isolation: isolate; overflow: hidden; }
.hero-art { position: absolute; inset: 0 0 0 max(30%, calc((100vw - 76rem) / 2 + 22rem)); z-index: -1; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%); mask-image: linear-gradient(to right, transparent 0, #000 22%); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; }
.hero-art::after { content: ""; position: absolute; inset: auto 0 0; height: 7rem; background: linear-gradient(rgba(255, 248, 234, 0), var(--paper)); }
.hero-copy { width: min(100%, 33rem); margin-left: max(var(--gutter), calc((100vw - 76rem) / 2 + var(--gutter))); padding: 7rem 0 6rem; }
.wordmark { margin: 0; font: 600 clamp(4rem, 2.2rem + 8vw, 7.5rem)/.95 var(--display); letter-spacing: -.01em; color: var(--ember); paint-order: stroke fill; -webkit-text-stroke: .085em var(--paper); text-shadow: 0 .06em 0 #7A3A06, 0 .1em .14em rgba(59, 44, 32, .25); }
.hero h1 { margin: 1.1rem 0 .9rem; font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.35rem); max-width: 20ch; }
.hero-pitch { font-size: 1.2rem; max-width: 30rem; margin-bottom: 1.6rem; }
@media (max-width: 760px) {
  .hero { display: block; min-height: 0; }
  .hero-art { position: relative; height: min(70svh, 30rem); }
  .hero-art img { object-position: 60% 50%; }
  .hero-art { inset: auto; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
  .hero-copy { margin: -3.5rem var(--gutter) 0; padding: 0 0 3.5rem; width: auto; position: relative; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-art img { animation: drift 1.6s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-copy > * { animation: rise .8s cubic-bezier(.2, .8, .3, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .12s; } .hero-copy > :nth-child(3) { animation-delay: .22s; } .hero-copy > :nth-child(4) { animation-delay: .32s; }
  @keyframes drift { from { transform: scale(1.06); } }
  @keyframes rise { from { opacity: 0; transform: translateY(.8rem); } }
}

/* Waitlist */
.waitlist label { display: block; margin-bottom: .35rem; font-weight: 700; font-size: 1rem; }
.waitlist-row { display: flex; flex-wrap: wrap; gap: .7rem; }
.waitlist input[type=email] { flex: 1 1 14rem; min-width: 0; min-height: 3.4rem; padding: 0 1.2rem; border: 2px solid var(--lip); border-radius: 999px; background: var(--linen); color: var(--ink); font: 400 1.1rem var(--body); }
.waitlist input[type=email]::placeholder { color: #8A7866; }
.waitlist input[aria-invalid=true] { border-color: var(--coral); }
.waitlist .button { flex: 1 0 auto; }
.waitlist-pot { position: absolute; left: -200vw; width: 1px; height: 1px; opacity: 0; }
.waitlist-status { margin: .7rem 0 0; font-weight: 700; min-height: 0; }
.waitlist-status:empty { display: none; }
.waitlist-status[data-kind=error] { color: var(--coral); }
.waitlist-status[data-kind=done] { color: var(--leaf); font: 600 1.2rem/1.3 var(--display); }
.waitlist-note { margin: .7rem 0 0; font-size: .95rem; color: var(--muted); }
.waitlist[data-done] .waitlist-row, .waitlist[data-done] label, .waitlist[data-done] .waitlist-note { display: none; }

/* Bands */
.band { padding-block: clamp(4rem, 3rem + 5vw, 7.5rem); }
.band-well { background: var(--well); }

/* The rescue, as picture-book spreads. */
.story { padding-block: clamp(4rem, 3rem + 5vw, 7rem) clamp(2rem, 2vw, 3rem); }
.story-head { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.spread { max-width: 76rem; margin: 0 auto clamp(3.5rem, 7vw, 6.5rem); padding-inline: var(--gutter); display: grid; grid-template-columns: 1.45fr 1fr; gap: clamp(1.75rem, 5vw, 5rem); align-items: center; }
.spread-flip { grid-template-columns: 1fr 1.45fr; }
.spread-flip .spread-art { order: 2; }
.spread-art img { width: 100%; border-radius: 28px; box-shadow: 0 30px 60px -30px rgba(59, 44, 32, .55); }
.spread-text h3 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); margin-bottom: 1rem; color: var(--ember-deep); }
.spread-text p { color: var(--muted); max-width: 30rem; }
@media (max-width: 860px) { .spread, .spread-flip { grid-template-columns: 1fr; } .spread-flip .spread-art { order: 0; } }

/* Endings: three paintings side by side. */
.endings { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); margin-top: 3rem; }
.endings figure { margin: 0; }
.endings img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; box-shadow: 0 20px 40px -24px rgba(59, 44, 32, .55); }
.endings h3 { margin: 1.3rem 0 .4rem; font-size: 1.55rem; }
.endings p { color: var(--muted); font-size: 1.05rem; }
@media (max-width: 860px) { .endings { grid-template-columns: 1fr; gap: 2.5rem; } }

/* Districts: a gallery of six paintings. */
.districts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem clamp(1.25rem, 2.5vw, 2rem); margin-top: 3rem; }
.district { margin: 0; }
.district img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; box-shadow: 0 18px 36px -22px rgba(59, 44, 32, .55); }
.district h3 { margin: 1.2rem 0 .35rem; font-size: 1.5rem; }
.district-story { margin: 0 0 .35rem; color: var(--muted); font-size: 1.03rem; }
.district-animals { margin: 0; font-weight: 700; font-size: 1rem; color: var(--leaf); }
@media (max-width: 1100px) { .districts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .districts { grid-template-columns: 1fr; } }

/* The promise, and Elowen's letter. */
.promise { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.promise-copy h2 { margin-bottom: 1.2rem; }
.promise-copy p { max-width: 34rem; }
.gentle { list-style: none; margin: 1.6rem 0 1.8rem; padding: 0; display: grid; gap: .85rem; max-width: 34rem; }
.gentle li { position: relative; padding-left: 1.9rem; color: var(--muted); }
.gentle li::before { content: ""; position: absolute; left: .15rem; top: .45em; width: .95rem; height: .95rem; border-radius: 50% 0 50% 50%; background: var(--leaf-bright); transform: rotate(-45deg); }
.gentle strong { color: var(--ink); }
.letter { margin: 0; padding: clamp(1.6rem, 4vw, 3rem); background: var(--linen); border: 2px solid var(--rule); border-radius: 18px; box-shadow: 0 18px 40px -18px rgba(59, 44, 32, .4); transform: rotate(1.2deg); font: 400 1.18rem/1.75 var(--hand); }
.letter blockquote { margin: 0; }
.letter-close { margin: 1.4rem 0 0; }
.letter-close span { font: italic 600 1.7rem/1.4 var(--hand); }
.letter figcaption { margin-top: 1.4rem; padding-top: 1rem; border-top: 2px solid var(--rule); color: var(--muted); font: 400 .98rem/1.4 var(--body); }
@media (max-width: 860px) { .promise { grid-template-columns: 1fr; } .letter { transform: none; } }

/* FAQ */
.faq { margin-top: 2rem; }
.faq details { border-bottom: 2px solid var(--rule); }
.faq summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.15rem 0; font: 600 1.25rem/1.3 var(--display); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: var(--linen); color: var(--ember-deep); font-size: 1.4rem; line-height: 1; box-shadow: 0 3px 0 var(--lip); }
.faq details[open] summary::after { content: "–"; }
.faq details p { max-width: var(--measure); margin: 0 0 1.3rem; color: var(--muted); }

/* Closing: the hearth at night, with the waitlist beside the fire. */
.closing { position: relative; isolation: isolate; min-height: min(90svh, 50rem); display: grid; align-items: center; overflow: hidden; }
.closing-art { position: absolute; inset: 0; z-index: -1; }
.closing-art img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 70%; }
.closing-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, rgba(35, 22, 12, .35), rgba(35, 22, 12, 0) 50%); }
.closing-card { justify-self: end; width: min(100% - 2 * var(--gutter), 28rem); margin: 4rem max(var(--gutter), calc((100vw - 76rem) / 2)); padding: clamp(1.6rem, 3vw, 2.4rem); background: var(--paper); border-radius: 28px; box-shadow: 0 0 0 6px rgba(255, 253, 246, .6), 0 30px 60px -20px rgba(0, 0, 0, .55); }
.closing-card img { border-radius: 22px; margin-bottom: 1.1rem; box-shadow: 0 4px 0 var(--lip); }
.closing-card h2 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem); }
.closing-card > p { margin: .7rem 0 1.3rem; color: var(--muted); }
@media (max-width: 760px) {
  .closing { display: block; min-height: 0; }
  .closing-art { position: relative; height: 22rem; }
  .closing-art img { object-position: 18% 88%; }
  .closing-art::after { background: none; }
  .closing-card { width: auto; margin: -1.5rem var(--gutter) 3rem; position: relative; }
}

/* Footer */
.foot { padding: 3.5rem var(--gutter) 2rem; background: var(--ink); color: #EADCC8; font-size: 1rem; }
.foot a { color: #fff; text-decoration: none; display: block; padding: .3rem 0; }
.foot a:hover { text-decoration: underline; }
.foot-inner { max-width: 74rem; margin-inline: auto; display: grid; align-items: start; grid-template-columns: minmax(14rem, 1fr) 2.4fr; gap: 3rem; }
.foot-brand { display: flex; gap: 1rem; align-items: center; }
.foot-brand img { border-radius: 14px; }
.foot-brand p { margin: 0; }
.foot-brand strong { font: 600 1.4rem var(--display); color: #fff; }
.foot nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 2rem; }
.foot h2 { font-size: 1.05rem; color: var(--brass); margin-bottom: .5rem; }
.foot-legal { max-width: 74rem; margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .16); font-size: .92rem; color: #CDBBA3; }
@media (max-width: 760px) { .foot-inner { grid-template-columns: 1fr; } }

/* Articles: guides, support, privacy */
.article { max-width: 48rem; margin-inline: auto; padding: clamp(2rem, 5vw, 4rem) var(--gutter) 5rem; }
.article h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.5rem); color: var(--ember-deep); }
.article h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin: 2.8rem 0 .9rem; }
.article-intro { margin-top: 1.2rem; font-size: 1.28rem; line-height: 1.55; }
.article ul:not(.guide-list) { padding-left: 1.3rem; }
.article li { margin-bottom: .4rem; }
.article-image img, .article-figure img { border-radius: 22px; box-shadow: 0 20px 40px -24px rgba(59, 44, 32, .55); }
.article-image { margin: 2rem 0 0; }
.article-image img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.article-figure { margin: 1.6rem 0; }
.article-figure figcaption { margin-top: .7rem; color: var(--muted); font-size: 1rem; }
.crumbs { margin-bottom: 1.2rem; font-size: 1rem; color: var(--muted); }
.callout { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; margin: 2.2rem 0; padding: 1.4rem 1.5rem; }
.callout img { border-radius: 16px; }
.callout p { margin-bottom: .8rem; }
@media (max-width: 560px) { .callout { grid-template-columns: 1fr; } }
.related ul { list-style: none; padding: 0 !important; }
.guide-list { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 2rem; }
.guide-list a { display: block; padding: 0 0 1.4rem; color: inherit; text-decoration: none; overflow: hidden; border-radius: 24px; }
.guide-list img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.guide-list h2 { margin: 1.2rem 1.4rem .4rem; color: var(--ember-deep); }
.guide-list p { margin: 0 1.4rem; color: var(--muted); }
.guide-list a:hover h2 { text-decoration: underline; }
.lost { text-align: center; padding-block: 7rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .button { transition: none; } }
