/* ============================================================================
   ROOT & DESIGN TOKENS
   ========================================================================== */

:root {
    --bg: #faf8f5;
    --surface: #ffffff;
    --surface-alt: #f0ebe4;
    --ink: #1a1b2e;
    --muted: #6b7280;
    --line: rgba(26, 27, 46, 0.08);
    --primary: #e8634a;
    --primary-strong: #d14b32;
    --secondary: #6b9080;
    --accent: #f0a500;
    --hero-bg: #0f172a;
    --shadow: 0 20px 50px rgba(26, 27, 46, 0.1);
    --shadow-lg: 0 30px 80px rgba(26, 27, 46, 0.15);
}

/* ============================================================================
   GLOBAL STYLES
   ========================================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background-color: var(--bg);
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.65;
    position: relative;
}

/* Paper grain texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" result="noise"/><feColorMatrix in="noise" type="saturate" values="0"/></filter><rect width="100" height="100" fill="%23000000" filter="url(%23noise)" opacity="0.012"/></svg>');
    pointer-events: none;
    z-index: 1;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    background: var(--primary-strong);
    color: white;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    z-index: 1000;
}

.skip-link:focus {
    top: 16px;
}

/* ============================================================================
   LAYOUT & CONTAINER
   ========================================================================== */

.site-header,
main,
.site-footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ============================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    transition: all 0.3s ease;
    position: relative;
}

.site-header.scrolled {
    background: rgba(250, 248, 245, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
    box-shadow: 0 4px 12px rgba(26, 27, 46, 0.06);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.brand-mark {
    display: block;
}

.brand-text {
    font-family: "DM Serif Display", serif;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

.site-nav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.site-nav a:hover {
    color: var(--ink);
}

.language-link {
    color: var(--ink);
    font-weight: 700;
}

/* ============================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: "DM Serif Display", serif;
    letter-spacing: -0.03em;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 16px;
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1.1;
    color: var(--ink);
}

h2 {
    margin: 0 0 16px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.15;
    color: var(--ink);
}

h3 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    line-height: 1.2;
    color: var(--ink);
}

.lede {
    max-width: 44rem;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
    margin: 0;
}

.mini-note {
    color: var(--muted);
    font-size: 0.94rem;
    margin-top: 14px;
}

/* ============================================================================
   BUTTONS & ACTIONS
   ========================================================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.button-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    box-shadow: 0 8px 24px rgba(232, 99, 74, 0.25);
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(232, 99, 74, 0.35);
}

.button-secondary {
    background: var(--surface-alt);
    color: var(--ink);
    border: 1px solid var(--line);
}

.button-secondary:hover {
    background: var(--surface);
    transform: translateY(-2px);
}

.store-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 0;
    border-radius: 16px;
    background: transparent;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.store-badge:hover {
    transform: translateY(-2px);
}

.store-badge img {
    display: block;
    height: 58px;
    width: auto;
}

.store-badge-compact {
    min-height: 40px;
    border-radius: 12px;
}

.store-badge-compact img {
    height: 40px;
}

.store-badge-play img {
    height: 86px;
}

/* ============================================================================
   HERO SECTION
   ========================================================================== */

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    padding: 60px 0 80px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-copy {
    display: flex;
    flex-direction: column;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
}

.store-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 28px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--primary-strong);
    font-size: 0.88rem;
    font-weight: 700;
}

a.pill {
    text-decoration: none;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    position: relative;
}

.hero-flashcard-stack {
    position: relative;
    width: 100%;
    max-width: 340px;
    height: 420px;
}

.flashcard-mock {
    position: absolute;
    width: 100%;
    height: 340px;
    border-radius: 24px;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    animation: float 6s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.flashcard-1 {
    transform: rotate(-3deg) translateY(20px);
    animation-delay: 0s;
    z-index: 3;
}

.flashcard-2 {
    transform: rotate(0deg) translateY(0px);
    animation-delay: 0.2s;
    z-index: 2;
}

.flashcard-3 {
    transform: rotate(3deg) translateY(-20px);
    animation-delay: 0.4s;
    z-index: 1;
}

.flashcard-front {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    background: linear-gradient(135deg, rgba(232, 99, 74, 0.08), rgba(240, 165, 0, 0.06));
    border-radius: 16px;
    padding: 24px;
}

.flashcard-label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 16px;
}

.flashcard-front h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.4rem;
    line-height: 1.4;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(var(--rotate, 0deg));
    }
    50% {
        transform: translateY(-12px) rotate(var(--rotate, 0deg));
    }
}

