/* Landing Page Styles — Cryptic Trainer */

/* ===== Reset & Base (matching crossword.css tokens) ===== */
* { box-sizing: border-box; }

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background-color: #f5f5f0;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1, h2, h3 { color: #1a1a1a; font-weight: normal; }

a { color: #2c5aa0; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Buttons (matching crossword.css .btn pattern) ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-family: inherit;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}
.btn:hover { text-decoration: none; }

.btn-primary {
    background-color: #2c5aa0;
    color: white;
}
.btn-primary:hover {
    background-color: #1e4080;
}

.btn-hero {
    background-color: #e86830;
    color: white;
    font-size: 1.2rem;
    padding: 16px 36px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(232, 104, 48, 0.3);
}
.btn-hero:hover {
    background-color: #d45a25;
    box-shadow: 0 6px 20px rgba(232, 104, 48, 0.4);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #2c5aa0;
    border: 2px solid #2c5aa0;
}
.btn-outline:hover {
    background: #2c5aa0;
    color: white;
}

/* ===== Navigation ===== */
.landing-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 245, 240, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #ddd;
    padding: 0 20px;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    font-size: 1.3rem;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: bold;
}
.nav-logo:hover { text-decoration: none; color: #2c5aa0; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-links a {
    font-size: 0.9rem;
    color: #555;
}
.nav-links a:hover { color: #2c5aa0; }
.nav-links .btn { font-size: 0.85rem; padding: 8px 16px; }

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-hamburger svg { display: block; }

/* ===== Hero Section ===== */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 60px;
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-content {
    flex: 1;
    max-width: 560px;
}

.hero h1 {
    font-size: 2.8rem;
    line-height: 1.15;
    margin: 0 0 20px;
    color: #1a1a1a;
}

.hero-sub {
    font-size: 1.15rem;
    color: #555;
    margin: 0 0 32px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-puzzles {
    font-size: 1.2rem;
    padding: 16px 36px;
    border-radius: 8px;
    background: transparent;
    color: #2c5aa0;
    border: 2.5px solid #2c5aa0;
    font-weight: bold;
}
.btn-puzzles:hover {
    background: #2c5aa0;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(44, 90, 160, 0.3);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-visual svg {
    width: 100%;
    max-width: 420px;
    height: auto;
}

/* ===== Section Shared ===== */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-narrow {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section h2 {
    font-size: 1.8rem;
    text-align: center;
    margin: 0 0 12px;
}

.section-intro {
    text-align: center;
    color: #555;
    font-size: 1.05rem;
    margin: 0 auto 40px;
    max-width: 600px;
}

/* ===== Problem Statement ===== */
.problem {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px 20px;
    text-align: center;
}
.problem h2 {
    font-size: 1.6rem;
    line-height: 1.3;
    margin: 0 0 16px;
}
.problem p {
    font-size: 1.05rem;
    color: #555;
}

/* ===== How It Works (3 cards) ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.step-card {
    background: white;
    border-radius: 8px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.step-card .step-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: #2c5aa0;
}
.step-card .step-icon svg {
    width: 100%;
    height: 100%;
}

.step-card .step-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    border-radius: 50%;
    background: #2c5aa0;
    color: white;
    font-size: 0.85rem;
    font-weight: bold;
    font-family: system-ui, sans-serif;
    margin-bottom: 12px;
}

.step-card h3 {
    font-size: 1.15rem;
    margin: 0 0 8px;
}
.step-card p {
    font-size: 0.95rem;
    color: #555;
    margin: 0;
}

/* ===== Try It (Demo Section) ===== */
.try-it {
    max-width: 740px;
    margin: 0 auto;
    padding: 60px 20px;
}

.try-it h2 {
    text-align: center;
    margin: 0 0 8px;
}

.try-it .section-intro {
    margin-bottom: 24px;
}

.demo-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    overflow: hidden;
}

.demo-header {
    background: #2c5aa0;
    color: white;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.demo-clue-number {
    font-weight: bold;
    font-family: system-ui, sans-serif;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

.demo-loading {
    padding: 40px;
    text-align: center;
    color: #888;
}

.demo-error {
    padding: 40px;
    text-align: center;
    color: #dc3545;
}

.demo-complete {
    text-align: center;
    padding: 30px 20px;
    background: #f0fdf4;
    border-radius: 8px;
    margin-top: 24px;
}
.demo-complete p {
    font-size: 1.1rem;
    color: #166534;
    margin: 0 0 16px;
}
.demo-complete.hidden { display: none; }

/* ===== Clue Types (6 cards in 3x2) ===== */
.types-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.type-card {
    background: white;
    border-radius: 8px;
    padding: 24px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
}

.type-card .type-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: #2c5aa0;
}
.type-card .type-icon svg {
    width: 100%;
    height: 100%;
}

.type-card h3 {
    font-size: 1.05rem;
    margin: 0 0 6px;
    color: #2c5aa0;
}
.type-card p {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

/* ===== FAQ ===== */
.faq-section {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 20px;
}

.faq-section h2 {
    text-align: center;
    margin: 0 0 32px;
}

.faq-list details {
    border-bottom: 1px solid #ddd;
    padding: 16px 0;
}
.faq-list details:first-child {
    border-top: 1px solid #ddd;
}

.faq-list summary {
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: bold;
    color: #1a1a1a;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
    content: '+';
    font-size: 1.3rem;
    color: #888;
    transition: transform 0.2s;
    font-weight: normal;
}
.faq-list details[open] summary::after {
    content: '\2212';
}

.faq-list details p {
    margin: 12px 0 4px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Footer ===== */
.landing-footer {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    border-top: 1px solid #ddd;
    font-size: 0.85rem;
    margin-top: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 800px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
        gap: 40px;
    }
    .hero-content { max-width: 100%; }
    .hero h1 { font-size: 2.2rem; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }

    .hero-visual svg { max-width: 300px; }

    .steps-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
    .types-grid { grid-template-columns: repeat(2, 1fr); }

    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #f5f5f0;
        border-bottom: 1px solid #ddd;
        padding: 16px 20px;
        gap: 16px;
    }
    .nav-hamburger { display: block; }
}

@media (max-width: 600px) {
    .hero h1 { font-size: 1.8rem; }
    .hero-sub { font-size: 1rem; }
    .btn-hero { font-size: 1.05rem; padding: 14px 28px; }

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

    .section, .section-narrow, .try-it, .faq-section, .problem {
        padding-left: 16px;
        padding-right: 16px;
    }
}
