/* style.css */

/* =========================
   THEME TOKENS
   ========================= */
:root {
    --color-primary: #064e3b;
    --color-primary-dark: #022c22;
    --color-primary-light: #34d399;

    --color-bg-light: #f0fdf4;
    --color-bg-white: #ffffff;
    --color-bg-dark: #111827;

    --color-text-main: #111827;
    --color-text-muted: #6b7280;
    --color-border-subtle: #e5e7eb;

    --font-heading: 'Merriweather', serif;
    --font-body: 'Inter', sans-serif;

    --spacing-container: 1200px;

    /* Navbar height */
    --nav-h: 72px;

    /* Rounded corners */
    --border-radius: 18px;
    --radius-lg: 24px;
    --radius-xl: 34px;

    /* Spacing */
    --section-pad: clamp(82px, 7.5vw, 110px);
    --fold-overlap: clamp(56px, 6vw, 920px);
    --hero-hold: clamp(110px, 8vw, 160px);

    /* Motion */
    --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);

    /* Shadows */
    --shadow-card-rest: 0 4px 6px rgba(0, 0, 0, 0.02);
    --shadow-card-hover: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-step-hover: 0 20px 40px rgba(0, 0, 0, 0.08);
    --shadow-btn-hover: 0 12px 25px rgba(6, 78, 59, 0.28);
    --shadow-float: 0 35px 90px rgba(15, 23, 42, 0.14);
    --shadow-fold: 0 -25px 70px rgba(15, 23, 42, 0.12);
}

/* =========================
   RESET & BASE
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-muted);
    line-height: 1.7;
    overflow-x: hidden;

    /* Subtle site-wide atmosphere */
    background:
        radial-gradient(1200px 700px at 15% -10%, rgba(52, 211, 153, 0.12) 0%, rgba(52, 211, 153, 0) 60%),
        radial-gradient(900px 550px at 90% 0%, rgba(187, 247, 208, 0.18) 0%, rgba(187, 247, 208, 0) 55%),
        linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

/* Grain texture overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

::selection {
    background: rgba(52, 211, 153, 0.35);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-bottom: 1rem;
    line-height: 1.18;
}

h1 {
    font-size: clamp(2.3rem, 5vw, 3.35rem);
    font-weight: 300;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.85rem, 3.1vw, 2.35rem);
    font-weight: 400;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.35rem;
    font-weight: 400;
}

p {
    font-size: 1.05rem;
    color: var(--color-text-muted);
}

strong, b {
    color: var(--color-text-main);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.25s ease;
}

ul {
    list-style: none;
}

:focus-visible {
    outline: 3px solid rgba(52, 211, 153, 0.55);
    outline-offset: 3px;
    border-radius: 10px;
}

/* =========================
   UTILITIES
   ========================= */
.container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 0 20px;
}



/* Narrow container for long-form pages (e.g., blog + posts) */
.container--narrow {
    max-width: 760px;
}
main {
    position: relative;
    z-index: 1;
}

section[id] {
    scroll-margin-top: 96px;
}

.section {
    padding: var(--section-pad) 0;
    position: relative;
}

