@font-face {
  font-family: "Wanted Sans";
  src: url("fonts/wanted-sans-subset.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("fonts/martian-mono-subset.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

:root {
  --navy: #0a1832;
  --navy-2: #0e1f3f;
  --gold: #d7a852;
  --gold-deep: #b2833f;
  --gold-soft: #e9c983;
  --card: #ece3d1;
  --card-ink: #12162a;
  --ink: #f6f2e8;
  --ink-2: #d9d1bf;
  --rule: rgba(215, 168, 82, 0.28);
  --rule-quiet: rgba(201, 207, 219, 0.18);
  --sans: "Wanted Sans", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --frame-ratio: calc(992 / 1586);
  --gutter: clamp(20px, 5vw, 80px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --band-h: clamp(54px, calc(100vw * var(--frame-ratio) * 0.068), 78px);
  --edge: max(var(--gutter), calc((100vw - 1280px) / 2 + var(--gutter)));
}
@media (max-width: 900px) { :root { --band-h: 60px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--band-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--navy) url("assets/plates/silk.png") repeat;
  background-size: 254px 138px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}
::selection { background: var(--gold); color: var(--navy); }
:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 4px; border-radius: 2px; }
a { color: inherit; }
html { scrollbar-color: var(--gold-deep) var(--navy); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--gold); color: var(--navy); padding: 10px 16px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }
.band :focus-visible, .record :focus-visible { outline-color: var(--card-ink); }

/* ---------- punch-card band ---------- */
.band {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--band-h);
  padding: 0 3vw 0 3vw;
  background: url("assets/plates/card-strip.webp") left center / auto 100% repeat-x, var(--card);
  border-radius: 0 0 14px 14px;
  color: var(--card-ink);
}
.brand { position: relative; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; padding: 5px 10px 5px 6px; margin-right: 12px; background: var(--card); border-radius: 3px; }
.brand::after { content: ""; position: absolute; right: -12px; top: calc(var(--band-h) * -0.28); bottom: calc(var(--band-h) * -0.28); width: 1.5px; background: rgba(18, 22, 42, 0.55); }
.brand-mark { width: 30px; height: 20px; color: var(--card-ink); }
.brand-word { font-family: var(--mono); font-weight: 700; font-size: clamp(11px, 0.66vw, 13px); letter-spacing: 0.14em; white-space: nowrap; }
.band nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.band nav li + li { border-left: 1.5px solid rgba(18, 22, 42, 0.45); }
.band nav a {
  display: block; padding: 4px clamp(14px, 2.2vw, 36px);
  font-size: clamp(13px, 0.72vw, 14px); font-weight: 600; text-decoration: none;
  background: var(--card); border-radius: 3px;
  transition: color .2s, background-color .2s;
}
.band nav li:last-child a { padding-right: 10px; }
.band nav a:hover { color: #7a5a14; }

/* ---------- hero (first viewport, measured from the approved comp) ---------- */
.hero {
  position: relative;
  min-height: calc(100vw * var(--frame-ratio) * 0.74);
  margin-top: calc(100vw * var(--frame-ratio) * -0.025);
  overflow: hidden;
}
.hero-emblem {
  position: absolute; z-index: 0;
  left: 61.6%; top: 0;
  width: 38.4%; height: calc(100vw * var(--frame-ratio) * 0.624);
  object-fit: cover; object-position: center top;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%), linear-gradient(180deg, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 9%), linear-gradient(180deg, #000 82%, transparent 100%);
  mask-composite: intersect;
}
.hero-copy {
  position: relative; z-index: 1;
  padding-left: var(--edge);
  padding-top: calc(100vw * var(--frame-ratio) * 0.16);
  max-width: 52vw;
}
.hero h1 {
  margin: 0;
  font-size: clamp(32px, 3.43vw, 66px);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-body {
  margin: calc(100vw * var(--frame-ratio) * 0.03) 0 0;
  font-size: clamp(16px, 1.06vw, 19px);
  line-height: 1.6;
  color: #ece6d8;
  font-weight: 400;
}
.hero-actions { display: flex; align-items: center; gap: 2.9vw; margin-top: calc(100vw * var(--frame-ratio) * 0.045); }

.btn-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.8em;
  min-height: 48px; padding: 0.95em 2.1em;
  font-size: clamp(15px, 0.86vw, 16px); font-weight: 700; color: #141020; text-decoration: none;
  background: linear-gradient(180deg, #ddb15c, #cf9f45);
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255, 236, 190, 0.45) inset, 0 10px 24px -14px rgba(0, 0, 0, 0.7);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), filter .2s;
}
.btn-gold:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 236, 190, 0.5) inset, 0 14px 28px -14px rgba(0, 0, 0, 0.8); }
.btn-gold:active { transform: translateY(0); filter: brightness(0.96); }
.arrow { width: 1.1em; height: 0.7em; fill: none; stroke: currentColor; stroke-width: 1.8; }

