@font-face {
  font-family: 'DM Sans';
  src: url('/assets/fonts/DMSans-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: Fraunces;
  src: url('/assets/fonts/Fraunces-VariableFont_SOFT,WONK,opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
:root { color-scheme: dark; color: #f3e5be; font-family: 'DM Sans', sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: #172e2a; }
/* PR #27 hero rework: the scene covers the viewport; all content overlays it.
 * Art direction slots, safe areas and art provenance: docs/landing-hero.md. */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(40px, 7vh, 80px) clamp(32px, 7vw, 120px) 24px;
}
.hero-art, .gameplay, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art { z-index: -2; }
.gameplay { display: block; object-fit: cover; object-position: center; }
/* At least 76% dark scrim behind desktop copy, and 80% behind the credit.
 * These stops keep cream text above AA even over white replacement artwork. */
.hero::after {
  content: '';
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgb(10 24 20 / 80%), transparent 20%),
    linear-gradient(90deg, rgb(10 24 20 / 86%), rgb(10 24 20 / 76%) calc(clamp(32px, 7vw, 120px) + 600px), rgb(10 24 20 / 8%) 80%);
}
header { width: min(100%, 600px); }
h1 { margin: 0 0 24px; }
.logo { display: block; width: min(100%, 480px); height: auto; }
.tagline { margin: 0; font: 600 clamp(24px, 2.3vw, 32px)/1.3 Fraunces, Georgia, serif; font-variation-settings: 'SOFT' 50, 'WONK' 0; }
p { line-height: 1.5; }
.coming { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: 28px 0 0; font-size: 18px; }
a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; color: inherit; text-underline-offset: 5px; }
.play-link { gap: 8px; }
.play-link img { display: block; flex: none; width: 20px; height: auto; }
.coming > a { padding: 12px 28px; background: #f3e5be; color: #172e2a; font-size: 20px; font-weight: 700; text-decoration: none; }
.credit { margin: 24px 0 0; font-size: 14px; }
a:hover { color: #f3e5be; }
.coming > a:hover { background: #d6ad66; color: #172e2a; }
a:focus-visible { outline: 3px solid #f3e5be; outline-offset: 6px; }
@media (max-width: 1023px) and (orientation: portrait) {
  .hero { padding: 40px 24px 32px; text-align: center; }
  header { margin-inline: auto; }
  .logo { width: min(100%, 420px); margin-inline: auto; }
  .tagline { max-width: 340px; margin-inline: auto; }
  .coming { align-items: center; margin-top: 24px; }
  .gameplay { object-position: 22% center; }
  .hero::after {
    background: linear-gradient(180deg, rgb(10 24 20 / 84%), rgb(10 24 20 / 76%) max(42%, 360px), rgb(10 24 20 / 8%) max(62%, 420px), rgb(10 24 20 / 80%) 94%);
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding: 24px 32px 8px; }
  header { width: min(100%, 410px); }
  h1 { margin-bottom: 12px; }
  .logo { width: 280px; }
  .tagline { font-size: 24px; }
  .coming { flex-direction: row; align-items: center; gap: 12px; margin-top: 20px; font-size: 16px; }
  .coming > a { padding: 8px 20px; font-size: 18px; }
  .credit { margin-top: 16px; }
  .hero::after {
    background:
      linear-gradient(0deg, rgb(10 24 20 / 80%), transparent 24%),
      linear-gradient(90deg, rgb(10 24 20 / 86%), rgb(10 24 20 / 76%) 54%, rgb(10 24 20 / 8%) 85%);
  }
}

/* Issue #44 §2: info sections use the landing's cream, gold and forest palette. */
.section-inner { width: min(100%, 1120px); margin-inline: auto; }
.info, .site-footer { padding: 72px clamp(24px, 7vw, 120px); }
h2, h3 { font-family: Fraunces, Georgia, serif; font-variation-settings: 'SOFT' 50, 'WONK' 0; }
h2 { margin: 0 0 36px; font-size: clamp(32px, 4vw, 46px); font-weight: 600; line-height: 1.15; }
h3 { margin: 0 0 12px; font-size: 23px; font-weight: 600; line-height: 1.2; }
.info p { margin: 0; font-size: 17px; }
.how { background: #243b35; }
.beats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin: 0; padding: 0; list-style: none; counter-reset: beat; }
.beats li { counter-increment: beat; border-top: 1px solid #8e8b63; padding-top: 20px; }
.beats li::before { content: '0' counter(beat); display: block; color: #d6ad66; font-size: 14px; margin-bottom: 20px; }
.characters { background: #eee0b9; color: #172e2a; }
.character-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
.character-card, .world-card { min-width: 0; overflow: hidden; }
.character-card { background: #e1cea1; }
.squirrel-card > img { display: block; width: 100%; height: 280px; object-fit: cover; object-position: right center; }
.card-copy { padding: 24px; }
.raven-art { height: 280px; display: grid; place-items: center; }
.raven-art img { display: block; width: 190px; height: 206px; }
.worlds { background: #172e2a; }
.world-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px; }
.world-card { grid-column: span 2; background: #243b35; }
.world-card:nth-child(4) { grid-column: 2 / span 2; }
.world-card > img { display: block; width: 100%; height: 190px; object-fit: cover; background: #dfc78e url('/art/world-sky.webp') center / cover; }
.world-card p { color: #decda3; font-size: 16px; }
.screenshots { background: #243b35; }
.gameplay-strip { display: grid; grid-template-columns: 1fr 2fr; align-items: center; gap: 48px; }
.gameplay-strip h2 { margin-bottom: 20px; }
.gameplay-strip > img { display: block; width: 100%; height: auto; }
.about { background: #f4ead6; color: #172e2a; }
.about p { max-width: 70ch; }
.about p + p { margin-top: 16px; }
.about-note { color: #304f3d; font-weight: 600; }
.story { background: #172e2a; }
.story p { max-width: 70ch; color: #decda3; }
.faq { background: #243b35; }
.faq-list { display: grid; gap: 16px; max-width: 70ch; }
.faq details { border-top: 1px solid #8e8b63; padding-top: 16px; }
.faq summary { font-family: Fraunces, Georgia, serif; font-size: 20px; font-weight: 600; cursor: pointer; }
.faq details p { margin-top: 10px; color: #decda3; }
.faq a[href="/credits.html"] { display: inline; min-height: 0; }
.notify { background: #eee0b9; color: #172e2a; text-align: center; }
.notify h2 { margin-bottom: 20px; }
.notify p { max-width: 70ch; margin-inline: auto; }
.notify .coming { align-items: center; }
.notify .coming > a { background: #243b35; color: #f3e5be; }
.notify .coming > a:hover { background: #304f3d; color: #f3e5be; }
.stores { background: #172e2a; text-align: center; }
.stores h2 { margin-bottom: 28px; }
.store-row { display: flex; justify-content: center; }
.store-badge { flex-direction: column; gap: 12px; padding: 12px; min-height: 44px; text-decoration: none; font-size: 14px; font-weight: 600; }
.store-badge img { display: block; width: 144px; height: 48px; }
.satire { flex-basis: 100%; text-align: center; font-size: 12px; color: #decda3; }
.site-footer { padding-block: 28px 40px; border-top: 1px solid #596855; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
@media (max-width: 1023px) {
  .beats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .character-grid { grid-template-columns: 3fr 2fr; }
  .world-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world-card, .world-card:nth-child(4) { grid-column: auto; }
  .world-card:last-child { grid-column: 1 / -1; width: calc((100% - 28px) / 2); justify-self: center; }
  .gameplay-strip { grid-template-columns: 1fr; gap: 28px; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 599px) {
  .info { padding-block: 48px; }
  h2 { margin-bottom: 28px; }
  .beats, .character-grid, .world-grid { grid-template-columns: 1fr; }
  .beats { gap: 28px; }
  .beats li { padding-left: 44px; position: relative; }
  .beats li::before { position: absolute; left: 0; top: 24px; }
  .character-grid, .world-grid { gap: 24px; }
  .squirrel-card > img { height: 230px; }
  .raven-art { height: 240px; }
  .world-card:last-child { grid-column: auto; width: 100%; }
  .card-copy { padding: 24px; }
  .site-footer { padding-bottom: 40px; }
}

/* Issue #53: credits page generated from THIRD_PARTY.md, matching the landing palette. */
.credits-page { min-height: 100svh; display: flex; flex-direction: column; }
.credits-masthead { padding: 28px clamp(24px, 7vw, 120px) 0; }
.credits-masthead .logo { width: min(100%, 280px); }
.credits-info { flex: 1; background: #243b35; }
.credits-page h1 {
  margin: 0 0 24px;
  font-family: Fraunces, Georgia, serif;
  font-variation-settings: 'SOFT' 50, 'WONK' 0;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 600;
  line-height: 1.15;
}
.credits-info p { margin: 0 0 20px; font-size: 17px; max-width: 70ch; }
.credits-table-wrap { overflow-x: auto; margin: 32px 0 40px; }
.credits-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.credits-table th, .credits-table td {
  border-bottom: 1px solid #8e8b63;
  padding: 12px 16px 12px 0;
  text-align: left;
  vertical-align: top;
}
.credits-table th {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  color: #d6ad66;
  white-space: nowrap;
}
.credits-table td { overflow-wrap: break-word; }
.credits-table a { display: inline; min-height: 0; }
.license-notice {
  margin: 0 0 24px;
  padding: 24px;
  overflow-x: auto;
  white-space: pre-wrap;
  background: #172e2a;
  border: 1px solid #8e8b63;
  font-size: 14px;
  line-height: 1.5;
}
@media (max-width: 599px) {
  .license-notice { padding: 16px; font-size: 13px; }
  .credits-table-wrap { overflow: visible; }
  .credits-table { min-width: 0; font-size: 15px; }
  .credits-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .credits-table, .credits-table tbody, .credits-table tr, .credits-table td { display: block; width: 100%; }
  .credits-table tbody tr {
    margin: 0 0 16px;
    padding: 16px 16px 8px;
    background: #172e2a;
    border: 1px solid #8e8b63;
  }
  .credits-table td {
    display: grid;
    grid-template-columns: 12ch minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #596855;
    overflow-wrap: anywhere;
  }
  .credits-table td:last-child { border-bottom: 0; }
  .credits-table td::before {
    content: attr(data-label);
    font-family: Fraunces, Georgia, serif;
    font-weight: 600;
    color: #d6ad66;
    font-size: 13px;
  }
}

/* Issue #66: own /privacy and /terms pages share the credits layout. */
.legal-page h2 { margin: 36px 0 12px; font-family: Fraunces, Georgia, serif; font-size: 24px; color: #d6ad66; }
.legal-page ul { margin: 0 0 20px; padding-left: 22px; max-width: 70ch; font-size: 17px; }
.legal-page li { margin-bottom: 8px; }
.legal-todo { border: 1px dashed #d6ad66; padding: 12px 16px; }

/* Live Rookie listing + expanded info (story/world/characters/media). */
.skip-link { position:absolute; left:16px; top:-60px; z-index:10; background:#f3e5be; color:#172e2a; padding:10px 16px; font-weight:700; }
.skip-link:focus { top:12px; color:#172e2a; }
.media { background:#243b35; }
.media-intro, .worlds-intro { color:#decda3; margin-bottom:28px; max-width:70ch; }
.media-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; }
.media-grid figure { margin:0; background:#172e2a; overflow:hidden; }
.media-grid img { display:block; width:100%; height:260px; object-fit:cover; }
.media-grid figcaption { padding:16px 20px; font-size:15px; color:#decda3; }
.fatcat-card { display:flex; align-items:center; }
.story p + p { margin-top:16px; }
@media (max-width:599px){ .media-grid{grid-template-columns:1fr} .media-grid img{height:auto} }