.bg-light {
    background:
        linear-gradient(180deg, rgba(240, 253, 244, 0.95) 0%, rgba(255, 255, 255, 0.98) 70%, #ffffff 100%);
}

.bg-dark {
    background:
        radial-gradient(1000px 600px at 20% -10%, rgba(52, 211, 153, 0.12) 0%, rgba(52, 211, 153, 0) 60%),
        linear-gradient(180deg, #111827 0%, #0b1220 100%);
}

.text-white { color: #f9fafb !important; }
.text-white h2, .text-white h3, .text-white p { color: #f9fafb !important; }

/* The “fold-over” effect for the first section after the hero */
.section-fold {
    z-index: 2;
    margin-top: calc(-1 * var(--fold-overlap));
    padding-top: calc(var(--section-pad) + var(--fold-overlap));

    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    box-shadow: var(--shadow-fold);

    border-top: 1px solid rgba(255, 255, 255, 0.7);
    overflow: hidden;
}

.section-fold::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(6, 78, 59, 0.20), transparent);
    opacity: 0.8;
    pointer-events: none;
}

/* =========================
   BUTTONS
   ========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 12px 28px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.98rem;
    line-height: 1;
    white-space: nowrap;

    border: 2px solid transparent;
    position: relative;
    overflow: hidden;

    transition: box-shadow 320ms var(--ease-soft), background-color 320ms var(--ease-soft), transform 220ms var(--ease-soft);
}

.btn:active {
    transform: translateY(1px);
}

/* Gloss */
.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 320ms var(--ease-soft);

    background: radial-gradient(
        circle at var(--mx, 50%) var(--my, 50%),
        rgba(255, 255, 255, 0.45),
        rgba(255, 255, 255, 0) 70%
    );

    mix-blend-mode: soft-light;
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #ffffff !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #043f30 0%, #022c22 100%);
    box-shadow: var(--shadow-btn-hover);
}

.btn-secondary {
    background: rgba(6, 78, 59, 0.06);
    border-color: rgba(6, 78, 59, 0.35);
    color: var(--color-primary);
}

.btn-secondary:hover {
    background: rgba(6, 78, 59, 0.10);
    box-shadow: var(--shadow-btn-hover);
}

/* =========================
   NAVIGATION
   ========================= */

#site-nav {
    display: contents;
}

.navbar{
    height: var(--nav-h);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px) saturate(1.25);
    -webkit-backdrop-filter: blur(16px) saturate(1.25);

    border-bottom: 1px solid rgba(229, 231, 235, 0.55);
    box-shadow: 0 1px 16px rgba(15, 23, 42, 0.05);
}

/* this is the vertical centering */
.navbar .nav-container{
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* anchors the mobile dropdown */
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.03em;
}

.nav-links {
    display: flex;
    gap: 26px;
    align-items: center;
}

.nav-links li a {
    display: inline-flex;
    align-items: center;
    line-height: 1;

    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-main);
}

/* Underline shimmer for normal nav links */
.nav-links li a:not(.btn) {
    position: relative;
    padding: 10px 0;
}

.nav-links li a:not(.btn)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.95), transparent);
    opacity: 0;
    transform: scaleX(0.5);
    transition: 260ms var(--ease-soft);
}

.nav-links li a:not(.btn):hover {
    color: var(--color-primary);
}

.nav-links li a:not(.btn):hover::after {
    opacity: 1;
    transform: scaleX(1);
}

/* Slightly tighter CTA sizing inside the navbar */
.navbar .btn {
    padding: 10px 18px;
    font-size: 0.95rem;
}

.burger-menu {
    display: none;
    cursor: pointer;
}

/* =========================
   HERO (sticky + scrolled-over)
   ========================= */
.hero-stage {
    position: relative;
    min-height: calc(100svh + var(--fold-overlap));
    padding-bottom: var(--fold-overlap);
}

.hero {
    position: relative;
    top: auto;
    z-index: 0;

    min-height: calc(100svh - var(--nav-h));
    display: grid;
    align-content: center;

    padding: clamp(110px, 12vh, 160px) 0 clamp(72px, 10vh, 120px);
    text-align: center;

    isolation: isolate;
    overflow: hidden;
}

/* The radiance lives in pseudo layers so it feels deep + cohesive */
.hero::before {
    content: "";
    position: absolute;
    inset: -20%;
    z-index: -2;

    background:
        radial-gradient(1200px 700px at 18% 0%, rgba(52, 211, 153, 0.28) 0%, rgba(52, 211, 153, 0) 60%),
        radial-gradient(900px 600px at 85% 10%, rgba(187, 247, 208, 0.42) 0%, rgba(187, 247, 208, 0) 55%),
        radial-gradient(700px 520px at 50% 18%, rgba(6, 78, 59, 0.09) 0%, rgba(6, 78, 59, 0) 72%),
        linear-gradient(180deg, rgba(240, 253, 244, 1) 0%, rgba(255, 255, 255, 1) 58%, rgba(255, 255, 255, 1) 100%);

    filter: saturate(1.05);
    transform: translate3d(0, 0, 0);
}

