/* HexStep homepage — shared by / and /ko/ (each page sets its own fonts). */
:root {
    --bg: #0A0A14;
    --bg-raised: #10111C;
    --line: rgba(255, 255, 255, 0.07);
    --text: #E8ECF0;
    --muted: #9A9EB5;           /* 7.4:1 on --bg (WCAG AA needs 4.5:1) */
    --teal: #00C6AE;
    --teal-soft: rgba(0, 198, 174, 0.12);
    --gold: #C9A24B;            /* HexStep Plus gold — Color.plusGold in the app */
    --gold-soft: rgba(201, 162, 75, 0.12);
    --head: 'Satoshi', 'Inter', -apple-system, sans-serif;
    --body: 'Inter', -apple-system, sans-serif;
    --wrap: 1180px;
    --gutter: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }   /* on body only: it applies to the viewport, so <body> doesn't become its own scroller */
body {
    font-family: var(--body);
    background: var(--bg); color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.teal { color: var(--teal); }
.sr-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Nav ---------- */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(10, 10, 20, 0.82);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(42, 42, 62, 0.4);
}
.nav-inner {
    max-width: var(--wrap); margin: 0 auto; padding: 14px var(--gutter);
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 6px; text-decoration: none; min-height: 44px; }
.nav-logo svg { height: 16px; width: auto; }
.nav-logo span { font-family: 'Satoshi', sans-serif; font-weight: 700; font-size: 21px; letter-spacing: -0.01em; }
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-lang {
    font-size: 14px; color: var(--muted); text-decoration: none; font-weight: 500;
    display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
    min-height: 44px; padding: 0 4px;
}
.nav-lang:hover { color: var(--text); }
.nav-cta {
    display: inline-flex; align-items: center; min-height: 40px;
    color: var(--teal); border: 1px solid rgba(0, 198, 174, 0.4);
    border-radius: 10px; padding: 0 18px;
    font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
}
.nav-cta:hover { background: rgba(0, 198, 174, 0.08); border-color: var(--teal); }

/* ---------- Download CTA: Apple's official, unmodified badge artwork ---------- */
/* Apple: on-screen badge at least 40px tall; clear space at least 1/4 of its height
   (54px tall → 14px). The badge itself is never recoloured, cropped or given effects. */
.store-badge { display: inline-block; padding: 0; border-radius: 9px; transition: transform 0.2s, opacity 0.2s; }
.store-badge img { height: 54px; width: auto; }
.store-badge:hover { transform: translateY(-1px); }
.store-badge:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.btn-note { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* ---------- Phone frame (screens are the real 1.3.0 captures) ---------- */
.phone {
    position: relative;
    background: linear-gradient(145deg, #2C2C2E 0%, #1C1C1E 50%, #2C2C2E 100%);
    border-radius: 15% / 7%;           /* scales with width; matches iPhone corner curve */
    padding: 3.6%;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.5),
        0 0 0 0.5px rgba(255, 255, 255, 0.12),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.08);
}
.phone-screen {
    border-radius: 12% / 5.6%;
    overflow: hidden; background: var(--bg);
    aspect-ratio: 1206 / 2622;         /* iPhone 17 Pro simulator capture */
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Section rhythm ---------- */
section { position: relative; }
.section { padding: 96px 0; }
.eyebrow {
    font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--teal); margin-bottom: 14px;
}
h1, h2, h3 { font-family: var(--head); font-weight: 700; }
h2 { font-size: clamp(30px, 3.8vw, 46px); letter-spacing: -0.025em; line-height: 1.1; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head p { color: var(--muted); font-size: 17px; margin-top: 14px; }

/* ---------- 1. Hero ---------- */
.hero { padding: 132px 0 88px; overflow: hidden; }
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse 50% 60% at 72% 55%, rgba(0, 198, 174, 0.16) 0%, rgba(0, 198, 174, 0.05) 40%, transparent 72%);
    pointer-events: none;
}
.hero-grid {
    position: relative;
    display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 48px;
}
.hero-icon {
    width: 64px; height: 64px; border-radius: 16px; overflow: hidden; margin-bottom: 28px;
    border: 1px solid rgba(0, 198, 174, 0.2);
    box-shadow: 0 0 20px rgba(0, 198, 174, 0.25), 0 0 40px rgba(0, 198, 174, 0.1);
}
.hero h1 {
    font-size: clamp(42px, 5.6vw, 76px); letter-spacing: -0.035em; line-height: 1.04;
    margin-bottom: 24px; max-width: 12ch;
}
.hero-sub { font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); max-width: 30em; margin-bottom: 36px; }
.hero-cta { display: flex; flex-direction: column; align-items: flex-start; }
.hero-phone { width: min(100%, 360px); justify-self: center; }

