:root {
    --paper: #FDF8EF;
    --paper-light: #FFFFFF;
    --paper-deep: #F7EEDC;
    --ink: #4A362E;
    --ink-soft: #6E5A50;
    --ink-faint: #9C897E;
    --orange: #F5A85C;
    --orange-dark: #DD8B3A;
    --teal: #82CBCE;
    --teal-dark: #5CA6A9;
    --band-dark: #3A2A22;
    --band-dark-light: #4E3A30;
    --rule-line: rgba(74, 54, 46, 0.14);
    --shadow-card: 0 10px 24px rgba(74, 54, 46, 0.18);
    --radius-card: 3px;
    --max-w: 1180px;
    --font-display: 'Fraunces', Georgia, serif;
}

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

html {
    scroll-behavior: smooth;
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    background-image:
        linear-gradient(var(--rule-line) 1px, transparent 1px);
    background-size: 100% 2.15rem;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 1.08;
    margin: 0 0 0.5em 0;
    color: var(--ink);
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.75rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

a:focus-visible,
button:focus-visible,
label:focus-visible,
input:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--orange-dark);
    outline-offset: 2px;
}

/* ---------- Header ---------- */
header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--paper-light);
    border-bottom: 2px solid var(--ink);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.35rem;
    text-decoration: none;
    color: var(--ink);
}

.logo img {
    width: 34px;
    height: 34px;
    display: block;
}

.logo .dot {
    color: var(--orange-dark);
}

nav.primary-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    order: 1;
    margin-left: auto;
}

.nav-links {
    display: flex;
    gap: 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover {
    border-color: var(--orange-dark);
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--band-dark);
    color: var(--paper-light);
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

.badge-pill .puck {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal);
}

.menu-toggle {
    display: none;
}

.menu-btn {
    display: none;
    order: 3;
}

/* ---------- Language switcher ---------- */
.lang-switch {
    position: relative;
    order: 2;
    margin-left: 1.25rem;
}

.lang-switch summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 2.4rem;
    padding: 0 0.8rem;
    border: 2px solid var(--ink);
    border-radius: 6px;
    background: var(--paper-light);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    user-select: none;
}

.lang-switch summary::-webkit-details-marker {
    display: none;
}

.lang-switch summary svg {
    flex: none;
}

.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.45rem);
    min-width: 11rem;
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
    background: var(--paper-light);
    border: 2px solid var(--ink);
    border-radius: 6px;
    box-shadow: var(--shadow-card);
    z-index: 50;
}

.lang-menu a {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-size: 0.92rem;
}

.lang-menu a:hover {
    background: var(--paper-deep);
}

.lang-menu a[aria-current="page"] {
    font-weight: 700;
    color: var(--orange-dark);
}

/* ---------- Hero ---------- */
.hero {
    padding: 4.5rem 0 3.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

.hero-copy .kicker {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 600;
    color: var(--orange-dark);
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.hero-copy h1 {
    font-size: clamp(2.3rem, 4.2vw, 3.4rem);
    letter-spacing: -0.01em;
}

.hero-copy p.lede {
    font-size: 1.1rem;
    color: var(--ink-soft);
    max-width: 46ch;
    margin: 1.1rem 0 1.9rem;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background: var(--ink);
    color: var(--paper-light);
    padding: 0.7rem 1.1rem;
    border-radius: 8px;
    text-decoration: none;
    border: 2px solid var(--ink);
}

.store-badge svg {
    flex: none;
}

.store-badge .store-text {
    line-height: 1.2;
}

.store-badge .store-text small {
    display: block;
    font-size: 0.68rem;
    opacity: 0.8;
    font-weight: 500;
}

.store-badge .store-text strong {
    display: block;
    font-size: 1rem;
    font-family: var(--font-display);
    font-weight: 600;
}

.hero-note {
    font-size: 0.9rem;
    color: var(--ink-faint);
}

/* phone mockup */
.phone-stage {
    position: relative;
    display: flex;
    justify-content: center;
}

.phone {
    width: 250px;
    background: var(--ink);
    border-radius: 30px;
    padding: 10px;
    box-shadow: var(--shadow-card);
    transform: rotate(-3deg);
}

.phone .screen {
    background: var(--band-dark);
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 9/19.5;
    position: relative;
}

.phone .screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phone .screen .placeholder-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.06), transparent 40%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 14px);
}

