/* hamkke: colours come from the logo (white, black and its four greys), so the page reads as
   part of the mark. Light/dark swap paper and ink; the logo's own gradient never changes. */
:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --muted: #5e5e5e;
  --line: #e4e4e4;
  --edge: rgb(0 0 0 / .12);      /* hairline around the gradient tiles */
  --gutter: clamp(16px, 4vw, 48px);
  --sans: "IBM Plex Sans KR", system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --brand-gradient: linear-gradient(to bottom right, #ffffff, #000000);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a0a0a;
    --ink: #f2f2f2;
    --muted: #a0a0a0;
    --line: #262626;
    --edge: rgb(255 255 255 / .16);
  }
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap { max-width: 1200px; margin: 0 auto; }

/* The mark as a small square tile: the logo's gradient behind the 6 x 9 grid */
.tile {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  background: var(--brand-gradient);
  outline: 1px solid var(--edge);
  outline-offset: -1px;
}

/* Small mono labels above each section */
.label {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0 0 20px;
  font: 400 13px/1.4 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.label b { font-weight: 400; color: var(--ink); }

h1, h2 { font-weight: 600; margin: 0; text-wrap: balance; }
h2 {
  font-size: clamp(32px, 4.6vw, 60px);
  line-height: 1.05;
  letter-spacing: -.025em;
  margin-bottom: 24px;
}
p { margin: 0 0 1em; max-width: 34em; }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; }

/* Buttons: a small square leads each one, like a single block of the mark */
.button, .replay {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.button { background: var(--ink); color: var(--paper); }
.replay { background: transparent; color: var(--ink); font: 400 14px/1 var(--mono); }
.button::before, .replay::before {
  content: "";
  width: 8px;
  height: 8px;
  background: currentColor;
}
.button:hover { background: transparent; color: var(--ink); }
.button.ghost { background: transparent; color: var(--ink); }
.button.ghost:hover { background: var(--ink); color: var(--paper); }
.replay:hover { background: var(--ink); color: var(--paper); }

/* Header */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 20px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -.01em;
  text-decoration: none;
}
.brand .tile { width: 32px; }
.nav ul {
  display: flex;
  gap: clamp(14px, 3vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}
.nav ul a { text-decoration: none; }
.nav ul a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Hero: a small animated logo above the words */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0 var(--gutter);
}
.hero-body {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: clamp(28px, 4vw, 40px);
  width: 100%;
  padding: clamp(24px, 4vw, 48px) 0 clamp(48px, 8vw, 96px);
}
.hero h1 {
  font-size: clamp(64px, 11vw, 168px);
  line-height: .9;
  letter-spacing: -.045em;
  margin: 0 0 28px;
}
.hero .lede { margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-logo {
  width: clamp(80px, 9vw, 120px);
  margin: 0;
}
.hero-logo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  cursor: pointer;
  outline: 1px solid var(--edge);
  outline-offset: -1px;
}

/* Sections */
.section {
  padding: clamp(72px, 11vw, 160px) var(--gutter);
  border-top: 1px solid var(--line);
}

/* The ribbon: one wide photo, edge to edge, under the logo */
.ribbon { margin: 0; border-top: 1px solid var(--line); background: var(--line); }
.ribbon img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; }
@media (max-width: 560px) {
  .ribbon img { aspect-ratio: 2 / 1; }
}

/* Photos: carousel stacks, each a deck of 4:5 slides with the next cards showing behind it */
.stacks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: clamp(40px, 5vw, 56px) clamp(24px, 3vw, 40px);
  margin-top: clamp(40px, 6vw, 64px);
}
.stack { min-width: 0; margin: 0; }
.stack-card { position: relative; isolation: isolate; }
/* The cards behind: two edges peeking out on the right, as a stack */
.stack-card::before, .stack-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--line);
  outline: 1px solid var(--edge);
  outline-offset: -1px;
}
.stack-card::before { transform: translate(8px, 8px); opacity: .7; }
.stack-card::after { transform: translate(16px, 16px); opacity: .4; }
@media (max-width: 560px) {
  /* Keep the cards behind inside the page's gutter */
  .stack { margin-right: 10px; }
  .stack-card::before { transform: translate(5px, 5px); }
  .stack-card::after { transform: translate(10px, 10px); }
}
.stack-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  background: var(--line);
}
.stack-track::-webkit-scrollbar { display: none; }
.stack-track:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.stack-slide { flex: 0 0 100%; aspect-ratio: 4 / 5; scroll-snap-align: start; }
.stack-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.stack-nav {
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border: 1px solid rgb(255 255 255 / .6);
  background: rgb(10 10 10 / .45);
  color: #ffffff;
  font: 400 16px/1 var(--mono);
  cursor: pointer;
}
.stack-nav:hover { border-color: #ffffff; }
.stack-prev { left: 10px; }
.stack-next { right: 10px; }
.stack-nav[hidden] { display: none; }
@media (hover: hover) {
  .stack-nav { opacity: 0; transition: opacity .2s; }
  .stack:hover .stack-nav, .stack-nav:focus-visible { opacity: 1; }
}
.stack-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 0;
  font: 400 13px/1.4 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.stack-count { color: var(--ink); }

/* Photo viewer: always dark, whatever the page theme, so the photos read true */
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
}
.lightbox::backdrop { background: #050505; }
.lightbox[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-items: center;
}
.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px var(--gutter);
  font: 400 13px/1 var(--mono);
  color: rgb(255 255 255 / .7);
}
.lightbox button {
  border: 1px solid rgb(255 255 255 / .3);
  background: rgb(0 0 0 / .4);
  color: #ffffff;
  cursor: pointer;
}
.lightbox button:hover { border-color: #ffffff; }
.lb-close { padding: 10px 14px; font: 400 13px/1 var(--mono); }
.lb-img {
  align-self: center;
  max-width: calc(100% - 2 * var(--gutter) - 112px);
  max-height: 100%;
  object-fit: contain;
  transition: opacity .2s ease;
}
.lb-img.is-loading { opacity: 0; }
.lb-caption {
  max-width: none;
  margin: 0;
  padding: 16px var(--gutter) 24px;
  font-size: 15px;
  text-align: center;
  color: rgb(255 255 255 / .8);
}
.lb-nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 48px;
  height: 48px;
  font: 400 20px/1 var(--sans);
}
.lb-prev { left: var(--gutter); }
.lb-next { right: var(--gutter); }
@media (max-width: 560px) {
  /* On phones the photo uses the full width; the arrows sit over it */
  .lb-img { max-width: 100%; }
  .lb-nav { width: 40px; height: 40px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* About: the name */
.name .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(32px, 6vw, 96px);
}
.name-word {
  margin: 0;
  font-size: clamp(112px, 20vw, 300px);
  font-weight: 600;
  line-height: .85;
  letter-spacing: -.04em;
}
.gloss {
  margin: 0 0 24px;
  font: 400 15px/1.5 var(--mono);
  color: var(--muted);
}
.name .lede { color: var(--muted); }

@media (max-width: 760px) {
  .name .wrap { grid-template-columns: 1fr; }
}

/* Footer */
.footer {
  padding: 32px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer p { margin: 0; color: var(--muted); }
.footer .brand { font-size: 16px; }
.footer .brand .tile { width: 28px; }
.footer .brand span + span { font-weight: 400; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .replay { display: none; }
}
