/* ============================================================
   GlutenFreeToday — Shared Stylesheet
   ============================================================ */

/* --- Google Fonts (loaded in HTML <head>) --- */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #10182C;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #00A63E;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Design Tokens (as custom properties) --- */
:root {
    --navy: #10182C;
    --green: #00A63E;
    --gray: #6A7282;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.8);
    --card-radius: 16px;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    --max-width: 1152px;
    --side-padding: 24px;
}

@media (min-width: 768px) {
    :root {
        --side-padding: 64px;
    }
}

/* --- Utility --- */
.wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: var(--side-padding);
    padding-right: var(--side-padding);
}

/* ============================================================
   LANDING PAGE — Hero
   ============================================================ */
.hero {
    background-color: var(--navy);
    position: relative;
    overflow: hidden;
    padding: 80px 0 96px;
    text-align: center;
}

/* Subtle green glow */
.hero::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(0, 166, 62, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -1px;
    margin-bottom: 16px;
    position: relative;
}

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

.hero .subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.65);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.6;
    font-weight: 400;
}

@media (min-width: 768px) {
    .hero {
        padding: 120px 0 140px;
    }

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

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

/* --- CTA Button --- */
.btn-cta {
    display: inline-block;
    background: #fff;
    color: var(--navy);
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 36px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 166, 62, 0.25);
    text-decoration: none;
}

/* Shimmer effect */
.btn-cta::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ============================================================
   LANDING PAGE — Feature Section
   ============================================================ */
.feature-section {
    background: linear-gradient(180deg, #DCF9E7 0%, #F0FDE4 40%, #FFFFFF 100%);
    padding: 64px 0 48px;
    position: relative;
    overflow: hidden;
}

/* Atmospheric green glow */
.feature-section::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    top: -60px;
    left: -60px;
    background: radial-gradient(circle, rgba(0, 166, 62, 0.2) 0%, transparent 70%);
    filter: blur(64px);
    pointer-events: none;
}

.feature-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
}

.feature-text h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 16px;
}

.feature-text p {
    font-size: 17px;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 28px;
}

.app-store-badge {
    height: 48px;
    width: auto;
}

.feature-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glow behind app icon */
.feature-icon-wrapper::before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(0, 166, 62, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.feature-icon-wrapper img {
    width: 200px;
    height: 200px;
    border-radius: 40px;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .feature-section {
        padding: 96px 0 64px;
    }

    .feature-grid {
        flex-direction: row;
        align-items: center;
    }

    .feature-text {
        flex: 1;
    }

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

    .feature-icon-wrapper {
        flex: 0 0 auto;
    }

    .feature-icon-wrapper img {
        width: 260px;
        height: 260px;
    }

    .feature-icon-wrapper::before {
        width: 320px;
        height: 320px;
    }
}

/* ============================================================
   LANDING PAGE — Screenshots Carousel
   ============================================================ */
.screenshots {
    padding: 48px 0 64px;
    background: #fff;
}

.screenshots h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--navy);
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

/* Carousel container */
.carousel {
    position: relative;
    max-width: 260px;
    margin: 0 auto;
}

.carousel-viewport {
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid #1e1e1e;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    aspect-ratio: 1 / 2;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

/* Arrow buttons */
.carousel-btn {
    position: absolute;
    top: 40%;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: var(--navy);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    z-index: 2;
}

.carousel-btn:hover {
    background: #f8f8f8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.carousel-btn--prev {
    left: -60px;
}

.carousel-btn--next {
    right: -60px;
}

/* Info below carousel */
.carousel-info {
    text-align: center;
    margin-top: 20px;
}

.carousel-label {
    font-size: 17px;
    font-weight: 600;
    color: var(--navy);
}

.carousel-desc {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.5;
    margin-top: 4px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Dot navigation */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #d1d5db;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.active {
    background: var(--green);
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: #9ca3af;
}

.carousel-dot.active:hover {
    background: var(--green);
}

/* Mobile: smaller carousel */
@media (max-width: 767px) {
    .carousel {
        max-width: 220px;
    }

    .carousel-viewport {
        border-radius: 28px;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .carousel-btn--prev {
        left: -48px;
    }

    .carousel-btn--next {
        right: -48px;
    }
}

@media (min-width: 768px) {
    .screenshots {
        padding: 64px 0 80px;
    }

    .screenshots h2 {
        font-size: 40px;
    }
}

/* ============================================================
   LANDING PAGE — Testimonials
   ============================================================ */
.testimonials {
    padding: 64px 0;
    background: #fff;
    position: relative;
    overflow: hidden;
}

/* Subtle blue glow */
.testimonials::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    bottom: -80px;
    right: -80px;
    background: radial-gradient(circle, rgba(21, 101, 252, 0.12) 0%, transparent 70%);
    filter: blur(64px);
    pointer-events: none;
}

.testimonials h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--navy);
    text-align: center;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

