/* Tecmo World Cup '98 Online - a sunny afternoon at France 98: sky over the stands, mown turf, the tricolour, photos pinned up */
:root {
  --navy: #13235b;           /* the kit and the type */
  --navy-2: #24367a;
  --ink-2: #44507a;          /* running text on light grounds */
  --muted: #6b7699;
  --blue: #1f3fa8;           /* the tricolour */
  --red: #e3262f;
  --red-dark: #9d1218;
  --white: #fff;
  --sky: #7fc4f0;
  --sky-2: #d9f0ff;
  --sky-3: #eef8ff;
  --grass: #3fa34d;
  --grass-2: #36923f;
  --grass-3: #2e7f37;
  --stand: #c9d6e3;
  --stand-2: #b4c3d3;
  --line: rgba(19, 35, 91, .14);
  --r: 6px;
  --display: "Archivo Black", "Arial Black", "Do Hyeon", sans-serif;
  --ko-display: "Do Hyeon", "Archivo Black", sans-serif;
  --body: "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--white); color: var(--navy);
  font: 16px/1.7 var(--body); -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 20px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

/* the tricolour, used as a rule under the nav and above the stats */
.nav::after, .stats::before {
  content: ""; position: absolute; left: 0; right: 0; height: 6px;
  background: linear-gradient(90deg, var(--blue) 0 33.3%, var(--white) 33.3% 66.6%, var(--red) 66.6%);
}

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 24px 10px;
  background: var(--white); border-bottom: 3px solid var(--navy);
}
.nav::after { bottom: -9px; }
.nav.solid { box-shadow: 0 10px 24px rgba(19, 35, 91, .12); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 16px/1 var(--display); letter-spacing: .02em; white-space: nowrap; }
.brand b { color: var(--red); font-weight: 400; }
.links { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.links a { text-decoration: none; color: var(--navy); font-size: 14px; font-weight: 700; }
.links a:hover { color: var(--red); }
.links a.dl { background: var(--red); color: var(--white); padding: 8px 16px; border-radius: 4px; }
.links a.dl:hover { background: var(--red-dark); color: var(--white); }
.lang {
  border: 2px solid var(--navy); background: var(--white); color: var(--navy);
  font: 700 12px/1 var(--body); padding: 7px 11px; border-radius: 4px; cursor: pointer;
}
.lang:hover { background: var(--navy); color: var(--white); }
@media (max-width: 760px) {
  .links { display: none; } .lang { margin-left: auto; }
  .nav { padding-inline: 16px; } .brand { font-size: 13px; gap: 9px; } .brand img { width: 28px; height: 28px; }
}
@media (max-width: 420px) { .nav { gap: 10px; } .brand { font-size: 11px; gap: 7px; } .brand img { width: 26px; height: 26px; } .lang { padding: 6px 8px; } }

/* ---------------------------------------------------------------- hero: sky, the stand, the halfway line, the turf */
.hero {
  position: relative; overflow: hidden; padding: 128px 0 72px;
  background:
    linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 34%, transparent 34%),
    repeating-linear-gradient(90deg, var(--stand) 0 6px, var(--stand-2) 6px 12px) 0 34% / 100% 16% no-repeat,
    repeating-linear-gradient(90deg, var(--grass) 0 110px, var(--grass-2) 110px 220px);
}
.hero::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; background: rgba(255, 255, 255, .85); }
.hero-in { position: relative; max-width: 1160px; margin: 0 auto; padding-inline: 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: start; }
.eyebrow { display: inline-block; margin: 0; background: var(--navy); color: var(--white); font-weight: 700; font-size: 14px; padding: 6px 12px; letter-spacing: .05em; }
h1 { margin: 18px 0 0; line-height: .92; }
.h-main {
  display: block; font: clamp(56px, 8.4vw, 104px)/.92 var(--display); color: var(--white); letter-spacing: .01em;
  -webkit-text-stroke: 3px var(--navy); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--navy);
}
.h-ko { display: block; margin-top: 16px; font: 400 clamp(26px, 3vw, 36px)/1.15 var(--ko-display); color: var(--navy); }
html[lang="en"] .h-ko { font-family: var(--display); font-size: clamp(18px, 2vw, 24px); }
.lede {
  max-width: 470px; margin: 26px 0 0; background: var(--white); padding: 16px 20px;
  border-left: 8px solid var(--red); color: var(--ink-2); font-size: 16px; line-height: 1.65; box-shadow: 0 8px 0 rgba(19, 35, 91, .16);
}
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 13px 22px; border-radius: 4px; font-weight: 700; font-size: 16px;
  transition: transform .12s, box-shadow .12s, background .2s;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--red); color: var(--white); box-shadow: 0 5px 0 var(--red-dark); }
