/* whitebrew — 1a Manifesto */

:root {
  --bg: oklch(0.992 0.004 85);
  --ink: oklch(0.19 0.012 60);
  --muted: oklch(0.46 0.012 60);
  --rule: oklch(0.88 0.006 80);
  --accent: oklch(0.62 0.19 38); /* persimmon */
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(0.18 0.006 60);
    --ink: oklch(0.95 0.006 80);
    --muted: oklch(0.72 0.01 70);
    --rule: oklch(0.34 0.008 60);
    --accent: oklch(0.74 0.15 48);
  }
}

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

html, body { margin: 0; padding: 0; }

body {
  /* cqi 단위가 뷰포트 폭(스크롤바 제외)을 기준으로 계산되도록 한다 */
  container-type: inline-size;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
a:hover { opacity: .75; }

.page {
  max-width: 1440px;
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(20px, 4.5cqi, 64px) clamp(22px, 6.5cqi, 104px) clamp(28px, 4cqi, 56px);
  display: flex;
  flex-direction: column;
  gap: clamp(80px, 11cqi, 168px);
}

main {
  display: flex;
  flex-direction: column;
  gap: clamp(80px, 11cqi, 168px);
}

/* ---------- Language stacking ----------
   두 언어를 같은 그리드 칸에 겹쳐 두고 하나만 보이게 해서
   전환해도 레이아웃 높이가 변하지 않는다. */
.stack { display: grid; }
.stack > [lang] {
  grid-area: 1 / 1;
  transition: opacity .25s ease, visibility .25s;
}
html[data-lang="ko"] .stack > [lang="en"],
html[data-lang="en"] .stack > [lang="ko"] {
  opacity: 0;
  visibility: hidden;
}

/* ---------- Header ---------- */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wordmark {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.035em;
  text-decoration: none;
  color: var(--ink);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
}
.lang-toggle > span { opacity: .3; }
.lang-toggle button {
  background: none;
  border: 0;
  padding: 10px 6px;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
  letter-spacing: inherit;
  opacity: .4;
  transition: opacity .2s ease;
}
.lang-toggle button:hover { opacity: .75; }
.lang-toggle button[aria-pressed="true"] { opacity: 1; }
.lang-toggle button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Intro ---------- */
.intro {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.6cqi, 48px);
}

h1 {
  margin: 0;
  font-size: clamp(42px, 8.2cqi, 118px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
  max-width: 11.5em;
  text-wrap: balance;
}
h1 .dot { color: var(--accent); }

.lead {
  margin: 0;
  font-size: clamp(18px, 2cqi, 25px);
  line-height: 1.65;
  max-width: 31em;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- Principles ---------- */
.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--rule);
}

.principles li {
  display: flex;
  gap: clamp(14px, 3cqi, 44px);
  padding: clamp(22px, 3cqi, 40px) 0;
  border-top: 1px solid var(--rule);
}

.principles .num {
  flex: 0 0 2.2em;
  font-size: clamp(14px, 1.5cqi, 19px);
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: .55em;
}

.principles .body {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px clamp(24px, 4cqi, 64px);
  align-items: baseline;
}

.principles h3 {
  margin: 0;
  flex: 1 1 300px;
  font-size: clamp(28px, 4.4cqi, 60px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.principles p {
  margin: 0;
  flex: 1 1 240px;
  font-size: clamp(16px, 1.7cqi, 21px);
  line-height: 1.6;
  color: var(--muted);
}


/* 04 — 비어 있는 다음 자리 */
.principles .brewing { border-top-style: dashed; }
.brewing .num { position: relative; color: var(--muted); }
.brewing h3 { color: var(--accent); flex-basis: 100%; }

.steam {
  position: absolute;
  left: .1em;
  top: -1.1em;
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 18px;
}
.steam i {
  display: block;
  width: 2px;
  height: 11px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  animation: wb-steam 2.6s ease-in-out infinite;
}
.steam i:nth-child(2) { height: 15px; animation-delay: .5s; }
.steam i:nth-child(3) { animation-delay: 1s; }

@keyframes wb-steam {
  0%   { transform: translateY(8px) scaleY(.4); opacity: 0; }
  25%  { opacity: .9; }
  60%  { transform: translateY(-4px) translateX(1.5px) scaleY(1); }
  100% { transform: translateY(-16px) translateX(-1px) scaleY(.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .steam i { animation: none; opacity: .6; }
  .stack > [lang], .lang-toggle button { transition: none; }
}

/* ---------- Contact ---------- */
.contact {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact .label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.email {
  font-size: clamp(26px, 6.2cqi, 90px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: .07em;
  text-underline-offset: .16em;
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
.bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