.link-gold {
  font-size: clamp(15px, 0.86vw, 16px); font-weight: 600; color: var(--ink); text-decoration: none;
  text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 7px;
  transition: text-decoration-thickness .3s var(--ease-out), color .2s;
}
.link-gold:hover { color: var(--gold-soft); text-decoration-thickness: 3px; }

.hero-index {
  position: absolute; z-index: 1; left: 0; right: 0;
  top: calc(100vw * var(--frame-ratio) * 0.655);
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule-quiet);
}
.index-item {
  display: flex; align-items: center; gap: 1.1vw;
  padding: calc(100vw * var(--frame-ratio) * 0.026) 3.5vw calc(100vw * var(--frame-ratio) * 0.026) var(--edge);
  text-decoration: none; color: var(--ink);
  font-size: clamp(16px, 1.23vw, 22px); font-weight: 500;
}
.index-item + .index-item { border-left: 1px solid var(--rule-quiet); padding-left: 3.5vw; padding-right: var(--edge); }
.index-icon { width: 1.25em; height: 1.25em; color: #b9bfcc; flex: none; }
.index-rule { flex: 1; height: 1px; background: rgba(201, 207, 219, 0.35); position: relative; margin-left: 1vw; transition: background-color .3s; }
.index-rule::after { content: ""; position: absolute; right: -2px; top: -7px; width: 15px; height: 15px;
  background: linear-gradient(currentColor, currentColor) center / 15px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 15px no-repeat; color: #c9cfdb; transition: transform .35s var(--ease-out); }
.index-item:hover .index-rule { background: var(--gold); }
.index-item:hover .index-rule::after { transform: rotate(90deg); color: var(--gold); }

/* ---------- sections ---------- */
.sec { padding: clamp(64px, 6.6vw, 104px) var(--gutter) 0; max-width: 1280px; margin: 0 auto; }
.sec h2 { margin: 0 0 clamp(20px, 1.9vw, 30px); font-size: clamp(24px, 2.04vw, 34px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
.sec h2 span { color: var(--gold); }
.sec-head { border-top: 1px solid var(--rule); padding-top: clamp(22px, 2.4vw, 36px); }
.lead { margin: 0; font-size: clamp(16px, 0.98vw, 18px); line-height: 1.7; color: var(--ink-2); max-width: 34em; }

.data-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.data-copy .btn-gold { margin-top: clamp(28px, 2.6vw, 40px); }
.facts { list-style: none; margin: clamp(28px, 2.6vw, 40px) 0 0; padding: 0; border-top: 1px solid var(--rule-quiet); }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule-quiet); }
.facts b { font-weight: 700; color: var(--ink); }
.facts b .num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.92em; color: var(--gold); }
.facts > li > span { color: var(--ink-2); text-align: right; }

.film { margin: 0; }
.film-frame {
  position: relative; padding: clamp(8px, 0.8vw, 12px);
  border: 1px solid var(--gold);
  outline: 1px solid rgba(215, 168, 82, 0.45); outline-offset: 5px;
  background: var(--navy-2);
}
.film video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.film figcaption { margin-top: 14px; font-size: 15px; color: var(--ink-2); }

.games-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.swatch { margin: 0; }
.swatch img { display: block; width: 100%; height: auto; border: 1px solid rgba(215, 168, 82, 0.35); }

.work-list { list-style: none; counter-reset: w; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule-quiet); }
.work-list li { padding: clamp(22px, 2.4vw, 36px) clamp(18px, 2vw, 32px) 0 0; }
.work-list li + li { padding-left: clamp(18px, 2vw, 32px); border-left: 1px solid var(--rule-quiet); }
.work-list h3 { margin: 0 0 8px; font-size: clamp(17px, 1vw, 19px); font-weight: 700; }
.work-list p { margin: 0; color: var(--ink-2); max-width: 26em; }

