/* GOCHU LAB — site styles
   Concept: a quiet laboratory notebook. Paper, ink, one chili red.
   No component library. Type, grid and data do the work. */

:root {
  --paper: #f3efe6;
  --paper-2: #ebe5d8;
  --ink: #17140f;
  --ink-2: #3a352d;
  --muted: #6f675b;
  --rule: #d6cebf;
  --red: #b0281c;
  --red-deep: #7a1a11;
  --red-soft: #e7c9bf;

  --sans: "IBM Plex Sans", "IBM Plex Sans JP", "IBM Plex Sans KR", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --max: 1360px;
  --gut: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
}
:lang(ja) body, body:lang(ja) { line-break: strict; }
:lang(ko) body, body:lang(ko) { word-break: keep-all; }
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--red); color: var(--paper); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(12px, 2vw, 32px); }

/* ---------- type ---------- */
.mono, .label { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.5; }
.label { color: var(--muted); }
.label b { color: var(--ink); font-weight: 500; }
h1, h2, h3 { font-weight: 500; margin: 0; line-height: 1.2; letter-spacing: -.01em; }
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3 { letter-spacing: 0; }
.display { font-size: clamp(38px, 6.4vw, 96px); line-height: 1.08; letter-spacing: -.025em; }
:lang(ja) .display, :lang(ko) .display { letter-spacing: 0; line-height: 1.22; font-size: clamp(32px, 5.4vw, 80px); }
.h2 { font-size: clamp(26px, 3.2vw, 44px); line-height: 1.25; }
.h3 { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; }
.lead { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.8; color: var(--ink-2); max-width: 36em; }
.small { font-size: 13px; color: var(--muted); line-height: 1.7; }
p { margin: 0 0 1em; }
.red { color: var(--red); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.wordmark { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.wordmark .wm { font-family: var(--mono); font-weight: 500; font-size: 15px; letter-spacing: .22em; }
.wordmark .wm i { font-style: normal; color: var(--red); }
.wordmark .by { font-size: 11px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.nav { display: flex; gap: clamp(14px, 2vw, 28px); font-size: 14px; }
.nav a { text-decoration: none; color: var(--ink-2); position: relative; padding: 4px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }
.langs { display: flex; gap: 2px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; }
.langs a { text-decoration: none; padding: 4px 7px; color: var(--muted); border-radius: 2px; }
.langs a[aria-current="true"] { color: var(--paper); background: var(--ink); }
.menu-btn { display: none; background: none; border: 0; font: inherit; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; padding: 8px 0; cursor: pointer; color: var(--ink); }

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav { position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px var(--gut) 20px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
  .nav a::after { display: none; }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .wordmark .by { display: none; }
}

/* ---------- sections ---------- */
section { position: relative; }
.sec { padding: clamp(72px, 11vw, 160px) 0; border-top: 1px solid var(--rule); }
.sec-head { margin-bottom: clamp(40px, 6vw, 80px); }
.sec-head .label { margin-bottom: 20px; display: block; }
.idx { font-family: var(--mono); font-size: 12px; color: var(--red); letter-spacing: .08em; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 128px) 0 clamp(56px, 8vw, 112px); }
.hero .grid { align-items: end; row-gap: 56px; }
.hero-copy { grid-column: 1 / span 7; }
.hero-copy .label { display: block; margin-bottom: 28px; }
.hero-copy .lead { margin-top: 32px; }
.hero-card { grid-column: 9 / span 4; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 14px 20px; font-size: 14px; text-decoration: none; border: 1px solid var(--ink); border-radius: 2px; transition: background .3s var(--ease), color .3s var(--ease); }
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--red); border-color: var(--red); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 1100px) { .hero-copy { grid-column: 1 / span 7; } .hero-card { grid-column: 8 / span 5; } }
@media (max-width: 900px) { .hero-copy, .hero-card { grid-column: 1 / -1; } .hero-card { max-width: 460px; } }