/* A soft vignette so the “sheet” transition feels natural */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background:
        radial-gradient(800px 380px at 50% 52%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 62%),
        linear-gradient(180deg, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 1) 100%);
    opacity: 0.95;
}

.hero-content {
    max-width: 960px;
    margin: 0 auto;

    padding: clamp(26px, 3.5vw, 44px);
    border-radius: var(--radius-xl);

    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);

    box-shadow: var(--shadow-float);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 8px 14px;
    border-radius: 999px;

    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(17, 24, 39, 0.74);

    background: rgba(6, 78, 59, 0.08);
    border: 1px solid rgba(6, 78, 59, 0.14);

    margin: 0 auto 16px;
}

.hero-sub {
    font-size: 1.05rem;
    color: rgba(17, 24, 39, 0.70);
    margin: 0 auto 34px;
    max-width: 62ch;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* =========================
   SECTIONS & LAYOUTS
   ========================= */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 60px;
}

.section-header p {
    color: var(--color-text-muted);
    margin-top: 12px;
    font-size: 1.1rem;
}

.split-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(32px, 6vw, 80px);
    align-items: center;
}

.text-block {
    max-width: 65ch;
}

.text-block p + p {
    margin-top: 16px;
}

/* =========================
   STICKY “PROCESS” LAYOUT
   ========================= */
.sticky-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 6vw, 80px);
    align-items: start;
    position: relative;
}

.sticky-header {
    position: relative;
    top: 0;
    height: fit-content;
    z-index: 10;
    will-change: transform;
}

.scroll-steps {
    position: relative;
    border-left: 2px solid rgba(6, 78, 59, 0.16);
    padding-left: 56px;
    margin-left: 18px;

    display: grid;
    gap: 18px;
}

.step-number {
    position: absolute;
    left: -64px;
    top: 34px;

    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 999px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 4px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 16px 34px rgba(6, 78, 59, 0.25);

    z-index: 5;
    transition: transform 0.4s var(--ease-soft);
}

.step-card:hover .step-number,
.step-card.visible .step-number {
    transform: scale(1.12);
}

/* =========================
   GRID
   ========================= */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(18px, 2.4vw, 30px);
}

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

/* =========================
   CARD BASES
   ========================= */
/* Article card: same visual “sheet”, without hover tilt/glare/shadow changes */
.article-card {
    border-radius: var(--border-radius);
    overflow: hidden;

    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.60);

    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.55);

    position: relative;
    padding: 30px 26px;

    /* Keep reveal animation (fade-in uses --revealY) */
    transform: translateY(var(--revealY, 0px));
    will-change: transform, opacity;
}

.card,
.step-card {
    border-radius: var(--border-radius);
    overflow: hidden;

    /* Card style (from the other sheet) */
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.60);

    /* Use a stable multi-layer shadow so the browser can interpolate smoothly */
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.55);

    transform-style: preserve-3d;
    will-change: transform, box-shadow, opacity;

    transform:
        translateY(var(--revealY, 0px))
        perspective(900px)
        rotateX(var(--rx, 0deg))
        rotateY(var(--ry, 0deg));

    /* Combine reveal + hover transitions */
    transition-property: box-shadow, transform, opacity;
    transition-duration: 420ms, 800ms, 800ms;
    transition-timing-function: var(--ease-soft), cubic-bezier(0.25, 1, 0.5, 1), cubic-bezier(0.25, 1, 0.5, 1);

    /* Reveal delay applies only to transform + opacity, not box-shadow */
    transition-delay: 0s, var(--reveal-delay, 0s), var(--reveal-delay, 0s);

    position: relative;
}

.card { padding: 30px 26px; }
.step-card { padding: 40px; }