.sec-contact { padding-bottom: clamp(64px, 6vw, 96px); text-align: left; }
.sec-contact h2 { border-top: 1px solid var(--rule); padding-top: clamp(22px, 2.4vw, 36px); }
.mail {
  display: inline-block; margin-top: clamp(26px, 2.4vw, 36px);
  font-family: var(--mono); font-weight: 700; font-size: clamp(17px, 1.8vw, 28px); letter-spacing: 0.02em;
  color: var(--gold); overflow-wrap: anywhere;
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 10px;
  transition: text-decoration-color .35s var(--ease-out);
}
.mail:hover { text-decoration-color: var(--gold); }

/* ---------- footer: company record on card stock ---------- */
.foot { padding: 0 var(--gutter) 32px; }
.record {
  max-width: 1320px; margin: 0 auto; color: var(--card-ink);
  background: url("assets/plates/card-strip.webp") left top / auto 52px repeat-x, var(--card);
  padding: calc(58px + clamp(24px, 3vw, 40px)) clamp(22px, 3vw, 44px) clamp(24px, 3vw, 40px);
  border-radius: 14px;
}
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-mark { width: 46px; height: 31px; color: var(--card-ink); }
.foot h2 { margin: 0; font-size: 18px; font-weight: 700; }
.company { margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; max-width: 1320px; }
.company div { display: flex; gap: 18px; padding: 12px 0; border-top: 1px solid rgba(18, 22, 42, 0.16); font-size: 15px; }
.company dt { flex: none; width: 7.5em; color: #5b5a5c; font-family: var(--sans); }
.company dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.nav-short { display: none; }
.company a { text-underline-offset: 3px; text-decoration-color: rgba(18, 22, 42, 0.35); }
.copy { max-width: 1320px; margin: 22px auto 0; font-size: 13px; color: var(--ink-2); }

/* ---------- responsive ---------- */
.br-wide { display: inline; }
@media (max-width: 900px) {
  .band { height: 60px; padding: 0 16px; border-radius: 0 0 10px 10px; }
  .brand { border-right: 0; padding-right: 0; gap: 8px; }
  .brand-word { font-size: 11px; letter-spacing: 0.12em; }
  .brand-mark { width: 26px; height: 18px; }
  .band nav a { padding: 4px 9px; font-size: 13px; }
  .hero { min-height: 0; margin-top: 0; padding-bottom: 0; }
  .hero-emblem { position: relative; display: block; left: auto; top: auto; width: 100%; height: auto; aspect-ratio: 1 / 0.8; object-position: center 30%; margin-top: 8px; }
  .hero-copy { max-width: none; padding: 40px 20px 0; }
  .hero h1 { font-size: clamp(32px, 8.6vw, 52px); }
  .hero-body { font-size: 17px; margin-top: 18px; }
  .hero-actions { flex-wrap: wrap; gap: 18px 24px; margin-top: 28px; }
  .hero-index { position: relative; top: auto; grid-template-columns: 1fr; }
  .index-item { padding: 20px; font-size: 18px; gap: 12px; }
  .index-item + .index-item { border-left: 0; border-top: 1px solid var(--rule-quiet); padding: 20px; }
  .br-wide { display: none; }
  .data-grid, .games-grid { grid-template-columns: 1fr; }
  .work-list { grid-template-columns: 1fr; }
  .work-list li, .work-list li + li { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--rule-quiet); }
  .company { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .film video { aspect-ratio: 9 / 16; max-height: 78vh; margin: 0 auto; object-fit: cover; }
  .band { padding: 0 10px; gap: 8px; }
  .brand { padding: 4px 8px 4px 4px; }
  .brand-word { font-size: 11px; letter-spacing: 0.08em; }
  .band nav li + li { border-left: 0; }
  .band nav a { padding: 4px 7px; }
  .nav-long { display: none; }
  .nav-short { display: inline; }
}
