/* ========================================
   Healthier Ground - Main Stylesheet
   Design Direction: "Cartographic Warmth"
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */
:root {
    /* Colors */
    --color-primary: #87A878;
    /* Warm sage green */
    --color-primary-dark: #6B8C5C;
    --color-primary-light: #A8C49A;
    --color-accent: #D4A574;
    /* Soft terracotta */
    --color-accent-dark: #C08B58;
    --color-neutral-light: #FAF8F5;
    /* Creamy off-white */
    --color-neutral-warm: #F5F0E8;
    --color-neutral-dark: #2D2D2D;
    /* Charcoal */
    --color-highlight: #C9B896;
    /* Muted gold */
    --color-text: #3D3D3D;
    --color-text-muted: #6B6B6B;
    --color-white: #FFFFFF;

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

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;

    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(45, 45, 45, 0.08);
    --shadow-medium: 0 8px 30px rgba(45, 45, 45, 0.12);
    --shadow-hover: 0 12px 40px rgba(45, 45, 45, 0.15);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Container */
    --container-max: 1200px;
    --container-narrow: 800px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-neutral-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

/* ========================================
   Typography
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-neutral-dark);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: var(--space-md);
}

h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    margin-bottom: var(--space-sm);
}

p {
    margin-bottom: var(--space-sm);
}

.lead {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* ========================================
   Layout Utilities
   ======================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: var(--space-2xl) 0;
}

.section--alt {
    background-color: var(--color-white);
}

.section--highlight {
    background-color: var(--color-neutral-warm);
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(135, 168, 120, 0.1);
    transition: box-shadow var(--transition-medium);
}

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

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav__logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-neutral-dark);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav__logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav__logo-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--color-white);
}

.nav__links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
}

.nav__link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    padding: var(--space-xs) 0;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-fast);
}

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

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

/* Mobile Navigation Toggle */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.nav__toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-neutral-dark);
    transition: var(--transition-fast);
}

@media (max-width: 768px) {
    .nav__toggle {
        display: flex;
    }

    .nav__links {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-sm);
        box-shadow: var(--shadow-medium);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-medium);
    }

    .nav__links.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 72px;
    position: relative;
    overflow: hidden;
}

.hero--short {
    min-height: 60vh;
}

.hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    opacity: 0.15;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 200 Q100 150 150 200 T250 200 T350 200' fill='none' stroke='%2387A878' stroke-width='1.5' opacity='0.5'/%3E%3Cpath d='M50 250 Q100 200 150 250 T250 250 T350 250' fill='none' stroke='%2387A878' stroke-width='1.5' opacity='0.4'/%3E%3Cpath d='M50 300 Q100 250 150 300 T250 300 T350 300' fill='none' stroke='%2387A878' stroke-width='1.5' opacity='0.3'/%3E%3Cpath d='M50 150 Q100 100 150 150 T250 150 T350 150' fill='none' stroke='%2387A878' stroke-width='1.5' opacity='0.4'/%3E%3Cpath d='M50 100 Q100 50 150 100 T250 100 T350 100' fill='none' stroke='%2387A878' stroke-width='1.5' opacity='0.3'/%3E%3C/svg%3E") repeat;
    animation: contourDrift 30s linear infinite;
}

@keyframes contourDrift {
    0% {
        transform: translateX(0) translateY(0);
    }

    50% {
        transform: translateX(-20px) translateY(-10px);
    }

    100% {
        transform: translateX(0) translateY(0);
    }
}

.hero__content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero__title {
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.8s ease forwards;
}

.hero__subtitle {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--color-text-muted);
    max-width: 650px;
    margin: 0 auto var(--space-lg);
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero__buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: var(--space-lg);
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.9rem 1.8rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-medium);
    text-decoration: none;
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(135, 168, 120, 0.35);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(135, 168, 120, 0.45);
    color: var(--color-white);
}

.btn--secondary {
    background: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

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

.btn--highlight {
    background: linear-gradient(135deg, var(--color-highlight) 0%, var(--color-accent) 100%);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(201, 184, 150, 0.35);
}

.btn--highlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(201, 184, 150, 0.45);
    color: var(--color-white);
}

.btn--large {
    padding: 1.1rem 2.2rem;
    font-size: 1.1rem;
}

/* ========================================
   Cards & Feature Grid
   ======================================== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.feature-card {
    background: var(--color-white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-medium);
    text-align: center;
}

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

.feature-card__icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    font-size: 1.8rem;
}

.feature-card__title {
    font-size: 1.1rem;
    margin-bottom: var(--space-xs);
}

.feature-card__desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ========================================
   Two Column Layout
   ======================================== */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.two-col--reverse {
    direction: rtl;
}

.two-col--reverse>* {
    direction: ltr;
}

