/* LexiFlow public site (landing, offer, privacy). Static stylesheet: no build step, no external fonts or images. */
:root {
    color-scheme: light dark;
    --bg: #ffffff;
    --bg-alt: #f4f4f5;
    --card: #ffffff;
    --text: #18181b;
    --muted: #52525b;
    --border: #e4e4e7;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --accent-text: #000000;
    --link: #b45309;
    /* Soft tints (background + readable ink) of the app mock-up buttons and icon tiles: accent / success / danger. */
    --accent-soft: #fef3c7;
    --accent-ink: #92400e;
    --success-soft: #dcfce7;
    --success-ink: #166534;
    --danger-soft: #fee2e2;
    --danger-ink: #991b1b;
    /* Phone mock-up: bezel, screen, shadow and the glow behind it. */
    --device: #18181b;
    --screen: var(--bg-alt);
    --shadow: 0 1.5rem 3rem -1rem rgba(24, 24, 27, .35);
    --glow: rgba(245, 158, 11, .28);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111113;
        --bg-alt: #18181b;
        --card: #1f1f23;
        --text: #f4f4f5;
        --muted: #a1a1aa;
        --border: #3f3f46;
        --link: #fbbf24;
        --accent-soft: #3a2a0a;
        --accent-ink: #fcd34d;
        --success-soft: #11301c;
        --success-ink: #86efac;
        --danger-soft: #3b1717;
        --danger-ink: #fca5a5;
        --device: #09090b;
        --screen: var(--bg);
        --shadow: 0 1.5rem 3rem -1rem rgba(0, 0, 0, .75);
        --glow: rgba(245, 158, 11, .18);
    }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--link); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: 64rem; margin: 0 auto; padding: 0 1rem; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .75rem; overflow-wrap: anywhere; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 6vw, 2.75rem); }
h2 { font-size: clamp(1.375rem, 4.5vw, 1.875rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* Header: the logo and RU/UZ always share the first row; the page links form a scrollable strip under them
   on narrow screens (no JavaScript) and move between the two on wide ones. */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.bar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand langs" "nav nav";
    align-items: center;
    column-gap: 1rem;
}
.brand {
    grid-area: brand;
    justify-self: start;
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    text-decoration: none;
}
.langs { grid-area: langs; display: flex; gap: .25rem; }
.langs a {
    color: var(--text);
    text-decoration: none;
    padding: .3rem .7rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 600;
}
.langs a[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.nav {
    grid-area: nav;
    display: flex;
    gap: .5rem;
    margin: 0 -6px;
    padding: 6px 6px .75rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
    flex: none;
    padding: .3rem .9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-size: .9rem;
    text-decoration: none;
    white-space: nowrap;
}
.nav a:hover { color: var(--link); }

/* Hero: copy and the phone mock-up (stacked on a phone, side by side from 56.25rem) */
.hero { padding: 2rem 0 2.5rem; background: var(--bg-alt); }
.hero-grid { display: grid; gap: 2.25rem; align-items: center; }
.hero-copy { min-width: 0; }
.hero .lead { font-size: 1.125rem; color: var(--muted); max-width: 40rem; }
.btn {
    display: inline-block;
    padding: .8rem 1.5rem;
    margin: .5rem 0 1rem;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 600;
    text-decoration: none;
}
.btn:hover { background: var(--accent-hover); }
.btn-disabled { background: var(--border); color: var(--muted); cursor: default; }
.btn-disabled:hover { background: var(--border); }

.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art::before {
    content: "";
    position: absolute;
    inset: 4% 6%;
    border-radius: 50%;
    background: radial-gradient(closest-side, var(--glow), transparent);
}

/* The phone: a flash card of the Mini App drawn with HTML and CSS only */
.phone {
    position: relative;
    width: min(100%, 17.5rem);
    padding: .5rem;
    border-radius: 2.5rem;
    background: var(--device);
    box-shadow: var(--shadow), 0 0 0 1px var(--border);
}
.phone::before {
    content: "";
    position: absolute;
    top: 1rem;
    left: 50%;
    z-index: 1;
    width: 4.5rem;
    height: 1.1rem;
    margin-left: -2.25rem;
    border-radius: 999px;
    background: var(--device);
}
.phone-screen {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    min-height: 31rem;
    padding: 2.75rem .85rem .9rem;
    border-radius: 2rem;
    background: var(--screen);
    color: var(--text);
    line-height: 1.4;
}
.app-top { display: flex; align-items: center; gap: .6rem; color: var(--muted); }
.app-close { flex: none; width: 1rem; height: 1rem; }
.app-bar { flex: 1; height: .35rem; border-radius: 999px; background: var(--border); overflow: hidden; }
.app-bar-fill { display: block; width: 35%; height: 100%; border-radius: inherit; background: var(--accent); }
.app-count { font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.app-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    background: var(--card);
    text-align: center;
}
.app-card p { margin: 0; }
.app-card .app-word { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.app-card .app-ipa { color: var(--muted); }
.app-card .app-translation { margin-top: 1.1rem; font-size: 1.25rem; font-weight: 600; }
.app-card .app-example { margin-top: .45rem; color: var(--muted); font-size: .85rem; font-style: italic; }
.app-chip {
    padding: .1rem .65rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: .72rem;
    font-weight: 600;
}
.app-sound {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: .9rem 0 .5rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-ink);
}
.app-sound .icon { width: 1.1rem; height: 1.1rem; }
.app-question { margin: 0 0 .5rem; color: var(--muted); font-size: .8rem; text-align: center; }
.app-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.app-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: .35rem .25rem;
    border-radius: .8rem;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    overflow-wrap: anywhere;
}
.app-btn-forgot { background: var(--danger-soft); color: var(--danger-ink); }
.app-btn-remembered { background: var(--accent-soft); color: var(--accent-ink); }
.app-btn-easy { background: var(--success-soft); color: var(--success-ink); }

/* Sections and cards */
.section { padding: 2.5rem 0; }
.section.alt { background: var(--bg-alt); }
.grid { display: grid; gap: 1rem; list-style: none; margin-top: 1.25rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.card p:last-child { margin-bottom: 0; }
.card p, .ticks li { text-wrap: pretty; }

/* "How it works": the step number sits in a circle before the title */
.step { display: grid; grid-template-columns: auto 1fr; align-items: center; align-content: start; gap: .65rem .85rem; }
.step-num {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 700;
    line-height: 1;
}
.step h3 { margin: 0; }
.step p { grid-column: 1 / -1; }

/* "What's inside": an icon tile before the text */
.feature { display: flex; gap: 1rem; align-items: flex-start; }
.feature > div { min-width: 0; }
.feature h3 { margin-bottom: .35rem; }
.feature-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .8rem;
    background: var(--accent-soft);
    color: var(--accent-ink);
}
.icon { display: block; width: 1.5rem; height: 1.5rem; }

.badge {
    display: inline-block;
    margin-left: .35rem;
    padding: .1rem .55rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-text);
    font-size: .75rem;
    font-weight: 600;
    vertical-align: middle;
}