.flashcard-1 {
    --rotate: -3deg;
}

.flashcard-2 {
    --rotate: 0deg;
}

.flashcard-3 {
    --rotate: 3deg;
}

/* ============================================================================
   SUBJECT BAND
   ========================================================================== */

.subject-band {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 40px 0;
    animation: fadeInUp 0.9s ease-out;
}

.subject-chip {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(26, 27, 46, 0.06);
    transition: all 0.2s ease;
}

.subject-chip:hover {
    background: var(--surface-alt);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ============================================================================
   SECTIONS & COMMON LAYOUT
   ========================================================================== */

.section {
    padding: 64px 0;
    animation: fadeInUp 1s ease-out;
}

.section-heading {
    margin-bottom: 40px;
}

.section-heading-compact {
    margin-bottom: 0;
}

.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    border-radius: 32px;
    padding: 64px;
    margin: 64px 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
}

.cta-section .lede {
    color: rgba(255, 255, 255, 0.85);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

.cta-band {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

/* ============================================================================
   PREVIEW SECTION
   ========================================================================== */

.preview-section {
    padding-top: 20px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: end;
}

.preview-device {
    padding: 24px;
    border-radius: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.preview-device:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.preview-device-featured {
    transform: translateY(-24px);
}

.preview-device-featured:hover {
    transform: translateY(-28px);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.preview-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.preview-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--primary-strong);
    font-size: 0.78rem;
    font-weight: 700;
}

.preview-screen {
    min-height: 280px;
    border-radius: 24px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

.preview-screen-import {
    background: linear-gradient(180deg, #f6f9ff 0%, #dce8fb 100%);
}

.preview-screen-study {
    background: linear-gradient(180deg, #17304c 0%, #245fa7 100%);
}

.preview-screen-progress {
    background: linear-gradient(180deg, #fdfdff 0%, #edf4ff 100%);
}

.preview-paper {
    width: 66%;
    padding: 18px 16px;
    border-radius: 16px;
    background: white;
    border: 1px solid rgba(26, 27, 46, 0.08);
    box-shadow: 0 8px 16px rgba(26, 27, 46, 0.06);
}

.paper-line {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: rgba(36, 95, 167, 0.18);
    margin-top: 10px;
}

.paper-line:first-child {
    margin-top: 0;
}

.paper-line-short {
    width: 72%;
}

.preview-arrow {
    position: absolute;
    right: 18px;
    top: 28px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(232, 99, 74, 0.15);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 800;
}

.mini-deck {
    position: absolute;
    right: 24px;
    bottom: 24px;
    width: 120px;
    height: 120px;
}

.mini-deck-card {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 1px solid rgba(26, 27, 46, 0.12);
}

.mini-deck-card-back {
    background: linear-gradient(135deg, #c9daf8 0%, #e6efff 100%);
    transform: rotate(-9deg) translate(-8px, 4px);
}

.mini-deck-card-front {
    background: white;
    transform: rotate(8deg);
    box-shadow: 0 12px 24px rgba(26, 27, 46, 0.1);
}

.study-card {
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
    margin-bottom: 16px;
}

.study-card-label {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
}

.study-card strong {
    display: block;
    font-size: 1.2rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.study-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.rating-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.rating-row span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 0.82rem;
    font-weight: 700;
}

.progress-ring {
    width: 130px;
    height: 130px;
    margin: 0 auto 20px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, white 0 50px, transparent 51px),
                conic-gradient(#245fa7 0 313deg, rgba(36, 95, 167, 0.14) 313deg 360deg);
    box-shadow: inset 0 0 0 1px rgba(26, 27, 46, 0.08);
}

.progress-ring span {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1b4d89;
}

.progress-bars {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    min-height: 90px;
}

.progress-bars span {
    flex: 1;
    border-radius: 10px 10px 4px 4px;
    background: linear-gradient(180deg, #8cb8ff 0%, #2f68b8 100%);
}

.preview-caption {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

/* ============================================================================
   FEATURES SECTION
   ========================================================================== */

.workflow-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 235, 228, 0.8));
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.workflow-strip {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 16px;
    align-items: center;
}

.workflow-step {
    padding: 24px;
    border-radius: 20px;
    background: white;
    border: 1px solid var(--line);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.workflow-step strong {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
}

.workflow-step p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.workflow-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    font-weight: 800;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.workflow-arrow {
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 800;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.feature-card {
    padding: 28px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card h3 {
    margin-top: 0;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================================================
   STUDY MODES SECTION
   ========================================================================== */

.modes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.mode-tile {
    padding: 28px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.mode-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.mode-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    border: none;
}

.mode-primary h3,
.mode-primary p {
    color: white;
}

.mode-accent {
    background: linear-gradient(135deg, rgba(240, 165, 0, 0.12), rgba(232, 99, 74, 0.08));
    border-color: rgba(240, 165, 0, 0.2);
}

.mode-audio {
    background: linear-gradient(135deg, rgba(107, 144, 128, 0.12), rgba(107, 144, 128, 0.08));
    border-color: rgba(107, 144, 128, 0.2);
}

.mode-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 800;
    background: var(--surface-alt);
    color: var(--primary-strong);
    margin-bottom: 16px;
}

.mode-primary .mode-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.mode-accent .mode-icon {
    background: rgba(240, 165, 0, 0.2);
    color: #d98600;
}

.mode-audio .mode-icon {
    background: rgba(107, 144, 128, 0.2);
    color: #5a7d6d;
}

.mode-tile h3 {
    margin-top: 0;
}

.mode-tile p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.mode-primary p {
    color: rgba(255, 255, 255, 0.85);
}

/* ============================================================================
   PRICING SECTION
   ========================================================================== */

.section-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.pricing-panel {
    display: grid;
    gap: 20px;
    grid-column: 1 / -1;
}

.pricing-card {
    padding: 32px;
    border-radius: 28px;
    background: var(--surface);
    border: 2px solid var(--line);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pricing-card-premium {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(232, 99, 74, 0.04), rgba(240, 165, 0, 0.04));
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 24px;
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pricing-card h3 {
    margin-top: 0;
    color: var(--ink);
}

.pricing-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.pricing-card strong {
    color: var(--ink);
}

/* ============================================================================
   SHOWCASE SECTION
   ========================================================================== */

.showcase-section {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 40px;
    align-items: center;
}

.showcase-copy {
    display: flex;
    flex-direction: column;
}

.showcase-stack {
    position: relative;
    min-height: 380px;
}

.showcase-panel {
    position: absolute;
    width: min(100%, 420px);
    padding: 28px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.showcase-panel:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.showcase-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.showcase-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
    background: var(--surface-alt);
    color: var(--primary-strong);
    margin-bottom: 12px;
}

.showcase-panel strong {
    display: block;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    color: var(--ink);
}

.showcase-panel-shift {
    top: 100px;
    left: 80px;
}

.showcase-panel-accent {
    top: 200px;
    left: 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    border: none;
}

.showcase-panel-accent strong,
.showcase-panel-accent .showcase-label {
    color: white;
}

.showcase-panel-accent .showcase-label {
    background: rgba(255, 255, 255, 0.2);
}

.showcase-panel-accent p {
    color: rgba(255, 255, 255, 0.85);
}

/* ============================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding: 40px 0 48px;
    border-top: 1px solid var(--line);
    margin-top: 40px;
}

.brand-footer {
    margin-bottom: 12px;
    display: inline-flex;
}

.footer-copy {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.footer-nav {
    display: grid;
    gap: 10px 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-nav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: var(--ink);
}

/* ============================================================================
   SHARED CARD STYLES (for content pages)
   ========================================================================== */

.content-page,
.demo-page {
    padding: 24px 0 56px;
}

.content-page h1,
.demo-page h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.content-card,
.faq-item,
.demo-panel,
.callout {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.faq-list {
    display: grid;
    gap: 16px;
}

.faq-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.faq-item h2 {
    font-size: 1.1rem;
    margin: 0 0 10px;
}

.text-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.text-link:hover {
    color: var(--primary-strong);
}

.pricing-inline-link {
    color: inherit;
    font-weight: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.16em;
}

.pricing-inline-link:hover {
    color: var(--primary-strong);
}

/* ============================================================================
   SCREENSHOTS SECTION
   ========================================================================== */

.screenshots-section {
    padding-top: 40px;
}

.screenshots-grid {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.screenshot-item {
    position: relative;
    width: 200px;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(.22,1,.36,1);
}

.screenshot-item:hover {
    transform: translateY(-8px);
}

/* Phone device frame */
.screenshot-item::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 32px;
    background: linear-gradient(145deg, #1a1b2e 0%, #2d2f45 100%);
    box-shadow:
        0 20px 50px rgba(0,0,0,0.2),
        0 8px 20px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.08);
    z-index: 0;
}

/* Notch / dynamic island */
.screenshot-item::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 18px;
    background: #1a1b2e;
    border-radius: 0 0 12px 12px;
    z-index: 2;
}

.screenshot-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 26px;
    position: relative;
    z-index: 1;
}

/* Stagger the screenshots at slight angles for visual interest */
.screenshot-item:nth-child(1) { transform: rotate(-1.5deg); }
.screenshot-item:nth-child(2) { transform: rotate(0.5deg); margin-top: 20px; }
.screenshot-item:nth-child(3) { transform: rotate(-0.8deg); }
.screenshot-item:nth-child(4) { transform: rotate(1.2deg); margin-top: 20px; }

.screenshot-item:nth-child(1):hover { transform: rotate(-1.5deg) translateY(-8px); }
.screenshot-item:nth-child(2):hover { transform: rotate(0.5deg) translateY(-8px); }
.screenshot-item:nth-child(3):hover { transform: rotate(-0.8deg) translateY(-8px); }
.screenshot-item:nth-child(4):hover { transform: rotate(1.2deg) translateY(-8px); }

@media (max-width: 900px) {
    .screenshots-grid {
        gap: 20px;
    }
    .screenshot-item {
        width: 160px;
    }
}

@media (max-width: 640px) {
    .screenshots-grid {
        gap: 12px;
    }
    .screenshot-item {
        width: calc(45% - 6px);
    }
    .screenshot-item:nth-child(1),
    .screenshot-item:nth-child(2),
    .screenshot-item:nth-child(3),
    .screenshot-item:nth-child(4) {
        transform: none;
        margin-top: 0;
    }
    .screenshot-item:nth-child(1):hover,
    .screenshot-item:nth-child(2):hover,
    .screenshot-item:nth-child(3):hover,
    .screenshot-item:nth-child(4):hover {
        transform: translateY(-4px);
    }
}

/* ============================================================================
   INVITE/SHARE LANDING PAGE STYLES
   ========================================================================== */

.invite-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px 40px;
}

.invite-card {
    width: min(760px, 100%);
    padding: 40px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 32px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
}

.invite-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    text-decoration: none;
}

.invite-brand-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(26, 27, 46, 0.15);
}

.invite-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.invite-brand-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.invite-brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.invite-title {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4.8vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.invite-lede,
.invite-note,
.invite-step {
    color: var(--muted);
}

.invite-lede {
    margin: 0 0 24px;
    font-size: 1.08rem;
}

.invite-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.invite-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.invite-fallback {
    margin-top: 12px;
}

.invite-panel-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
    margin-top: 28px;
}

.invite-panel {
    padding: 22px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: 24px;
}

.invite-panel h2,
.invite-panel h3 {
    margin: 0 0 10px;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.invite-panel h2 {
    font-size: 1.15rem;
}

.invite-panel h3 {
    font-size: 0.95rem;
}

.invite-steps {
    display: grid;
    gap: 12px;
}

.invite-step {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 12px;
    align-items: start;
}

.invite-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(232, 99, 74, 0.15), rgba(240, 165, 0, 0.1));
    color: var(--primary-strong);
    font-size: 0.88rem;
    font-weight: 800;
}

.invite-step strong {
    display: block;
    color: var(--ink);
    margin-bottom: 2px;
}

.invite-note {
    margin: 0;
    font-size: 0.92rem;
}

.invite-status {
    margin-bottom: 18px;
    color: var(--primary-strong);
    font-weight: 700;
}

.invite-status[data-state="fallback"] {
    color: var(--accent);
}

.invite-hidden {
    display: none !important;
}

/* ============================================================================
   DEMO PAGE STYLES
   ========================================================================== */

.demo-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.field-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
    color: var(--ink);
}

.notes-input {
    width: 100%;
    min-height: 320px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    resize: vertical;
}

.notes-input:focus {
    outline: 3px solid var(--primary);
    outline-offset: 0;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.output-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.empty-state {
    padding: 24px;
    border: 2px dashed var(--line);
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
}

.cards-output {
    display: grid;
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
}

.flashcard {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: var(--surface-alt);
}

.flashcard-label {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--primary-strong);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.flashcard-row + .flashcard-row {
    margin-top: 10px;
}

.flashcard-row-title {
    display: block;
    margin-bottom: 4px;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--ink);
}

.demo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.demo-panel {
    transition: all 0.2s ease;
}

.demo-panel:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 900px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        width: 100%;
        justify-content: space-between;
    }

    .site-nav a:nth-child(-n + 3) {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 0 60px;
    }

    .hero-visual {
        min-height: 380px;
    }

    .flashcard-mock {
        height: 300px;
    }

    .hero-flashcard-stack {
        max-width: 280px;
        height: 340px;
    }

    .feature-grid,
    .content-grid,
    .modes-grid,
    .preview-grid,
    .screenshots-grid {
        grid-template-columns: 1fr;
    }

    .workflow-panel {
        padding: 24px;
    }

    .workflow-strip {
        grid-template-columns: 1fr;
    }

    .workflow-arrow {
        display: none;
    }

    .preview-device-featured {
        transform: none;
    }

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

    .section-split {
        grid-template-columns: 1fr;
    }

    .showcase-section {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .showcase-stack {
        min-height: auto;
        display: grid;
        gap: 16px;
    }

    .showcase-panel,
    .showcase-panel-shift,
    .showcase-panel-accent {
        position: static;
        width: 100%;
    }

    .cta-section {
        padding: 40px;
    }

    .section {
        padding: 48px 0;
    }

    .site-footer {
        flex-direction: column;
        gap: 24px;
    }

    .footer-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .demo-layout {
        grid-template-columns: 1fr;
    }

    .invite-panel-grid {
        grid-template-columns: 1fr;
    }

    .invite-card {
        padding: 28px;
    }

    .feature-card,
    .content-card,
    .faq-item,
    .pricing-card,
    .demo-panel,
    .callout {
        padding: 24px;
    }
}

@media (max-width: 640px) {
    .modes-grid {
        grid-template-columns: 1fr;
    }

    .subject-band {
        padding: 28px 0;
    }

    .hero-actions,
    .cta-band {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .section {
        padding: 40px 0;
    }

    .hero {
        padding: 32px 0 48px;
    }

    .preview-device {
        padding: 16px;
    }

    .cta-section {
        padding: 32px;
        border-radius: 24px;
        margin: 48px 0;
    }

    .section-heading {
        margin-bottom: 24px;
    }
}
