/* Stanwick Studios
   Brand Sheet v1: Instrument Serif + IBM Plex Mono.
   Ink #141414 · Heritage Green #1F4D3A · Mint #8FC7A8 · Paper #F3F0EA */

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #141414;
  --green: #1f4d3a;
  --mint: #8fc7a8;
  --paper: #f3f0ea;
  --line: rgba(243, 240, 234, 0.22);
  --soft: rgba(243, 240, 234, 0.66);

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --pad: clamp(18px, 4vw, 56px);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--green);
}

body {
  margin: 0;
  background: var(--green);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--mint);
  color: var(--ink);
}

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

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--pad);
  top: 10px;
  z-index: 10;
  background: var(--paper);
  color: var(--ink);
  padding: 6px 10px;
}

/* Top bar */
.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px var(--pad);
  border-bottom: 1px solid var(--line);
}
.bar > :nth-child(2) {
  text-align: center;
}
.bar > :last-child {
  text-align: right;
}
.bar a:hover,
.bar a:focus-visible {
  color: var(--mint);
}
.home-link {
  display: inline-block;
  width: 34px;
}
.home-link img {
  width: 34px;
  border-radius: 6px;
  transition: transform 0.2s ease;
}
.home-link:hover img {
  transform: translateY(-1px);
}

h1,
h2 {
  margin: 0;
  font-weight: 400;
}

/* Hero */
.hero {
  padding: clamp(48px, 8vw, 120px) var(--pad) clamp(48px, 7vw, 104px);
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 40px var(--pad);
  align-items: end;
}
.hero h1 {
  grid-column: 1 / span 7;
}
.hero .mark {
  width: 100%;
  max-width: 820px;
}
.hero-copy {
  grid-column: 8 / -1;
  padding-bottom: 0.4em;
}
.status {
  color: var(--mint);
  margin: 0 0 18px;
}
.status::before {
  content: "> ";
  font-weight: 500;
}
.cursor {
  display: inline-block;
  width: 0.7em;
  height: 0.18em;
  margin-left: 0.2em;
  background: var(--mint);
  vertical-align: baseline;
  animation: blink 1.06s steps(1, end) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.intro {
  margin: 0;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.005em;
}

/* About */
.about {
  border-top: 1px solid var(--line);
  padding: clamp(64px, 10vw, 152px) var(--pad);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 40px var(--pad);
}
.about .tag {
  grid-column: 1 / span 3;
  color: var(--soft);
  margin: 0;
  padding-top: 0.6em;
}
.about .lead {
  grid-column: 4 / -1;
  margin: 0;
  font-size: clamp(32px, 4.6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  max-width: 19ch;
}
.about .lead + p {
  grid-column: 4 / span 6;
  margin: 0;
  color: rgba(243, 240, 234, 0.86);
  font-size: clamp(21px, 1.9vw, 27px);
  line-height: 1.32;
  max-width: 34ch;
}

/* Spec sheet */
.spec {
  margin: 0;
  padding: 0 var(--pad) clamp(64px, 10vw, 152px);
}
.spec div {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 var(--pad);
  align-items: baseline;
  padding: 18px 0 20px;
  border-top: 1px solid var(--line);
}
.spec div:last-child {
  border-bottom: 1px solid var(--line);
}
.spec dt {
  grid-column: 1 / span 3;
  color: var(--soft);
}
.spec dd {
  grid-column: 4 / -1;
  margin: 0;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.15;
}

/* Testing band */
.band {
  background: var(--ink);
  padding: clamp(72px, 12vw, 176px) var(--pad);
}
.band h2 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(76px, 17vw, 268px);
  line-height: 0.86;
  letter-spacing: -0.03em;
}
.band h2 .cursor,
.lost h1 .cursor {
  width: 0.42em;
  height: 0.075em;
  margin-left: 0.06em;
}
.band-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px var(--pad);
  margin-top: clamp(40px, 5vw, 72px);
}
.band-row p {
  margin: 0;
}
.band-row .mono {
  grid-column: 1 / span 3;
  color: var(--mint);
}
.band-row p:last-child {
  grid-column: 4 / span 6;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.25;
  color: rgba(243, 240, 234, 0.82);
  max-width: 30ch;
}

