:root {
  color-scheme: light;
  --charcoal: #24272f;
  --coral: #ff917c;
  --ink: #22262d;
  --soft: #d5dee5;
  --paper: color-mix(in srgb, var(--soft) 9%, white);
  --muted: color-mix(in srgb, var(--ink) 83%, white);
  --line: color-mix(in srgb, var(--charcoal) 30%, white);
  --max: 1280px;
  --edge: clamp(20px, 4.6vw, 70px);
  --sans: "Inter", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
a:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
.wrap { width: min(calc(100% - var(--edge) * 2), var(--max)); margin-inline: auto; }
.skip { position: absolute; top: 0; left: 1rem; z-index: 2; padding: .8em 1em; background: white; color: #181818; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }

.site-header { background: var(--charcoal); color: white; border-bottom: 1px solid #ffffff75; }
.masthead { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { display: inline-block; width: clamp(95px, 12vw, 150px); }
.wordmark img { width: 100%; height: auto; }
.site-nav, .languages { display: flex; align-items: center; }
.site-nav { gap: clamp(12px, 2.5vw, 32px); font-size: .95rem; font-weight: 700; }
.site-nav > a:hover, .footer a:hover { text-decoration: underline; text-underline-offset: .28em; }
.languages { gap: 2px; border: 1px solid var(--line); border-radius: 24px; padding: 3px; }
.languages a { padding: 6px 9px; font: 700 .875rem var(--sans); border-radius: 20px; }
.languages [aria-current], .languages a:hover { background: white; color: var(--charcoal); }

.hero { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 448px; overflow: hidden; background: var(--charcoal); color: white; }
.hero-copy { align-self: center; padding: 46px 0 46px max(var(--edge), calc((100vw - var(--max)) / 2)); }
.eyebrow { font-size: .94rem; font-weight: 740; text-transform: uppercase; letter-spacing: .09em; }
h1 { margin: .22em 0 .23em; font-size: clamp(2.4rem, 5.7vw, 6rem); line-height: 1.08; letter-spacing: -.075em; font-weight: 900; }
h1 span { display: block; }
.hero-intro { max-width: 42ch; margin-bottom: 1.2em; line-height: 1.55; word-break: keep-all; }
.primary { display: inline-flex; width: fit-content; min-height: 44px; align-items: center; justify-content: center; padding: .65em 1.15em; font-size: .9375rem; font-weight: 750; }
.primary { background: var(--coral); color: var(--ink); }
.primary:hover { text-decoration: underline; text-underline-offset: .25em; }
.hero-art { display: grid; place-items: center; overflow: hidden; background: var(--coral); }
.board { display: grid; width: min(77%, 382px); grid-template-columns: repeat(3, 1fr); border: 4px solid var(--ink); background: var(--ink); transform: rotate(-9deg) scale(1.06); box-shadow: 17px 17px var(--ink); }
.tile { aspect-ratio: 1; background: var(--tile-bg); position: relative; border: 2px solid var(--ink); }
.tile::after { position: absolute; inset: 22%; content: ""; background: var(--tile-figure, var(--ink)); border-radius: var(--tile-shape, 100%); transform: var(--tile-turn, none); }
.tile:nth-child(3n + 1) { --tile-bg: var(--paper); }
.tile:nth-child(3n + 2) { --tile-bg: var(--coral); }
.tile:nth-child(3n) { --tile-bg: var(--soft); }
.tile-one { --tile-shape: 50% 50% 9% 50%; }
.tile-two { --tile-shape: 10%; --tile-turn: rotate(45deg) scale(.8); }
.tile-three { --tile-shape: 50% 50% 3% 3%; }
.tile-four { --tile-shape: 12%; }
.tile.tile-five { --tile-bg: var(--charcoal); --tile-figure: white; --tile-shape: 0 100% 100% 100%; }
.tile-six { --tile-shape: 11%; --tile-turn: rotate(45deg) scale(.8); }
.tile-eight { --tile-shape: 50% 50% 0 0; --tile-turn: rotate(-90deg); }
.tile-nine { --tile-shape: 9% 50% 50% 50%; }

.games { padding-block: 38px clamp(46px, 6vw, 92px); }
.section-heading { margin-bottom: 23px; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.95rem); line-height: 1.15; letter-spacing: -.055em; }
.game-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 2px solid var(--ink); }
.game { display: grid; align-content: start; min-width: 0; }
.game + .game { border-left: 2px solid var(--ink); }
.game-art { aspect-ratio: 2.1; min-width: 0; position: relative; overflow: hidden; display: grid; place-items: center; border-bottom: 2px solid var(--ink); }
.game-art img { width: 100%; height: 100%; object-fit: cover; }
.game-restore { background: color-mix(in srgb, var(--soft) 55%, white); }
.game-restore .game-art { background: #232434; isolation: isolate; }
.game-restore .game-art::before { position: absolute; inset: 0; z-index: -1; content: ""; background: linear-gradient(90deg, #2324349c, #23243412, #2324349c), url(assets/restoration.jpg) center 74%/cover; filter: blur(8px); transform: scale(1.1); }
.game-restore img { object-fit: contain; object-position: center; position: absolute; }
.game-courier { background: color-mix(in srgb, var(--coral) 55%, white); }
.game-courier img { object-position: 40% 57%; }
.game-info { display: grid; justify-items: start; padding: clamp(20px, 3vw, 34px); }
.game-type { color: var(--charcoal); font-size: .875rem; font-weight: 760; }
h3 { margin: .42em 0 .35em; font-size: clamp(1.3rem, 2.45vw, 2.1rem); line-height: 1.16; letter-spacing: -.045em; }
.game-description { color: var(--muted); line-height: 1.6; }
.contact { border-top: 1px solid var(--line); }
.contact-inner { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; align-items: baseline; padding-block: 40px; }
.contact-inner a { width: fit-content; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: .25em; }
.footer { border-top: 1px solid var(--line); padding-block: 25px; display: flex; justify-content: space-between; font-size: .875rem; color: var(--muted); }

@media (max-width: 700px) {
  .masthead { min-height: 70px; }
  .wordmark { width: 100px; }
  .site-nav { gap: 12px; font-size: .875rem; }
  .languages a { padding-inline: 7px; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 35px var(--edge) 29px; }
  h1 { font-size: clamp(2.4rem, 8.6vw, 4.1rem); }
  .hero-art { min-height: 245px; }
  .board { max-width: 180px; }
  .game-list { grid-template-columns: 1fr; }
  .game + .game { border-left: 0; border-top: 2px solid var(--ink); }
  .contact-inner { grid-template-columns: 1fr; padding-block: 32px; }
}

@media (max-width: 350px) {
  .nav-about { display: none; }
}

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