/* === Features Page Strict Minimalist Layout === */

.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    border-bottom: 1px solid var(--border);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border);
    padding: 6px 16px;
    font-size: 0.75rem;
    color: var(--text);
    margin-bottom: 32px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--text);
    border-radius: 0;
}

.hero h1 {
    font-size: clamp(2.4rem, 5.5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -3px;
    max-width: 100%;
    width: 100%;
    margin-bottom: 24px;
}

.hero p {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--text);
    opacity: 0.7;
    max-width: 680px;
    line-height: 1.6;
    margin-bottom: 48px;
}

.features-section,
.highlight-section,
.pricing-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 32px;
    border-bottom: 1px solid var(--border);
}

.pricing-section {
    border-bottom: none;
}

.section-header {
    max-width: 700px;
    margin-bottom: 64px;
}

.section-header.text-center {
    margin: 0 auto 64px;
    text-align: center;
}

.section-header .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 16px;
    display: inline-block;
    border-bottom: 1px solid var(--text);
    padding-bottom: 4px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.1rem;
    opacity: 0.7;
}


/* ═══ FEATURES ALTERNATING ROWS ═══ */
.features-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--border);
    min-height: 480px;
}

/* Even rows: flip video to left, text to right */
.feature-row:nth-child(even) .feature-video-panel {
    order: -1;
}

.feature-content {
    padding: 60px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--border);
}

/* Even rows: content is on right, so border goes on left of video */
.feature-row:nth-child(even) .feature-content {
    border-right: none;
    border-left: 1px solid var(--border);
}

.feature-video-panel {
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    position: relative; /* anchor the tap-to-play overlay (v2.2.31) */
}

.feature-video-panel video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    cursor: pointer;
}

/* v4 — lazy-load spinner: shown over the poster while a demo video downloads.
   ::before (the tap-to-play badge uses ::after). White ring + dark halo so it
   reads on both the black panel and light poster frames. */
.feature-video-panel.video-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.25);
    animation: fvSpin 0.8s linear infinite;
    pointer-events: none;
    z-index: 3;
}
@keyframes fvSpin { to { transform: rotate(360deg); } }

/* v2.2.31 — tap-to-play affordance shown when inline autoplay was blocked
   (iOS Low Power Mode, or any case where video.play() rejected). The JS
   adds `.video-needs-tap` to the panel; we draw a B&W play badge centered
   over the video. Tapping the panel triggers another play() attempt. */
.feature-video-panel.video-needs-tap::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    line-height: 72px;
    text-align: center;
    font-size: 28px;
    color: #000;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    pointer-events: none; /* clicks fall through to the panel */
    box-shadow: 0 0 0 2px rgba(0,0,0,0.5);
}
.feature-video-panel.video-needs-tap {
    cursor: pointer;
}

