/* Landing Page Styles — Dark-mode-first premium design */

/* ===== Navigation (Glass effect) ===== */
.landing-nav {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 2rem;
}

.landing-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0.75rem 0;
    width: 100%;
}

.landing-nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.landing-nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.landing-nav-link {
    color: var(--color-text-muted);
    transition: color 0.15s;
}

.landing-nav-link:hover {
    color: var(--color-text);
}

.landing-nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.875rem;
    background: var(--color-primary);
    color: #fff !important;
    border-radius: var(--radius);
    font-weight: 500;
    transition: background-color 0.15s, box-shadow 0.15s;
}

.landing-nav-cta:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    text-decoration: none;
}

/* ===== Hero ===== */
.landing-hero {
    text-align: center;
    padding: 4.5rem 2rem 3.5rem;
    background:
        radial-gradient(ellipse 600px 400px at 50% 30%, rgba(59, 130, 246, 0.15), transparent),
        linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg) 100%);
    border-bottom: 1px solid var(--color-border);
}

.landing-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--color-text);
    max-width: 750px;
    margin: 0 auto 1.25rem;
}

.landing-hero-accent {
    color: var(--color-primary);
}

.landing-hero p {
    font-size: 1.1875rem;
    color: var(--color-text-muted);
    max-width: 540px;
    margin: 0 auto 0;
    line-height: 1.7;
}

/* ===== Buttons ===== */
.landing-btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, box-shadow 0.25s;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
}

.landing-btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
    text-decoration: none;
}

.landing-btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, background-color 0.15s;
}