.card:hover {
    /* Keep same shadow “shape count” (two layers) so it animates cleanly */
    box-shadow:
        var(--shadow-card-hover),
        inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.step-card:hover {
    box-shadow:
        var(--shadow-step-hover),
        inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

/* Glare layer */
.card::before,
.step-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 420ms var(--ease-soft);

    background:
        radial-gradient(
            360px circle at var(--mx, 50%) var(--my, 50%),
            rgba(255, 255, 255, 0.35),
            rgba(255, 255, 255, 0.0) 60%
        );

    mix-blend-mode: soft-light;
}

.card.is-hovered::before,
.step-card.is-hovered::before {
    opacity: 1;
}

.step-card h3 {
    margin-top: 15px;
    font-size: 1.25rem;
}

/* =========================
   IMAGE & QUOTES
   ========================= */
.image-block {
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
}

.color-block-green {
    background: linear-gradient(135deg, #064e3b 0%, #022c22 45%, #0b755b 100%);
    border-radius: var(--border-radius);
    padding: 38px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    position: relative;
    overflow: hidden;
}

.color-block-green::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 25% 25%, rgba(52, 211, 153, 0.35) 0%, rgba(52, 211, 153, 0) 55%),
        radial-gradient(circle at 70% 20%, rgba(187, 247, 208, 0.25) 0%, rgba(187, 247, 208, 0) 60%);
    opacity: 0.9;
    pointer-events: none;
}

.color-block-green > * {
    position: relative;
    z-index: 1;
}

.quote-card {
    background: rgba(255, 255, 255, 0.92);
    padding: 32px;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.1rem;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
    color: #111827;
    line-height: 1.6;
}

/* =========================
   CONTENT BOX
   ========================= */
.content-box {
    max-width: 760px;
    margin: 0 auto;

    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border-radius: var(--radius-lg);
    padding: 40px 34px;

    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.content-box p + p { margin-top: 18px; }

/* =========================
   FOOTER
   ========================= */
.footer {
    background:
        linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
    padding: 80px 0 30px;
    border-top: 1px solid #e5e7eb;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 34px;
    margin-bottom: 40px;
}

.footer h4 {
    font-family: var(--font-heading);
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.footer p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

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

.copyright {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

/* =========================
   SCROLL ANIMATIONS
   ========================= */
.fade-in {
    opacity: 0;
    --revealY: 30px;

    transition:
        opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
        transform 0.8s cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 420ms var(--ease-soft);
}

.fade-in.visible {
    opacity: 1;
    --revealY: 0px;
}

.delay-100 { transition-delay: 0.1s, 0.1s, 0s; }
.delay-300 { transition-delay: 0.3s, 0.3s, 0s; }
.delay-500 { transition-delay: 0.5s, 0.5s, 0s; }

/* =========================
   MEDIA QUERIES
   ========================= */
@media (max-width: 900px) {
    .split-layout { grid-template-columns: 1fr; }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        right: 0;

        background: rgba(255, 255, 255, 0.92);
        padding: 18px 18px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.10);
        border: 1px solid rgba(229, 231, 235, 0.8);
        border-radius: var(--radius-lg);

        flex-direction: column;
        gap: 14px;
    }

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

    .burger-menu { display: block; }

    .burger-menu span {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--color-primary);
        margin: 5px 0;
        border-radius: 999px;
    }

    .hero-content {
        border-radius: var(--radius-lg);
    }
}

@media (max-width: 768px) {
    /* Keep the layout crisp on small screens (no heavy overlap) */
    .hero-stage {
        min-height: auto;
    }

    .hero {
        position: relative;
        min-height: auto;
    }

    .section-fold {
        margin-top: 0;
        padding-top: var(--section-pad);
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        box-shadow: none;
    }

    .sticky-container {
        grid-template-columns: 1fr;
    }

    .sticky-header {
        margin-bottom: 40px;
        transform: none !important;
    }

    .scroll-steps {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
    }

    .step-card::before {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .card,
    .step-card,
    .btn {
        transition: none !important;
        transform: none !important;
    }

    .card::before,
    .step-card::before,
    .card::after,
    .step-card::after,
    .btn::before {
        transition: none !important;
        opacity: 0 !important;
        box-shadow: none !important;
    }
}
