/* ============================================
   PRODUCT PAGES
   ============================================ */

/* ============================================
   PRODUCT STORY SECTIONS
   ============================================ */

.product-story {
    display: flex;
    flex-direction: column;
    gap: 6rem;
    padding: 4rem 0;
    counter-reset: story-step;
}

.story-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
}

.story-block:nth-child(even) .story-content {
    order: 1;
}

/* Swirling connectors between story sections */
.story-block:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 6rem;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60% 100%;
}

/* Odd blocks: visual on right, arrow curves right-to-left */
.story-block:nth-child(odd):not(:last-child)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100'%3E%3Ccircle cx='300' cy='4' r='4' fill='%2310b981' opacity='0.3'/%3E%3Cpath d='M300,4 C300,55 100,45 100,82 L100,92' stroke='%2310b981' stroke-width='2' stroke-dasharray='10 8' fill='none' opacity='0.25' stroke-linecap='round'/%3E%3Cpath d='M94,86 L100,98 L106,86' stroke='%2310b981' stroke-width='2' fill='none' opacity='0.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Even blocks: visual on left, arrow curves left-to-right */
.story-block:nth-child(even):not(:last-child)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100'%3E%3Ccircle cx='100' cy='4' r='4' fill='%2310b981' opacity='0.3'/%3E%3Cpath d='M100,4 C100,55 300,45 300,82 L300,92' stroke='%2310b981' stroke-width='2' stroke-dasharray='10 8' fill='none' opacity='0.25' stroke-linecap='round'/%3E%3Cpath d='M294,86 L300,98 L306,86' stroke='%2310b981' stroke-width='2' fill='none' opacity='0.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.story-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background: var(--accent-primary-dim);
    border: 1px solid var(--border-accent);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.story-label::before {
    counter-increment: story-step;
    content: counter(story-step, decimal-leading-zero);
    font-variant-numeric: tabular-nums;
    opacity: 0.6;
}

.story-content h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.story-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.story-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-svg {
    width: 100%;
    max-width: 480px;
    height: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

/* Story section in light-alt context */
.section-light-alt .story-svg {
    border-color: var(--border-light-default);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

@media (max-width: 1024px) {
    .product-story {
        gap: 4rem;
        padding: 2rem 0;
    }

    .story-block {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .story-block:nth-child(even) .story-content {
        order: 0;
    }

    .story-visual {
        order: -1;
    }

    .story-content p {
        max-width: 560px;
        margin: 0 auto;
    }

    /* Hide swirl connectors on single-column layout */
    .story-block:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .product-story {
        gap: 3rem;
    }

    .story-content h2 {
        font-size: 1.5rem;
    }

    .story-content p {
        font-size: 1rem;
    }
}

/* Product Hero - Two-column layout */
.product-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
    padding: 7rem 0 6rem;
}

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

.product-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent-primary-dim);
    border: 1px solid var(--border-accent);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.product-hero-content h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(2.25rem, 5vw, 3.5rem);
}

.product-hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.product-hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-hero-visual .browser-frame {
    width: 100%;
    max-width: 540px;
}

.product-hero-visual .browser-content {
    min-height: 360px;
}

/* Benefits Strip */
.benefits-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.benefit-card {
    background: var(--bg-surface);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    text-align: center;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.benefit-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary-dim);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
}

.benefit-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-primary);
}

.benefit-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.benefit-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Use Cases */
.use-case-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.use-case-card {
    background: var(--bg-surface);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    text-align: center;
    transition: all 0.3s ease;
}

.use-case-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.use-case-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary-dim);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
}

.use-case-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--accent-primary);
}

.use-case-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.use-case-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Product page responsive */
@media (max-width: 1024px) {
    .product-hero {
        grid-template-columns: 1fr;
        text-align: center;
        min-height: auto;
        padding: 3rem 0 4rem;
    }

    .product-hero-content {
        max-width: 100%;
    }

    .product-hero-desc {
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }

    .product-hero .hero-cta {
        justify-content: center;
    }

    .product-hero-visual {
        order: -1;
    }

    .benefits-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .use-case-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-hero {
        padding: 2rem 0 3rem;
    }

    .benefits-strip {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .use-case-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .benefits-strip {
        grid-template-columns: 1fr;
    }

    .use-case-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PRODUCT PAGE ENHANCEMENTS
   ============================================ */

/* Customer Testimonial Section */
.product-testimonial {
    padding: 3rem 4rem;
    background: var(--bg-light-surface);
    border: 1px solid var(--border-light-subtle);
    border-radius: var(--radius-xl);
    text-align: center;
}

.testimonial-quote {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    position: relative;
}

.testimonial-quote::before {
    content: '"';
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    font-family: Georgia, serif;
    color: var(--accent-primary);
    opacity: 0.3;
    line-height: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.testimonial-info {
    text-align: left;
}

.testimonial-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.125rem;
}

.testimonial-position {
    font-size: 0.9rem;
    color: var(--text-dark-muted);
}

/* Product Testimonial Carousel */
.product-testimonial .testimonial-carousel {
    position: relative;
    min-height: 200px;
}

.product-testimonial .testimonial-slide {
    display: none;
    padding: 1rem 0;
}

.product-testimonial .testimonial-slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Product testimonial carousel - overrides for smaller variant */
.product-testimonial .carousel-prev,
.product-testimonial .carousel-next {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border-color: var(--border-light-default);
}

.product-testimonial .carousel-prev:hover,
.product-testimonial .carousel-next:hover {
    background: var(--bg-light-surface);
}

.product-testimonial .carousel-prev svg,
.product-testimonial .carousel-next svg {
    color: var(--text-dark-secondary);
}

.product-testimonial .carousel-dot {
    background: var(--border-light-default);
}

.product-testimonial .carousel-dot:hover {
    background: var(--text-dark-muted);
}

/* FAQ Section */

.product-faq .section-header {
    margin-bottom: 2.5rem;
}

.product-faq .faq-list {
    display: grid;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq-item:hover,
.faq-item.is-open {
    border-color: var(--border-accent);
}

.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.faq-trigger:hover {
    background: var(--bg-hover);
}

.faq-arrow {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.is-open .faq-arrow {
    transform: rotate(180deg);
}

.faq-item .faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.is-open .faq-content {
    max-height: 300px;
}

.faq-body {
    padding: 0 1.5rem 1.5rem;
}

.faq-body p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 0;
    margin-bottom: 3rem;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.trust-badge svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent-primary);
}

.trust-badge-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary-dim);
    border-radius: var(--radius-sm);
}

