/* 와르르 (Flipspill) — 앱 아이콘(app-store/icon/icon-1024.png)과 디자인 시안 팔레트
   (홍보웹_병렬작업지시.md §1 GRV 행). 파란 바탕 위 굵은 남색 외곽선 + 번짐 없는 그림자,
   블록은 코랄·노랑·민트. 구조는 products/bukangi 카드형 컴포넌트, 값만 교체. 고정 라이트. */

@font-face {
  font-family: "Gowun Batang";
  src: url("./fonts/GowunBatang-Bold-subset.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans KR";
  src: url("./fonts/IBMPlexSansKR-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans KR";
  src: url("./fonts/IBMPlexSansKR-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --blue: #3d5afe;       /* 파랑 — 아이콘 바탕. 흰 글자 5.13:1 */
  --yellow: #ffd23f;     /* 노랑 블록 */
  --coral: #ff5a5f;      /* 코랄 블록 — 흰 글자 3.05:1(미달)이라 위 글자는 잉크 */
  --mint: #2ec4b6;       /* 민트 블록 */
  --hamster: #f2b880;    /* 햄스터 */
  --bg: #f3f5ff;         /* 파랑 6% + 흰색 */
  --ink: #1b1b3a;        /* 남색 잉크 — 본문·외곽선. bg 위 15.3:1 */
  --muted: #5b5b71;      /* 잉크 72% + 흰색 — 흰 바탕 6.6:1, bg 6.07:1 */
  --accent: #3d5afe;     /* bg 위 4.72:1 — 큰 글자·밑줄·점 */
  --accent-strong: #1b1b3a;
  --surface: #ffffff;
  --surface-soft: #f3f5ff;
  --line: #1b1b3a;
  --rule: rgb(27 27 58 / 16%);
  --shadow: 4px 4px 0 #1b1b3a;
  --shadow-sm: 3px 3px 0 #1b1b3a;
  --display: "Gowun Batang", "Apple SD Gothic Neo", serif;
  --body: "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
}

a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 2px solid var(--line);
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.site-nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

main {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

/* 히어로 — 아이콘과 같은 파란 판 */
.hero {
  margin: 12px 0 8px;
  padding: 44px 40px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--blue);
  color: #fff;
  border: 2.5px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-icon {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  border: 2.5px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: block;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(34px, 5.6vw, 56px);
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.hero p.lead {
  font-size: clamp(16px, 2.2vw, 18px);
  max-width: 540px;
  margin: 0 0 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--coral);
  border: 1.5px solid var(--line);
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
}

.btn-primary {
  background: var(--yellow);
  color: var(--ink);
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
}

.store-note {
  font-size: 13.5px;
  margin: 14px 0 0;
}

/* 규칙 그림 — 8칸 보드 미니어처. 실제 게임 화면이 아니라 규칙 설명용 */
.board {
  --cell: 26px;
  display: grid;
  grid-template-columns: repeat(8, var(--cell));
  grid-auto-rows: var(--cell);
  gap: 3px;
  padding: 10px;
  background: var(--surface);
  border: 2.5px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  width: max-content;
}

.board i {
  display: block;
  border-radius: 6px;
}

.board .c { background: var(--coral); border: 2px solid var(--line); }
.board .y { background: var(--yellow); border: 2px solid var(--line); }
.board .m { background: var(--mint); border: 2px solid var(--line); }
.board .h { background: var(--hamster); border: 2px solid var(--line); }
.board .x { background: rgb(27 27 58 / 7%); }
.board .clear { background: #fff; border: 2px dashed var(--line); }

.hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hero-art .board {
  --cell: clamp(20px, 3.4vw, 30px);
}

.art-note {
  font-size: 12.5px;
  margin: 0;
  text-align: center;
}

.gravity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 13px;
  font-weight: 700;
}

section {
  padding: 52px 0;
  border-top: 1px solid var(--rule);
}

.hero + section {
  border-top: 0;
}

section h2 {
  font-size: clamp(25px, 3.2vw, 32px);
  line-height: 1.3;
  margin: 0 0 8px;
}

section > p.section-lead {
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 28px;
}

.eyebrow {
  display: block;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}

/* 한 턴의 흐름 — 세 장면 */
.loop {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.loop-step {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.loop-step .board {
  --cell: 17px;
  gap: 2px;
  padding: 7px;
  border-width: 2px;
  box-shadow: none;
  border-radius: 12px;
  align-self: center;
}

.loop-step .board i {
  border-radius: 4px;
}

.loop-step .board .c,
.loop-step .board .y,
.loop-step .board .m,
.loop-step .board .h,
.loop-step .board .clear {
  border-width: 1.5px;
}

.step-no {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--yellow);
  border: 2px solid var(--line);
  font-weight: 700;
  font-size: 14px;
}

.loop-step h3 {
  font-size: 19px;
  margin: 0;
}

.loop-step p {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  padding: 22px;
  border-top-width: 10px;
}

.feature-card.is-coral { border-top-color: var(--coral); }
.feature-card.is-yellow { border-top-color: var(--yellow); }
.feature-card.is-mint { border-top-color: var(--mint); }

.feature-card h3 {
  font-size: 20px;
  margin: 0 0 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.principle {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.principle strong {
  display: block;
  margin-bottom: 4px;
}

.principle span {
  color: var(--muted);
  font-size: 14px;
}

.faq-list details {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

.faq-list details[open] {
  box-shadow: var(--shadow-sm);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15.5px;
}

.faq-list p {
  color: var(--ink);
  margin: 10px 0 0;
  font-size: 14.5px;
}

.contact-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 24px;
  text-align: center;
  max-width: 520px;
}

.contact-card a {
  font-size: 18px;
  font-weight: 700;
}

.support-form {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: grid;
  gap: 16px;
  max-width: 520px;
}

.support-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.support-form select,
.support-form input,
.support-form textarea {
  background: var(--surface-soft);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  font-family: inherit;
}

.support-form button {
  justify-self: start;
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 11px 24px;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}

.support-form button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
}

.support-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

#form-status {
  font-size: 13.5px;
  color: var(--muted);
  min-height: 1.2em;
  margin: 0;
}

.form-note {
  color: var(--muted);
  font-size: 14px;
  max-width: 640px;
}

footer {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--rule);
  padding: 28px 0 44px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

footer a {
  color: var(--muted);
}

/* Breadcrumb — 화면 표시와 BreadcrumbList 스키마를 1:1로 맞춘다. */
.breadcrumb {
  font-size: 13px;
  line-height: 1.5;
}

.breadcrumb ol {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 4px 0 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
}

.breadcrumb a {
  color: inherit;
}

/* 방침 본문 — 긴 글이라 읽기 폭을 좁힌다. */
.policy {
  max-width: 780px;
  padding: 28px 0 48px;
}

.policy h1 {
  font-size: clamp(30px, 4.6vw, 42px);
  margin: 0 0 6px;
}

.policy .meta-date {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 28px;
}

.policy h2 {
  font-size: 20px;
  margin: 32px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.policy ol,
.policy ul {
  padding-left: 1.4em;
}

.policy li + li {
  margin-top: 6px;
}

.policy table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 2px solid var(--line);
  font-size: 14px;
  margin: 12px 0;
  display: block;
  overflow-x: auto;
}

.policy th,
.policy td {
  border: 1px solid var(--rule);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
}

.policy th {
  background: var(--surface-soft);
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 30px 22px;
    gap: 32px;
  }

  .loop {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .hero-art .board {
    --cell: 22px;
    gap: 2px;
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
