/* Unblunder 랜딩 페이지. 기준은 mobile/docs/brand/README.md — 색 값·글꼴·치수는 거기와 목업(screens.html의 .ub-*)에서 옮겼다. */

/* ---------- 글꼴: 자체 호스팅(외부 요청 없음), 라틴 서브셋 ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url("fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 토큰: 문방구 논리(종이·시트·잉크 + 빨간 펜·파란 연필·형광펜) ---------- */
:root {
  /* 라이트 모드만 있다 — 다크 모드 기기에서도 종이색 그대로 */
  color-scheme: only light;
  --paper: #f3f0e7;
  --sheet: #fbf9f3;
  --ink: #15130f;
  --ink2: #34312a;
  --muted: #5e5a50;
  --faint: #8e8774; /* 글자색으로 쓰지 않는다(4.5:1 미달) — 빈 칸 테두리 같은 그림에만 */
  --rule: #d9d4c6;
  --red: #e5402f; /* 획으로만 */
  --blue: #233fbf; /* 고친 수·체크·선택으로만 */
  --hi: #ffdd4a; /* 한 줄에 낱말 하나 */

  --gutter: 24px;
  --max: 1200px;
  --display: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --voice: "Newsreader", "Iowan Old Style", Georgia, serif;
}
@media (max-width: 350px) {
  :root {
    --gutter: 18px;
  }
}

*,
*::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(--body);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}
img,
svg {
  display: block;
}
[id] {
  scroll-margin-top: 24px;
}
:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}
.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
/* 화면에는 없고 읽기에는 있는 글 */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 10;
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: var(--sheet);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

/* ---------- 세 목소리 ---------- */
/* 1 판정·큰 제목 */
.d {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 82%;
  letter-spacing: -0.022em;
  line-height: 0.94;
}
/* 2 제목 */
.h {
  font-family: var(--display);
  font-weight: 650;
  font-stretch: 90%;
  letter-spacing: -0.012em;
  line-height: 1.06;
}
/* 3 Kib의 말에만 */
.say {
  font-family: var(--voice);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.16;
}
/* 형광펜: 낱말 하나를 통째로 — 줄이 바뀌어도 칠이 갈라지지 않게 nowrap */
.hl {
  position: relative;
  z-index: 0;
  white-space: nowrap;
}
.hl::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.14em;
  right: -0.14em;
  top: 0.16em;
  bottom: 0.04em;
  background: var(--hi);
  transform: rotate(-1.2deg) skewX(-9deg);
  border-radius: 0.05em 0.2em 0.08em 0.16em;
}
.kib {
  flex: none;
  overflow: visible;
}
.kibline {
  display: flex;
  align-items: center;
  gap: 12px;
}
.link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

/* ---------- 워드마크: 'Un' + 빨간 펜으로 지운 'blunder' ---------- */
.wm {
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings:
    "wdth" 86,
    "opsz" 40;
  letter-spacing: 0.018em;
  line-height: 1;
  white-space: nowrap;
  display: inline-block;
  font-size: 28px;
}
.wm-x {
  position: relative;
  display: inline-block;
}
.wm-x::after {
  content: "";
  position: absolute;
  left: -0.035em;
  right: -0.05em;
  top: 0.56em;
  height: 0.062em;
  background: var(--red);
  transform: rotate(-1.6deg);
}
.by {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.by b {
  font-weight: 700;
  letter-spacing: 0.16em;
}

/* ---------- 머리 ---------- */
.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px 12px;
}
.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  min-height: 48px;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
}
.brand .by {
  margin-left: 1px;
}
.status {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted);
  text-align: right;
}

/* ---------- 히어로 ---------- */
.hero {
  display: grid;
  gap: 48px;
  padding-block: 36px 88px;
}
.hero-copy {
  container-type: inline-size;
  min-width: 0;
}
.hero-h1 {
  /* 가장 긴 줄('We take notes.')의 폭은 글자 크기의 약 5.3배 — 칸 폭의 18%면 한 줄에 든다 */
  font-size: clamp(3.25rem, 1.9rem + 6.3vw, 7.25rem);
  font-size: clamp(3.25rem, 18cqi, 8.5rem);
}
.hero-sub {
  margin-top: 28px;
  max-width: 27em;
  font-size: 19px;
  line-height: 28px;
  font-weight: 500;
}
.btn {
  min-height: 56px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--ink);
  color: var(--sheet);
  font-family: var(--display);
  font-weight: 650;
  font-stretch: 92%;
  font-size: 18px;
  text-decoration: none;
}
.btn:hover,
.btn:active {
  background: var(--ink2);
}

