/* Korly landing — brand-matched, theme-aware, responsive.
   Colors mirror the app (AppColors): blue #2563EB primary, orange #FE9519 secondary. */

:root {
  --blue: #2563EB;
  --blue-dark: #2659BF;
  --blue-light: #99BBFF;
  --blue-subtle: #E3EDFF;
  --orange: #FE9519;
  --orange-light: #FEC875;
  --orange-subtle: #FFF6EB;

  --bg: #F4F7FE;
  --bg-tint: #E9EFFD;
  --card: #FFFFFF;
  --text: #1A2233;
  --muted: #5B6473;
  --border: #E3E8F3;
  --shadow: 0 8px 30px rgba(37, 99, 235, 0.08);
  --shadow-sm: 0 2px 10px rgba(20, 30, 55, 0.06);
  --radius: 20px;
  --radius-sm: 14px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard",
    Roboto, "Helvetica Neue", Arial, "Noto Sans KR", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1420;
    --bg-tint: #141C2B;
    --card: #172033;
    --text: #E8ECF4;
    --muted: #9AA6BC;
    --border: #26314A;
    --blue-subtle: #1B2740;
    --orange-subtle: #2A2011;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
}
:root[data-theme="dark"] {
  --bg: #0E1420; --bg-tint: #141C2B; --card: #172033; --text: #E8ECF4;
  --muted: #9AA6BC; --border: #26314A; --blue-subtle: #1B2740; --orange-subtle: #2A2011;
  --shadow: 0 8px 30px rgba(0,0,0,.35); --shadow-sm: 0 2px 10px rgba(0,0,0,.3);
}
:root[data-theme="light"] {
  --bg: #F4F7FE; --bg-tint: #E9EFFD; --card: #FFFFFF; --text: #1A2233;
  --muted: #5B6473; --border: #E3E8F3; --blue-subtle: #E3EDFF; --orange-subtle: #FFF6EB;
  --shadow: 0 8px 30px rgba(37,99,235,.08); --shadow-sm: 0 2px 10px rgba(20,30,55,.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
/* Overflow guards — grid/flex children default to min-width:auto and can push past the
   viewport on narrow screens; force them to be allowed to shrink. */
.hero-grid > *, .cards > *, .steps > *, .plans > * { min-width: 0; }
.store-btns { max-width: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--blue);
  background: var(--blue-subtle); padding: 6px 12px; border-radius: 999px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  background: var(--blue); color: #fff !important; padding: 9px 18px;
  border-radius: 999px; font-weight: 700;
}
.nav-cta:hover { background: var(--blue-dark); text-decoration: none; }
@media (max-width: 760px) { .nav-links a:not(.nav-cta) { display: none; } }

/* Hero */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(30px, 5vw, 56px); line-height: 1.1; margin: 18px 0 16px; letter-spacing: -0.02em; overflow-wrap: break-word; }
.hero h1 .hl { color: var(--blue); }
.hero p.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); margin: 0 0 26px; max-width: min(42ch, 100%); }
.levels { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.lvl { font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  background: var(--orange-subtle); color: var(--orange); }
.lvl.b { background: var(--blue-subtle); color: var(--blue); }

.store-btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 14px;
  font-weight: 700; font-size: 15px;
}
.store-btn:hover { text-decoration: none; opacity: .9; }
.store-btn small { display: block; font-size: 11px; font-weight: 500; opacity: .8; line-height: 1; }
.store-btn b { font-size: 16px; line-height: 1.1; }
.store-btn svg { width: 22px; height: 22px; fill: currentColor; }
.soon { font-size: 13px; color: var(--muted); font-weight: 600; }

.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual img {
  width: 300px; max-width: 82%; border-radius: 34px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.blob { position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 60% 40%, var(--blue-subtle), transparent 62%); filter: blur(8px); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 48px 0 20px; text-align: center; }
  .levels, .store-btns { justify-content: center; }
  .hero p.lead { margin-inline: auto; }
}

/* Sections */
section.block { padding: 60px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 14px 0 10px; letter-spacing: -0.02em; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.card .ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--blue-subtle); color: var(--blue); margin-bottom: 16px; font-size: 22px;
}
.card .ico.o { background: var(--orange-subtle); color: var(--orange); }
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { text-align: center; padding: 8px; }
.step .n {
  counter-increment: step; width: 52px; height: 52px; margin: 0 auto 16px;
  border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; font-size: 20px;
  display: grid; place-items: center;
}
.step .n::before { content: counter(step); }
.step h3 { margin: 0 0 6px; font-size: 19px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* Screenshot strip */
.shots { display: flex; gap: 20px; overflow-x: auto; padding: 8px 4px 20px; scroll-snap-type: x mandatory; }
.shots img {
  width: 240px; flex: 0 0 auto; border-radius: 26px; scroll-snap-align: center;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 760px; margin: 0 auto; }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }
.plan {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm); position: relative;
}
.plan.pro { border-color: var(--blue); box-shadow: var(--shadow); }
.plan .tag {
  position: absolute; top: -12px; right: 22px; background: var(--blue); color: #fff;
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
}
.plan h3 { margin: 0 0 4px; font-size: 22px; }
.plan .price { font-size: 34px; font-weight: 800; margin: 8px 0 2px; }
.plan .price span { font-size: 15px; font-weight: 600; color: var(--muted); }
.plan .sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.plan ul { list-style: none; padding: 0; margin: 0; }
.plan li { padding: 7px 0 7px 28px; position: relative; font-size: 15px; }
.plan li::before {
  content: "✓"; position: absolute; left: 0; color: var(--blue); font-weight: 800;
}

/* CTA */
.cta {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff; border-radius: 28px; text-align: center; padding: 56px 24px; margin: 20px 0;
}
.cta h2 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 10px; }
.cta p { margin: 0 0 26px; opacity: .92; font-size: 17px; }
.cta .store-btn { background: #fff; color: var(--blue); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-tint); padding: 44px 0 34px; margin-top: 40px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; }
.foot-brand { max-width: 300px; }
.foot-brand .brand { margin-bottom: 10px; }
.foot-brand p { color: var(--muted); font-size: 14px; margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 40px; }
.foot-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 12px; }
.foot-col a { display: block; color: var(--text); font-size: 15px; margin-bottom: 9px; }
.foot-col a:hover { color: var(--blue); text-decoration: none; }
.foot-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* Legal doc pages (iframe embed) */
.doc-header { background: var(--card); border-bottom: 1px solid var(--border); }
.doc-frame { width: 100%; height: calc(100vh - 66px); border: 0; display: block; background: var(--card); }

/* Support / content page */
.page { padding: 56px 0; }
.page h1 { font-size: clamp(30px, 4vw, 44px); margin: 12px 0 12px; letter-spacing: -0.02em; }
.page .lead { color: var(--muted); font-size: 18px; max-width: 60ch; }
.faq { max-width: 760px; margin: 32px 0 0; }
.faq details {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 4px 20px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; padding: 16px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--blue); font-weight: 800; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }
.contact-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); margin-top: 28px; max-width: 760px;
}
.contact-card a.email {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 8px;
  background: var(--blue); color: #fff; padding: 11px 20px; border-radius: 12px; font-weight: 700;
}
.contact-card a.email:hover { background: var(--blue-dark); text-decoration: none; }
.backlink { color: var(--muted); font-weight: 600; font-size: 15px; }