.testimonials-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.testimonial-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 32px;
}

.testimonial-card blockquote {
    font-size: 16px;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: normal;
}

.testimonial-card blockquote::before {
    content: "\201E";
    font-size: 28px;
    color: var(--green);
    line-height: 1;
    display: block;
    margin-bottom: 4px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-author img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
}

.testimonial-author .name {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
}

.testimonial-author .role {
    font-size: 13px;
    color: var(--gray);
}

@media (min-width: 768px) {
    .testimonials {
        padding: 96px 0;
    }

    .testimonials h2 {
        font-size: 40px;
    }

    .testimonials-grid {
        flex-direction: row;
    }

    .testimonial-card {
        flex: 1;
    }
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
    background: var(--navy);
    padding: 48px 0;
    color: #fff;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.footer-brand {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.footer-links h3 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-copy {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 24px;
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .footer-copy {
        margin-top: 32px;
    }
}

/* ============================================================
   PAGE HEADER (privacy-policy, support)
   ============================================================ */
.page-header {
    background: var(--navy);
    padding: 20px 0;
}

.page-header a {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
}

.page-header a:hover {
    text-decoration: none;
    opacity: 0.85;
}

/* ============================================================
   LEGAL CONTENT — Scoped styles for privacy-policy & support
   ============================================================ */
.legal-content {
    max-width: 740px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a2e;
    line-height: 1.7;
}

.legal-content header {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e0e8e2;
}

.legal-content header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    color: #101828;
}

.legal-content header p {
    font-size: 14px;
    color: #6b7280;
    max-width: 480px;
    margin: 0 auto;
}

.legal-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: #101828;
    margin-top: 40px;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.legal-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin-top: 24px;
    margin-bottom: 8px;
}

.legal-content p,
.legal-content li {
    font-size: 15px;
    color: #374151;
    margin-bottom: 12px;
}

.legal-content ul,
.legal-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.legal-content li {
    margin-bottom: 6px;
}

.legal-content .section {
    margin-bottom: 32px;
}

.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 14px;
}

.legal-content th,
.legal-content td {
    text-align: left;
    padding: 10px 14px;
    border: 1px solid #e0e8e2;
}

.legal-content th {
    background-color: #f0f7f1;
    font-weight: 600;
    color: #101828;
}

.legal-content td {
    color: #374151;
}

/* Contact card (support page) */
.legal-content .contact-card {
    background: #ffffff;
    border: 1px solid #e0e8e2;
    border-radius: 16px;
    padding: 28px;
    margin: 24px 0 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.legal-content .contact-card p {
    margin-bottom: 8px;
}

.legal-content .contact-card .label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.legal-content .contact-card .value {
    font-size: 16px;
    color: #101828;
    margin-bottom: 16px;
}

.legal-content .contact-card .value:last-child {
    margin-bottom: 0;
}

/* FAQ accordion */
.legal-content .faq-item {
    border: 1px solid #e0e8e2;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    background: #ffffff;
}

.legal-content .faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 18px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #101828;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    line-height: 1.5;
}

.legal-content .faq-question:hover {
    background: #f0f7f1;
}

.legal-content .faq-question::after {
    content: "+";
    font-size: 20px;
    font-weight: 400;
    color: #6b7280;
    flex-shrink: 0;
    margin-left: 16px;
    transition: transform 0.2s ease;
}

.legal-content .faq-item.open .faq-question::after {
    content: "\2212";
}

.legal-content .faq-answer {
    display: none;
    padding: 0 20px 18px;
    font-size: 15px;
    color: #374151;
    line-height: 1.7;
}

.legal-content .faq-item.open .faq-answer {
    display: block;
}

.legal-content .faq-answer p {
    margin-bottom: 8px;
}

.legal-content .faq-answer p:last-child {
    margin-bottom: 0;
}

.legal-content .faq-category {
    font-size: 14px;
    font-weight: 600;
    color: #00a63d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 32px;
    margin-bottom: 12px;
}

/* Legal page footer */
.legal-content .legal-footer {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid #e0e8e2;
    font-size: 13px;
    color: #9ca3af;
}

.legal-content .legal-footer a {
    color: #9ca3af;
}

/* Legal content responsive */
@media (max-width: 480px) {
    .legal-content {
        padding: 32px 16px 60px;
    }

    .legal-content header h1 {
        font-size: 24px;
    }

    .legal-content h2 {
        font-size: 18px;
    }

    .legal-content table {
        font-size: 13px;
    }

    .legal-content th,
    .legal-content td {
        padding: 8px 10px;
    }

    .legal-content .contact-card {
        padding: 20px;
    }

    .legal-content .faq-question {
        padding: 16px;
        font-size: 14px;
    }

    .legal-content .faq-answer {
        padding: 0 16px 16px;
        font-size: 14px;
    }
}