@media (max-width: 900px) {
    .two-col {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .two-col--reverse {
        direction: ltr;
    }
}

.two-col__content h2 {
    margin-bottom: var(--space-md);
}

.two-col__visual {
    position: relative;
}

.two-col__image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

/* Map Illustration Placeholder */
.illustration {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--color-neutral-warm) 0%, var(--color-white) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.illustration::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='8' fill='%2387A878' opacity='0.2'/%3E%3Ccircle cx='100' cy='80' r='6' fill='%23D4A574' opacity='0.3'/%3E%3Ccircle cx='170' cy='50' r='10' fill='%2387A878' opacity='0.15'/%3E%3Ccircle cx='50' cy='140' r='12' fill='%23C9B896' opacity='0.2'/%3E%3Ccircle cx='150' cy='160' r='7' fill='%23D4A574' opacity='0.25'/%3E%3Cpath d='M20 100 Q60 80 100 100 T180 100' fill='none' stroke='%2387A878' stroke-width='1' stroke-dasharray='4 3' opacity='0.4'/%3E%3Cpath d='M30 130 Q70 110 110 130 T190 130' fill='none' stroke='%2387A878' stroke-width='1' stroke-dasharray='4 3' opacity='0.3'/%3E%3C/svg%3E");
    animation: floatDots 20s ease-in-out infinite;
}

@keyframes floatDots {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-20px, -15px);
    }
}

.illustration__pins {
    position: relative;
    z-index: 1;
    display: flex;
    gap: var(--space-lg);
}

.pin {
    width: 40px;
    height: 50px;
    position: relative;
    animation: pinBounce 2s ease-in-out infinite;
}

.pin:nth-child(2) {
    animation-delay: 0.3s;
}

.pin:nth-child(3) {
    animation-delay: 0.6s;
}

.pin::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: var(--color-primary);
    border-radius: 50% 50% 50% 0;
    transform: translateX(-50%) rotate(-45deg);
    box-shadow: var(--shadow-soft);
}

.pin--accent::before {
    background: var(--color-accent);
}

.pin--highlight::before {
    background: var(--color-highlight);
}

@keyframes pinBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* ========================================
   Callout Box
   ======================================== */
.callout {
    background: var(--color-white);
    border-left: 4px solid var(--color-primary);
    padding: var(--space-lg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: var(--space-lg) 0;
    box-shadow: var(--shadow-soft);
}

.callout--muted {
    background: var(--color-neutral-warm);
    border-left-color: var(--color-text-muted);
}

.callout--highlight {
    background: linear-gradient(135deg, rgba(201, 184, 150, 0.1) 0%, rgba(212, 165, 116, 0.1) 100%);
    border-left-color: var(--color-highlight);
}

.callout__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--color-neutral-dark);
}

.callout p:last-child {
    margin-bottom: 0;
}

/* ========================================
   Pilot Cards (Postcard Style)
   ======================================== */
.pilot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0 var(--space-md);
}

.pilot-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-medium);
    position: relative;
}

.pilot-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.pilot-card__header {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    padding: var(--space-md);
    position: relative;
    overflow: hidden;
}

.pilot-card__header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 50 Q30 30 50 50 T90 50' fill='none' stroke='white' stroke-width='0.5' opacity='0.3'/%3E%3Cpath d='M10 70 Q30 50 50 70 T90 70' fill='none' stroke='white' stroke-width='0.5' opacity='0.2'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.pilot-card__location {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-white);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.pilot-card__body {
    padding: var(--space-lg);
}

.pilot-card__title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: var(--space-xs);
    color: var(--color-neutral-dark);
}

.pilot-card__status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.pilot-card__status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ========================================
   Data Sources / Trust Badges
   ======================================== */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-lg);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: var(--color-white);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--color-text-muted);
    box-shadow: var(--shadow-soft);
}

.trust-badge__icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-neutral-warm);
    border-radius: 50%;
    font-size: 0.8rem;
}

/* ========================================
   About Page - Story Section
   ======================================== */
.story {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.story p {
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
}

/* Founder Card */
.founder-card {
    background: linear-gradient(135deg, var(--color-neutral-warm) 0%, rgba(212, 165, 116, 0.15) 100%);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    text-align: center;
    margin-top: var(--space-xl);
}

.founder-card__avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 50%;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--color-white);
}

.founder-card__name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.founder-card__role {
    color: var(--color-text-muted);
}

/* ========================================
   Contact Page
   ======================================== */
.contact-section {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
}

.contact-content {
    max-width: 500px;
}

.contact-content h1 {
    margin-bottom: var(--space-md);
}

.contact-content p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--color-neutral-dark);
    color: var(--color-white);
    padding: var(--space-lg) 0;
    text-align: center;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: center;
}

.footer__logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.footer__tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer__copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer__cta {
    margin-top: var(--space-sm);
}

.footer__cta .btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
}

/* ========================================
   Decorative Elements
   ======================================== */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    z-index: -1;
}

.blob--green {
    background: var(--color-primary);
}

.blob--terracotta {
    background: var(--color-accent);
}

.blob--gold {
    background: var(--color-highlight);
}

/* Dotted Path */
.dotted-path {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
}

/* Section Divider */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--color-primary-light) 50%, transparent 100%);
    margin: 0 auto;
    max-width: 200px;
}

/* ========================================
   Accessibility
   ======================================== */
.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;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ========================================
   Animations on Scroll
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 600px) {
    .section {
        padding: var(--space-xl) 0;
    }

    .hero {
        min-height: 90vh;
    }

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

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

    .trust-badges {
        flex-direction: column;
        align-items: center;
    }
}