/* ======================================
   Homepage-specific styles
   ====================================== */

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 24px 80px;
    background: linear-gradient(180deg, #0a0a0a 0%, #111 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(139, 123, 247, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 32px;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -2px;
    line-height: 1.1;
    max-width: 700px;
}

.hero h1 .highlight {
    color: var(--accent-purple);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 550px;
    margin-bottom: 40px;
}

.hero-input-form {
    width: 100%;
    max-width: 580px;
}

.hero-labs-link {
    margin-top: 16px;
    font-size: 16px;
    color: var(--text-secondary);
}

.hero-labs-link a {
    color: var(--accent-purple);
    text-decoration: none;
}

.hero-labs-link a:hover {
    text-decoration: underline;
}

.hero-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.hero-input {
    flex: 1;
    min-width: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-purple);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 18px;
    padding: 16px 64px 16px 20px;
    min-height: 56px;
    box-shadow: 0 0 30px rgba(139, 123, 247, 0.35);
}

.hero-input:focus {
    outline: none;
}

.hero-input::placeholder {
    color: #666;
}

.hero-input-btn {
    position: absolute;
    right: 8px;
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 10px;
    min-width: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-input-btn:hover:not(:disabled) {
    background: #333;
}

.hero-input-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hero-scroll span {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(5px);
    }
}

/* Feature Rows (alternating image + text) */
.features {
    background: var(--bg-primary);
    padding: 40px 24px;
}

.features-content {
    max-width: 1100px;
    margin: 0 auto;
}

.feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
    padding: 60px 0;
}

.feature--reverse .feature-media {
    order: 2;
}

.feature-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    object-fit: cover;
}

/* App screenshots: transparent phone mockups with their own rounded corners */
.feature-img--screenshot {
    width: auto;
    height: auto;
    aspect-ratio: auto;
    max-width: 100%;
    max-height: 560px;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 0;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.4)) drop-shadow(0 18px 40px rgba(0, 0, 0, 0.5));
}

/* Graphite device frame and a soft glow, so dark screenshots stand off a dark page */
.feature-media--phone {
    position: relative;
    display: flex;
    justify-content: center;
}

.feature-media--phone::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(139, 123, 247, 0.36) 0%, rgba(139, 123, 247, 0.1) 40%, transparent 70%);
    pointer-events: none;
}

