/* 번호추첨기 홈페이지 — 앱 컨셉 lucky_ticket 팔레트. 글꼴은 페이지 글자만 남긴 하위 집합(fonts.py). */
@font-face { font-family: "RN Sans"; src: url("assets/fonts/rn-sans-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "RN Sans"; src: url("assets/fonts/rn-sans-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "RN Num"; src: url("assets/fonts/rn-num.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --teal: #008577; --teal-ink: #006b60; --red: #c7362b; --paper: #f5f1e6; --surface: #fff;
  --ink: #17211f; --muted: #5f6763; --line: #e3ddcf;
  --sans: "RN Sans", -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --num: "RN Num", "RN Sans", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.7; word-break: keep-all; overflow-wrap: break-word; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
p { color: var(--muted); }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
.num { font-family: var(--num); font-weight: 400; letter-spacing: 0; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -100px; z-index: 10; background: var(--surface); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 머리글 */
.header { min-height: 88px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.2rem; white-space: nowrap; }
.brand img { border-radius: 11px; }
.header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-size: 0.95rem; }
.header nav a { text-decoration: none; white-space: nowrap; }
.header nav a:hover { color: var(--teal-ink); }
.nav-download { background: var(--teal); color: #fff !important; padding: 8px 16px; border-radius: 999px; font-weight: 700; }
.nav-download:hover { background: var(--teal-ink); }

/* 히어로 */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; padding-block: 40px 96px; }
.intro { color: var(--teal-ink); font-weight: 700; margin-bottom: 18px; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.3rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1.18; }
.lead { font-size: 1.15rem; margin: 26px 0 32px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 14px 20px; background: var(--ink); color: #fff; border-radius: 14px; text-decoration: none; font-weight: 700; box-shadow: 0 4px 0 #000; }
.store img { filter: invert(1); }
.store:hover { background: #2a3633; }
.store-note { font-size: 0.85rem; margin-top: 18px; }

/* 체험 티켓 */
.ticket-demo { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 22px; box-shadow: 0 24px 48px -28px rgba(0, 61, 54, 0.45); }
.range-label { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 14px; color: var(--muted); font-size: 0.9rem; }
.range-label strong { color: var(--ink); font-size: 1.5rem; }
.ticket { position: relative; overflow: hidden; background: var(--teal); color: #fff; border-radius: 22px; padding: 20px 26px 18px; }
.ticket-top { display: flex; flex-wrap: wrap; gap: 2px 12px; justify-content: space-between; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; opacity: 0.8; }
.ticket-number { text-align: center; font-size: clamp(5.5rem, 11vw, 8.5rem); line-height: 1.15; padding: 10px 0 18px; font-variant-numeric: tabular-nums; }
.ticket-demo.is-rolling .ticket-number { opacity: 0.7; }
.ticket-bottom { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; border-top: 2px dashed rgba(255, 255, 255, 0.45); padding-top: 16px; font-size: 0.95rem; }
.ticket-bottom::before, .ticket-bottom::after { content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); }
.ticket-bottom::before { left: -38px; }
.ticket-bottom::after { right: -38px; }
.ticket-bottom strong { font-size: 1.6rem; margin-left: 6px; vertical-align: -2px; }
.barcode { width: 112px; height: 26px; flex: none; background: repeating-linear-gradient(90deg, rgba(255,255,255,.8) 0 3px, transparent 3px 6px, rgba(255,255,255,.8) 6px 7px, transparent 7px 10px, rgba(255,255,255,.8) 10px 14px, transparent 14px 17px); }
.demo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.draw-button { flex: 1 1 180px; }
.reset-button { flex: 0 1 auto; }
.draw-button, .reset-button { border-radius: 16px; padding: 16px 20px; font-weight: 700; }
.draw-button { background: var(--ink); color: #fff; border: 0; font-size: 1.15rem; }
.draw-button:hover:not(:disabled) { background: #2a3633; }
.reset-button { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.reset-button:hover:not(:disabled) { border-color: var(--teal); }
button:disabled { opacity: 0.45; cursor: default; }
.ticket-demo.is-done .draw-button { opacity: 1; background: var(--teal-ink); }
.ticket-demo.is-done .draw-button [aria-hidden] { display: none; }
.history-head { display: flex; justify-content: space-between; margin: 18px 4px 8px; font-size: 0.9rem; font-weight: 700; color: var(--muted); }
.history { list-style: none; margin: 0; padding: 0 2px; display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; }
.history li { min-width: 48px; padding: 6px 10px; text-align: center; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); font-size: 1.15rem; }
.history li.latest { background: var(--teal); border-color: var(--teal); color: #fff; }
.demo-caption { font-size: 0.85rem; text-align: center; margin-top: 14px; }

/* 기능 */
.features { padding-block: 40px 96px; }
.section-title { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 40px; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px 24px 28px; }
.stub { display: inline-block; color: var(--teal-ink); background: rgba(0, 133, 119, 0.1); border-right: 2px dashed rgba(0, 107, 96, 0.35); padding: 2px 12px 2px 10px; border-radius: 8px; font-size: 1.1rem; margin-bottom: 16px; }
.feature-list h3 { font-size: 1.2rem; margin-bottom: 8px; }

/* 이럴 때 */
.uses-band { background: var(--teal); color: #fff; padding-block: 72px; }
.uses-band h2 { margin-bottom: 32px; }
.use-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.use-list li { border: 1.5px dashed rgba(255, 255, 255, 0.5); border-radius: 18px; padding: 22px 20px; background: rgba(255, 255, 255, 0.08); }
.use-list strong { display: block; font-size: 1.15rem; }
.use-list span { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; }

/* 궁금한 점 */
.faq { padding-block: 96px 40px; display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 40px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 4px; font-weight: 700; font-size: 1.08rem; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--teal); line-height: 1; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { padding: 0 4px 22px; }
.faq-list a { color: var(--teal-ink); }

/* 다운로드 */
.download { margin-block: 56px 88px; background: var(--surface); border: 1px solid var(--line); border-radius: 32px; padding: 56px 24px; text-align: center; }
.download img { border-radius: 22px; margin-bottom: 18px; }
.download p { margin: 10px 0 28px; }
.download .stores { justify-content: center; }

/* 바닥글 */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px 56px; font-size: 0.9rem; color: var(--muted); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; }
.footer-brand { font-size: 1.05rem; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--teal-ink); text-decoration: underline; }
.business-info { margin-top: 24px; }
.business-name { font-weight: 700; color: var(--ink); text-decoration: none; }
.business-name span { font-weight: 400; color: var(--muted); }
.business-details { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 8px 0 0; }
.business-details div { display: flex; flex-wrap: wrap; gap: 0 6px; min-width: 0; }
.business-details dt::after { content: ":"; }
.business-details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.copyright { margin-top: 18px; font-size: 0.85rem; }

/* 좁은 화면 */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 16px; }
  .section-title, .faq { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .feature-list, .use-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .header { min-height: 72px; }
  .header nav a:not(.nav-download):not(.nav-lang) { display: none; }
  .header nav { gap: 14px; }
  .feature-list, .use-list { grid-template-columns: minmax(0, 1fr); }
  .ticket-demo { padding: 16px; border-radius: 24px; }
  .ticket { padding: 18px 20px 16px; }
  .ticket-bottom::before { left: -32px; }
  .ticket-bottom::after { right: -32px; }
  .barcode { width: 84px; }
  .store { width: 100%; justify-content: center; }
  .download { padding: 44px 20px; }
}
@media (max-width: 360px) {
  .nav-lang { display: none; }
  .brand { font-size: 1.05rem; }
}