.trust-badge-icon svg {
    width: 18px;
    height: 18px;
}

/* Integration Badge (for Payroll Xero, etc.) */
.integration-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.integration-badge img {
    height: 24px;
    width: auto;
}

/* App Store Badges */
.app-badges {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.app-badge {
    display: block;
    transition: transform 0.2s ease;
}

.app-badge:hover {
    transform: scale(1.05);
}

.app-badge svg {
    height: 40px;
    width: auto;
}

/* Responsive for new components */
@media (max-width: 768px) {
    .product-testimonial {
        padding: 2rem 1.5rem;
    }

    .testimonial-quote {
        font-size: 1.25rem;
    }

    .testimonial-quote::before {
        font-size: 3rem;
        top: -1rem;
    }

    .product-testimonial .testimonial-carousel {
        min-height: 180px;
    }

    .product-testimonial .carousel-nav {
        gap: 0.75rem;
    }

    .product-testimonial .carousel-prev,
    .product-testimonial .carousel-next {
        width: 36px;
        height: 36px;
    }

    .trust-badges {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .app-badges {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }

    .testimonial-info {
        text-align: center;
    }

    .trust-badges {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ========================================
   INDUSTRY TEXT LIST - Typographic Section
   ======================================== */

.industry-text-list {
    text-align: center;
    line-height: 1.3;
    margin-top: 0.5rem;
}

.industry-text-list a {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 3.5rem);
    font-weight: 400;
    color: var(--text-dark);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

.industry-text-list a:hover {
    color: var(--accent-dark);
    font-weight: 800;
}

.industry-text-list a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.industry-text-list__separator {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 3.5rem);
    font-weight: 300;
    color: var(--text-dark-muted);
    margin: 0 0.15em;
    user-select: none;
}

@media (max-width: 768px) {
    .industry-text-list a,
    .industry-text-list__separator {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }
}

/* ========================================
   TESTIMONIAL MARQUEE
   ======================================== */

.testimonial-marquee {
    overflow: hidden;
    padding: 2rem 0 4rem;
    position: relative;
}

.testimonial-marquee::before,
.testimonial-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.testimonial-marquee::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-void), transparent);
}

.testimonial-marquee::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-void), transparent);
}

.testimonial-track {
    display: flex;
    gap: 1.5rem;
    animation: marquee 40s linear infinite;
    width: max-content;
}

.testimonial-marquee:hover .testimonial-track {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.testimonial-card {
    flex-shrink: 0;
    width: 380px;
    padding: 1.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Light section testimonial overrides */
.section-light .testimonial-card {
    background: var(--bg-light-surface);
    border-color: var(--border-light-default);
}

.section-light .testimonial-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.section-light .testimonial-card__avatar {
    border-color: var(--border-light-default);
}

.section-light .testimonial-card__quote {
    color: var(--text-dark-secondary);
}

.section-light .testimonial-card__name {
    color: var(--text-dark);
}

.section-light .testimonial-card__position {
    color: var(--text-dark-muted);
}

.section-light .testimonial-marquee::before {
    background: linear-gradient(to right, var(--bg-light), transparent);
}

.section-light .testimonial-marquee::after {
    background: linear-gradient(to left, var(--bg-light), transparent);
}

.testimonial-card__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border-subtle);
}

.testimonial-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-card__quote {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.testimonial-card__quote::before {
    content: none;
}

.testimonial-card__author {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

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

.testimonial-card__position {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Testimonial Marquee Responsive */
@media (max-width: 768px) {
    .testimonial-card {
        width: 320px;
        padding: 1.5rem;
    }

    .testimonial-card__avatar {
        width: 56px;
        height: 56px;
    }

    .testimonial-marquee::before,
    .testimonial-marquee::after {
        width: 60px;
    }
}

@media (max-width: 480px) {
    .testimonial-card {
        width: 280px;
        padding: 1.25rem;
    }

    .testimonial-card__avatar {
        width: 48px;
        height: 48px;
    }

    .testimonial-marquee::before,
    .testimonial-marquee::after {
        width: 40px;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .testimonial-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 2rem;
        gap: 1.5rem;
    }

    .testimonial-marquee::before,
    .testimonial-marquee::after {
        display: none;
    }

    .testimonial-card {
        flex-shrink: 1;
    }
}
