/* Jack Pine Savage Games — studio site
   Self-hosted OFL fonts only. No third-party CDNs, no trackers. */

@font-face {
  font-family: "Alegreya";
  src: url("fonts/Alegreya-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("fonts/Alegreya-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("fonts/Alegreya-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya SC";
  src: url("fonts/AlegreyaSC-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya SC";
  src: url("fonts/AlegreyaSC-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("fonts/AlegreyaSans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("fonts/AlegreyaSans-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("fonts/AlegreyaSans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --pine-950: #0c1210;
  --pine-900: #141c18;
  --pine-800: #1c2a22;
  --birch: #f1e6d0;
  --birch-deep: #e4d5b8;
  --ink: #161a17;
  --ink-soft: #3e463f;
  --ember: #c35620;
  --ember-deep: #9e4318;
  --rule: rgba(22, 26, 23, 0.16);
  --rule-light: rgba(241, 230, 208, 0.18);
  --header-h: 4.5rem;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 72rem;
  --font-serif: "Alegreya", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sc: "Alegreya SC", "Alegreya", Palatino, serif;
  --font-sans: "Alegreya Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

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

h1, h2, .lede, .prose {
  text-wrap: pretty;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--birch);
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--ember-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--ember); }
a:focus-visible,
.btn:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 30;
  background: var(--birch);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
}
.skip:focus { top: 0.75rem; }

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

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem var(--pad);
  color: var(--birch);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand:hover { color: inherit; }

.brand .mark {
  width: 1.35rem;
  height: 2.02rem;
  flex: none;
  display: block;
}

.brand-name {
  font-family: var(--font-sc);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
  white-space: nowrap;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.65rem;
}

.site-header nav a {
  color: var(--birch);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.site-header nav a:hover {
  color: var(--birch);
  text-decoration: underline;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1px;
}

/* ----- Hero ----- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--birch);
  background: var(--pine-950);
}

.hero-image,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 52% 48%;
}
.hero-video {
  z-index: 0;
  background: transparent;
}
.hero-image { z-index: 0; }
.hero-video { z-index: 1; }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(12, 18, 16, 0.48) 0%, rgba(12, 18, 16, 0.1) 20%, rgba(12, 18, 16, 0.0) 36%),
    linear-gradient(to top, rgba(12, 18, 16, 0.9) 0%, rgba(12, 18, 16, 0.62) 26%, rgba(12, 18, 16, 0.22) 48%, rgba(12, 18, 16, 0) 66%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 0 var(--pad) clamp(3rem, 8vh, 5.5rem);
  max-width: 38rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-family: var(--font-sc);
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  font-variant-caps: small-caps;
  color: inherit;
}

/* Alegreya SC already is small caps; don't double-transform in a way that looks odd.
   Use the SC face at a modest size with tracking, keep the designed caps. */
.eyebrow,
.brand-name {
  text-transform: none;
  font-variant-caps: normal;
}

.hero h1,
.section h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.98;
  margin: 0;
}

.hero h1 {
  font-size: clamp(3.15rem, 7.2vw, 6.35rem);
  margin-bottom: 0.7rem;
}

.lede,
.prose {
  margin: 0;
  max-width: 34rem;
}

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.4;
  color: var(--birch);
  opacity: 0.92;
}

.btn {
  display: inline-block;
  margin-top: 1.65rem;
  padding: 0.8rem 1.2rem;
  background: var(--ember);
  color: var(--birch);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  line-height: 1.25;
  border: 0;
  border-radius: 0;
  text-decoration: none;
  box-shadow: none;
}
.btn[aria-disabled="true"] {
  cursor: default;
  pointer-events: none;
}

/* ----- Page sections ----- */

.section {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.wrap {
  width: min(100% - 2 * var(--pad), var(--max));
  margin-inline: auto;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 1.5rem 4rem;
  align-items: start;
}

.section .eyebrow {
  color: var(--ink-soft);
}

.section h2 {
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  max-width: 18ch;
  margin-top: 0.2rem;
}

.prose {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink);
  padding-top: 1.85rem;
}

.game {
  border-top: 0;
}

.about,
.contact {
  padding-top: 0;
}

.about .wrap,
.contact .wrap {
  border-top: 1px solid var(--rule);
  padding-top: clamp(2.5rem, 5.5vw, 4rem);
}

.contact {
  padding-bottom: clamp(2.75rem, 5vw, 4rem);
}

.email {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  word-break: break-word;
}
.email:hover {
  color: var(--ember-deep);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* ----- Features (tent, cabin, UTV) ----- */

.features {
  width: min(100% - 2 * var(--pad), 82rem);
  margin-inline: auto;
  margin-top: clamp(3rem, 7vw, 6rem);
  display: flex;
  flex-direction: column;
  gap: clamp(3.25rem, 8vw, 6.5rem);
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(15rem, 0.7fr);
  gap: clamp(1.25rem, 3.5vw, 3.75rem);
  align-items: center;
}

.feature-alt {
  grid-template-columns: minmax(15rem, 0.7fr) minmax(0, 1.45fr);
}

.feature-alt figure { grid-column: 2; grid-row: 1; }
.feature-alt .feature-copy { grid-column: 1; grid-row: 1; }

.feature figure { margin: 0; }

.feature img {
  width: 100%;
  height: auto;
  background: var(--pine-800);
}

.feature-label {
  margin: 0 0 0.7rem;
  font-family: var(--font-sc);
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  line-height: 1.3;
  color: var(--ink-soft);
}

.feature-caption {
  margin: 0;
  max-width: 26rem;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.85vw, 1.55rem);
  line-height: 1.45;
  color: var(--ink);
  text-wrap: pretty;
}

.clips {
  width: min(100% - 2 * var(--pad), 82rem);
  margin-inline: auto;
  margin-top: clamp(3.25rem, 8vw, 6.5rem);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1.1rem, 2.4vw, 1.75rem);
  align-items: start;
}

.clip video {
  width: 100%;
  height: auto;
  display: block;
  background: var(--pine-800);
}

.clip .feature-label { margin-top: 0.7rem; }

.clip .feature-caption {
  max-width: none;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

.landscape {
  padding-top: 0;
}

.landscape-fig {
  width: min(100% - 2 * var(--pad), 82rem);
  margin: 0 auto clamp(0.5rem, 2vw, 1rem);
}

.landscape-fig img {
  width: 100%;
  height: auto;
  background: var(--pine-800);
}

.landscape-fig figcaption {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

/* ----- Footer ----- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.35rem 0 1.6rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}

.site-footer p { margin: 0; }

/* ----- Topographic texture (repeat, low contrast) ----- */

.game,
.about,
.contact,
.site-footer {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22640%22%20height%3D%22480%22%20viewBox%3D%220%200%20640%20480%22%20fill%3D%22none%22%3E%0A%20%20%3Cg%20stroke%3D%22%23161a17%22%20stroke-width%3D%220.9%22%20fill%3D%22none%22%20opacity%3D%220.042%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22M190%20150%20C%20210%20138%2C%20235%20140%2C%20248%20158%20C%20258%20174%2C%20248%20196%2C%20222%20204%20C%20198%20212%2C%20172%20198%2C%20166%20176%20C%20160%20156%2C%20172%20140%2C%20190%20150%20Z%22/%3E%0A%20%20%20%20%3Cpath%20d%3D%22M178%20132%20C%20214%20112%2C%20262%20118%2C%20282%20150%20C%20300%20180%2C%20286%20220%2C%20244%20234%20C%20200%20248%2C%20150%20226%2C%20140%20186%20C%20130%20148%2C%20148%20122%2C%20178%20132%20Z%22/%3E%0A%20%20%20%20%3Cpath%20d%3D%22M162%20110%20C%20214%2082%2C%20286%2092%2C%20318%20140%20C%20348%20186%2C%20328%20248%2C%20270%20270%20C%20210%20292%2C%20132%20262%2C%20116%20204%20C%20100%20148%2C%20120%20100%2C%20162%20110%20Z%22/%3E%0A%20%20%20%20%3Cpath%20d%3D%22M146%2086%20C%20216%2050%2C%20316%2064%2C%20356%20128%20C%20396%20192%2C%20368%20280%2C%20292%20310%20C%20216%20340%2C%20108%20300%2C%2088%20222%20C%2068%20146%2C%2090%2072%2C%20146%2086%20Z%22/%3E%0A%20%20%20%20%3Cpath%20d%3D%22M460%20300%20C%20478%20290%2C%20500%20294%2C%20510%20312%20C%20520%20328%2C%20508%20348%2C%20486%20354%20C%20464%20360%2C%20442%20346%2C%20438%20326%20C%20434%20308%2C%20444%20296%2C%20460%20300%20Z%22/%3E%0A%20%20%20%20%3Cpath%20d%3D%22M448%20280%20C%20480%20264%2C%20526%20270%2C%20546%20304%20C%20564%20336%2C%20548%20378%2C%20508%20392%20C%20466%20406%2C%20418%20384%2C%20408%20346%20C%20398%20308%2C%20416%20270%2C%20448%20280%20Z%22/%3E%0A%20%20%20%20%3Cpath%20d%3D%22M432%20256%20C%20480%20230%2C%20548%20242%2C%20578%20292%20C%20606%20340%2C%20582%20402%2C%20524%20424%20C%20466%20446%2C%20386%20416%2C%20368%20360%20C%20350%20304%2C%20382%20248%2C%20432%20256%20Z%22/%3E%0A%20%20%3C/g%3E%0A%3C/svg%3E");
  background-size: 640px 480px;
  background-repeat: repeat;
}

/* ----- Responsive ----- */

@media (max-width: 1100px) {
  .clips { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 800px) {
  .split {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .prose { padding-top: 0.4rem; }
  .feature,
  .feature-alt {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
  .feature-alt figure,
  .feature-alt .feature-copy {
    grid-column: auto;
    grid-row: auto;
  }
  .feature-copy { padding-top: 0.15rem; }
  .clips { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding-top: 0.9rem;
    padding-bottom: 0.7rem;
  }
  .brand-name { font-size: 0.82rem; letter-spacing: 0.08em; }
  .site-header nav { gap: 1.15rem; }
  .site-header nav a { font-size: 0.9rem; }
  /* Keep more of the wide cabin-on-the-right frame than a full-viewport crop would. */
  .hero {
    min-height: 0;
    aspect-ratio: 3 / 4;
    max-height: 100svh;
    align-items: flex-end;
  }
  .hero-image,
  .hero-video { object-position: 62% 50%; }
  .hero-inner { max-width: 100%; }
}

@media (max-width: 420px) {
  .brand-name { letter-spacing: 0.06em; }
}
