/* =========================================================
   FOREWIN WEBSITE V2
   Main Stylesheet
   ========================================================= */


/* =========================================================
   DESIGN TOKENS
   ========================================================= */

:root {
    --color-bg: #f5f7f3;
    --color-surface: #ffffff;
    --color-surface-soft: #edf3ed;
    --color-surface-dark: #102019;

    --color-text: #17231d;
    --color-text-soft: #5d6c64;
    --color-text-light: #ffffff;

    --color-green: #2f8f57;
    --color-green-dark: #206c40;
    --color-green-light: #dceee1;

    --color-border: rgba(23, 35, 29, 0.12);
    --color-shadow: rgba(22, 40, 31, 0.12);

    --font-heading: Arial, Helvetica, sans-serif;
    --font-body: Arial, Helvetica, sans-serif;

    --container-width: 1180px;
    --container-narrow: 780px;

    --radius-small: 12px;
    --radius-medium: 20px;
    --radius-large: 32px;

    --shadow-small: 0 10px 30px rgba(22, 40, 31, 0.08);
    --shadow-medium: 0 20px 50px rgba(22, 40, 31, 0.14);
    --shadow-large: 0 30px 80px rgba(22, 40, 31, 0.18);

    --transition: 0.25s ease;
}


/* =========================================================
   RESET
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

h1,
h2,
h3,
p,
blockquote {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

section {
    scroll-margin-top: 90px;
}


/* =========================================================
   LAYOUT
   ========================================================= */

.container {
    width: min(calc(100% - 40px), var(--container-width));
    margin-inline: auto;
}

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

.section {
    padding: 110px 0;
}

.section-soft {
    background: var(--color-surface-soft);
}

.section-label,
.eyebrow {
    margin-bottom: 18px;
    color: var(--color-green);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section h2 {
    max-width: 820px;
    margin-bottom: 28px;
    font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.section-intro {
    max-width: 760px;
    margin-bottom: 55px;
    color: var(--color-text-soft);
    font-size: 1.1rem;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(245, 247, 243, 0.88);
    border-bottom: 1px solid rgba(23, 35, 29, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand img {
    width: 170px;
    height: auto;
}

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

.site-nav a {
    position: relative;
    color: var(--color-text-soft);
    font-size: 0.92rem;
    font-weight: 700;
    transition:
        color var(--transition),
        transform var(--transition);
}

.site-nav a::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 2px;
    background: var(--color-green);
    content: "";
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition);
}

.site-nav a:hover {
    color: var(--color-text);
    transform: translateY(-1px);
}

.site-nav a:hover::after {
    transform: scaleX(1);
}


/* =========================================================
   HERO — CONTINUOUS BACKGROUND LAYOUT
   ========================================================= */

.hero {
    position: relative;
    min-height: 760px;
    padding: 90px 0 110px;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 78% 38%,
            rgba(92, 164, 111, 0.16),
            transparent 34%
        ),
        linear-gradient(
            90deg,
            #f7f9f5 0%,
            #f5f8f3 42%,
            #e7f0e6 72%,
            #dcebdd 100%
        );
}

.hero::before {
    position: absolute;
    top: -180px;
    right: -150px;
    width: 620px;
    height: 620px;
    border: 1px solid rgba(47, 143, 87, 0.12);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.hero::after {
    position: absolute;
    right: 4%;
    bottom: -330px;
    width: 600px;
    height: 600px;
    border: 1px solid rgba(47, 143, 87, 0.1);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(520px, 1.05fr);
    min-height: 610px;
    align-items: center;
    gap: 40px;
}

.hero-copy {
    position: relative;
    z-index: 3;
    max-width: 680px;
}

.hero h1 {
    margin-bottom: 30px;
    font-size: clamp(3rem, 5.4vw, 5.3rem);
    line-height: 1;
}

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

.phone-showcase {
    position: absolute;
    z-index: 1;
    top: -90px;
    right: calc((100vw - min(100vw - 40px, var(--container-width))) / -2);
    bottom: -110px;

    width: min(62vw, 880px);
    min-width: 650px;

    background-image:
        linear-gradient(
            90deg,
            rgba(245, 248, 243, 1) 0%,
            rgba(245, 248, 243, 0.92) 8%,
            rgba(245, 248, 243, 0.42) 22%,
            rgba(245, 248, 243, 0) 42%
        ),
        url("assets/forewin-phone-mockup.png");

    background-repeat: no-repeat;
    background-position:
        center,
        center right;

    background-size:
        cover,
        cover;

    filter: saturate(0.96);
}

/* Softly blend the lower edge into the hero */
.phone-showcase::before {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(247, 249, 245, 0) 62%,
            rgba(231, 240, 230, 0.2) 78%,
            rgba(220, 235, 221, 0.7) 100%
        );
    content: "";
}

/* Removes the old phone shadow element */
.phone-showcase::after {
    display: none;
}

.phone-mockup:hover {
    filter: drop-shadow(0 34px 40px rgba(16, 32, 25, 0.28));
    transform: rotate(0deg) translateY(-8px);
}


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

.button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 800;
    transition:
        background-color var(--transition),
        border-color var(--transition),
        color var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.button:hover {
    transform: translateY(-3px);
}

.button.primary {
    background: var(--color-green);
    color: var(--color-text-light);
    box-shadow: 0 12px 30px rgba(47, 143, 87, 0.25);
}

.button.primary:hover {
    background: var(--color-green-dark);
    box-shadow: 0 16px 36px rgba(47, 143, 87, 0.34);
}

.button.secondary {
    background: rgba(255, 255, 255, 0.65);
    border-color: var(--color-border);
    color: var(--color-text);
}

.button.secondary:hover {
    background: var(--color-surface);
    border-color: rgba(47, 143, 87, 0.35);
}


/* =========================================================
   MISSION
   ========================================================= */

.mission-section {
    background: var(--color-surface);
    text-align: center;
}

.mission-section .narrow {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mission-section h2 {
    max-width: 760px;
}

.mission-section p {
    max-width: 720px;
    color: var(--color-text-soft);
    font-size: 1.12rem;
}

.mission-section strong {
    color: var(--color-text);
}


/* =========================================================
   PLAY / IMPROVE / CONNECT
   ========================================================= */

.three-column-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.feature-card {
    position: relative;
    min-height: 320px;
    padding: 38px;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-small);
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

.feature-card::after {
    position: absolute;
    top: -45px;
    right: -45px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--color-green-light);
    content: "";
    opacity: 0.6;
}

.feature-card:hover {
    border-color: rgba(47, 143, 87, 0.28);
    box-shadow: var(--shadow-medium);
    transform: translateY(-8px);
}

.feature-icon {
    position: relative;
    z-index: 1;
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    border-radius: 16px;
    background: var(--color-green-light);
    font-size: 1.7rem;
}

.feature-card h3 {
    position: relative;
    z-index: 1;
    margin-bottom: 18px;
    font-size: 1.65rem;
}

.feature-card p {
    position: relative;
    z-index: 1;
    margin-bottom: 0;
    color: var(--color-text-soft);
}

.mission-statement {
    max-width: 860px;
    margin: 85px auto 0;
    text-align: center;
}

.mission-statement h2 {
    margin-inline: auto;
    margin-bottom: 20px;
    color: var(--color-green);
}

.mission-statement p {
    max-width: 680px;
    margin: 0 auto;
    color: var(--color-text-soft);
    font-size: 1.18rem;
}


/* =========================================================
   CALVIN
   ========================================================= */

.calvin-section {
    position: relative;
    overflow: hidden;
    background: var(--color-surface-dark);
    color: var(--color-text-light);
}

.calvin-section::before {
    position: absolute;
    top: -200px;
    right: -120px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: rgba(47, 143, 87, 0.18);
    content: "";
    filter: blur(10px);
}

.calvin-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 0.85fr;
    align-items: center;
    gap: 70px;
}