.phone-frame {
    position: relative;
    width: min(259px, 100%);
    padding: 8px;
    border-radius: 52px;
    background: linear-gradient(150deg, #6b6b72 0%, #3a3a3f 22%, #26262a 50%, #3a3a3f 78%, #5c5c63 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.18),
        inset 0 0 0 3px #111113,
        0 0 0 1px rgba(0, 0, 0, 0.8),
        0 30px 60px -12px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(139, 123, 247, 0.15);
}

.phone-frame .feature-img--screenshot {
    width: 100%;
    max-height: none;
    border-radius: 44px;
    background: #0b0b0d;
    filter: none;
}

.feature-icon {
    display: inline-flex;
    margin-bottom: 24px;
}

.feature-icon svg {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.feature-icon--purple svg {
    stroke: var(--accent-purple);
}

.feature-icon--green svg {
    stroke: var(--accent-green);
}

.feature-text h2 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}

.feature-text p {
    font-size: 19px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 480px;
}

.feature-text p + p {
    margin-top: 20px;
}

/* Scroll-reveal; index.js adds .is-animated */
.features.is-animated .feature {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.features.is-animated .feature.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .features.is-animated .feature {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Why Section */
.why {
    padding: 100px 24px;
    background: var(--bg-secondary);
}

.why-content {
    max-width: 1100px;
    margin: 0 auto;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.why-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid #333;
    text-align: center;
}

.why-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.why-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.why-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Trust Section */
.trust {
    padding: 100px 24px;
    background: var(--bg-primary);
}

.trust-content {
    max-width: 1100px;
    margin: 0 auto;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.trust-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid #333;
    text-align: center;
}

.trust-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.trust-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.trust-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Testimonials Section */
.testimonials {
    padding: 100px 24px;
    background: var(--bg-primary);
}

.testimonials-content {
    max-width: 1100px;
    margin: 0 auto;
}

.testimonials-eyebrow {
    display: inline-block;
    color: var(--accent-purple);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.testimonials .section-header h2 {
    margin-bottom: 12px;
}

.testimonials .section-header p {
    font-size: 16px;
    color: var(--text-secondary);
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
}

.testimonials-carousel {
    column-count: 3;
    column-gap: 16px;
    max-width: 1052px;
    margin-top: 60px;
    margin-left: auto;
    margin-right: auto;
}

.testimonials-card {
    background: var(--bg-card-light);
    border: 0;
    border-radius: 1.2em;
    corner-shape: squircle;
    color: var(--text-on-light);
    break-inside: avoid;
    display: inline-block;
    margin-bottom: 10px;
    width: 100%;
    overflow: hidden;
}

.testimonials-card-quote {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    max-width: 340px;
    padding: 20px 30px 26px 21px;
}

.testimonials-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-on-light);
    line-height: 1.3;
}

.testimonials-details {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.3;
}

.testimonials-text {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(22px, 2.1vw, 30px);
    font-weight: 400;
    color: var(--text-on-light);
    line-height: 1.28;
    margin: 0;
}

@supports not (corner-shape: squircle) {
    .testimonials-card {
        border-radius: 0.7em;
        border: 0;
        mask-image:
            url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="m0,1 c0,-1 0,-1 1,-1 l99,0 l0,100 l-100,0 Z"/></svg>'),
            url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="m0,0 l99,0 c1,0 1,0 1,1 l0,99 l-100,0 l0,-100 Z"/></svg>'),
            url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="m0,0 l100,0 l0,99 c0,1 -0,1 -1,1 l-99,0 Z"/></svg>'),
            url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="m0,0 l100,0 l0,100 l-99,0 c-1,0 -1,-0 -1,-1 Z"/></svg>');
        mask-position:
            top left,
            top right,
            bottom right,
            bottom left;
        mask-size: 120em, 120em, 120em, 120em;
        mask-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
        mask-composite: intersect, intersect, intersect, intersect;
    }
}

/* Tariffs Section */
.tariffs {
    padding: 100px 24px;
    background: var(--bg-secondary);
    overflow: hidden;
}

.tariffs-content {
    max-width: 1100px;
    margin: 0 auto;
}

.tariffs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 60px;
    /* Equal-height cards; with .tariff-body's flex: 1 the buy buttons line up */
    align-items: stretch;
}

.tariffs-note {
    margin-top: 24px;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* CTA Section */
.cta-section {
    padding: 100px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(191, 255, 0, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.cta-content h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.cta-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-green);
    color: #000;
    padding: 16px 32px;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(191, 255, 0, 0.3);
}

/* App store badges inside the hero (hidden for iOS server-side) */
.hero-app-badges {
    margin-top: 40px;
}

.hero-app-badges .app-badge {
    padding: 8px 18px;
}

/* Responsive Design */
@media (max-width: 900px) {
    .feature {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 64px 0;
    }

    /* Flatten the text block: icon -> title -> image -> description */
    .feature-text {
        display: contents;
    }

    .feature-icon {
        order: 1;
    }

    .feature-media,
    .feature--reverse .feature-media {
        order: 3;
        margin-bottom: 32px;
    }

    .feature-text h2 {
        order: 2;
        font-size: 34px;
        letter-spacing: -1px;
        margin-bottom: 32px;
    }

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

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

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

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

    .testimonials-carousel {
        column-count: 2;
        max-width: 696px;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 100px 20px 60px;
    }

    .features {
        padding: 20px;
    }

    .feature {
        padding: 56px 0;
    }

    .feature-text h2 {
        font-size: 28px;
    }

    .feature-text p {
        font-size: 17px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .why {
        padding: 60px 20px;
    }

    .trust {
        padding: 60px 20px;
    }

    .tariffs {
        padding: 60px 20px;
    }

    .testimonials {
        padding: 60px 20px;
    }

    .testimonials-carousel {
        column-count: 1;
        max-width: 340px;
        margin-top: 40px;
    }

    .testimonials-card-quote {
        min-height: 300px;
    }

    .cta-section {
        padding: 60px 20px;
    }

    .cta-content h2 {
        font-size: 28px;
    }

    /* Compact one-line badges: icon + store name, side by side */
    .hero-app-badges {
        margin-top: 28px;
    }

    .hero-app-badges .app-badges {
        flex-wrap: nowrap;
        gap: 12px;
    }

    .hero-app-badges .app-badge {
        min-width: 0;
        padding: 8px 14px;
        gap: 8px;
        border-radius: 10px;
    }

    .hero-app-badges .app-badge-icon img {
        height: 20px;
    }

    .hero-app-badges .app-badge-top {
        display: none;
    }

    .hero-app-badges .app-badge-bottom {
        font-size: 15px;
    }
}

/* Tighter vertical rhythm on phones */
@media (max-width: 600px) {
    .features {
        padding: 0 20px;
    }

    .feature {
        padding: 32px 0;
    }

    .feature-icon {
        margin-bottom: 16px;
    }

    .feature-text h2 {
        margin-bottom: 20px;
    }

    .feature-media,
    .feature--reverse .feature-media {
        margin-bottom: 24px;
    }

    .why,
    .trust,
    .tariffs,
    .testimonials,
    .cta-section {
        padding: 40px 20px;
    }

    .section-header {
        margin-bottom: 32px;
    }

    .tariffs-grid {
        margin-top: 32px;
    }

    .testimonials-card-quote {
        min-height: 0;
    }
}
