/* AI 변호사: 최후의 변론 — 웹툰 컷 테마.
   값의 근거: 앱 lib/core/design_system/app_theme.dart (ink·paper·highlight·court·alarm).
   클래스 이름은 products/solomon 구조를 따르고 :root 값만 앱 것으로 바꿨다. 고정 라이트(앱도 흰 바탕 고정). */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #111111;
  --muted: #4d4d4d;
  --accent: #2f5bff;        /* 법정 파랑 — 판사·주요 버튼 */
  --accent-strong: #1c3fd1; /* 작은 파랑 글씨 (4.5:1) */
  --highlight: #ffe14d;     /* 형광 노랑 — 플레이어·강조 */
  --alarm: #d92d20;         /* 경보 빨강 — 검사·자충수 */
  --alarm-strong: #b42318;
  --surface: #ffffff;
  --surface-soft: #f2f2f2;
  --zone-guilty: #ffd9d4;
  --zone-mitigation: #fff3c4;
  --zone-acquittal: #dce4ff;
  --line: 3px solid var(--ink);
  --line-thick: 4px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --tone: radial-gradient(circle, rgba(17, 17, 17, 0.14) 1.2px, transparent 1.4px) 0 0 / 9px 9px;
  --display: "Black Han Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

a { color: var(--accent-strong); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

h1, h2, h3, .display { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; line-height: 1.25; }

/* ── 헤더 ─────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, calc((100% - var(--max)) / 2));
  background: var(--bg);
  border-bottom: var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { border: 2px solid var(--ink); border-radius: 9px; }
.brand-name { font-family: var(--display); font-size: 19px; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--body); font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  padding: 4px 10px; border: 2px solid transparent; border-radius: 6px;
  color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none;
}
.site-nav a:hover { border-color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--highlight); border-color: var(--ink); }

.breadcrumb { padding: 12px max(16px, calc((100% - var(--max)) / 2)) 0; font-size: 13px; color: var(--muted); }
.breadcrumb ol { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; }
.breadcrumb a { color: var(--muted); }

main { max-width: var(--max); margin: 0 auto; padding: 0 16px 48px; }
section { margin-top: 56px; }

/* ── 컷(패널) ─────────────────────────────── */
.panel {
  background: var(--surface);
  border: var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.tone { background: var(--tone), var(--surface); }

.tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--ink); color: var(--highlight);
  font-family: var(--display); font-size: 13px; letter-spacing: 0.06em;
  transform: rotate(-1.5deg);
}
.section-head { margin-bottom: 18px; }
.section-head h2 { margin: 10px 0 0; font-size: clamp(26px, 5vw, 36px); }
.section-head p { margin: 6px 0 0; color: var(--muted); }