/* 기보 용지: 시트 + 1.5 잉크 테두리 + 반경 12 — 이 페이지의 하나뿐인 상자 모양 */
.sheet {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.sheet thead th {
  height: 34px;
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  color: var(--muted);
}
.sheet tbody th {
  width: 52px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.sheet tbody th,
.sheet tbody td {
  height: 46px;
  border-top: 1px solid var(--rule);
}
.sheet td {
  font-size: 20px;
  line-height: 24px;
  font-weight: 600;
}
.sheet th:last-child,
.sheet td:last-child {
  width: 34%;
}
/* 빨간 펜: 둔 수를 지우는 획 */
.struck {
  position: relative;
  display: inline-block;
  margin-right: 14px;
  text-decoration: none;
}
.struck::after {
  content: "";
  position: absolute;
  left: -5px;
  right: -5px;
  top: 48%;
  height: 3px;
  background: var(--red);
  transform: rotate(-4deg);
  transform-origin: left center;
}
/* 파란 연필: 고쳐 적은 수 */
.fixed {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}
/* 한 단으로 설 때 용지가 화면 폭만큼 늘어나 두 칸이 멀어지지 않게 */
.hero-sheet {
  max-width: 480px;
}
.hero-kib {
  margin-top: 26px;
}
.hero-kib .say {
  font-size: 25px;
}

/* ---------- 구획: 제목 줄 + 1.5 잉크 선(목업의 화면 문법) ---------- */
.sec {
  padding-bottom: clamp(72px, 9vw, 120px);
}
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding-bottom: 18px;
  border-bottom: 1.5px solid var(--ink);
}
.sec-h {
  font-size: clamp(2.125rem, 1.6rem + 2.2vw, 3rem);
}
.sec-note {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted);
}
.sec-lead {
  margin-top: 22px;
  max-width: 34em;
  font-size: 19px;
  line-height: 28px;
  font-weight: 500;
}

