/* ================================================================
   GoalTown — Landing Page Stylesheet
   Design tokens: ported from Flutter app (tokens.dart)
   Font: Montserrat (Google Fonts)
   ================================================================ */

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

:root {
    /* Backgrounds */
    --bg:         #F3F4F2;
    --bg-card:    #E8EAE6;
    --bg-card-alt:#EEF0EC;
    --bg-white:   #FFFFFF;

    /* Ink / text */
    --ink:        #0F1410;
    --ink-soft:   #2A312B;
    --muted:      #8A8F88;
    --muted-soft: #B8BDB5;

    /* Greens */
    --green:      #A8D66C;
    --green-deep: #7AB84A;
    --green-ink:  #4A5D3A;
    --green-pale: #DBEAC3;

    /* Misc */
    --track:      #D9DCD4;
    --btn-on-green:#1B2D10;

    /* Radii */
    --r-lg: 24px;
    --r-md: 18px;
    --r-sm: 12px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(15,20,16,0.04);
    --shadow-md: 0 4px 24px rgba(15,20,16,0.07);
    --shadow-lg: 0 12px 48px rgba(15,20,16,0.10);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Montserrat', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--green-deep);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--green-ink);
}

ul, ol {
    padding-left: 1.3em;
}
li {
    margin-bottom: 0.4em;
}

/* ---------- UTILITIES ---------- */
.section-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-tag {
    display: inline-block;
    padding: 6px 18px;
    background: var(--green-pale);
    color: var(--green-ink);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 999px;
    margin-bottom: 16px;
}

.section-tag--red {
    background: #fde8e8;
    color: #b91c1c;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: var(--ink);
    margin-bottom: 14px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.65;
}

.section-desc--sm {
    font-size: 0.9rem;
}

.text-green {
    color: var(--green-deep);
}

/* ---------- NAV ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(243,244,242,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(15,20,16,0.05);
    transition: box-shadow 0.3s;
}

.nav--scrolled {
    box-shadow: var(--shadow-sm);
}

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

.nav__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--ink);
}

.nav__logo-icon {
    font-size: 1.4rem;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav__link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
    transition: color 0.2s;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--green-deep);
    border-radius: 999px;
    transition: width 0.3s;
}

.nav__link:hover {
    color: var(--green-deep);
}

.nav__link:hover::after {
    width: 100%;
}

.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav__hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 24px 60px;
    max-width: 1100px;
    margin: 0 auto;
    gap: 60px;
}

.hero__bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
}

.shape--1 {
    width: 500px;
    height: 500px;
    background: var(--green-pale);
    top: -100px;
    right: -100px;
    animation: float 15s ease-in-out infinite;
}

.shape--2 {
    width: 400px;
    height: 400px;
    background: var(--green);
    bottom: 10%;
    left: -150px;
    animation: float 18s ease-in-out infinite reverse;
}

.shape--3 {
    width: 300px;
    height: 300px;
    background: #f0e6c0;
    top: 40%;
    right: 20%;
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-30px) scale(1.05); }
}

.hero__content {
    flex: 1;
    z-index: 1;
}

.hero__badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--bg-white);
    border: 1px solid var(--track);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 28px;
    animation: fadeInUp 0.6s ease-out;
}

.hero__title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero__title-accent {
    background: linear-gradient(135deg, var(--green-deep), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__desc {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 440px;
    line-height: 1.7;
    margin-bottom: 36px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero__buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
}

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

.btn--primary:hover {
    background: var(--ink-soft);
    color: var(--bg-white);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background: var(--bg-white);
    color: var(--ink);
    border: 1.5px solid var(--track);
}

.btn--secondary:hover {
    border-color: var(--green-deep);
    color: var(--green-deep);
    box-shadow: var(--shadow-sm);
}

.btn__icon {
    width: 20px;
    height: 20px;
}

/* Hero visual — phone mockup */
.hero__visual {
    flex: 0 0 320px;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero__phone {
    position: relative;
    width: 280px;
    margin: 0 auto;
}

.hero__phone-screen {
    background: var(--bg-white);
    border-radius: 32px;
    padding: 24px 20px;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(15,20,16,0.06);
    position: relative;
    overflow: hidden;
}

.hero__phone-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: var(--bg);
    border-radius: 0 0 18px 18px;
}