/* specimen card — the brand's signature object */
.specimen { border: 1px solid var(--ink); background: var(--paper); }
.specimen-top { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--ink); }
.swatch { aspect-ratio: 4 / 3; position: relative; overflow: hidden; background: var(--red); }
.swatch::before { content: ""; position: absolute; inset: -20%; background-image: url("/assets/grain.svg"); background-size: 220px; mix-blend-mode: multiply; opacity: .9; }
.swatch::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 30% 20%, rgba(255,190,150,.28), transparent 55%), radial-gradient(90% 80% at 80% 100%, rgba(60,0,0,.45), transparent 60%); }
.swatch .tag { position: absolute; left: 14px; bottom: 12px; z-index: 2; color: #f8e6dc; }
.spec-rows { margin: 0; padding: 0; list-style: none; }
.spec-rows li { display: grid; grid-template-columns: 6.5em 1fr; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--rule); font-size: 14px; }
.spec-rows li:first-child { border-top: 0; }
.spec-rows .k { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.pips { display: inline-flex; gap: 4px; vertical-align: middle; margin-right: 8px; }
.pips span { width: 18px; height: 6px; background: var(--rule); }
.pips span.on { background: var(--red); }

/* ---------- principles ---------- */
.principles { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.principle { padding: 28px 28px 8px 0; }
.principle + .principle { padding-left: 28px; border-left: 1px solid var(--rule); }
.principle .idx { display: block; margin-bottom: 40px; }
.principle h3 { margin-bottom: 14px; }
.principle p { color: var(--ink-2); font-size: 15px; }
@media (max-width: 800px) {
  .principles { grid-template-columns: 1fr; }
  .principle, .principle + .principle { padding: 24px 0 8px; border-left: 0; border-top: 1px solid var(--rule); }
  .principle:first-child { border-top: 0; }
  .principle .idx { margin-bottom: 16px; }
}

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.stat { padding: 28px 28px 0 0; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--rule); }
.stat .num { font-size: clamp(48px, 7vw, 104px); line-height: 1; letter-spacing: -.04em; font-weight: 400; font-variant-numeric: tabular-nums; }
.stat .num small { font-size: .38em; letter-spacing: 0; margin-left: 4px; color: var(--muted); }
.stat .what { margin-top: 20px; font-size: 15px; color: var(--ink-2); max-width: 22em; }
.stat .src { margin-top: 12px; }
@media (max-width: 800px) {
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 28px 0 24px; border-left: 0; border-top: 1px solid var(--rule); }
  .stat:first-child { border-top: 0; }
}

/* ---------- split ---------- */
.split { align-items: start; row-gap: 32px; }
.split .side { grid-column: 1 / span 4; }
.split .main { grid-column: 6 / span 7; }
.split .main > * + * { margin-top: 1.1em; }
@media (max-width: 900px) { .split .side, .split .main { grid-column: 1 / -1; } }