/* ---------- 2. How it records ---------- */
.records { padding: 72px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-raised); }
.records-grid { display: grid; grid-template-columns: 0.8fr repeat(3, 1fr); gap: 40px; align-items: start; }
.records-grid h2 { font-size: clamp(28px, 3vw, 36px); }
.record h3 { font-size: 18px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.record h3 svg { flex: none; }
.record p { color: var(--muted); font-size: 15px; }

/* ---------- 3. Free features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.feature .phone { width: min(100%, 280px); margin: 0 auto 32px; }
.feature h3 { font-size: 22px; letter-spacing: -0.01em; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feature p { color: var(--muted); font-size: 15.5px; }
.feature .fine { font-size: 13.5px; margin-top: 8px; }
.tag {
    font-family: var(--body); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--teal); background: var(--teal-soft); border-radius: 6px; padding: 3px 7px;
}

/* ---------- 4. Plus ---------- */
.plus-panel {
    position: relative; overflow: hidden;
    border: 1px solid rgba(201, 162, 75, 0.25); border-radius: 28px;
    background: radial-gradient(ellipse 60% 70% at 25% 50%, rgba(201, 162, 75, 0.10), transparent 70%), var(--bg-raised);
    display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
    padding: 72px 64px;
}
.plus-phones { position: relative; display: flex; justify-content: center; gap: 0; }
.plus-phones .phone { width: min(46%, 250px); }
.plus-phones .phone:first-child { transform: translateY(-24px) rotate(-3deg); margin-right: -6%; }
/* hex card phone sits in front: its bottom card (first claimed / days visited / last visit) is the point */
.plus-phones .phone:last-child { transform: translateY(24px) rotate(3deg); z-index: 2; }
.plus .eyebrow { color: var(--gold); display: flex; align-items: center; gap: 8px; }
.plus h2 { margin-bottom: 14px; }
.price-line { font-size: 17px; color: var(--text); margin-bottom: 32px; }
.price-line strong { color: var(--gold); font-weight: 600; }
.plus-list { list-style: none; display: grid; gap: 18px; }
.plus-list li { padding-left: 26px; position: relative; color: var(--muted); font-size: 15.5px; }
.plus-list li::before {
    content: ''; position: absolute; left: 0; top: 7px; width: 12px; height: 10.4px;   /* flat-top hex, height = width × √3/2 */
    background: var(--gold); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.plus-list strong { color: var(--text); font-weight: 600; }

/* ---------- 5 + 6. Free vs Plus and FAQ (two columns on wide screens) ---------- */
.info-grid { display: grid; grid-template-columns: 1fr; gap: 72px; }
.compare, .faq { width: 100%; max-width: 760px; margin: 0 auto; }
.compare h2 { margin-bottom: 28px; font-size: clamp(26px, 3vw, 36px); }
.compare table { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 13px 12px; border-bottom: 1px solid var(--line); }
.compare th { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.compare th:not(:first-child), .compare td:not(:first-child) { text-align: center; width: 104px; }
.compare th.plus-col { color: var(--gold); }
.compare td:first-child { color: var(--text); }
.compare .yes { color: var(--teal); font-weight: 700; }
.compare .yes-plus { color: var(--gold); font-weight: 700; }
.compare .no { color: rgba(139, 143, 168, 0.4); }
.compare tr.price td { font-weight: 600; border-bottom: none; padding-top: 18px; white-space: nowrap; }
.compare tr.price td:last-child { color: var(--gold); }
.compare .note { color: var(--muted); font-size: 13.5px; margin-top: 16px; }

.faq h2 { margin-bottom: 12px; font-size: clamp(26px, 3vw, 36px); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
    list-style: none; cursor: pointer; padding: 22px 36px 22px 0; position: relative;
    font-family: var(--head); font-weight: 700; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    font-family: var(--body); font-weight: 400; font-size: 24px; color: var(--teal); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); font-size: 15.5px; padding: 0 0 22px; max-width: 64ch; }
.faq details p a { color: var(--teal); }

/* ---------- 7. Final CTA ---------- */
.closing { text-align: center; padding: 88px 0 96px; overflow: hidden; }
.closing::before {
    content: ''; position: absolute; left: 50%; top: 50%; width: min(640px, 140vw); height: 420px;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse 60% 55% at 50% 50%, rgba(0, 198, 174, 0.13), transparent 70%);
    pointer-events: none;
}
.closing > * { position: relative; }
.closing .hero-icon { margin: 0 auto 28px; }
.closing h2 { font-size: clamp(34px, 4.6vw, 56px); margin-bottom: 14px; }
.closing p { color: var(--muted); font-size: 17px; margin-bottom: 32px; }
.closing .hero-cta { align-items: center; }

/* ---------- 8. Footer ---------- */
footer { text-align: center; padding: 40px var(--gutter) 56px; border-top: 1px solid var(--line); }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 20px; margin-bottom: 6px; }
.footer-links a { font-size: 13.5px; color: var(--muted); text-decoration: none; display: inline-block; padding: 12px 4px; }  /* 44px tap height */
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12.5px; color: var(--muted); opacity: 0.85; }