.hero-sticker {
    position: absolute;
    width: 118px;
    left: -2.2rem;
    bottom: -1.6rem;
    transform: rotate(-8deg);
    filter: drop-shadow(0 8px 14px rgba(74, 54, 46, 0.28));
    z-index: 2;
}

.phone-badge {
    position: absolute;
    top: -12px;
    right: 14px;
    background: var(--teal);
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    transform: rotate(6deg);
    box-shadow: var(--shadow-card);
    z-index: 100;
}

/* ---------- Section shared ---------- */
section {
    padding: 4rem 0;
}

.section-head {
    max-width: 62ch;
    margin-bottom: 2.75rem;
}

.section-head h2 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.section-head p {
    color: var(--ink-soft);
    font-size: 1.05rem;
    margin-top: 0.8rem;
}

/* ---------- Problem strip ---------- */
.problem {
    background: var(--paper-deep);
    border-top: 1px solid var(--rule-line);
    border-bottom: 1px solid var(--rule-line);
}

.problem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.problem-grid h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    max-width: 16ch;
}

.problem-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.1rem;
}

.problem-list li {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    font-size: 1rem;
    color: var(--ink-soft);
}

.problem-list .mark {
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
    border: 2px solid var(--orange-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange-dark);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 0.1rem;
}

/* ---------- Features (scattered cards) ---------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.6rem;
}

.feature-card {
    background: var(--paper-light);
    border: 1px solid var(--ink);
    border-radius: var(--radius-card);
    padding: 1.6rem 1.4rem 1.8rem;
    box-shadow: var(--shadow-card);
    position: relative;
}

.feature-grid .feature-card:nth-child(1) {
    transform: rotate(-1.4deg);
}

.feature-grid .feature-card:nth-child(2) {
    transform: rotate(1deg);
    margin-top: 1.2rem;
}

.feature-grid .feature-card:nth-child(3) {
    transform: rotate(-0.8deg);
}

.feature-grid .feature-card:nth-child(4) {
    transform: rotate(1.6deg);
    margin-top: 1.2rem;
}

.feature-card .rule-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    color: var(--orange-dark);
    font-size: 0.85rem;
    margin-bottom: 0.9rem;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.55rem;
}

.feature-card p {
    color: var(--ink-soft);
    font-size: 0.95rem;
    margin: 0;
}

/* ---------- Screenshots ---------- */
.screens {
    background: var(--paper);
}

.screens-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.2rem;
    align-items: end;
}

.screen-item {
    text-align: center;
}

.screen-item .phone {
    margin: 0 auto 1.1rem;
    width: 100%;
    max-width: 230px;
    transform: none;
}

.screen-item:nth-child(1) .phone {
    transform: rotate(-2.5deg);
}

.screen-item:nth-child(3) .phone {
    transform: rotate(2.5deg);
}

