:root {
  --black: #080808;
  --ink: #121212;
  --paper: #f1ead8;
  --paper-deep: #d8cfb8;
  --red: #c9142f;
  --red-dark: #7e0d1e;
  --steel: #b6bec5;
  --line: rgba(8, 8, 8, 0.18);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(201,20,47,.06), transparent 28rem),
    var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 999;
  padding: .75rem 1rem;
  background: white;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 clamp(1rem, 4vw, 3rem);
  color: white;
  background: linear-gradient(to bottom, rgba(0,0,0,.86), rgba(0,0,0,0));
  transition: background .25s ease, min-height .25s ease;
}
.site-header.is-scrolled {
  min-height: 64px;
  background: rgba(8,8,8,.95);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -.06em;
}
.brand-mark { color: var(--red); font-size: 1.3rem; }
.brand-word { font-size: 1.65rem; }
.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  text-decoration: none;
  text-transform: uppercase;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
}
.site-nav a:hover { color: #ff3c58; }
.nav-toggle { display: none; }

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: white;
  background: var(--black);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: 9rem max(1.5rem, calc((100vw - var(--max)) / 2)) 8rem;
}
.hero::after {
  content: "スバル・インプレッサ";
  position: absolute;
  right: 1.5rem;
  top: 7.5rem;
  writing-mode: vertical-rl;
  font-weight: 900;
  letter-spacing: .16em;
  color: rgba(255,255,255,.15);
}
.hero-sun {
  position: absolute;
  width: min(58vw, 720px);
  aspect-ratio: 1;
  right: -8vw;
  top: -12vw;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ec2d4a, var(--red) 45%, var(--red-dark) 74%);
  opacity: .9;
  box-shadow: 0 0 0 38px rgba(201,20,47,.05), 0 0 0 76px rgba(201,20,47,.035);
}
.hero-grid {
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to top, black, transparent);
}
.hero-copy, .hero-poster, .hero-spec-strip { position: relative; z-index: 2; }
.eyebrow {
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .73rem;
  font-weight: 900;
  color: var(--red);
}
.hero h1 {
  margin: 0;
  max-width: 8ch;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: .82;
  letter-spacing: -.025em;
  text-transform: uppercase;
}
.hero h1 span {
  color: transparent;
  -webkit-text-stroke: 2px white;
  text-stroke: 2px white;
}
.hero-lede {
  max-width: 36rem;
  margin: 2rem 0 0;
  color: rgba(255,255,255,.72);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.25rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: .75rem;
  font-weight: 900;
  border: 1px solid transparent;
}
.button-primary { background: var(--red); color: white; }
.button-primary:hover { background: #e31b39; }
.button-ghost { border-color: rgba(255,255,255,.45); color: white; }
.button-ghost:hover { background: white; color: black; }
.hero-poster {
  width: min(100%, 450px);
  justify-self: end;
  margin: 0;
  transform: rotate(1.2deg);
  box-shadow: 0 22px 70px rgba(0,0,0,.5);
  border: 10px solid rgba(255,255,255,.06);
}
.hero-poster img { width: 100%; }
.hero-poster figcaption {
  position: absolute;
  left: -1rem;
  bottom: -2rem;
  padding: .6rem .85rem;
  background: var(--paper);
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .65rem;
  font-weight: 900;
}
.hero-spec-strip {
  position: absolute;
  left: max(1.5rem, calc((100vw - var(--max)) / 2));
  right: max(1.5rem, calc((100vw - var(--max)) / 2));
  bottom: 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,.18);
}
.hero-spec-strip div { padding: 1rem 1rem 0 0; }
.hero-spec-strip strong { display: block; font-size: 1.2rem; }
.hero-spec-strip span { color: rgba(255,255,255,.55); font-size: .73rem; text-transform: uppercase; letter-spacing: .1em; }

.section { padding: clamp(5rem, 10vw, 9rem) max(1.5rem, calc((100vw - var(--max)) / 2)); }
.section-heading { max-width: 760px; margin-bottom: 3.5rem; }
.section-heading h2, .closing-section h2 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: .95;
  text-transform: uppercase;
  letter-spacing: -.02em;
}
.section-heading-light { color: white; }

