/* ==========================================================================
   GreenRead — Styles
   ========================================================================== */

:root {
    /* Core palette — golf green inspired */
    --green:        #1a6b3c;
    --green-dark:   #0f4525;
    --green-light:  #e8f5ee;
    --green-muted:  #2d8a55;
    --cream:        #faf9f5;
    --cream-dark:   #f0efe8;
    --charcoal:     #1c1c1c;
    --slate:        #4a4a4a;
    --white:        #ffffff;

    /* Typography */
    --font-display: 'PT Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --section-pad:  6rem 2rem;
    --section-pad-sm: 3.5rem 1.25rem;

    /* Transitions */
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--charcoal);
    background: var(--cream);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 2rem; }


/* ==========================================================================
   NAV
   ========================================================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 249, 245, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--charcoal);
}

.nav-logo-img {
    height: 32px;
    width: auto;
}

/* Visually hidden but accessible to screen readers & SEO */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--slate);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--green);
    text-decoration: none;
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--charcoal);
    border-radius: 2px;
    transition: 0.2s var(--ease);
}

@media (max-width: 640px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--cream);
        border-bottom: 1px solid rgba(0,0,0,0.06);
        padding: 1rem 2rem 1.5rem;
        gap: 0.25rem;
    }

    .nav-links.open { display: flex; }

    .nav-links a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1rem;
    }
}


/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 6rem 2rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 30% 50%, rgba(26, 107, 60, 0.08), transparent),
        radial-gradient(ellipse 60% 50% at 80% 40%, rgba(26, 107, 60, 0.05), transparent);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
    flex-shrink: 0;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.15;
    color: var(--charcoal);
    margin-bottom: 1.25rem;
}

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

.hero-sub {
    font-size: 1.1rem;
    color: var(--slate);
    margin-bottom: 2rem;
    max-width: 440px;
    line-height: 1.7;
}

/* Phone mockup — image-based */
.hero-phone {
    position: relative;
    z-index: 1;
    margin-left: 4rem;
    flex-shrink: 0;
}

/* Soft floor shadow beneath the phone */
.phone-shadow {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 24px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.18) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(6px);
    z-index: 0;
}

/* Container — sets the overall dimensions */
.phone-device {
    position: relative;
    width: 280px;
    /* Aspect ratio matches the phone image: 450x920 */
    aspect-ratio: 450 / 920;
    z-index: 1;
}

/* Phone frame PNG — sits on top of everything */
.phone-frame-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.20))
            drop-shadow(0 8px 16px rgba(0,0,0,0.12));
}

/* Screenshot area — positioned to align with the screen in the frame image */
.phone-screen {
    position: absolute;
    /* Insets match the bezel edges of the phone PNG (as % of image) */
    top: 2.4%;
    left: 4.9%;
    right: 4.7%;
    bottom: 2.6%;
    overflow: hidden;
    border-radius: 28px;
    background: var(--green-dark);
    z-index: 1;
}

.phone-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.phone-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Indicator dots — below the frame */
.phone-dots {
    position: absolute;
    bottom: -28px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 6;
}

.phone-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(0,0,0,0.15);
    transition: background 0.3s var(--ease), transform 0.3s var(--ease);
    cursor: pointer;
}

.phone-dot.active {
    background: var(--green);
    transform: scale(1.3);
}

@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 7rem;
        min-height: auto;
    }

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

    .hero-sub { margin-left: auto; margin-right: auto; }

    .hero-phone {
        margin-left: 0;
        margin-top: 3rem;
    }

    .phone-device {
        width: 230px;
    }
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s var(--ease);
}

.btn-primary {
    background: var(--charcoal);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--green-dark);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-lg {
    font-size: 1.05rem;
    padding: 1rem 2rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}


/* ==========================================================================
   FEATURES — "How It Works"
   ========================================================================== */