/* Pricing: the Pro card once Pro is for sale */
.plan-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.price { margin: .75rem 0 0; font-size: 1.375rem; font-weight: 700; line-height: 1.25; }
.price-alt { margin: .15rem 0 0; font-size: .9375rem; }

.ticks { list-style: none; margin: 1rem 0; }
.ticks li { position: relative; padding-left: 1.5rem; margin-bottom: .5rem; }
.ticks li::before { content: "\2713"; position: absolute; left: 0; color: var(--link); font-weight: 700; }

/* Legal stubs */
.legal-doc { padding-top: 1.5rem; padding-bottom: 3rem; max-width: 46rem; }
.legal-doc section { margin-top: 1.5rem; }
.legal-doc h2 { font-size: 1.25rem; }
.notice {
    padding: .75rem 1rem;
    border: 1px solid var(--accent);
    border-left-width: 5px;
    border-radius: 8px;
    background: var(--bg-alt);
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0 2rem; background: var(--bg-alt); }
.site-footer p { margin-bottom: .5rem; }
.legal { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-bottom: .75rem; }

/* >= 40rem: sticky one-line header with the links between logo and language switch */
@media (min-width: 40rem) {
    .site-header { position: sticky; top: 0; z-index: 10; }
    .bar { grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav langs"; column-gap: 1.5rem; }
    .nav { justify-content: flex-end; gap: 1.25rem; margin: 0; padding: 0; overflow: visible; }
    .nav a { padding: .5rem 0; border: 0; border-radius: 0; font-size: 1rem; }
    .hero { padding: 3.5rem 0; }
    .section { padding: 3.5rem 0; }
    .section[id] { scroll-margin-top: 3.5rem; }
    .steps { grid-template-columns: repeat(3, 1fr); }
    .features { grid-template-columns: repeat(2, 1fr); }
    .plans { grid-template-columns: repeat(3, 1fr); }
}

/* >= 56.25rem (900px): text on the left, the phone on the right */
@media (min-width: 56.25rem) {
    .hero { padding: 4.5rem 0; }
    .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 3rem; }
    .phone { width: min(100%, 18.5rem); }
    .phone-screen { min-height: 33rem; }
}

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