.landing-btn-secondary:hover {
    border-color: var(--color-text-muted);
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

/* ===== Feature Sections Layout ===== */
.feature-section {
    padding: 6rem 2rem;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
}

.feature-section-alt {
    background: rgba(17, 24, 39, 0.3);
}

.feature-inner {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-inner-reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1;
    min-width: 0;
}

.feature-visual {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
}

.feature-text h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.feature-text p {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    max-width: 420px;
}

/* Text entrance animation */
.feature-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-section.visible .feature-text {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Feature 1: Save — Browser with Extension Popup ===== */
.save-browser {
    width: 100%;
    max-width: 380px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(59, 130, 246, 0.08);
    overflow: visible;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.feature-section.visible .save-browser {
    opacity: 1;
    transform: translateY(0);
}

.save-browser-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 0.875rem;
    background: rgba(17, 24, 39, 0.6);
    border-bottom: 1px solid var(--color-border);
    border-radius: 10px 10px 0 0;
}

.save-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #374151;
}

.save-dot:first-child { background: #ef4444; }
.save-dot:nth-child(2) { background: #eab308; }
.save-dot:nth-child(3) { background: #22c55e; }

.save-url {
    margin-left: 8px;
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.save-browser-body {
    padding: 1rem;
}

.save-article-title {
    height: 10px;
    width: 70%;
    background: var(--color-text-muted);
    border-radius: 4px;
    margin-bottom: 14px;
    opacity: 0.3;
}

.save-article-line {
    height: 4px;
    width: 100%;
    background: rgba(156, 163, 175, 0.15);
    border-radius: 2px;
    margin-bottom: 8px;
}

.save-line-short { width: 60%; }
.save-line-medium { width: 80%; }

/* Extension popup */
.save-popup {
    position: absolute;
    top: 46px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
}

.feature-section.visible .save-popup {
    animation: popupSlideDown 0.4s ease 0.9s forwards;
}

.save-popup-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: #fff;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.save-popup-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.save-popup-check {
    color: #22c55e;
    opacity: 0;
    display: flex;
    flex-shrink: 0;
}

.feature-section.visible .save-popup-check {
    animation: checkAppear 0.4s ease 1.6s forwards;
}

/* ===== Feature 2: Read — Phone Mockup ===== */
.read-phone {
    width: 180px;
    background: #1a1a1a;
    border-radius: 24px;
    padding: 10px 10px 14px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.feature-section.visible .read-phone {
    opacity: 1;
    transform: translateY(0);
}

.read-phone-notch {
    width: 40%;
    height: 4px;
    background: #333;
    border-radius: 4px;
    margin: 0 auto 8px;
}

.read-phone-screen {
    background: #111827;
    border-radius: 12px;
    padding: 14px 12px;
    min-height: 220px;
}

.read-phone-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #e5e7eb;
    margin-bottom: 0.2rem;
    line-height: 1.3;
    opacity: 0;
}

.feature-section.visible .read-phone-title {
    animation: fadeIn 0.4s ease 0.6s forwards;
}

.read-phone-meta {
    font-size: 0.55rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    opacity: 0;
}

.feature-section.visible .read-phone-meta {
    animation: fadeIn 0.4s ease 0.7s forwards;
}

.read-phone-hr {
    height: 1px;
    background: rgba(75, 85, 99, 0.4);
    margin-bottom: 0.6rem;
    opacity: 0;
}

.feature-section.visible .read-phone-hr {
    animation: fadeIn 0.4s ease 0.8s forwards;
}

.read-phone-line {
    height: 3px;
    width: 100%;
    background: rgba(156, 163, 175, 0.25);
    border-radius: 2px;
    margin-bottom: 6px;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
}

.feature-section.visible .read-phone-line:nth-child(4) { animation: lineGrow 0.4s ease 0.9s forwards; }
.feature-section.visible .read-phone-line:nth-child(5) { animation: lineGrow 0.4s ease 1.0s forwards; }
.feature-section.visible .read-phone-line:nth-child(6) { animation: lineGrow 0.4s ease 1.1s forwards; }
.feature-section.visible .read-phone-line:nth-child(7) { animation: lineGrow 0.4s ease 1.2s forwards; }
.feature-section.visible .read-phone-line:nth-child(8) { animation: lineGrow 0.4s ease 1.3s forwards; }
.feature-section.visible .read-phone-line:nth-child(9) { animation: lineGrow 0.4s ease 1.4s forwards; }
.feature-section.visible .read-phone-line:nth-child(10) { animation: lineGrow 0.4s ease 1.5s forwards; }
.feature-section.visible .read-phone-line:nth-child(11) { animation: lineGrow 0.4s ease 1.6s forwards; }

.read-line-short { width: 65%; }
.read-line-medium { width: 80%; }

/* Progress bar */
.read-phone-progress {
    margin-top: 10px;
    height: 3px;
    background: rgba(75, 85, 99, 0.3);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
}

.feature-section.visible .read-phone-progress {
    animation: fadeIn 0.3s ease 1.2s forwards;
}

.read-phone-progress-fill {
    height: 100%;
    width: 0;
    background: var(--color-primary);
    border-radius: 2px;
}

.feature-section.visible .read-phone-progress-fill {
    animation: progressFill 2s ease 1.4s forwards;
}

/* ===== Feature 3: E-Paper — E-Reader Mockup ===== */
.epaper-device {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.feature-section.visible .epaper-device {
    opacity: 1;
    transform: translateY(0);
}

.epaper-bezel {
    width: 240px;
    background: #1a1a1a;
    border-radius: 18px;
    padding: 16px 14px 22px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.epaper-screen {
    background: #f5f0e8;
    border-radius: 4px;
    padding: 16px 14px;
    min-height: 220px;
    position: relative;
    overflow: hidden;
}

/* E-ink flash effect */
.epaper-flash {
    position: absolute;
    inset: 0;
    background: #222;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.feature-section.visible .epaper-flash {
    animation: einkFlash 0.6s ease 0.7s;
}

.epaper-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    opacity: 0;
}

.feature-section.visible .epaper-title {
    animation: fadeIn 0.3s ease 1.0s forwards;
}

.epaper-author {
    font-size: 0.6rem;
    color: #6b7280;
    margin-bottom: 0.6rem;
    opacity: 0;
}

.feature-section.visible .epaper-author {
    animation: fadeIn 0.3s ease 1.1s forwards;
}

.epaper-hr {
    height: 1px;
    background: #d1c9b8;
    margin-bottom: 0.7rem;
    opacity: 0;
}

.feature-section.visible .epaper-hr {
    animation: fadeIn 0.3s ease 1.15s forwards;
}

.epaper-line {
    height: 3px;
    background: #c4bba8;
    border-radius: 2px;
    margin-bottom: 6px;
    width: 100%;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
}

.epaper-short { width: 60%; }
.epaper-medium { width: 80%; }

.feature-section.visible .epaper-line-1 { animation: einkLineGrow 0.5s ease 1.2s forwards; }
.feature-section.visible .epaper-line-2 { animation: einkLineGrow 0.5s ease 1.35s forwards; }
.feature-section.visible .epaper-line-3 { animation: einkLineGrow 0.5s ease 1.5s forwards; }
.feature-section.visible .epaper-line-4 { animation: einkLineGrow 0.5s ease 1.65s forwards; }
.feature-section.visible .epaper-line-5 { animation: einkLineGrow 0.5s ease 1.8s forwards; }
.feature-section.visible .epaper-line-6 { animation: einkLineGrow 0.5s ease 1.95s forwards; }

/* ===== Feature 4: Tags — Article Cards with Tag Pills ===== */
.tags-demo {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tags-card {
    padding: 0.875rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(-20px);
}

.feature-section.visible .tags-card-1 {
    animation: cardSlideIn 0.5s ease 0.3s forwards;
}

.feature-section.visible .tags-card-2 {
    animation: cardSlideIn 0.5s ease 0.5s forwards;
}

.feature-section.visible .tags-card-3 {
    animation: cardSlideIn 0.5s ease 0.7s forwards;
}

.tags-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.15rem;
}

.tags-card-meta {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.tags-card-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag-pill {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0;
    transform: translateX(10px);
}

/* Staggered tag pill animations */
.feature-section.visible .tags-card-1 .tag-pill:nth-child(1) { animation: tagSlideIn 0.3s ease 0.9s forwards; }
.feature-section.visible .tags-card-1 .tag-pill:nth-child(2) { animation: tagSlideIn 0.3s ease 1.05s forwards; }
.feature-section.visible .tags-card-2 .tag-pill:nth-child(1) { animation: tagSlideIn 0.3s ease 1.1s forwards; }
.feature-section.visible .tags-card-2 .tag-pill:nth-child(2) { animation: tagSlideIn 0.3s ease 1.25s forwards; }
.feature-section.visible .tags-card-3 .tag-pill:nth-child(1) { animation: tagSlideIn 0.3s ease 1.3s forwards; }
.feature-section.visible .tags-card-3 .tag-pill:nth-child(2) { animation: tagSlideIn 0.3s ease 1.45s forwards; }

/* Tag color variants */
.tag-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.tag-purple { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.tag-green { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.tag-orange { background: rgba(249, 115, 22, 0.2); color: #fb923c; }
.tag-pink { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.tag-cyan { background: rgba(6, 182, 212, 0.2); color: #22d3ee; }

/* ===== Feature 5: Highlights — Text with Marker & Note ===== */
.hl-demo {
    width: 100%;
    max-width: 340px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.hl-page {
    flex: 1;
    min-width: 0;
    padding: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.feature-section.visible .hl-page {
    opacity: 1;
    transform: translateY(0);
}

.hl-line {
    height: 4px;
    width: 100%;
    background: rgba(156, 163, 175, 0.2);
    border-radius: 2px;
    margin-bottom: 8px;
    position: relative;
}

.hl-line-short { width: 55%; }
.hl-line-medium { width: 75%; }

/* Highlight marker overlay */
.hl-marked {
    overflow: hidden;
}

.hl-marker {
    position: absolute;
    inset: -1px 0;
    background: rgba(250, 204, 21, 0.5);
    border-radius: 2px;
    transform-origin: left;
    transform: scaleX(0);
}

.feature-section.visible .hl-marked:nth-child(3) .hl-marker {
    animation: highlightSweep 0.6s ease 1.0s forwards;
}

.feature-section.visible .hl-marked:nth-child(4) .hl-marker {
    animation: highlightSweep 0.6s ease 1.2s forwards;
}

/* Sticky note */
.hl-note {
    width: 110px;
    flex-shrink: 0;
    padding: 0.75rem;
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.25);
    border-radius: 8px;
    margin-top: 2rem;
    opacity: 0;
    transform: translateX(15px);
}

.feature-section.visible .hl-note {
    animation: noteSlideIn 0.4s ease 1.6s forwards;
}

.hl-note-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: #facc15;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hl-note-line {
    height: 3px;
    width: 100%;
    background: rgba(250, 204, 21, 0.2);
    border-radius: 2px;
    margin-bottom: 5px;
}

.hl-note-line-short { width: 65%; }

/* ===== Keyframes ===== */

/* Generic fade in */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Save popup slides down */
@keyframes popupSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Check mark appears with a pop */
@keyframes checkAppear {
    0%   { opacity: 0; transform: scale(0.5); }
    60%  { opacity: 1; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* Line grows from left */
@keyframes lineGrow {
    from {
        opacity: 0;
        transform: scaleX(0);
    }
    to {
        opacity: 0.7;
        transform: scaleX(1);
    }
}

/* Progress bar fills */
@keyframes progressFill {
    from { width: 0; }
    to   { width: 65%; }
}

/* E-ink screen flash */
@keyframes einkFlash {
    0%   { opacity: 0; }
    20%  { opacity: 0.8; }
    50%  { opacity: 0.6; }
    70%  { opacity: 0.3; }
    100% { opacity: 0; }
}

/* E-ink line appears with slight stutter (e-ink feel) */
@keyframes einkLineGrow {
    0%   { opacity: 0; transform: scaleX(0); }
    40%  { opacity: 0.5; transform: scaleX(0.6); }
    60%  { opacity: 0.5; transform: scaleX(0.6); }
    100% { opacity: 0.7; transform: scaleX(1); }
}

/* Card slides in from left */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Tag pill slides in from right */
@keyframes tagSlideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Highlight marker sweeps across */
@keyframes highlightSweep {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* Note slides in from right */
@keyframes noteSlideIn {
    from {
        opacity: 0;
        transform: translateX(15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Final CTA ===== */
.landing-cta {
    text-align: center;
    padding: 5rem 2rem;
    background:
        radial-gradient(ellipse 500px 300px at 50% 80%, rgba(59, 130, 246, 0.1), transparent),
        var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.landing-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: 0.625rem;
}

.landing-cta p {
    font-size: 1.0625rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

/* ===== Footer ===== */
.landing-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--color-border);
}

.landing-footer a {
    color: var(--color-text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.landing-footer a:hover {
    color: var(--color-text);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .landing-nav {
        padding: 0 1rem;
    }

    .landing-hero {
        padding: 4rem 1.25rem 3rem;
    }

    .landing-hero h1 {
        font-size: 2.25rem;
    }

    .landing-hero p {
        font-size: 1rem;
    }

    .feature-section {
        padding: 3.5rem 1.25rem;
    }

    .feature-inner,
    .feature-inner-reverse {
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
    }

    .feature-text p {
        max-width: none;
    }

    /* Visual sizing on mobile */
    .save-browser {
        max-width: 100%;
    }

    .read-phone {
        width: 160px;
    }

    .read-phone-screen {
        min-height: 180px;
    }

    .epaper-bezel {
        width: 200px;
    }

    .epaper-screen {
        min-height: 180px;
    }

    .tags-demo {
        max-width: 100%;
    }

    .hl-demo {
        max-width: 100%;
        min-width: 280px;
    }

    .hl-page {
        min-width: 160px;
    }

    .feature-text h2 {
        font-size: 1.5rem;
    }

    .landing-cta {
        padding: 3rem 1.25rem;
    }

    .landing-cta h2 {
        font-size: 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .feature-inner {
        gap: 2.5rem;
    }

    .feature-text h2 {
        font-size: 1.75rem;
    }

    .save-browser {
        max-width: 320px;
    }

    .epaper-bezel {
        width: 210px;
    }
}