.btn.ghost { background: var(--white); color: var(--navy); box-shadow: 0 5px 0 rgba(19, 35, 91, .35); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--red-dark); }
.btn.ghost:active { box-shadow: 0 2px 0 rgba(19, 35, 91, .35); }
.btn.big { padding: 16px 26px; font-size: 18px; }
.meta { display: inline-block; margin: 22px 0 0; font-size: 13px; color: var(--white); font-weight: 500; background: rgba(19, 35, 91, .55); padding: 4px 10px; border-radius: 3px; }

/* the two photos, pinned up */
.photos { position: relative; min-height: 580px; }
.ph { position: absolute; margin: 0; background: var(--white); padding: 12px 12px 0; box-shadow: 0 18px 40px rgba(0, 0, 0, .25); }
.ph figcaption { font: 400 20px/1 var(--ko-display); text-align: center; padding: 12px 0 14px; color: var(--navy); }
html[lang="en"] .ph figcaption { font: 14px/1 var(--display); padding: 14px 0 15px; }
.ph1 { right: 0; top: 0; width: 92%; transform: rotate(3deg); }
.ph2 { left: -4%; top: 318px; width: 52%; transform: rotate(-5deg); }
.ph1 figcaption { text-align: right; padding-right: 10px; }
@media (max-width: 900px) {
  .hero { padding-top: 104px; background:
    linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 22%, transparent 22%),
    repeating-linear-gradient(90deg, var(--stand) 0 6px, var(--stand-2) 6px 12px) 0 22% / 100% 8% no-repeat,
    repeating-linear-gradient(90deg, var(--grass) 0 80px, var(--grass-2) 80px 160px); }
  .hero::before { top: 30%; }
  .hero-in { grid-template-columns: 1fr; gap: 28px; }
  .photos { min-height: 0; display: grid; grid-template-columns: 1fr; gap: 18px; padding-inline: 6px; }
  .ph { position: relative; inset: auto; width: 100%; }
  .ph1 { transform: rotate(1.5deg); } .ph2 { transform: rotate(-2deg); width: 72%; justify-self: start; margin-top: -24px; }
  .ph1 figcaption { text-align: center; padding-right: 0; }
}
@media (max-width: 520px) { .h-main { -webkit-text-stroke-width: 2px; text-shadow: 4px 4px 0 var(--navy); } .ph2 { width: 86%; } }