.machine-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(3rem, 8vw, 7rem); }
.machine-copy { font-size: 1.12rem; max-width: 34rem; }
.machine-copy p:first-child::first-letter {
  float: left;
  font-family: Impact, sans-serif;
  font-size: 4.6rem;
  line-height: .78;
  padding-right: .5rem;
  color: var(--red);
}
.spec-grid { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 3px solid var(--ink); }
.spec-grid div { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.spec-grid dt { text-transform: uppercase; letter-spacing: .14em; font-size: .68rem; font-weight: 900; color: var(--red-dark); }
.spec-grid dd { margin: .35rem 0 0; font-size: 1.1rem; font-weight: 800; }

.build-section { background: var(--ink); }
.build-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.14); }
.build-card { min-height: 360px; padding: 2rem; background: #111; color: white; }
.build-card h3 { margin: 3.5rem 0 1.5rem; font-size: 1.6rem; text-transform: uppercase; }
.build-card ul { margin: 0; padding: 0; list-style: none; color: rgba(255,255,255,.62); }
.build-card li { padding: .75rem 0; border-top: 1px solid rgba(255,255,255,.1); }
.card-number { color: var(--red); font-family: Impact, sans-serif; font-size: 2rem; }
.accent-card { background: var(--red); }
.accent-card .card-number { color: white; }
.accent-card ul { color: rgba(255,255,255,.85); }

.timeline { position: relative; max-width: 900px; margin-left: auto; }
.timeline::before { content: ""; position: absolute; left: 180px; top: 0; bottom: 0; width: 2px; background: var(--ink); }
.timeline-entry { display: grid; grid-template-columns: 150px 1fr; gap: 60px; padding: 0 0 3.5rem; }
.timeline-entry time { text-transform: uppercase; font-size: .72rem; font-weight: 900; letter-spacing: .14em; color: var(--red-dark); }
.timeline-entry div { position: relative; }
.timeline-entry div::before { content: ""; position: absolute; left: -69px; top: .25rem; width: 16px; height: 16px; border: 4px solid var(--paper); border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--ink); }
.timeline-entry h3 { margin: 0 0 .5rem; font-size: 1.45rem; }
.timeline-entry p { margin: 0; max-width: 580px; }

.gallery-section { background: #090909; }
.gallery-grid { display: grid; grid-template-columns: 1.35fr .65fr .65fr; gap: 1rem; }
.gallery-feature { grid-row: span 2; margin: 0; position: relative; background: #111; }
.gallery-feature img { width: 100%; height: 100%; object-fit: cover; }
.gallery-feature figcaption { position: absolute; inset: auto 1rem 1rem 1rem; padding: .8rem 1rem; background: rgba(0,0,0,.78); color: white; font-size: .75rem; }
.gallery-placeholder { min-height: 220px; padding: 1.5rem; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(145deg, #1a1a1a, #0e0e0e); color: white; border: 1px solid rgba(255,255,255,.08); }
.gallery-placeholder span { color: var(--red); font-family: Impact, sans-serif; font-size: 2rem; }
.gallery-placeholder p { margin: 0; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 900; }

.closing-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 3rem;
  padding: clamp(5rem, 10vw, 8rem) max(1.5rem, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
}
.closing-section > p { max-width: 420px; margin: 0; color: rgba(0,0,0,.58); }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem max(1.5rem, calc((100vw - var(--max)) / 2));
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.site-footer p { margin: 0; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255,255,255,.25);
  }
  .nav-toggle span:not(.sr-only) { width: 20px; height: 2px; background: white; }
  .site-nav {
    position: fixed;
    inset: 64px 0 auto 0;
    display: none;
    flex-direction: column;
    padding: 1.5rem;
    background: #080808;
  }
  .site-nav.is-open { display: flex; }
  .hero { grid-template-columns: 1fr; padding-bottom: 10rem; }
  .hero-poster { justify-self: start; width: min(82vw, 430px); }
  .machine-layout { grid-template-columns: 1fr; }
  .build-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-feature { grid-column: span 2; grid-row: auto; }
}

@media (max-width: 620px) {
  .hero { padding-top: 7rem; }
  .hero::after { display: none; }
  .hero h1 { font-size: clamp(3.5rem, 20vw, 5.5rem); }
  .hero-spec-strip { grid-template-columns: repeat(2, 1fr); }
  .hero-spec-strip div:nth-child(n+3) { display: none; }
  .spec-grid, .build-grid, .gallery-grid { grid-template-columns: 1fr; }
  .gallery-feature { grid-column: auto; }
  .timeline::before { left: 10px; }
  .timeline-entry { grid-template-columns: 1fr; gap: .75rem; padding-left: 2.5rem; }
  .timeline-entry div::before { left: -2.9rem; }
  .closing-section, .site-footer { flex-direction: column; align-items: flex-start; }
}