/* ── 히어로 ────────────────────────────────── */
.hero {
  position: relative;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: center;
  margin-top: 28px; padding: 34px 30px;
  border: var(--line-thick); box-shadow: var(--shadow);
  background: var(--tone), #fff;
  overflow: hidden;
}
.hero::after { /* 집중선 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 78% 50%, rgba(17,17,17,0.06) 0deg 2deg, transparent 2deg 9deg);
}
.hero > * { position: relative; z-index: 1; }
.badge {
  display: inline-block; padding: 4px 12px;
  border: 2px solid var(--ink); border-radius: 999px; background: #fff;
  font-size: 13px; font-weight: 800;
}
.hero h1 { margin: 14px 0 12px; font-size: clamp(34px, 7vw, 60px); }
.hero h1 .mark { background: linear-gradient(transparent 55%, var(--highlight) 55%); padding: 0 4px; }
.hero .lead { font-size: 17px; margin: 0 0 20px; max-width: 34em; }
.hero-art { display: grid; justify-items: center; gap: 16px; }
.hero-art .icon-cut {
  width: min(260px, 70%); aspect-ratio: 1;
  border: var(--line-thick); border-radius: 22%;
  box-shadow: var(--shadow); transform: rotate(3deg); background: #5b4bff;
}
.hero-art .icon-cut img { display: block; width: 100%; height: 100%; border-radius: 20%; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border: var(--line); border-radius: 6px; box-shadow: var(--shadow-sm);
  background: var(--accent); color: #fff;
  font-family: var(--display); font-size: 17px; text-decoration: none; cursor: pointer;
  transition: transform 90ms, box-shadow 90ms;
}
.btn:hover { color: #fff; }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn.secondary { background: var(--highlight); color: var(--ink); }
.btn[aria-disabled="true"] { background: var(--surface-soft); color: var(--muted); cursor: default; }
.note { font-size: 13px; color: var(--muted); }

/* ── 말풍선 ─────────────────────────────────── */
.bubble {
  position: relative; display: block;
  padding: 12px 16px; margin: 0 0 18px;
  border: var(--line); border-radius: 18px; background: #fff;
  font-weight: 700; line-height: 1.55;
}
.bubble::after {
  content: ""; position: absolute; bottom: -14px; left: 26px;
  border-width: 14px 12px 0 0; border-style: solid; border-color: var(--ink) transparent transparent;
}
.bubble .who { display: block; font-family: var(--display); font-weight: 400; font-size: 13px; margin-bottom: 2px; }
.bubble.judge { border-color: var(--accent); box-shadow: 4px 4px 0 var(--accent); }
.bubble.judge .who { color: var(--accent-strong); }
.bubble.judge::after { border-top-color: var(--accent); }
.bubble.prosecutor { background: #fff0ee; border-color: var(--alarm); box-shadow: 4px 4px 0 var(--alarm); }
.bubble.prosecutor .who { color: var(--alarm-strong); }
.bubble.prosecutor::after { border-top-color: var(--alarm); }
.bubble.player { background: var(--highlight); margin-left: 24px; }
.bubble.player::after { left: auto; right: 26px; border-width: 14px 0 0 12px; }
.chat-mock { width: 100%; max-width: 380px; }

/* ── 한 판의 흐름 ─────────────────────────── */
.loop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: cut; }
.loop-step {
  position: relative; padding: 22px 18px 18px;
  border: var(--line); box-shadow: var(--shadow-sm); background: #fff;
}
.loop-step:nth-child(even) { transform: rotate(0.8deg); }
.loop-step:nth-child(odd) { transform: rotate(-0.6deg); }
.loop-step::before {
  counter-increment: cut; content: "#" counter(cut);
  position: absolute; top: -14px; left: 12px;
  padding: 0 8px; background: var(--highlight); border: 2px solid var(--ink);
  font-family: var(--display); font-size: 15px;
}
.loop-step h3 { margin: 4px 0 6px; font-size: 20px; }
.loop-step p { margin: 0; font-size: 15px; }

/* ── 심증 게이지 ──────────────────────────── */
.gauge { display: grid; grid-template-columns: 2fr 1.2fr 1fr; border: var(--line); box-shadow: var(--shadow-sm); margin: 6px 0 10px; }
.gauge span { padding: 10px 12px; font-family: var(--display); font-size: 16px; text-align: center; }
.gauge .g { background: var(--zone-guilty); color: var(--alarm-strong); }
.gauge .m { background: var(--zone-mitigation); color: #7a5a00; border-left: var(--line); border-right: var(--line); }
.gauge .a { background: var(--zone-acquittal); color: var(--accent-strong); }

/* ── 기능 카드 ────────────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { padding: 20px; border: var(--line); box-shadow: var(--shadow-sm); background: #fff; }
.feature-card h3 { margin: 0 0 6px; font-size: 21px; }
.feature-card p { margin: 0; font-size: 15px; }
.feature-card .sfx {
  display: inline-block; margin-bottom: 8px; padding: 0 8px;
  font-family: var(--display); font-size: 22px; transform: rotate(-4deg);
  color: #fff; background: var(--accent); border: 2px solid var(--ink);
}
.feature-card .sfx.red { background: var(--alarm); }
.feature-card .sfx.yellow { background: var(--highlight); color: var(--ink); }

/* ── 알림 컷 ──────────────────────────────── */
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.principle { padding: 18px 20px; border: var(--line); background: #fff; }
.principle h3 { margin: 0 0 4px; font-size: 19px; }
.principle p { margin: 0; font-size: 15px; }
.principle.warn { border-color: var(--alarm); box-shadow: 4px 4px 0 var(--alarm); }
.principle.warn h3 { color: var(--alarm-strong); }

.shot-slot {
  display: grid; place-items: center; min-height: 220px;
  border: 3px dashed var(--ink); background: var(--tone), var(--surface-soft);
  text-align: center; padding: 20px; color: var(--muted); font-weight: 700;
}

/* ── FAQ · 폼 ─────────────────────────────── */
.faq-list { display: grid; gap: 12px; }
.faq-list details { border: var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.faq-list summary {
  cursor: pointer; list-style: none; padding: 14px 44px 14px 16px; position: relative;
  font-weight: 800;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-size: 22px;
}
.faq-list details[open] summary { background: var(--highlight); border-bottom: var(--line); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0; padding: 14px 16px; }

.support-form { display: grid; gap: 14px; }
.support-form label { display: grid; gap: 6px; font-weight: 800; }
.support-form input, .support-form select, .support-form textarea {
  width: 100%; padding: 10px 12px;
  border: var(--line); border-radius: 4px; background: #fff; color: var(--ink);
  font: inherit; font-weight: 400;
}
.support-form button { justify-self: start; }
.form-note { margin-top: 0; }
#form-status { margin: 0; font-weight: 700; min-height: 1.7em; }
.contact-card a { font-family: var(--display); font-size: 22px; }

/* ── 정책 문서 ────────────────────────────── */
.policy { max-width: 820px; margin: 32px auto 0; padding: 30px 28px; border: var(--line); box-shadow: var(--shadow); background: #fff; }
.page-title { margin: 12px 0 4px; font-size: clamp(30px, 6vw, 42px); }
.meta-date { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.policy h2 {
  margin: 34px 0 10px; padding: 4px 10px;
  font-size: 21px; background: var(--highlight); border-left: 6px solid var(--ink);
}
.policy h3 { margin: 20px 0 6px; font-size: 18px; }
.policy ul, .policy ol { padding-left: 1.3em; }
.policy li { margin: 4px 0; }
.policy .table-wrap { overflow-x: auto; margin: 10px 0 16px; border: var(--line); }
.policy table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; }
.policy th, .policy td { padding: 8px 10px; border: 1px solid var(--ink); vertical-align: top; text-align: left; }
.policy th { background: var(--surface-soft); white-space: nowrap; }
.policy .callout { padding: 12px 14px; border: var(--line); background: var(--zone-acquittal); }
.policy .callout.warn { background: #fff0ee; border-color: var(--alarm); }
.tbd {
  display: inline-block; padding: 0 5px; margin: 0 2px;
  background: var(--alarm); color: #fff; font-size: 12px; font-weight: 800; border-radius: 3px;
}

/* ── 푸터 ─────────────────────────────────── */
footer {
  margin-top: 40px; padding: 24px 16px 36px;
  border-top: var(--line); background: var(--tone), var(--surface-soft);
  text-align: center; font-size: 14px;
}
footer p { margin: 4px 0; }
footer a { color: var(--ink); font-weight: 700; }

/* ── 반응형 ───────────────────────────────── */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 26px 20px; }
  .loop { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .site-header { flex-wrap: wrap; }
  .loop, .feature-grid, .principles { grid-template-columns: 1fr; }
  .policy { padding: 22px 16px; box-shadow: var(--shadow-sm); }
  .panel { padding: 18px 16px; box-shadow: var(--shadow-sm); }
  .bubble.player { margin-left: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