.phone-mockup {
    padding-top: 20px;
}

.phone-mockup__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.phone-mockup__greeting {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink);
}

.phone-mockup__gold {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--green-ink);
    background: var(--green-pale);
    padding: 4px 12px;
    border-radius: 999px;
}

.phone-mockup__timer {
    text-align: center;
    margin-bottom: 24px;
}

.phone-mockup__timer-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 12px;
}

.phone-mockup__timer-ring svg {
    width: 100%;
    height: 100%;
    animation: timer-pulse 3s ease-in-out infinite;
}

@keyframes timer-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.phone-mockup__time {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: 1px;
}

.phone-mockup__task-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}

.phone-mockup__buildings {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px 0 4px;
    border-top: 1px solid var(--track);
}

.phone-mockup__building {
    font-size: 1.8rem;
    animation: building-pop 0.5s ease-out calc(var(--delay) + 0.8s) both;
}

@keyframes building-pop {
    0%   { transform: scale(0) translateY(10px); opacity: 0; }
    60%  { transform: scale(1.15) translateY(-3px); }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ---------- FEATURES ---------- */
.features {
    padding: 100px 0;
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-white);
    border-radius: var(--r-lg);
    padding: 32px 28px;
    transition: transform 0.3s, box-shadow 0.3s;
    opacity: 0;
    animation: fadeInUp 0.5s ease-out calc(var(--delay)) both;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-card__icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
    display: inline-block;
    animation: icon-bounce 2s ease-in-out infinite;
    animation-delay: var(--delay);
}

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

.feature-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--ink);
}

.feature-card__desc {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ---------- HOW IT WORKS ---------- */
.how-it-works {
    padding: 100px 0;
    background: var(--bg-white);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 660px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    background: var(--bg);
    border-radius: var(--r-lg);
    padding: 32px;
    opacity: 0;
    animation: fadeInLeft 0.6s ease-out calc(var(--delay)) both;
    transition: transform 0.3s, box-shadow 0.3s;
}

.step:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-sm);
}

.step__number {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--green-deep), var(--green));
    color: var(--bg-white);
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 16px;
}

.step__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.step__desc {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ---------- LEGAL SECTIONS ---------- */
.legal {
    padding: 80px 0;
}

.legal--alt {
    background: var(--bg-white);
}

.legal__card {
    background: var(--bg-white);
    border-radius: var(--r-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    max-width: 800px;
    margin: 0 auto;
}

.legal--alt .legal__card {
    background: var(--bg);
}

.legal__block {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--track);
}

.legal__block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.legal__block h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 10px;
}

.legal__block p,
.legal__block li {
    font-size: 0.88rem;
    color: var(--ink-soft);
    line-height: 1.65;
}

/* ---------- DELETE ACCOUNT ---------- */
.delete-account {
    padding: 80px 0;
}

.delete-account__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto 32px;
}