.calvin-left h2 {
    color: var(--color-text-light);
}

.calvin-left p:not(.section-label) {
    max-width: 650px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.08rem;
}

.calvin-right {
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-large);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.11),
            rgba(255, 255, 255, 0.04)
        );
    box-shadow: var(--shadow-large);
    backdrop-filter: blur(10px);
}

.calvin-right blockquote {
    margin-bottom: 26px;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.025em;
}

.calvin-note {
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.92rem;
}


/* =========================================================
   ECOSYSTEM
   ========================================================= */

.ecosystem-section {
    background: var(--color-surface);
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.ecosystem-card {
    padding: 30px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background: linear-gradient(
        145deg,
        #ffffff,
        #f7faf6
    );
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

.ecosystem-card:hover {
    border-color: rgba(47, 143, 87, 0.3);
    box-shadow: var(--shadow-small);
    transform: translateY(-5px);
}

.ecosystem-card h3 {
    margin-bottom: 14px;
    font-size: 1.35rem;
}

.ecosystem-card p {
    margin-bottom: 0;
    color: var(--color-text-soft);
}


/* =========================================================
   ROADMAP
   ========================================================= */

.roadmap-section {
    background:
        linear-gradient(
            180deg,
            var(--color-surface-soft),
            #f7f9f6
        );
}

.roadmap {
    position: relative;
    display: grid;
    max-width: 860px;
    margin-top: 45px;
    gap: 22px;
}

.roadmap::before {
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 24px;
    width: 2px;
    background: rgba(47, 143, 87, 0.2);
    content: "";
}

.roadmap-item {
    position: relative;
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 22px;
    padding: 25px 30px 25px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background: rgba(255, 255, 255, 0.72);
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

.roadmap-item:hover {
    border-color: rgba(47, 143, 87, 0.28);
    box-shadow: var(--shadow-small);
    transform: translateX(6px);
}

.roadmap-item > span {
    position: relative;
    z-index: 1;
    display: flex;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-green-light);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-green);
    font-size: 1.1rem;
    font-weight: 900;
}

.roadmap-item.complete > span,
.roadmap-item.current > span {
    background: var(--color-green);
    border-color: var(--color-green);
    color: var(--color-text-light);
}

.roadmap-item.current {
    border-color: rgba(47, 143, 87, 0.3);
    box-shadow: var(--shadow-small);
}

.roadmap-item h3 {
    margin-bottom: 8px;
    font-size: 1.35rem;
}

.roadmap-item p {
    margin-bottom: 0;
    color: var(--color-text-soft);
}


/* =========================================================
   WAITLIST
   ========================================================= */

.waitlist-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(255, 255, 255, 0.2),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            var(--color-green-dark),
            var(--color-green)
        );
    color: var(--color-text-light);
    text-align: center;
}