/* ---------------------------------------------------------------- at a glance: a navy band */
.stats {
  position: relative; background: var(--navy); color: var(--white);
  padding: 36px max(20px, calc((100% - 1120px) / 2)) 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.stats::before { top: 0; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .n { font: 44px/1 var(--display); color: var(--white); font-variant-numeric: tabular-nums; }
.stat .n small { font-size: .5em; color: #ff8a90; margin-left: 2px; font-family: var(--ko-display); }
.stat .l { font-size: 14px; color: #c9d1ee; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(3, 1fr); gap: 10px; } .stat .n { font-size: 30px; } .stat .l { font-size: 13px; } }

/* ---------------------------------------------------------------- sections */
section.features, section.start, section.download { padding: 92px 0; }
.head { max-width: 760px; margin-bottom: 40px; }
.kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 14px/1 var(--display); letter-spacing: .14em; color: var(--red); }
.kicker::before { content: ""; width: 30px; height: 6px; background: linear-gradient(90deg, var(--blue) 0 33.3%, var(--white) 33.3% 66.6%, var(--red) 66.6%); box-shadow: 0 0 0 1px var(--line); }
h2 { margin: 0; font: 400 clamp(32px, 4.6vw, 48px)/1.12 var(--ko-display); text-wrap: balance; color: var(--navy); }
html[lang="en"] h2 { font: clamp(28px, 4.2vw, 46px)/1.05 var(--display); }
.sub { margin: 14px 0 0; color: var(--ink-2); max-width: 64ch; }

.feat { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: f; }
.feat li { background: var(--white); border: 2px solid var(--navy); border-radius: var(--r); padding: 22px 22px 20px; box-shadow: 6px 6px 0 var(--sky-2); }
.feat h3 { margin: 0 0 8px; font: 400 22px/1.2 var(--ko-display); color: var(--navy); }
html[lang="en"] .feat h3 { font: 16px/1.25 var(--display); }
.feat p { margin: 0; color: var(--ink-2); font-size: 15px; }
.feat li:nth-child(2) { box-shadow: 6px 6px 0 #ffd2d4; }
.feat li:nth-child(2) h3::after { content: "FIX"; margin-left: 8px; vertical-align: 3px; font: 11px/1 var(--display); letter-spacing: .08em; background: var(--red); color: var(--white); padding: 3px 6px; border-radius: 3px; }
@media (max-width: 900px) { .feat { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feat { grid-template-columns: 1fr; } }

/* how to start: a light-sky section, the steps beside the launcher picture */
section.start { background: var(--sky-3); border-top: 3px solid var(--navy); border-bottom: 3px solid var(--navy); }
.start-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 40px; align-items: start; margin-bottom: 40px; }
.launcher { margin: 0; background: var(--white); padding: 12px 12px 0; box-shadow: 0 16px 34px rgba(19, 35, 91, .2); transform: rotate(1.5deg); }
.launcher img { border: 1px solid var(--line); }
.launcher figcaption { padding: 12px 4px 14px; font-size: 14px; color: var(--muted); text-align: center; }
@media (max-width: 900px) { .start-grid { grid-template-columns: 1fr; } .launcher { transform: none; } }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 22px; counter-reset: s; }
.steps li { counter-increment: s; padding-top: 58px; position: relative; }
.steps li::before {
  content: counter(s); position: absolute; top: 0; left: 0; width: 44px; height: 44px; display: grid; place-items: center;
  font: 22px/1 var(--display); color: var(--white); background: var(--navy); border-radius: 50%; box-shadow: 3px 3px 0 var(--red);
}
.steps h3 { margin: 0 0 6px; font-size: 17px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mode { background: var(--white); border-top: 6px solid var(--navy); border-radius: 0 0 var(--r) var(--r); padding: 18px 20px; box-shadow: 0 4px 0 var(--line); }
.mode:nth-child(2) { border-top-color: var(--blue); }
.mode:nth-child(3) { border-top-color: var(--red); }
.mode .tag { margin: 0 0 6px; font-weight: 700; font-size: 14px; letter-spacing: .06em; color: var(--navy); }
.mode p { margin: 0; color: var(--ink-2); font-size: 15px; }
.mode code { display: inline-block; margin-top: 10px; font: 700 13px/1 ui-monospace, Consolas, monospace; color: var(--navy); background: var(--sky-2); padding: 6px 9px; border-radius: 4px; }
@media (max-width: 860px) { .modes { grid-template-columns: 1fr; } }

/* download: a strip of turf with the halfway line */
.dl-panel {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: start; color: var(--white);
  background: repeating-linear-gradient(90deg, var(--grass) 0 80px, var(--grass-2) 80px 160px);
  border: 3px solid var(--navy); border-radius: 10px; padding: 38px; position: relative; overflow: hidden; box-shadow: 8px 8px 0 var(--navy);
}
.dl-panel > * { position: relative; z-index: 1; }
.dl-copy .kicker { color: var(--white); }
.dl-copy h2 { color: var(--white); text-shadow: 3px 3px 0 var(--navy); }
.dl-copy .sub { color: #eef9ef; margin-bottom: 24px; }
.dl-note { margin: 12px 0 0; color: var(--white); font-weight: 700; }
.req { margin: 0; display: grid; background: var(--white); color: var(--navy); border-radius: 6px; padding: 6px 18px; box-shadow: 0 6px 0 rgba(0, 0, 0, .18); }
.req div { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.req div:last-child { border-bottom: 0; }
.req dt { color: var(--muted); font-size: 14px; font-weight: 700; }
.req dd { margin: 0; font-size: 15px; }
.rom-note { margin: 22px 0 0; font-size: 14px; color: var(--muted); }
@media (max-width: 820px) { .dl-panel { grid-template-columns: 1fr; padding: 28px 22px; box-shadow: 5px 5px 0 var(--navy); } }

/* footer */
.foot { background: var(--navy); color: #c9d1ee; padding: 34px 0 calc(env(safe-area-inset-bottom, 0px) + 40px); font-size: 13px; position: relative; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--blue) 0 33.3%, var(--white) 33.3% 66.6%, var(--red) 66.6%); }
.foot p { margin: 0 0 6px; max-width: 90ch; }

/* reveal on scroll: hidden only while the script runs (html.js), shown at once without motion */
html.js .rv { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
html.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .rv { opacity: 1; transform: none; transition: none; } }