/* ---------- heat index ---------- */
.heat { border-top: 1px solid var(--ink); }
.heat-row { display: grid; grid-template-columns: 5.5em minmax(8em, 14em) 1fr minmax(10em, 18em); gap: 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--rule); transition: background .3s var(--ease); }
.heat-row .lv { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.heat-row .lv b { display: block; font-family: var(--sans); font-size: 32px; font-weight: 400; color: var(--ink); letter-spacing: -.02em; line-height: 1.1; }
.heat-row .nm { font-size: 18px; font-weight: 500; }
.heat-row .nm span { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.bar { height: 10px; background: var(--paper-2); position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease); }
.in .bar i, .no-js .bar i { transform: scaleX(1); }
.bar-val { margin-top: 8px; }
.heat-row .use { font-size: 14px; color: var(--ink-2); }
.heat-row.is-hit { background: color-mix(in srgb, var(--red-soft) 45%, transparent); }
@media (max-width: 900px) {
  .heat-row { grid-template-columns: 4.5em 1fr; gap: 10px 16px; }
  .heat-row .barbox, .heat-row .use { grid-column: 2; }
}

.chooser { margin-top: 48px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { font: inherit; font-size: 14px; padding: 9px 14px; border: 1px solid var(--rule); background: transparent; border-radius: 999px; cursor: pointer; color: var(--ink); transition: border-color .2s, background .2s, color .2s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chooser-out { margin-top: 16px; min-height: 1.75em; font-size: 15px; }

/* ---------- table / list ---------- */
.dl { border-top: 1px solid var(--ink); margin: 0; }
.dl > div { display: grid; grid-template-columns: minmax(8em, 16em) 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.dl dt { font-weight: 500; }
.dl dt .mono { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; font-size: 11px; }
.dl dd { margin: 0; color: var(--ink-2); }
@media (max-width: 700px) { .dl > div { grid-template-columns: 1fr; gap: 4px; } }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.card { background: var(--paper); padding: 28px; }
.card .idx { display: block; margin-bottom: 28px; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 15px; color: var(--ink-2); margin: 0; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* ---------- plate (typographic image) ---------- */
.plate { background: var(--ink); color: var(--paper); aspect-ratio: 4 / 5; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; }
.plate::before { content: ""; position: absolute; inset: 0; background-image: url("/assets/grain.svg"); background-size: 260px; opacity: .14; mix-blend-mode: screen; }
.plate .big { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.25; position: relative; }
.plate .big span { display: block; }
.plate .big span:nth-child(2) { color: #e2a091; }
.plate .label { color: #a9a196; position: relative; }

/* ---------- page head ---------- */
.page-head { padding: clamp(56px, 9vw, 128px) 0 clamp(40px, 6vw, 72px); }
.page-head .label { display: block; margin-bottom: 24px; }
.page-head .lead { margin-top: 28px; }

/* ---------- notes / sources ---------- */
.sources { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.sources li { display: grid; grid-template-columns: 2.5em 1fr; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.sources .n { font-family: var(--mono); font-size: 12px; color: var(--red); }
.sources a { color: var(--ink-2); text-underline-offset: 3px; text-decoration-color: var(--rule); word-break: break-word; }
sup.ref { font-family: var(--mono); font-size: 10px; color: var(--red); margin-left: 2px; }
.note-box { border-left: 2px solid var(--red); padding: 4px 0 4px 18px; color: var(--ink-2); font-size: 15px; }

/* ---------- cta band ---------- */
.band { background: var(--ink); color: var(--paper); padding: clamp(64px, 9vw, 128px) 0; }
.band .label { color: #a9a196; display: block; margin-bottom: 24px; }
.band .btn { border-color: var(--paper); color: var(--paper); }
.band .btn:hover { background: var(--paper); color: var(--ink); }
.band .btn-solid { background: var(--red); border-color: var(--red); }
.band .btn-solid:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.band .lead { color: #cfc8bc; }

/* ---------- contact ---------- */
.mail { font-size: clamp(26px, 4.4vw, 64px); letter-spacing: -.02em; text-decoration: none; border-bottom: 1px solid var(--ink); line-height: 1.2; word-break: break-all; transition: color .3s var(--ease), border-color .3s var(--ease); }
.mail:hover { color: var(--red); border-color: var(--red); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--ink); padding: 56px 0 40px; font-size: 14px; }
.site-footer .grid { row-gap: 32px; }
.f-brand { grid-column: 1 / span 5; }
.f-brand .wm { font-family: var(--mono); font-size: clamp(36px, 6vw, 84px); letter-spacing: .12em; line-height: 1; font-weight: 500; }
.f-brand .wm i { font-style: normal; color: var(--red); }
.f-brand p { margin-top: 20px; color: var(--muted); max-width: 26em; }
.f-col { grid-column: span 2; }
.f-col:first-of-type { grid-column: 8 / span 2; }
.f-col ul { list-style: none; margin: 12px 0 0; padding: 0; }
.f-col li { padding: 3px 0; }
.f-col a { text-decoration: none; color: var(--ink-2); }
.f-col a:hover { color: var(--red); }
.f-base { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--rule); }
@media (max-width: 900px) { .f-brand { grid-column: 1 / -1; } .f-col, .f-col:first-of-type { grid-column: span 6; } }

/* ---------- motion ---------- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }
.no-js .rv { opacity: 1; transform: none; }
.line { display: block; overflow: hidden; }
.line > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.is-ready .line > span, .no-js .line > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv, .line > span, .bar i { transition: none !important; transform: none !important; opacity: 1 !important; }
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
