/* Tokens: names mirror the Figma "Brand" variable collection (Dark mode). */
:root {
  --bg-page: #1b1f1d;
  --bg-deep: #15181a;
  --bg-surface: #202522;
  --border-subtle: #2c312e;
  --text-primary: #ede6d3;
  --text-muted: #b8b19f;
  --accent-default: #9e1b1b;

  --font-display: "Texturina", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

  --page-pad: 24px;
}

@media (min-width: 900px) {
  :root { --page-pad: 64px; }
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-display);
}

ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

main { flex: 1; }

/* ---------- Home: featured product ---------- */
/* Figma "Featured": key art card (16:10) beside the copy; stacked on mobile.
   Side padding matches the About page: centered at no more than 1312px. */

.page-home main {
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
}

/* Tagline: the page h1. Centered Texturina, matching the About page's vision heading. */
.home-tagline {
  padding: 64px var(--page-pad) 0;
  background: var(--bg-deep);
  text-align: center;
}

.home-tagline h1 {
  max-width: 1000px;
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

.featured {
  --content-max: 1312px;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 64px max(var(--page-pad), calc((100% - var(--content-max)) / 2));
  background: var(--bg-deep);
}

.featured__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.featured__art {
  position: relative;
  flex: none;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-deep);
}

/* Opt-in cream drop shadow (front matter `artBorder`). Brand cream (#ede6d3) at low opacity. */
.featured__art--framed { box-shadow: 0 1px 15px rgba(237, 230, 211, 0.22); }

.featured__art > img { display: block; width: 100%; height: 100%; object-fit: cover; }

.featured__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.featured .eyebrow {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Section title: 80% of the game title (Texturina 32 / 44 -> 25.6 / 35.2). */
.featured .featured__heading {
  margin: 0 0 32px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.featured h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

/* Title + site link read as one unit, tighter than the body's 24px rhythm. */
.featured__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.featured__link {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--border-subtle);
  text-underline-offset: 4px;
}

.featured__link:hover { color: var(--text-primary); }

.featured__summary {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Meta Row: up to four label/value pairs over a hairline. */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.meta-item {
  display: flex;
  flex: 1 1 120px;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.meta-item dt {
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.meta-item dd {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-primary);
}

@media (min-width: 900px) {
  .home-tagline { padding: 120px var(--page-pad) 0; }
  .home-tagline h1 { font-size: 51px; }

  .featured { padding-top: 120px; padding-bottom: 120px; }

  .featured__inner { flex-direction: row; align-items: center; gap: 72px; }
  .featured__art { width: 688px; max-width: 52%; }

  .featured h2 { font-size: 44px; }
  .featured .featured__heading { margin-bottom: 48px; }
  .featured__summary { font-size: 20px; }
}

/* ---------- Logo lockup ---------- */
/* Official brand SVG (583 x 96). Sized by height; width follows the aspect ratio. */

.lockup {
  display: block;
  height: 46px;
  width: auto;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 var(--page-pad);
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-body);
}

/* Mobile: the logo's flex basis is its natural width (37px tall) but it may
   shrink, so the lockup scales down to leave room for the nav instead of
   pushing it off-screen. */
.site-header__logo {
  display: flex;
  flex: 0 1 225px;
  min-width: 0;
}

.site-header .lockup {
  width: 100%;
  height: auto;
}

.site-header nav { flex: none; }

@media (min-width: 900px) {
  .site-header { height: 88px; }
  .site-header__logo { flex: none; }
  .site-header .lockup { width: auto; height: 46px; }
}

/* ---------- Site navigation ---------- */

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-nav a {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text-primary); }

@media (min-width: 900px) {
  .site-nav { gap: 40px; }
  .site-nav a { font-size: 15px; }
}

/* ---------- Footer ---------- */
/* Layout: nav row, red divider, then [lockup] [copyright] ........ [social]. */

.site-footer {
  display: flex;
  flex-direction: column;
  padding: 20px var(--page-pad) 16px;
  background: var(--bg-page);
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-body);
  text-align: left;
}

.site-footer__nav {
  display: flex;
  font-family: var(--font-display);
  flex-wrap: wrap;
  gap: 0 28px;
  margin-bottom: 16px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-primary);
}

.site-footer__nav a { display: block; padding: 4px 0; }
.site-footer__nav a[aria-current="page"] { color: var(--text-muted); }

/* Product link: same row as About / Contact, anchored to the right edge. */
.site-footer__product { margin-left: auto; }

/* Red divider between the nav row and the lockup/copyright/social row. */
.site-footer__edge {
  height: 1px;
  background: var(--accent-default);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-top: 20px;
}

/* Mobile: lockup on its own line, then copyright and social share a row. */
.site-footer__brand { display: flex; flex: 0 0 100%; min-width: 0; }

/* The lockup scales down with the row on narrow screens (46px tall = 280px wide at full size). */
.site-footer .lockup {
  width: 100%;
  max-width: 280px;
  height: auto;
}

.site-footer__copyright {
  margin: 0 auto 0 0;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-footer a:hover { color: var(--text-muted); }

.social {
  display: flex;
  margin: 0 -9px; /* optically align the 22px icons with the page padding */
}

.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-primary);
}