.waitlist-section::before,
.waitlist-section::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    content: "";
}

.waitlist-section::before {
    top: -210px;
    left: -140px;
    width: 500px;
    height: 500px;
}

.waitlist-section::after {
    right: -160px;
    bottom: -250px;
    width: 560px;
    height: 560px;
}

.waitlist-section .container {
    position: relative;
    z-index: 1;
}

.waitlist-section h2 {
    margin-inline: auto;
    color: var(--color-text-light);
}

.waitlist-section p {
    max-width: 670px;
    margin-right: auto;
    margin-bottom: 35px;
    margin-left: auto;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.1rem;
}

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

.waitlist-section .button.primary {
    background: var(--color-text-light);
    color: var(--color-green-dark);
    box-shadow: 0 15px 35px rgba(16, 32, 25, 0.2);
}

.waitlist-section .button.primary:hover {
    background: #f0f4ef;
}

.waitlist-section .button.secondary {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-light);
}

.waitlist-section .button.secondary:hover {
    background: rgba(255, 255, 255, 0.18);
}
/* =========================================================
   WAITLIST FORM
   ========================================================= */

.waitlist-form {
    width: 100%;
    max-width: 720px;
    margin: 2rem auto 0;
}

.waitlist-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 700;
}

.form-group input {
    width: 100%;
    min-height: 52px;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    font: inherit;
    outline: none;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.form-group input:focus {
    border-color: #45b96f;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 4px rgba(69, 185, 111, 0.18);
}

.waitlist-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.waitlist-buttons button {
    border: none;
    cursor: pointer;
    font: inherit;
}

.waitlist-buttons button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.waitlist-message {
    min-height: 1.5rem;
    margin: 1.25rem 0 0;
    font-weight: 700;
    text-align: center;
}

.waitlist-message.success {
    color: #83e3a5;
}

.waitlist-message.error {
    color: #ffb4b4;
}

@media (max-width: 700px) {
    .waitlist-fields {
        grid-template-columns: 1fr;
    }

    .waitlist-buttons {
        flex-direction: column;
    }

    .waitlist-buttons .button {
        width: 100%;
        text-align: center;
    }
}

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

.site-footer {
    padding: 65px 0;
    background: #0b1711;
    color: rgba(255, 255, 255, 0.68);
    text-align: center;
}

.footer-logo {
    width: 160px;
    height: auto;
    margin: 0 auto 24px;
    filter: none;
    mix-blend-mode: screen;
}

.site-footer p {
    max-width: 620px;
    margin-right: auto;
    margin-left: auto;
}

.site-footer .copyright {
    margin-top: 28px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.85rem;
}


/* =========================================================
   SIMPLE ENTRANCE ANIMATION
   ========================================================= */

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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

.hero-copy,
.phone-showcase {
    animation: fade-up 0.8s ease both;
}

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


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 980px) {
    .site-nav {
        gap: 18px;
    }

    .hero {
        padding-top: 75px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-copy {
        max-width: 700px;
    }

    .phone-showcase {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;

        width: calc(100% + 40px);
        min-width: 0;
        min-height: 560px;
        margin: 35px -20px -110px;

        background-position:
            center,
            center;

        background-size:
            cover,
            cover;
    }

    .calvin-layout {
        grid-template-columns: 1fr;
    }

    .three-column-grid,
    .ecosystem-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {
    .container {
        width: min(calc(100% - 28px), var(--container-width));
    }

    .section {
        padding: 82px 0;
    }

    .header-inner {
        min-height: 68px;
    }

    .brand img {
        width: 145px;
    }

    .site-nav {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: 65px 0 90px;
    }

    .hero-grid {
        display: block;
    }

    .hero h1 {
        font-size: clamp(3rem, 15vw, 4.7rem);
    }

    .hero-text {
        font-size: 1rem;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions .button {
        width: 100%;
    }

    .phone-showcase {
        width: calc(100% + 28px);
        min-height: 460px;
        margin: 45px -14px -90px;

        background-image:
            linear-gradient(
                180deg,
                rgba(245, 248, 243, 0.82) 0%,
                rgba(245, 248, 243, 0.15) 25%,
                rgba(245, 248, 243, 0) 55%
            ),
            url("assets/forewin-phone-mockup.png");

        background-position:
            center,
            center;

        background-size:
            cover,
            cover;
    }

    .three-column-grid,
    .ecosystem-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {
    .hero h1 {
        font-size: 3rem;
    }

    .section h2 {
        font-size: 2.25rem;
    }

    .calvin-right blockquote {
        font-size: 1.35rem;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}