/* ---------- How it works ---------- */
.steps {
  list-style: none;
  padding: 0;
}
.step {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding-block: 28px;
  border-top: 1px solid var(--rule);
}
.step:first-child {
  border-top: 0;
}
.step-n {
  display: block;
  margin-bottom: 6px;
  font-family: var(--display);
  font-weight: 650;
  font-stretch: 90%;
  font-size: 20px;
  line-height: 24px;
  color: var(--muted);
}
.step p {
  font-size: 19px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* ---------- 앱 화면 ---------- */
.phones-scroll {
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  padding: 36px var(--gutter) 12px;
}
.phones {
  display: flex;
  gap: 28px;
  width: max-content;
  list-style: none;
  padding: 0;
}
.phones li {
  flex: none;
  width: min(72vw, 264px);
  scroll-snap-align: start;
}
/* 목업의 폰 틀: 종이 + 2px 잉크 외곽선(그림자가 아니다). 모서리 44/390 */
.phone {
  aspect-ratio: 390 / 844;
  overflow: hidden;
  border-radius: 11.28% / 5.21%;
  background: var(--paper);
  box-shadow: 0 0 0 2px var(--ink);
}
.phone img {
  width: 100%;
  height: auto;
}
.shot figcaption {
  margin-top: 18px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
  color: var(--ink2);
}
.shot figcaption b {
  display: block;
  margin-bottom: 2px;
  font-family: var(--display);
  font-weight: 650;
  font-stretch: 90%;
  font-size: 20px;
  line-height: 24px;
  color: var(--ink);
}

/* ---------- Kib과 말투 ---------- */
.tones {
  position: relative;
  display: grid;
  gap: 16px;
  min-width: 0;
  margin: 32px 0 0;
  padding: 0;
  border: 0;
}
/* 라디오는 보이지 않지만 키보드로 닿는다 — 포커스·선택 표시는 카드(label)가 받는다 */
.tone-in {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.demo {
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  padding: 22px 24px 24px;
}
.demo-cap {
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  color: var(--muted);
}
.demo-verdict {
  margin-top: 18px;
  font-size: clamp(3rem, 2.2rem + 3.4vw, 4.5rem);
}
.demo-ok {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: var(--blue);
}
/* Quiet에서도 칸 높이는 그대로 — 줄만 없다 */
.demo-lines {
  margin-top: 24px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.demo-line {
  display: none;
}
.demo-line .say {
  font-size: 26px;
}
#tone-dry:checked ~ .demo .demo-dry,
#tone-kind:checked ~ .demo .demo-kind {
  display: flex;
}
.opts {
  display: grid;
  gap: 12px;
}
/* 테두리 굵기가 달라져도 안쪽이 움직이지 않게 굵은 쪽(2.5)에 맞춰 안 여백을 뺀다 */
.opt {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 17px 15px;
  border: 1.5px solid var(--faint);
  border-radius: 12px;
  background: var(--sheet);
  cursor: pointer;
}
.opt-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}
.opt-name {
  font-size: 26px;
  line-height: 32px;
}
.opt-say {
  font-size: 20px;
  line-height: 25px;
}
.opt-plain {
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted);
}
.radio {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--faint);
}
/* 고른 것: 2.5 파란 연필 테두리(색만이 아니라 굵기로도) */
#tone-dry:checked ~ .opts [for="tone-dry"],
#tone-kind:checked ~ .opts [for="tone-kind"],
#tone-quiet:checked ~ .opts [for="tone-quiet"] {
  border: 2.5px solid var(--blue);
  padding: 16px 14px;
}
#tone-dry:checked ~ .opts [for="tone-dry"] .radio,
#tone-kind:checked ~ .opts [for="tone-kind"] .radio,
#tone-quiet:checked ~ .opts [for="tone-quiet"] .radio {
  border: 7px solid var(--blue);
}
#tone-dry:focus-visible ~ .opts [for="tone-dry"],
#tone-kind:focus-visible ~ .opts [for="tone-kind"],
#tone-quiet:focus-visible ~ .opts [for="tone-quiet"] {
  outline: 2.5px solid var(--ink);
  outline-offset: 3px;
}
.kibrule {
  margin-top: 32px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.kibrule .say {
  font-size: 26px;
  white-space: nowrap;
}
.kibrule-note {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- 사실 표 ---------- */
.facts > div {
  display: grid;
  gap: 4px;
  padding-block: 18px;
  border-bottom: 1px solid var(--rule);
}
.facts dt {
  font-size: 15px;
  line-height: 22px;
  font-weight: 700;
}
.facts dd {
  max-width: 38em;
  font-size: 17px;
  line-height: 26px;
  font-weight: 500;
  color: var(--ink2);
}
.who-lead {
  padding-block: 24px 8px;
  max-width: 27em;
  font-size: 21px;
  line-height: 31px;
  font-weight: 500;
}
.contact-line {
  padding-top: 24px;
  font-size: 19px;
  line-height: 28px;
}
/* 이 페이지에서 누를 것이 이 주소 하나라 터치 높이 44를 채운다 */
.contact-line .link {
  display: inline-block;
  padding-block: 8px;
}

/* ---------- 바닥 ---------- */
.foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 18px 24px;
  padding-block: 28px 56px;
  border-top: 1.5px solid var(--ink);
}
.foot-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
}
.wm-sm {
  font-size: 22px;
}
.foot-legal {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted);
}
.foot-credits {
  grid-column: 1 / -1;
  max-width: 46em;
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted);
}
/* 손가락으로 누를 수 있게 줄 높이보다 큰 누름 자리 */
.foot-credits .link {
  display: inline-block;
  padding-block: 12px;
  margin-block: -12px;
}