.social__icon {
  display: block;
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

@media (min-width: 900px) {
  .site-footer { padding-top: 28px; padding-bottom: 24px; }
  .site-footer__nav { margin-bottom: 20px; }

  .site-footer__bottom { flex-wrap: nowrap; padding-top: 24px; }
  .site-footer__brand { flex: none; }
  .site-footer .lockup { width: auto; max-width: none; height: 46px; }
  .site-footer__copyright { margin: 0; }
  .site-footer__social { margin-left: auto; }
}

/* ---------- Contact page ---------- */

/* main grows to fill the viewport on tall screens; paint it so the deep
   background runs down to the footer rule instead of stopping at the section. */
.page-contact main {
  background: var(--bg-deep);
  font-family: var(--font-body);
}

.channels {
  padding: 64px var(--page-pad) 56px;
  background: var(--bg-deep);
}

.channels h1 {
  margin: 0 0 40px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--text-primary);
}

.channels__inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.channel-list { flex: 1; min-width: 0; }

.channel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.channel__label {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.channel__email {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.channel__email:hover { color: var(--text-muted); }

.channel__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.channel__desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
}

/* Logo / Mark, Surface=Dark (244 x 256 artwork) scaled to 56 x 59. */

/* Star Divider: a single centered star between hairline rules. */
.star-divider {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 8px 0;
}

.star-divider::before,
.star-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.star-divider img { display: block; flex: none; width: auto; height: 16px; }

.contact-card__note {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
  width: 100%;
  color: var(--text-muted);
}

@media (min-width: 900px) {
  .channels { padding: 120px var(--page-pad); }

  .channels h1 { margin-bottom: 48px; font-size: 64px; }

  .channels__inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 96px;
  }

  .channel {
    flex-direction: row;
    align-items: baseline;
    gap: 48px;
    padding: 28px 0;
  }

  .channel__label { flex: none; width: 200px; }

  .contact-card {
    flex: none;
    width: 416px;
    padding: 32px;
  }
}

/* ---------- About page ---------- */

.page-about main { font-family: var(--font-body); }

/* Side padding for About sections: the normal page padding, growing on wide
   screens so content stays centered at no more than --content-max (the Figma
   1440 frame's 1312px content width). Section backgrounds stay full-bleed. */
.page-about {
  --content-max: 1312px;
  --about-pad: max(var(--page-pad), calc((100% - var(--content-max)) / 2));
}

/* Shared: eyebrow label + section header (Label/Eyebrow Texturina 13, Heading/H2 Texturina 44). */
.page-about .eyebrow {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.page-about h2,
.page-about h3 { margin: 0; font-family: var(--font-display); font-weight: 700; }

.section-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}

.section-header h2 {
  font-size: 32px;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

.about-mission,
.about-history { padding: 64px var(--about-pad); }

/* Vision: the page header. Centered, and the page's only h1. */
.about-vision { padding: 64px var(--about-pad) 56px; }

.section-header--center {
  align-items: center;
  margin: 0 auto;
  text-align: center;
}

/* Studio line: "Independent game studio / ★ / Austin, Texas", stacked and centered (Body/Caption, brand star between). */
.studio-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0 0 60px;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.studio-line img { display: block; flex: none; width: auto; height: 16px; }

.about-vision .section-header { max-width: 1000px; }

.about-vision h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

.about-mission { background: var(--bg-deep); }

/* Split: heading on the left, body copy on the right (stacked on mobile). */
.split {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.split__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
}

.split__body p { margin: 0; }
.split__body p:first-child { color: var(--text-primary); }

/* History timeline. Mobile: vertical, stars as nodes on a left rail.
   Desktop: horizontal, a hairline runs edge to edge with a star per entry. */
.about-history {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 8px;
  width: 1px;
  background: var(--border-subtle);
}

.timeline__item {
  display: grid;
  grid-template-columns: 17px 1fr;
  column-gap: 24px;
  align-items: start;
}

/* Padding + page background hide the rail behind the star. */
.timeline__marker {
  grid-row: 1 / span 2;
  position: relative;
  box-sizing: content-box;
  width: 17px;
  height: 16px;
  padding: 4px 0;
  background: var(--bg-page);
}

.timeline__year {
  font-family: var(--font-display);
  font-weight: 400; /* Heading/H3 Texturina 28 */
  font-size: 28px;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

.timeline__label {
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-muted);
}

@media (min-width: 900px) {
  .about-mission,
  .about-history { padding: 120px var(--about-pad); }

  .about-vision { padding: 120px var(--about-pad) 96px; }
  .about-vision h1 { font-size: 51px; }

  .section-header h2 { font-size: 44px; letter-spacing: 0.01em; }

  .split { flex-direction: row; align-items: flex-start; gap: 96px; }
  .split .section-header { flex: none; width: 416px; }
  .split__body { font-size: 20px; }

  .about-history { gap: 64px; }

  .timeline { flex-direction: row; gap: 0; }

  .timeline::before {
    top: 12px;
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 1px;
  }

  .timeline__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
  }

  .timeline__marker { margin-bottom: 16px; }
  .timeline__label { max-width: 280px; font-size: 20px; }
}