/* Fullscreen video overlay */
.video-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.video-fullscreen-overlay video {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.video-fullscreen-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: 1px solid #fff;
    color: #fff;
    font-size: 20px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.video-fullscreen-close:hover {
    opacity: 1;
}

.feature-icon {
    margin-bottom: 20px;
    opacity: 0.6;
}

.feature-content h3 {
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.feature-content p {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.7;
    margin-bottom: 32px;
}

.feature-content .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.feature-content .tag {
    border: 1px solid var(--border);
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mobile: single column, video always on top */
@media (max-width: 768px) {
    .feature-row {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .feature-row:nth-child(even) .feature-video-panel {
        order: 0;
    }

    .feature-video-panel {
        order: -1;
    }

    .feature-content {
        padding: 36px 24px;
        border-right: none !important;
        border-left: none !important;
    }
}

.highlight-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 100px;
}

.highlight-row.reverse {
    direction: rtl;
}

.highlight-row.reverse>* {
    direction: ltr;
}

.highlight-content h3 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 20px;
    line-height: 1.1;
}

.highlight-visual {
    background: transparent;
    border: 1px solid var(--border);
    padding: 40px;
    min-height: 380px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
@media (max-width: 800px) {
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .pricing-grid { grid-template-columns: 1fr; }
}

.pricing-card {
    border: 1px solid var(--border);
    padding: 48px 32px;
    text-align: center;
    background: transparent;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: background 0.2s ease, color 0.2s ease;
}

.pricing-card:hover {
    background: var(--text);
    color: var(--bg);
}

.pricing-card:hover .check {
    color: var(--bg);
}

.pricing-card:hover .cross {
    color: var(--bg);
    opacity: 0.5;
}

.pricing-card:hover .btn-ghost {
    border-color: var(--bg);
    color: var(--bg);
}

.pricing-card:hover .btn-ghost:hover {
    background: var(--bg);
    color: var(--text);
}

.pricing-card.popular {
    border-width: 2px;
}

.pricing-card.popular::before {
    content: attr(data-label);
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--bg);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.pricing-card:hover.popular::before {
    background: var(--bg);
    color: var(--text);
}

.pricing-card .tier-name {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.pricing-card .price {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 8px;
}

.pricing-card .price-sub {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 40px;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    text-align: left;
    flex: 1;
}

.pricing-card li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom-color: inherit;
}

.pricing-card li:last-child {
    border-bottom: none;
}

.pricing-card .check {
    font-weight: 700;
    color: var(--text);
    transition: color 0.2s ease;
}

.pricing-card .cross {
    font-weight: 700;
    opacity: 0.3;
    color: var(--text);
    transition: color 0.2s ease, opacity 0.2s ease;
}

.pricing-card .btn {
    width: 100%;
}

/* Adjustments for Mock Visuals to match B&W */
.mock-preview {
    width: 100%;
    max-width: 280px;
    background: var(--text);
    color: var(--bg);
    border: 1px solid var(--border);
    padding: 24px;
    font-size: 11px;
    line-height: 1.8;
    font-family: 'Courier New', monospace;
    box-shadow: none;
    border-radius: 0;
}

.mock-preview .mock-chord {
    font-weight: 700;
    color: var(--bg);
}

.mock-key {
    width: 48px;
    height: 48px;
    background: transparent;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    border-radius: 0;
}

.mock-key.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.mock-session .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-left: -8px;
    background: var(--bg);
}

@media (max-width: 768px) {
    .highlight-row {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .highlight-row.reverse {
        direction: ltr;
    }
}

html[dir="rtl"] .hero-badge {
    direction: rtl;
}

html[dir="rtl"] .pricing-card ul {
    text-align: right;
}

html[dir="rtl"] .highlight-row.reverse {
    direction: ltr;
}

html[dir="rtl"] .highlight-row.reverse>* {
    direction: rtl;
}

html[dir="rtl"] .highlight-row:not(.reverse) {
    direction: rtl;
}

html[dir="rtl"] .highlight-row:not(.reverse)>* {
    direction: rtl;
}

/* Language Picker Minimalist Override */
.lang-picker {
    position: relative;
    display: inline-block;
}

.lang-picker-btn {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 11px;
    font-family: inherit;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    border-radius: 0;
}

.lang-picker-btn:hover {
    background: var(--text);
    color: var(--bg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    min-width: 140px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover,
.lang-option.active {
    background: var(--text);
    color: var(--bg);
}

.lang-option.active::after {
    content: '✓';
    font-size: 14px;
}

/* ═══ NAVBAR & LINKS (Strict B&W) ═══ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 18px 24px;
}

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

.nav-logo {
    color: var(--text);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    justify-content: center;
}

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

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s, opacity 0.2s;
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
}

.nav-cta {
    background: var(--text) !important;
    color: var(--bg) !important;
    padding: 6px 12px;
    border-radius: 0;
    font-weight: 600;
    font-size: 12px;
    border: 1px solid var(--text);
    transition: background 0.2s, color 0.2s;
}

.nav-cta:hover {
    background: transparent !important;
    color: var(--text) !important;
}

@media (max-width: 768px) {
    .nav-links a:not(.nav-cta) {
        display: none;
    }
}

/* ═══ MOCK VISUALS (Transports & Performance) ═══ */
.highlight-visual .big-icon {
    font-size: 80px;
    color: var(--border);
    opacity: 1;
    position: absolute;
    right: 20px;
    bottom: 20px;
}

.mock-keys {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    max-width: 260px;
    z-index: 10;
}

.mock-session {
    text-align: center;
    color: var(--text);
    z-index: 10;
}

.mock-session .code {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 6px;
    margin-bottom: 12px;
    font-family: inherit;
    border: 1px solid var(--border);
    padding: 10px 20px;
    background: var(--bg);
}

.mock-session .status {
    font-size: 12px;
    color: var(--text);
    opacity: 0.6;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mock-session .participants {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.mock-session .avatar {
    width: 32px;
    height: 32px;
    border-radius: 0;
    background: transparent;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}
/* ════════ TESTIMONIALS (v2.2.32) ════════
   Shared component on features.html (between How-it-works and Pricing)
   and pricing-page.html (between FAQ and CTA). Markup is identical on
   both pages — keep in sync. */

.testimonials-section {
    padding: 80px 24px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.testimonials-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.testimonials-heading {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 8px;
    text-align: center;
    color: var(--text);
}

.testimonials-sub {
    opacity: 0.6;
    text-align: center;
    margin: 0 0 40px;
    font-size: 0.95rem;
}

.testimonials-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.testimonial-card {
    border: 1px solid var(--border);
    padding: 28px 24px 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg);
}

.testimonial-quote-mark {
    font-size: 3rem;
    line-height: 1;
    opacity: 0.25;
    font-family: Georgia, 'Times New Roman', serif;
    margin-bottom: -16px;
    color: var(--text);
}

.testimonial-body {
    font-size: 1rem;
    line-height: 1.55;
    margin: 0;
    color: var(--text);
}

.testimonial-author {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.testimonial-author-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.testimonial-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.testimonial-role {
    opacity: 0.6;
    font-size: 0.85rem;
    color: var(--text);
}

/* v2.2.33 — circular avatar with grayscale photo + initials fallback.
   The <img>'s onerror handler hides it when the file is missing, which
   uncovers the .testimonial-initials span underneath. Drop a photo at
   ChordsApp/www/images/testimonials/tN.jpg to replace the initials. */
.testimonial-avatar {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--text);
    color: var(--bg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.testimonial-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* v2.2.35 — photos render in color (grayscale removed) */
    background: var(--text);
}

.testimonial-initials {
    /* Sits underneath the img; visible only when img onerror hides it.
       pointer-events:none keeps clicks landing on whatever's above. */
    pointer-events: none;
}

/* Mobile: horizontal scroll-snap carousel — no JS */
@media (max-width: 700px) {
    .testimonials-section { padding: 60px 0; }
    .testimonials-heading { padding: 0 24px; font-size: 1.5rem; }
    .testimonials-sub { padding: 0 24px; }
    .testimonials-track {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 16px;
        padding: 0 24px;
    }
    .testimonials-track::-webkit-scrollbar { display: none; }
    .testimonial-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
        min-width: 280px;
    }
}

/* RTL — when the page is in he/Hebrew dir, the quote glyph still belongs
   at the top-right (read-start) of the card. Most card content flows
   naturally via dir inheritance. */
[dir="rtl"] .testimonial-quote-mark { text-align: right; }
