:root {
  --site-ink: #10191b;
  --site-paper: #f9edd7;
  --site-gold: #efc084;
  --site-rule: #c8a37365;
  --site-muted: #d3cdc0;
}

body[data-screen="title"] { background: var(--site-ink); }
body[data-screen="title"] .menu-shade { background: none; }
body[data-screen="title"] .hud-header {
  top: max(14px, env(safe-area-inset-top));
  right: max(19px, env(safe-area-inset-right));
}
body[data-screen="title"] :is(.locale-switch, #audio) {
  background: #172326ed;
  border: 1px solid var(--site-rule);
  box-shadow: none;
}
body[data-screen="title"] .locale-switch button[aria-pressed="true"] { background: var(--site-gold); }

body[data-screen="title"] #title-screen {
  inset: 0;
  z-index: 2;
  isolation: isolate;
  grid-template: 1fr / minmax(0, 480px);
  align-items: center;
  gap: 0;
  max-height: none;
  margin: 0;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(clamp(25px, 6vw, 116px), env(safe-area-inset-left));
  color: var(--site-paper);
}
.nfh-menu-art {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.nfh-menu-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.nfh-menu-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #10191b 0%, #10191bf7 23%, #10191bcf 38%, #10191b36 64%, #10191b10 100%),
    linear-gradient(0deg, #10191bbd, transparent 38%);
  content: "";
}
#title-screen h1 {
  color: var(--site-paper);
  font-size: clamp(68px, min(11vw, 18vh), 158px);
  line-height: .8;
  letter-spacing: -.075em;
  text-shadow: 0 2px 24px #10191b9e;
}
#title-screen h1 em {
  margin-top: .68em;
  color: var(--site-gold);
  font-size: clamp(.85rem, 1.65vw, 1.32rem);
  letter-spacing: .31em;
}
#title-screen .nfh-tagline {
  max-width: 39ch;
  margin: 17px 0 22px;
  color: var(--site-muted);
  font-size: clamp(.85rem, 1.16vw, 1rem);
  line-height: 1.45;
}
#title-screen .roster-select { margin-top: 0; }
#title-screen .menu-label {
  margin-bottom: 7px;
  color: var(--site-gold);
  font-size: .73rem;
  letter-spacing: .13em;
}
#title-screen :is(#skins, .opening-actions) { width: 100%; }
#title-screen #skins { gap: 6px; }
#title-screen .skin-card {
  min-height: 0;
  background: radial-gradient(ellipse at 50% 25%, #3453517d, #19262a 74%);
  border: 1px solid #aa937754;
  border-radius: 6px;
  box-shadow: none;
}
#title-screen .skin-card canvas { height: clamp(36px, 8.6vh, 68px); }
#title-screen .skin-card span { background: #152126; color: var(--site-paper); font-size: .76rem; padding-block: 4px; }
#title-screen .skin-card[aria-pressed="true"] { background: #493a29; border-color: var(--site-gold); }
#title-screen .skin-card[aria-pressed="true"] span { background: var(--site-gold); color: #221a13; }
#title-screen .skin-card:hover:not([aria-pressed="true"]) { border-color: var(--site-gold); }
#title-screen .hero-perk {
  width: 100%;
  min-height: 2em;
  gap: 3px 9px;
  margin-top: 7px;
  padding: 5px 8px;
  color: var(--site-muted);
  background: #10191bc7;
  border-color: #7464458c;
}
#title-screen .hero-perk strong { color: var(--site-gold); }
#title-screen .spawn-select { display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 10px; }
#title-screen .spawn-select select { background: #1a282b; border-color: var(--site-rule); color: var(--site-paper); min-width: 0; flex: 1; }
#title-screen .opening-actions { gap: 7px; margin-top: 11px; }
#title-screen .opening-actions button {
  min-height: 46px;
  justify-content: flex-start;
  text-align: left;
  padding: 7px 12px;
  border-radius: 6px;
  box-shadow: none;
}
#title-screen :is(#story-start, #story-coop) {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 2px;
  min-height: 58px;
  padding-right: 30px;
}
#title-screen :is(#story-start, #story-coop)::after {
  content: "";
  position: absolute;
  top: calc(50% - 4px);
  right: 12px;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid;
  border-right: 1.5px solid;
  transform: rotate(45deg);
}
#title-screen #story-start { background: var(--site-gold); color: #251b13; }
#title-screen :is(#story-coop, #online, #solo) {
  background: #172629ef;
  color: var(--site-paper);
  border: 1px solid var(--site-rule);
}
#title-screen :is(#story-coop, #online, #solo):hover { background: #2c413f; }
#title-screen .opening-actions strong + span { font-size: .75rem; opacity: .9; }
#title-screen .menu-tools { justify-content: space-between; gap: 3px 10px; margin-top: 10px; }
#title-screen .menu-tools :is(button, a) {
  color: var(--site-muted);
  border: 0;
  background: transparent;
  padding: 6px 0;
  line-height: 1.2;
  font-size: .8rem;
  text-decoration: none;
}
#title-screen .menu-tools :is(button, a):hover { color: var(--site-gold); text-decoration: underline; }
#title-screen .menu-tools #site-about { color: var(--site-gold); }
:is(#title-screen, .nfh-about) a:focus-visible { outline: 2px solid var(--site-gold); outline-offset: 4px; }

@media (max-width: 700px) and (orientation: portrait) {
  body[data-screen="title"] #title-screen {
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
    padding: max(47px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
      max(13px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }
  .nfh-menu-art img { object-position: 69% center; }
  .nfh-menu-art::after { background: linear-gradient(0deg, #10191b 0%, #10191bf6 44%, #10191b91 68%, #10191b05 100%); }
  #title-screen h1 { font-size: clamp(57px, 16vw, 94px); }
  #title-screen h1 em { font-size: .83rem; }
  #title-screen .nfh-tagline { margin-block: 12px 14px; }
  #title-screen .skin-card canvas { height: clamp(35px, 8vh, 61px); }
  #title-screen .menu-tools { gap: 3px 8px; }
  #title-screen .menu-tools :is(button, a) { font-size: clamp(.7rem, 2.8vw, .8rem); }
}

@media (max-height: 550px) and (orientation: landscape) {
  body[data-screen="title"] #title-screen {
    grid-template-columns: minmax(0, min(58vw, 466px));
    padding: max(7px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
      max(7px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  }
  #title-screen h1 { font-size: clamp(42px, 14vh, 68px); }
  #title-screen h1 em { margin-top: .48em; font-size: .79rem; }
  #title-screen .nfh-tagline { max-width: none; margin-block: 7px; font-size: .77rem; line-height: 1.26; }
  #title-screen .menu-label { margin-bottom: 4px; }
  #title-screen .skin-card canvas { height: clamp(25px, 8.5vh, 46px); }
  #title-screen .skin-card span { padding-block: 2px; font-size: .72rem; }
  #title-screen .hero-perk { margin-top: 4px; padding-block: 3px; font-size: .69rem; }
  #title-screen .spawn-select { margin-top: 6px; }
  #title-screen .spawn-select > span { font-size: .75rem; }
  #title-screen .spawn-select select { min-height: 28px; padding-block: 3px; }
  #title-screen .opening-actions { margin-top: 7px; gap: 5px; }
  #title-screen :is(#story-start, #story-coop, #online, #solo) { min-height: 32px; padding-block: 4px; font-size: .79rem; }
  #title-screen .opening-actions strong + span { margin-top: 1px; font-size: .67rem; }
  #title-screen .menu-tools { margin-top: 3px; }
  #title-screen .menu-tools :is(button, a) { padding-block: 4px; font-size: .72rem; }
}

@media (max-height: 610px) and (orientation: portrait) {
  #title-screen h1 { font-size: clamp(48px, 14vw, 65px); }
  #title-screen .nfh-tagline { margin-block: 9px; }
  #title-screen .skin-card canvas { height: 34px; }
  #title-screen .skin-card span { font-size: .66rem; }
  #title-screen :is(#story-start, #story-coop, #online, #solo) { min-height: 39px; font-size: .78rem; padding: 5px 8px; }
  #title-screen :is(#story-start, #story-coop) { padding-right: 20px; }
  #title-screen :is(#story-start, #story-coop)::after { right: 8px; width: 6px; height: 6px; }
  #title-screen .opening-actions strong + span { font-size: .67rem; }
  #title-screen .menu-tools { margin-top: 7px; }
}

@media (max-height: 360px) and (orientation: landscape) {
  body[data-screen="title"] #title-screen { grid-template-columns: minmax(0, 670px); padding-top: max(45px, env(safe-area-inset-top)); }
  #title-screen .menu-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "name roster" "pitch roster" "town modes" "tools modes";
    gap: 6px 13px;
    align-items: end;
  }
  .nfh-menu-art::after { background: linear-gradient(90deg, #10191bf5, #10191b9c 55%, #10191b4d), linear-gradient(0deg, #10191b98, transparent 90%); }
  #title-screen h1 { grid-area: name; }
  #title-screen .nfh-tagline { grid-area: pitch; }
  #title-screen .roster-select { grid-area: roster; }
  #title-screen .spawn-select { grid-area: town; margin-top: 0; }
  #title-screen .opening-actions { grid-area: modes; margin-top: 0; }
  #title-screen .menu-tools { grid-area: tools; justify-content: flex-start; }
  #title-screen h1 { font-size: 41px; }
  #title-screen h1 em { font-size: .71rem; }
  #title-screen .nfh-tagline { margin-block: 5px; font-size: .72rem; }
  #title-screen .hero-perk { gap: 2px 6px; }
  #title-screen :is(#story-start, #story-coop, #online, #solo) { padding-block: 3px; }
  #title-screen .menu-tools :is(button, a) { min-height: 23px; font-size: .68rem; }
}

.nfh-about {
  box-sizing: border-box;
  min-height: 100vh;
  margin: 0;
  color-scheme: dark;
  background: var(--site-ink);
  color: var(--site-paper);
  font: 1rem/1.6 system-ui, sans-serif;
}
.nfh-about *, .nfh-about *::before { box-sizing: inherit; }
.nfh-about a { color: inherit; }
.about-header, .about-content { width: min(1120px, calc(100% - 36px)); margin-inline: auto; }
.about-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-block: 14px; }
.about-brand { font: 700 1.65rem Georgia, serif; text-decoration: none; }
.about-brand span { margin-left: .4em; color: var(--site-gold); font: 650 .68rem system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.about-header nav { display: flex; align-items: center; gap: clamp(7px, 2vw, 18px); font-size: .85rem; }
.nfh-about .about-play {
  display: inline-block;
  padding: 8px 13px;
  border-radius: 5px;
  background: var(--site-gold);
  color: #251b13;
  font-weight: 720;
  text-decoration: none;
  white-space: nowrap;
}
.nfh-about .about-play:hover { background: #ffdaaa; }
.about-hero { position: relative; display: grid; isolation: isolate; align-items: end; min-height: clamp(290px, 42vw, 440px); border: 1px solid var(--site-rule); border-radius: 9px; overflow: hidden; }
.about-art { position: absolute; z-index: -1; inset: 0; }
.about-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 72% 45%; }
.about-art::after { position: absolute; inset: 0; background: linear-gradient(76deg, #10191b 0%, #10191bdf 25%, #10191b74 52%, #10191b10 82%); content: ""; }
.about-lead { padding: clamp(18px, 4vw, 47px); }
.about-lead h1 { font: 650 clamp(2.15rem, 5.5vw, 4.8rem)/1.02 Georgia, serif; letter-spacing: -.035em; margin: 0; }
.about-lead p { max-width: 51ch; margin: 16px 0 0; color: var(--site-muted); }
.about-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 11px; margin-top: 14px; }
.about-features section { background: #192527; border: 1px solid #74685079; border-radius: 7px; padding: clamp(15px, 2.4vw, 24px); }
.about-features h2 { margin: 0 0 7px; color: var(--site-gold); font: 650 clamp(1.25rem, 2vw, 1.6rem)/1.2 Georgia, serif; }
.about-features p { color: var(--site-muted); margin: 0; }
.about-footer { margin-block: 19px 25px; }

@media (max-width: 560px) {
  .about-header, .about-content { width: calc(100% - 24px); }
  .about-brand span { display: none; }
  .about-art::after { background: linear-gradient(0deg, #10191b 0%, #10191bec 41%, #10191b50 100%); }
}
