@font-face {
  font-family: 'Fredoka';
  src: url('/assets/Fredoka-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Jua';
  src: url('/assets/Jua-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans KR';
  src: url('/assets/NotoSansKR.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fff4dc;
  --card: #fffbec;
  --ink: #382222;
  --muted: #644a43;
  --line: #553330;
  --coral: #f6ab91;
  --peach: #ffd6ac;
  --yellow: #ffe184;
  --mint: #dbebbf;
  --lavender: #ebddf6;
  --body: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Segoe UI', system-ui, sans-serif;
}

html[lang='ko'] { --body: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.6 var(--body);
  background-image: conic-gradient(from 90deg, transparent 25%, #f3dfba 0 50%, transparent 0 75%, #f3dfba 0);
  background-size: 24px 24px;
}
a { color: inherit; text-underline-offset: .2em; }
a:focus-visible, video:focus-visible { outline: 3px solid #62238e; outline-offset: 4px; }
img, video { display: block; max-width: 100%; }
figure, p, h1, h2, h3 { margin: 0; }
section { scroll-margin-top: .9rem; }
.wrap { width: min(100% - 3rem, 67rem); margin-inline: auto; }
.topbar { border-top: 7px solid var(--coral); border-bottom: 3px solid var(--line); background: var(--card); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: .65rem 1.5rem; min-height: 4.3rem; padding-block: .5rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 900; text-decoration: none; letter-spacing: .025em; white-space: nowrap; }
.brand img { width: 2.5rem; height: 2.5rem; border: 2px solid var(--line); background: #fff; }
.topbar nav { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .55rem; font-size: .86rem; font-weight: 750; }
.topbar nav > a, .lang a {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0 .6rem;
  border: 2px solid var(--line);
  background: var(--peach);
  box-shadow: 2px 2px 0 var(--line);
  text-decoration: none;
}
.topbar nav > a:hover, .lang a:hover { background: var(--yellow); }
.lang { display: inline-flex; gap: .35rem; white-space: nowrap; }
.lang a { background: var(--card); }
.lang a[aria-current] { background: var(--mint); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(1.25rem, 5vw, 4.5rem);
  align-items: center;
  margin-block: clamp(1.65rem, 4vw, 3.55rem);
  padding: clamp(1.2rem, 4vw, 3.1rem);
  border: 3px solid var(--line);
  box-shadow: 6px 6px 0 var(--line);
  background: var(--card);
}
.hero-copy { min-width: 0; }
.hero-copy > :not(:first-child) { margin-top: 1.05rem; }
.hero-copy .pixel, .section-heading .pixel { width: 2rem; height: 2rem; }
.pixel { flex: none; width: 1.5rem; height: 1.5rem; object-fit: contain; image-rendering: pixelated; }
.kicker { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-weight: 850; font-size: .84rem; }
h1, h2, h3 { font-weight: 900; }
h1 { font-size: clamp(2.5rem, 6.25vw, 4.8rem); line-height: .98; letter-spacing: -.065em; }
html[lang='en'] h1 { font-family: 'Fredoka', var(--body); font-weight: 700; letter-spacing: -.035em; }
html[lang='ko'] :is(h1, h2, .brand) { font-family: 'Jua', var(--body); font-weight: 400; letter-spacing: -.02em; }
html[lang='ko'] h1 { line-height: 1.05; }
h2 { font-size: clamp(1.65rem, 4vw, 2.45rem); line-height: 1.2; letter-spacing: -.04em; }
h3 { font-size: 1.13rem; line-height: 1.3; }
.lede { color: var(--muted); max-width: 42ch; font-size: clamp(1rem, 1.7vw, 1.15rem); }
.hero-context { color: var(--muted); max-width: 49ch; }
.app-link { font-size: .9rem; font-weight: 750; }
html[lang='ko'] :is(h1, h2, h3, p, figcaption) { word-break: keep-all; overflow-wrap: anywhere; }
.action {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  gap: .55rem;
  padding: .4rem .75rem;
  border: 2px solid var(--line);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--line);
  font-weight: 850;
  text-decoration: none;
}
.action:hover { background: var(--coral); }
.action:active, .topbar nav a:active { box-shadow: none; transform: translate(2px, 2px); }

.photo-album { position: relative; min-width: 0; aspect-ratio: 1.17; isolation: isolate; }
.photo-album img { position: absolute; height: auto; padding: .32rem .32rem .75rem; background: var(--card); border: 2px solid var(--line); box-shadow: 4px 4px 0 #55333050; object-fit: cover; }
.photo-album .album-plaza { top: 7%; left: 3%; width: 68%; aspect-ratio: 1.5; transform: rotate(-9deg); }
.photo-album .album-east { bottom: 5%; left: 6%; width: 68%; aspect-ratio: 1.5; transform: rotate(6deg); }
.photo-album .album-beagle { top: 19%; right: 3%; width: 57%; aspect-ratio: 1; transform: rotate(9deg); }

.band { padding-block: 0 clamp(1.65rem, 4vw, 3.55rem); }
.band > .wrap { border: 3px solid var(--line); box-shadow: 5px 5px 0 var(--line); padding: clamp(1rem, 3.25vw, 2.4rem); background: var(--card); }
.comparison > .wrap { background: var(--mint); }
.catalog-count { flex: none; margin-left: .25rem; color: var(--muted); font: 750 .87rem/1.25 var(--body); letter-spacing: 0; white-space: nowrap; }
.compare-catalog {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(5.35rem, 1fr);
  gap: .4rem;
  overflow-x: auto;
  padding: .35rem .15rem .55rem;
  margin-top: .7rem;
  scrollbar-color: var(--line) #c7d6ad;
}
.compare-catalog button { display: grid; grid-template-rows: auto 1fr; align-items: center; justify-items: center; width: 100%; min-width: 0; min-height: 5.5rem; padding: .2rem; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: 750 .7rem/1.2 var(--body); text-align: center; cursor: pointer; }
.compare-catalog button[aria-pressed='true'] { background: var(--yellow); }
.compare-catalog button:focus-visible, .compare-toolbar select:focus-visible { outline: 3px solid #62238e; outline-offset: 1px; }
.compare-catalog img { width: 100%; height: 2.7rem; object-fit: contain; background: #eae3d7; }
.compare-catalog span { padding: .25rem .1rem 0; overflow-wrap: anywhere; }
.compare-layout { display: grid; align-items: start; grid-template-columns: minmax(0, 2.55fr) minmax(0, 1fr); gap: clamp(.85rem, 3vw, 1.55rem); margin-top: 1rem; }
.compare-widget { border: 2px solid var(--line); background: var(--card); box-shadow: 3px 3px 0 var(--line); }
.compare-toolbar { display: flex; flex-wrap: wrap; gap: .35rem; padding: .45rem; background: var(--peach); border-bottom: 2px solid var(--line); }
.compare-toolbar button { border: 2px solid var(--line); background: var(--card); color: var(--ink); font: 750 .84rem/1.2 var(--body); padding: .35rem .5rem; cursor: pointer; }
.breed-picker { display: flex; flex: 1 1 12rem; min-width: 0; gap: .4rem; align-items: center; font-size: .8rem; font-weight: 750; }
.breed-picker select { width: 100%; min-width: 0; color: var(--ink); background: var(--card); border: 2px solid var(--line); padding: .26rem .3rem; font: inherit; }
.breed-picker span { flex: none; }
.pose-options { display: flex; gap: .3rem; align-items: center; }
.compare-toolbar button[aria-pressed='true'] { background: var(--yellow); }
.compare-toolbar button:focus-visible, .compare-control input:focus-visible { outline: 3px solid #62238e; outline-offset: 2px; }
.compare-labels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: center; }
.compare-labels span { background: #fff8e2; padding: .28rem .14rem; font-weight: 800; font-size: clamp(.7rem, 1.6vw, .85rem); }
.compare-labels span + span { background: var(--lavender); border-left: 2px solid var(--line); }
.compare-stage { --split: 50%; position: relative; overflow: hidden; aspect-ratio: 800/475; background: #f2f0ed; cursor: ew-resize; touch-action: pan-y; user-select: none; }
.compare-stage img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.compare-stage .compare-reference { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.compare-divider { position: absolute; inset: 0 auto 0 var(--split); width: 3px; transform: translateX(-50%); background: var(--line); pointer-events: none; }
.compare-divider span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 2.05rem; height: 2.05rem; background: var(--yellow); color: var(--ink); border: 2px solid var(--line); font-size: 1rem; font-weight: 900; }
.compare-control { display: flex; align-items: center; gap: .55rem; padding: .45rem .6rem; border-top: 2px solid var(--line); font-size: .85rem; font-weight: 750; }
.compare-control input { min-width: 2rem; flex: 1; accent-color: var(--line); }
.compare-copy { align-self: start; background: var(--card); border: 2px solid var(--line); padding: .8rem; }
.compare-copy h3 { margin-bottom: .45rem; }
.compare-copy ol { padding-left: 1.2rem; margin: 0; }
.compare-copy li + li { margin-top: .48rem; }
.compare-copy li strong { display: block; }
.section-heading { display: flex; align-items: center; gap: .6rem; }
.section-copy { max-width: 68ch; margin-top: .55rem; color: var(--muted); }
.build-label { margin-top: .3rem; color: var(--muted); font-size: .84rem; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.85rem, 2.4vw, 1.45rem); margin-top: 1.1rem; }
.card { min-width: 0; border: 2px solid var(--line); box-shadow: 3px 3px 0 var(--line); background: var(--paper); }
.card > a { display: block; border-bottom: 2px solid var(--line); }
.card > a:hover { filter: brightness(1.08); }
.card > a:focus-visible { outline-offset: -4px; }
.card > a img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--lavender); }
.workflow { margin-top: 1.25rem; }
.workflow .grid { margin-top: .55rem; gap: .55rem; }
.workflow .card > a img { object-fit: contain; }
.workflow .card figcaption { padding: .4rem .45rem; font-size: .82rem; }
.card figcaption { padding: .65rem .65rem .7rem; }
.card figcaption strong { display: flex; align-items: center; gap: .35rem; line-height: 1.28; }
.motion { margin-top: 1.4rem; background: var(--mint); border: 2px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
.motion video { width: 100%; aspect-ratio: 756/496; max-height: 17rem; background: var(--ink); object-fit: contain; }
.motion figcaption { padding: clamp(.75rem, 4vw, 1.7rem); }
.partnership > .wrap { background: var(--lavender); }
.partnership .kicker { margin-bottom: .4rem; }
.review-facts { max-width: 53rem; margin: 1rem 0 0; border: 2px solid var(--line); background: var(--card); }
.review-facts > div { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(0, 4fr); gap: .35rem .8rem; padding: .55rem .7rem; }
.review-facts > div + div { border-top: 1px solid var(--line); }
.review-facts dt { font-weight: 850; }
.review-facts dd { margin: 0; color: var(--muted); }
footer { border-top: 3px solid var(--line); background: var(--card); color: var(--muted); padding: .85rem 0; font-size: .85rem; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 1rem; }
.skip { position: absolute; top: .75rem; left: .75rem; z-index: 1; background: white; padding: .4rem .7rem; transform: translateY(-200%); }
.skip:focus { transform: none; }

@media (max-width: 48rem) {
  .topbar .wrap { align-items: flex-start; flex-direction: column; }
  .compare-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 42rem) {
  .wrap { width: calc(100% - 1.65rem); }
  .hero, .grid, .motion, .review-facts > div { grid-template-columns: minmax(0, 1fr); }
  .hero { gap: 1.15rem; }
  .workflow .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar nav { gap: .35rem; }
  .topbar nav > a, .lang a { padding-inline: .35rem; }
  .motion video { max-height: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
