/* Colors, spacing and radii follow the 칭찬보드 app theme (packages/core-ui/src/theme.ts). */
:root {
  --paper: #f6f8f6;
  --well: #e7ece8;
  --surface: #ffffff;
  --ink: #1b2420;
  --ink-soft: #3a4741;
  --ink-meta: #52605a;
  --line: #dde4df;
  --line-strong: #c9d2cd;
  --accent: #1f5c45;
  --accent-pressed: #164534;
}

*, *::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: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

h1, h2, h3, p, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 800; line-height: 1.3; text-wrap: balance; }
h1 { font-size: clamp(28px, 4.4vw, 48px); letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 2.6vw, 28px); letter-spacing: -0.01em; }
h3 { font-size: 20px; }
p { max-width: 36em; text-wrap: pretty; }
p + p { margin-top: 12px; }
img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-pressed); text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1104px; margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: 24px; top: -64px;
  background: var(--surface); padding: 12px 16px;
}
.skip:focus { top: 8px; }

/* Header */
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  column-gap: 24px; padding-top: 12px; padding-bottom: 12px;
}
.site-header a {
  display: inline-flex; align-items: center; min-height: 48px;
  color: var(--ink); text-decoration: none;
}
.site-header a:hover { color: var(--accent); }
.site-header nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.site-header .brand { font-size: 20px; font-weight: 800; }
.site-header nav { display: flex; gap: 24px; }

/* Shared sections */
main { padding: 24px 0 64px; }
.section { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.section > h2 { margin-bottom: 16px; }
.note { color: var(--ink-meta); font-size: 15px; }
.action { display: inline-flex; align-items: center; min-height: 48px; font-weight: 800; }
.status { font-weight: 800; color: var(--ink-soft); }
.app-name { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.app-name img { width: 72px; height: 72px; border: 1px solid var(--line-strong); border-radius: 16px; }

/* App screen crops are 954px wide; 477px shows them at 2x. Their edges are the app's own paper colour. */
.pair { display: grid; gap: 48px; margin-top: 32px; }
.pair h3 { margin-bottom: 8px; }
.pair img { width: 100%; max-width: 477px; margin-top: 24px; }
.plain .action { margin-top: 4px; }

/* Home */
.nowrap { white-space: nowrap; }
.hero { display: grid; gap: 24px; }
.hero figure img { width: 100%; max-width: 477px; }
.hero figcaption { margin-top: 12px; }
.button {
  display: inline-flex; align-items: center; min-height: 56px; margin-top: 24px; padding: 8px 28px;
  border-radius: 28px; background: var(--accent); color: var(--surface);
  font-weight: 800; text-decoration: none;
}
.button:hover { background: var(--accent-pressed); color: var(--surface); }
.button:focus-visible { border-radius: 28px; }

/* App page */
.lead { font-size: 20px; max-width: 26em; }
.status { margin-top: 16px; }
.app-intro .note { margin-top: 4px; }
.today { display: grid; gap: 32px; }
.today h2, .rewards h2 { margin-bottom: 16px; }
.today h3 { margin: 24px 0 4px; }
.phone { width: 100%; max-width: 320px; border: 1px solid var(--line-strong); border-radius: 28px; }
.board-band {
  display: grid; gap: 24px; margin-top: 64px; padding: 32px 20px 24px;
  border-radius: 28px; background: var(--well);
}
.board-band h2 { margin-bottom: 12px; }
.board-band img { width: 100%; max-width: 440px; }
.block { margin-top: 64px; }
.rewards { display: grid; gap: 24px; }
.rewards h2 { margin-top: 0; }
.rewards img { width: 100%; max-width: 477px; }
.thirds { display: grid; gap: 24px; margin-top: 24px; }
.thirds h3, .faq h3 { margin-bottom: 4px; }
.faq > div { padding: 20px 0; border-top: 1px solid var(--line); }
.faq > div:first-child { border-top: 0; padding-top: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line-strong); padding: 40px 0; }
.site-footer .wrap { display: grid; gap: 40px; }
.site-footer h2 { font-size: 20px; margin-bottom: 12px; }
.site-footer p a { display: inline-flex; align-items: center; min-height: 48px; }
.site-footer p + p { margin-top: 0; }
.business div { display: grid; grid-template-columns: 10.5em 1fr; gap: 12px; padding: 8px 0; }
.business dt { color: var(--ink-meta); }

@media (max-width: 400px) {
  .business div { grid-template-columns: 1fr; gap: 0; }
}

@media (min-width: 720px) {
  .pair { grid-template-columns: repeat(2, minmax(0, 477px)); justify-content: space-between; column-gap: clamp(32px, 6vw, 102px); }
  /* Text rows share a height so both screens start on the same line. */
  .pair > div { display: grid; grid-template-rows: subgrid; grid-row: span 3; align-items: start; }
  .pair { row-gap: 0; }
  .hero { grid-template-columns: 1fr min(477px, 52%); grid-template-rows: auto 1fr; column-gap: clamp(32px, 6vw, 64px); }
  .hero figure { grid-column: 2; grid-row: 1 / 3; }
  .hero-app { align-self: end; padding-bottom: 39px; }
  .today { grid-template-columns: 1fr minmax(0, 320px); grid-template-rows: auto 1fr; column-gap: clamp(32px, 8vw, 128px); }
  .today .phone { grid-column: 2; grid-row: 1 / 3; }
  .today section { align-self: end; }
  .board-band { grid-template-columns: 1fr min(440px, 52%); align-items: center; gap: clamp(32px, 5vw, 64px); padding: clamp(32px, 5vw, 56px); }
  .rewards { grid-template-columns: repeat(2, minmax(0, 477px)); justify-content: space-between; grid-template-rows: auto 1fr; column-gap: clamp(32px, 6vw, 102px); }
  .reward-stars { align-self: end; }
  .reward-list { grid-column: 2; grid-row: 1 / 3; }
  .thirds { grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); }
  .faq > div { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; }
}

@media (min-width: 800px) {
  main { padding: 48px 0 64px; }
  .block, .board-band { margin-top: 88px; }
  .plain { display: grid; grid-template-columns: 280px 1fr; column-gap: 64px; }
  .site-footer .wrap { grid-template-columns: 280px 1fr; gap: 64px; }
}