/* ---------- 좁은 화면: Kib의 예시 줄이 카드 안에서 한 줄에 들게 ---------- */
@media (max-width: 399px) {
  .opt {
    gap: 12px;
  }
  .opt > .kib {
    width: 48px;
    height: auto;
  }
  .opt-say {
    font-size: 19px;
  }
  .demo {
    padding-inline: 20px;
  }
  .demo-line .say {
    font-size: 24px;
  }
}

/* ---------- 넓은 화면 ---------- */
@media (min-width: 600px) {
  .btn {
    display: inline-flex;
  }
  .facts > div {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 24px;
    align-items: baseline;
  }
}
@media (min-width: 900px) {
  .head {
    padding-block: 28px 16px;
  }
  .wm {
    font-size: 32px;
  }
  .wm-sm {
    font-size: 22px;
  }
  /* 좁은 화면은 앱 첫 화면의 차례(제목 → 기보 용지 → Kib → 단추), 넓은 화면은 단추가 글 아래로 온다 */
  .hero {
    grid-template-columns: minmax(0, 1fr) clamp(340px, 34vw, 420px);
    grid-template-rows: auto auto;
    column-gap: 64px;
    row-gap: 36px;
    padding-block: 64px 128px;
  }
  .hero-sheet {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: end;
  }
  .hero-cta {
    grid-column: 1;
    grid-row: 2;
  }
  .sheet thead th {
    height: 40px;
    font-size: 14px;
  }
  .sheet tbody th {
    width: 60px;
    font-size: 15px;
  }
  .sheet tbody th,
  .sheet tbody td {
    height: 56px;
  }
  .sheet td {
    font-size: 23px;
    line-height: 28px;
  }
  .hero-kib .say {
    font-size: 28px;
  }
  .steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  /* 세 칸이 좁은 동안은 그림을 글 위에 둔다 — 옆에 두면 문장이 네 줄로 쪼개진다 */
  .step {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    padding: 36px 28px 8px;
    border-top: 0;
    border-left: 1px solid var(--rule);
  }
  .step:first-child {
    padding-left: 0;
    border-left: 0;
  }
  .step:last-child {
    padding-right: 0;
  }
  .tones {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 40px;
    margin-top: 40px;
  }
  /* 결과 칸이 말투 카드 셋과 같은 높이로 서고, Kib 줄은 바닥에 앉는다 */
  .demo {
    display: flex;
    flex-direction: column;
    padding: 28px 32px 32px;
  }
  .demo-lines {
    margin-top: auto;
    padding-top: 28px;
    min-height: 84px;
  }
  .demo-line .say {
    font-size: clamp(1.5rem, 2.6vw, 1.875rem);
  }
  .who {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    column-gap: 64px;
    align-items: start;
  }
  .who-lead {
    padding-block: 22px 0;
  }
  .facts-tight > div {
    grid-template-columns: 140px minmax(0, 1fr);
  }
}
@media (min-width: 1200px) {
  .step {
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
  }
}
@media (min-width: 1000px) {
  .phones-scroll {
    width: min(100% - 2 * var(--gutter), var(--max));
    margin-inline: auto;
    overflow: visible;
    padding: 40px 0 0;
  }
  .phones {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px;
    width: auto;
  }
  .phones li {
    width: auto;
  }
}

/* ---------- 움직임: 둘뿐 — 히어로의 취소선이 그어지고 고친 수가 적힌다, Kib이 가끔 눈을 깜빡인다 ---------- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  .hero .struck::after {
    animation: strike 420ms cubic-bezier(0.3, 0.7, 0.2, 1) 700ms both;
  }
  .hero .fixed {
    animation: pencil 320ms ease-out 1250ms both;
  }
  .hero .kib-eyes {
    transform-box: fill-box;
    transform-origin: 50% 0;
    animation: blink 6.5s 2.4s infinite;
  }
}
@keyframes strike {
  from {
    transform: rotate(-4deg) scaleX(0);
  }
  to {
    transform: rotate(-4deg) scaleX(1);
  }
}
@keyframes pencil {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes blink {
  0%,
  95%,
  100% {
    transform: scaleY(1);
  }
  97.5% {
    transform: scaleY(0.08);
  }
}

@media print {
  .skip,
  .btn {
    display: none;
  }
}