.features {
    padding: var(--section-pad);
    background: var(--white);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-sub {
    text-align: center;
    color: var(--slate);
    margin-bottom: 3.5rem;
    font-size: 1.05rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.feature-card {
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    background: var(--cream);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}

.feature-number {
    font-family: var(--font-display);
    font-size: 2.4rem;
    color: var(--green);
    margin-bottom: 0.75rem;
    line-height: 1;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
}

.feature-card p {
    color: var(--slate);
    font-size: 0.95rem;
    line-height: 1.65;
}

@media (max-width: 700px) {
    .features-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .features { padding: var(--section-pad-sm); }
}


/* ==========================================================================
   SHOWCASE
   ========================================================================== */

.showcase {
    padding: var(--section-pad);
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.showcase-text h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.showcase-text p {
    color: var(--slate);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.check-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.check-list li {
    position: relative;
    padding-left: 1.6rem;
    color: var(--slate);
    font-size: 0.95rem;
}

.check-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35em;
    width: 14px;
    height: 14px;
    background: var(--green);
    border-radius: 50%;
    opacity: 0.7;
}

.showcase-image img {
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

@media (max-width: 700px) {
    .showcase { padding: var(--section-pad-sm); }
    .showcase-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .showcase-image { order: -1; }
}


/* ==========================================================================
   CTA
   ========================================================================== */

.cta {
    padding: var(--section-pad);
    background: var(--green-dark);
    text-align: center;
}

.cta h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    color: var(--white);
    margin-bottom: 0.6rem;
}

.cta p {
    color: rgba(255,255,255,0.75);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.cta .btn-primary {
    background: var(--white);
    color: var(--green-dark);
}

.cta .btn-primary:hover {
    background: var(--green-light);
    color: var(--green-dark);
}


/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    padding: 3rem 2rem;
    border-top: 1px solid rgba(0,0,0,0.06);
    background: var(--cream);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--charcoal);
}

.footer-logo {
    height: 22px;
    width: auto;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--slate);
    font-size: 0.85rem;
    font-weight: 500;
}

.footer-links a:hover { color: var(--green); text-decoration: none; }

.footer-copy {
    width: 100%;
    text-align: center;
    color: var(--slate);
    font-size: 0.8rem;
    margin-top: 1rem;
    opacity: 0.7;
}

@media (max-width: 640px) {
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; flex-wrap: wrap; }
}


/* ==========================================================================
   PAGE HEADER  (FAQ, Support, Privacy)
   ========================================================================== */

.page-header {
    padding: 8rem 2rem 3rem;
    text-align: center;
    background: var(--white);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.4rem;
}

.page-header p {
    color: var(--slate);
    font-size: 1.05rem;
}


/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */

.faq-section {
    padding: var(--section-pad);
}

.faq-item {
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4rem 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--charcoal);
    text-align: left;
    line-height: 1.4;
}

.faq-icon {
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.3s var(--ease);
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease), padding 0.35s var(--ease);
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding-bottom: 1.4rem;
}

.faq-answer p {
    color: var(--slate);
    line-height: 1.7;
    font-size: 0.95rem;
}

.faq-answer a {
    color: var(--green);
    font-weight: 500;
}


/* ==========================================================================
   SUPPORT FORM
   ========================================================================== */

.support-section {
    padding: var(--section-pad);
}

.support-intro {
    margin-bottom: 2.5rem;
    text-align: center;
    color: var(--slate);
}

.support-intro a { font-weight: 600; }

.support-form-wrapper {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 1.5px solid rgba(0,0,0,0.12);
    border-radius: 10px;
    background: var(--cream);
    color: var(--charcoal);
    transition: border-color 0.2s var(--ease);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--green);
}

.form-group textarea { resize: vertical; }

.form-success {
    text-align: center;
    padding: 3rem 1rem;
}

.form-success h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin: 1rem 0 0.5rem;
}

.form-success p {
    color: var(--slate);
}

.support-alt {
    margin-top: 2rem;
    text-align: center;
    color: var(--slate);
    font-size: 0.9rem;
}


/* ==========================================================================
   LEGAL / PRIVACY
   ========================================================================== */

.legal-section {
    padding: var(--section-pad);
}

.legal-content h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 0.6rem;
    color: var(--charcoal);
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.4rem;
    color: var(--charcoal);
}

.legal-content p {
    color: var(--slate);
    margin-bottom: 1rem;
    line-height: 1.75;
}

.legal-content a {
    font-weight: 600;
}


/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
    .hero-content,
    .hero-phone {
        animation: fadeUp 0.7s var(--ease) both;
    }

    .hero-phone {
        animation-delay: 0.15s;
    }

    .feature-card {
        opacity: 0;
        animation: fadeUp 0.5s var(--ease) both;
    }
    .feature-card:nth-child(1) { animation-delay: 0.1s; }
    .feature-card:nth-child(2) { animation-delay: 0.2s; }
    .feature-card:nth-child(3) { animation-delay: 0.3s; }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