.screen-item .caption {
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.screen-item .caption strong {
    display: block;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

/* ---------- CTA band ---------- */
.cta-band {
    background: var(--band-dark);
    background-image:
        radial-gradient(circle at 18% 30%, rgba(255, 255, 255, 0.05), transparent 45%),
        radial-gradient(circle at 85% 70%, rgba(255, 255, 255, 0.05), transparent 40%);
    color: var(--paper-light);
    padding: 4.5rem 0;
    text-align: center;
}

.cta-band h2 {
    color: var(--paper-light);
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
}

.cta-band p {
    color: rgba(248, 243, 229, 0.82);
    max-width: 44ch;
    margin: 0.9rem auto 2rem;
    font-size: 1.05rem;
}

.cta-band .store-badge {
    background: var(--paper-light);
    color: var(--ink);
    border-color: var(--paper-light);
}

.cta-band .store-badge svg path {
    fill: var(--ink);
}

.cta-actions {
    display: flex;
    justify-content: center;
}

.cta-band .hero-note {
    color: rgba(248, 243, 229, 0.65);
    margin-top: 1rem;
}

/* ---------- Footer ---------- */
footer {
    padding: 2.4rem 0;
    border-top: 2px solid var(--ink);
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-row .logo {
    font-size: 1.05rem;
}

footer .foot-meta {
    font-size: 0.85rem;
    color: var(--ink-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .phone-stage {
        order: -1;
        margin-bottom: 1rem;
    }

    .phone {
        width: 200px;
    }

    .hero-sticker {
        width: 88px;
        left: -1.2rem;
        bottom: -1.2rem;
    }

    .problem-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .screens-row {
        grid-template-columns: 1fr;
        max-width: 280px;
        margin: 0 auto;
    }
}

@media (max-width: 700px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--paper-light);
        border-bottom: 2px solid var(--ink);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.2s ease;
    }

    .nav-links li {
        border-top: 1px solid var(--rule-line);
    }

    .nav-links a {
        display: block;
        padding: 0.9rem 1.75rem;
        border-bottom: none;
    }

    .menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.4rem;
        height: 2.4rem;
        margin-left: 0.6rem;
        background: transparent;
        border: 2px solid var(--ink);
        border-radius: 6px;
        cursor: pointer;
    }

    .menu-btn span,
    .menu-btn span::before,
    .menu-btn span::after {
        content: "";
        display: block;
        width: 18px;
        height: 2px;
        background: var(--ink);
        position: relative;
    }

    .menu-btn span::before {
        position: absolute;
        top: -6px;
    }

    .menu-btn span::after {
        position: absolute;
        top: 6px;
    }

    .menu-toggle:checked~.primary-nav .nav-links {
        max-height: 220px;
    }

    .header-row {
        position: relative;
    }

    .lang-switch {
        margin-left: 0.6rem;
    }

    .lang-switch summary {
        padding: 0 0.55rem;
    }

    .lang-switch .lang-current {
        display: none;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid .feature-card {
        margin-top: 0 !important;
    }
}

@media (max-width: 420px) {
    .badge-pill {
        display: none;
    }
}

/* Fraunces has no Cyrillic glyphs; Literata covers them on Cyrillic pages */
html[data-script="cyrillic"] {
    --font-display: 'Fraunces', 'Literata', Georgia, serif;
}

/* Legal pages (privacy policy etc.): readable single-column text. */
.legal {
  padding: 3rem 16px 4rem;
}

.legal__body {
  max-width: 72ch;
  margin: 0 auto;
  line-height: 1.65;
}

.legal__body h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 .5rem; }
.legal__body h1 + p { margin-top: 0; color: var(--muted, rgba(0, 0, 0, .6)); font-size: .9rem; }
.legal__body h2 { font-size: 1.25rem; margin: 2.25rem 0 .75rem; }

.legal__body p,
.legal__body ul { margin: 0 0 1rem; }
.legal__body ul { padding-left: 1.25rem; }
.legal__body li + li { margin-top: .35rem; }

.legal__body a { color: inherit; text-decoration-color: var(--accent, #F5A85C); text-underline-offset: 2px; }

/* Footer links: contact email and privacy policy. */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.5rem;
  margin-top: 1rem;
  font-size: .875rem;
}

.footer-links__item {
  color: var(--muted, rgba(0, 0, 0, .6));
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer-links__item:hover,
.footer-links__item:focus-visible {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent, #F5A85C);
  text-underline-offset: 2px;
}