.delete-card {
    background: var(--bg-white);
    border-radius: var(--r-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.delete-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.delete-card__icon {
    font-size: 2rem;
    margin-bottom: 14px;
}

.delete-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.delete-card__desc {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.delete-card__steps {
    font-size: 0.85rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

.delete-account__warning {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 800px;
    margin: 0 auto;
    background: #fef3cd;
    border: 1px solid #fde68a;
    border-radius: var(--r-md);
    padding: 20px 24px;
}

.warning-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.delete-account__warning p {
    font-size: 0.88rem;
    color: #92400e;
    line-height: 1.6;
}

/* ---------- FOOTER ---------- */
.footer {
    background: var(--ink);
    color: var(--bg);
    padding: 60px 24px 0;
}

.footer__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer__logo {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.footer__tagline {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.6;
}

.footer__links h4 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.footer__links a {
    display: block;
    font-size: 0.88rem;
    color: var(--muted-soft);
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer__links a:hover {
    color: var(--green);
}

.footer__bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
    text-align: center;
}

.footer__bottom p {
    font-size: 0.78rem;
    color: var(--muted);
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll-triggered reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
        gap: 40px;
    }

    .hero__desc {
        margin: 0 auto 36px;
    }

    .hero__buttons {
        justify-content: center;
    }

    .hero__visual {
        flex: none;
    }

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

    .footer__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .nav__links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(243,244,242,0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--track);
    }

    .nav__links.open {
        display: flex;
    }

    .nav__hamburger {
        display: flex;
    }

    .nav__hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translateY(7px);
    }
    .nav__hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .nav__hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-7px);
    }

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

    .delete-account__grid {
        grid-template-columns: 1fr;
    }

    .legal__card {
        padding: 24px 20px;
    }

    .step {
        flex-direction: column;
        gap: 16px;
    }
}

/* ---------- SUBPAGE LAYOUT ---------- */
.page {
    padding: 100px 24px 60px;
}

.page__container {
    max-width: 800px;
    margin: 0 auto;
}

.page__back {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 28px;
    transition: color 0.2s, transform 0.2s;
}

.page__back:hover {
    color: var(--green-deep);
    transform: translateX(-3px);
}

.page__header {
    text-align: center;
    margin-bottom: 40px;
}

.page__title {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--ink);
    margin-bottom: 8px;
}

.page__date {
    font-size: 0.85rem;
    color: var(--muted);
}

.page__subtitle {
    font-size: 1rem;
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.6;
}

/* ---------- CTA SECTION ---------- */
.cta {
    padding: 40px 0 80px;
}

.cta__card {
    background: linear-gradient(135deg, var(--green-pale), #e8f0d8);
    border-radius: var(--r-lg);
    padding: 56px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta__card::before {
    content: '🏘️';
    position: absolute;
    font-size: 8rem;
    opacity: 0.08;
    top: -20px;
    right: -20px;
    transform: rotate(15deg);
}

.cta__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 10px;
}

.cta__desc {
    font-size: 1rem;
    color: var(--ink-soft);
    margin-bottom: 28px;
}

/* ---------- SUPPORT PAGE ---------- */
.support__contact-card {
    background: linear-gradient(135deg, var(--green-pale), #e8f0d8);
    border-radius: var(--r-lg);
    padding: 48px 40px;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.support__contact-card::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--green);
    border-radius: 50%;
    opacity: 0.08;
    top: -60px;
    right: -60px;
}

.support__contact-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.support__contact-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 10px;
}

.support__contact-desc {
    font-size: 0.95rem;
    color: var(--ink-soft);
    max-width: 440px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.btn--lg {
    padding: 16px 32px;
    font-size: 0.95rem;
}

.support__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.support__card {
    background: var(--bg-white);
    border-radius: var(--r-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.support__card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.support__card-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.support__card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--ink);
}

.support__card-desc {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ---------- FAQ ACCORDION ---------- */
.faq {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq__item {
    border-bottom: 1px solid var(--track);
}

.faq__item:last-child {
    border-bottom: none;
}

.faq__question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink);
    text-align: left;
    transition: color 0.2s;
}

.faq__question:hover {
    color: var(--green-deep);
}

.faq__arrow {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--muted);
    transition: transform 0.3s;
}

.faq__item.open .faq__arrow {
    transform: rotate(90deg);
    color: var(--green-deep);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 0;
}

.faq__item.open .faq__answer {
    max-height: 200px;
    padding: 0 0 16px;
}

.faq__answer p {
    font-size: 0.88rem;
    color: var(--ink-soft);
    line-height: 1.65;
}

/* ---------- RESPONSIVE (SUBPAGES) ---------- */
@media (max-width: 640px) {
    .support__grid {
        grid-template-columns: 1fr;
    }

    .support__contact-card {
        padding: 32px 24px;
    }

    .cta__card {
        padding: 40px 24px;
    }
}