@media (min-width: 1080px) {
    .info-grid { grid-template-columns: 1.08fr 1fr; gap: 80px; align-items: start; }
    .compare, .faq { max-width: none; margin: 0; }
}

/* Swipe position dots for the mobile feature rail (hidden where the cards sit in a grid) */
.rail-dots { display: none; }

/* ---------- Motion (hero only; content never waits on JS) ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-copy > * { animation: fadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.hero-phone { animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Tablet (≤ 900px) ---------- */
@media (max-width: 900px) {
    .section { padding: 88px 0; }
    .hero { padding: 112px 0 64px; text-align: center; }
    .hero::before { background: radial-gradient(ellipse 80% 45% at 50% 72%, rgba(0, 198, 174, 0.16) 0%, transparent 72%); }
    .hero-grid { grid-template-columns: 1fr; gap: 56px; }
    .hero h1 { margin-left: auto; margin-right: auto; }
    .hero-icon { margin-left: auto; margin-right: auto; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-cta { align-items: center; }
    .hero-phone { width: min(72vw, 320px); }
    .records-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
    .records-grid > h2 { grid-column: 1 / -1; }
    .plus-panel { grid-template-columns: 1fr; padding: 56px 32px; gap: 48px; }
    .plus-copy { order: -1; }
    /* Tablet keeps the three cards in one row: 3 × ~224px phones fit a 768px screen */
    .features { gap: 24px; }
    .feature .phone { margin-bottom: 24px; }
    .feature h3 { font-size: 19px; }
}

/* ---------- Phone (≤ 600px) ---------- */
@media (max-width: 600px) {
    :root { --gutter: 16px; }
    .nav-cta { padding: 0 14px; }
    .section { padding: 72px 0; }
    .section-head { margin-bottom: 36px; }
    .store-badge img { height: 50px; }
    .hero { padding-top: 104px; }
    .hero-phone { width: min(70vw, 270px); }
    .records { padding: 56px 0; }
    .records-grid { grid-template-columns: 1fr; gap: 22px; }
    /* Feature cards become a swipeable rail: one card plus a peek of the next */
    .features {
        display: grid; grid-auto-flow: column; grid-template-columns: none;
        grid-auto-columns: 74vw; gap: 20px;
        overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
        margin: 0 calc(-1 * var(--gutter));
        /* Right padding lets the LAST card snap to the left edge (otherwise the previous card's
           text shows half-cut on the left): 100vw − 74vw card − 16px gutter = 26vw − 16px. */
        padding: 0 calc(26vw - var(--gutter)) 8px var(--gutter);
        scrollbar-width: none;
        /* The next card peeks in as a swipe hint; fade it so its text never looks cut off.
           Fade 56px ≈ visible peek at 375px: 375 − 16 gutter − 277 card (74vw) − 20 gap = 62px. */
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent);
                mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent);
    }
    .features::-webkit-scrollbar { display: none; }
    .features.at-end { -webkit-mask-image: none; mask-image: none; }
    .feature { scroll-snap-align: start; }
    .feature .phone { width: 100%; }
    /* Only the card in view shows its text; the peeking card shows just its phone image.
       .js-rail is set by the page script, so text stays visible if JavaScript is off. */
    .feature h3, .feature p { transition: opacity 0.25s; }
    .js-rail .feature:not(.current) h3, .js-rail .feature:not(.current) p { opacity: 0; }
    .feature h3 { font-size: 21px; }
    .rail-dots { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
    .rail-dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--muted); opacity: 0.35; transition: width 0.2s, opacity 0.2s, background 0.2s; }
    .rail-dots span.on { width: 18px; opacity: 1; background: var(--teal); }
    .plus-panel { padding: 44px 20px 52px; border-radius: 22px; }
    .compare th, .compare td { padding: 11px 6px; font-size: 14px; }
    .compare th:not(:first-child), .compare td:not(:first-child) { width: 72px; }   /* fits "One-time" / "한 번 결제" at 14px */
    .compare th { font-size: 11.5px; letter-spacing: 0.04em; }
    .faq summary { font-size: 16.5px; padding: 18px 32px 18px 0; }
    .closing { padding: 72px 0 72px; }
    .info-grid { gap: 64px; }
}