/* Contact */
.contact {
  padding: clamp(72px, 12vw, 176px) var(--pad) clamp(56px, 8vw, 120px);
}
.contact .mono {
  color: var(--soft);
  margin: 0 0 clamp(20px, 3vw, 40px);
}
.email {
  display: inline-block;
  font-size: clamp(40px, 8.6vw, 148px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  background-image: linear-gradient(var(--mint), var(--mint));
  background-size: 0 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s ease, color 0.2s ease;
  padding-bottom: 0.06em;
}
.email:hover,
.email:focus-visible {
  color: var(--mint);
  background-size: 100% 2px;
}
.email .arrow {
  font-family: var(--mono);
  font-size: 0.32em;
  vertical-align: 0.9em;
  margin-left: 0.25em;
}
.contact p:last-child {
  margin: clamp(20px, 3vw, 36px) 0 0;
  color: var(--soft);
  font-size: clamp(19px, 1.6vw, 23px);
}

/* Footer */
.foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  padding: 20px var(--pad) 28px;
  border-top: 1px solid var(--line);
  color: var(--soft);
}
.foot > :nth-child(2) {
  text-align: center;
}
.foot > :last-child {
  text-align: right;
}
.foot a:hover,
.foot a:focus-visible {
  color: var(--mint);
}

/* Document pages (privacy) */
.doc {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 var(--pad);
  padding: clamp(56px, 9vw, 128px) var(--pad) clamp(72px, 10vw, 144px);
}
.doc > * {
  grid-column: 4 / span 7;
}
.doc .mono {
  grid-column: 1 / span 3;
  grid-row: 1 / span 2;
  color: var(--soft);
  margin: 0;
  padding-top: 1.2em;
}
.doc h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(52px, 8vw, 120px);
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.doc .updated {
  margin: 20px 0 clamp(40px, 5vw, 72px);
  color: var(--mint);
}
.doc h2 {
  margin: 48px 0 10px;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
}
.doc p,
.doc li {
  color: rgba(243, 240, 234, 0.84);
  max-width: 40ch;
}
.doc ul {
  margin: 0;
  padding-left: 1em;
}
.doc li + li {
  margin-top: 10px;
}
.doc a {
  border-bottom: 1px solid var(--mint);
}
.doc a:hover {
  color: var(--mint);
}

/* 404 */
.lost {
  padding: clamp(80px, 14vw, 200px) var(--pad);
}
.lost h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(76px, 17vw, 268px);
  line-height: 0.86;
  letter-spacing: -0.03em;
}
.lost p {
  margin: 32px 0 0;
  font-size: clamp(22px, 2vw, 28px);
  color: rgba(243, 240, 234, 0.82);
}
.lost a {
  border-bottom: 1px solid var(--mint);
}
.lost a:hover {
  color: var(--mint);
}

/* Keep content within 1600px on very wide screens; backgrounds stay full-bleed. */
.bar,
.hero,
.about,
.spec,
.band,
.contact,
.foot,
.doc,
.lost {
  padding-left: max(var(--pad), calc((100% - 1600px) / 2));
  padding-right: max(var(--pad), calc((100% - 1600px) / 2));
}

/* Film grain over the whole page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: url("/assets/grain.png") repeat;
  background-size: 180px 180px;
  opacity: 0.09;
  mix-blend-mode: overlay;
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
  .email {
    transition: none;
  }
}

@media (max-width: 1100px) {
  .hero h1,
  .hero-copy {
    grid-column: 1 / -1;
  }
  .hero .mark {
    max-width: 720px;
  }
  .hero-copy {
    max-width: 640px;
  }
}

@media (max-width: 820px) {
  .hero-copy,
  .about .tag,
  .about .lead,
  .about .lead + p,
  .spec dt,
  .spec dd,
  .band-row .mono,
  .band-row p:last-child,
  .doc > *,
  .doc .mono {
    grid-column: 1 / -1;
  }
  .doc .mono {
    grid-row: auto;
    padding-top: 0;
    margin-bottom: 16px;
  }
  .spec dd {
    margin-top: 6px;
  }
}

@media (max-width: 560px) {
  .bar,
  .foot {
    grid-template-columns: 1fr auto;
  }
  .bar > :nth-child(2),
  .foot > :nth-child(2) {
    display: none;
  }
}
