@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap");
@import "tailwindcss";
@plugin '@tailwindcss/typography';

@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

:root {
    --ink: #2e3b2c;
    --ink-soft: #5c6858;
    --wash: #f8f2e6;
    --base: #fbf7ef;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: rgba(255, 255, 255, 0.88);
    --line: rgba(46, 59, 44, 0.12);
    --inset-glint: rgba(255, 255, 255, 0.8);
    --kicker: rgba(97, 124, 95, 0.9);
    --bg-base: #f8f2e6;
    --header-bg: rgba(251, 247, 239, 0.88);
    --chip-bg: rgba(255, 255, 255, 0.78);
    --chip-line: rgba(97, 124, 95, 0.18);
    --link-bg-hover: rgba(255, 255, 255, 0.85);
    --hero-a: rgba(97, 124, 95, 0.16);
    --hero-b: rgba(243, 159, 129, 0.12);

    --background: oklch(0.96 0.02 85);
    --foreground: oklch(0.28 0.03 145);
    --card: oklch(0.97 0.01 85);
    --card-foreground: oklch(0.28 0.03 145);
    --popover: oklch(0.97 0.01 85);
    --popover-foreground: oklch(0.28 0.03 145);
    --primary: oklch(0.28 0.03 145);
    --primary-foreground: oklch(0.97 0.01 90);
    --secondary: oklch(0.94 0.02 85);
    --secondary-foreground: oklch(0.28 0.03 145);
    --muted: oklch(0.94 0.02 85);
    --muted-foreground: oklch(0.48 0.03 145);
    --accent: oklch(0.94 0.02 85);
    --accent-foreground: oklch(0.28 0.03 145);
    --destructive: oklch(0.577 0.245 27.325);
    --destructive-foreground: oklch(0.577 0.245 27.325);
    --border: oklch(0.9 0.02 85);
    --input: oklch(0.9 0.02 85);
    --ring: oklch(0.52 0.08 145);
    --chart-1: oklch(0.646 0.222 41.116);
    --chart-2: oklch(0.6 0.118 184.704);
    --chart-3: oklch(0.398 0.07 227.392);
    --chart-4: oklch(0.828 0.189 84.429);
    --chart-5: oklch(0.769 0.188 70.08);
    --radius: 0.75rem;
    --sidebar: oklch(0.96 0.02 85);
    --sidebar-foreground: oklch(0.28 0.03 145);
    --sidebar-primary: oklch(0.28 0.03 145);
    --sidebar-primary-foreground: oklch(0.97 0.01 90);
    --sidebar-accent: oklch(0.94 0.02 85);
    --sidebar-accent-foreground: oklch(0.28 0.03 145);
    --sidebar-border: oklch(0.9 0.02 85);
    --sidebar-ring: oklch(0.52 0.08 145);
    --accent: #617c5f;
    --accent-deep: #4e6a4c;
    --accent-darker: #3d5a3b;
    --secondary: #f39f81;
    --secondary-deep: #e8865f;
}

.dark {
    --ink: #e2e6df;
    --ink-soft: #b5bdb0;
    --wash: #1a1d18;
    --base: #141712;
    --surface: rgba(26, 29, 24, 0.82);
    --surface-strong: rgba(24, 27, 22, 0.92);
    --line: rgba(138, 173, 135, 0.14);
    --inset-glint: rgba(164, 196, 161, 0.1);
    --kicker: #a4c4a1;
    --bg-base: #111410;
    --header-bg: rgba(17, 20, 16, 0.84);
    --chip-bg: rgba(22, 25, 20, 0.9);
    --chip-line: rgba(138, 173, 135, 0.2);
    --link-bg-hover: rgba(34, 38, 32, 0.8);
    --hero-a: rgba(138, 173, 135, 0.12);
    --hero-b: rgba(245, 180, 158, 0.08);

    --background: oklch(0.18 0.02 145);
    --foreground: oklch(0.97 0.01 90);
    --card: oklch(0.18 0.02 145);
    --card-foreground: oklch(0.97 0.01 90);
    --popover: oklch(0.18 0.02 145);
    --popover-foreground: oklch(0.97 0.01 90);
    --primary: oklch(0.97 0.01 90);
    --primary-foreground: oklch(0.28 0.03 145);
    --secondary: oklch(0.24 0.02 145);
    --secondary-foreground: oklch(0.97 0.01 90);
    --muted: oklch(0.24 0.02 145);
    --muted-foreground: oklch(0.65 0.03 145);
    --accent: oklch(0.24 0.02 145);
    --accent-foreground: oklch(0.97 0.01 90);
    --destructive: oklch(0.396 0.141 25.723);
    --destructive-foreground: oklch(0.637 0.237 25.331);
    --border: oklch(0.24 0.02 145);
    --input: oklch(0.24 0.02 145);
    --ring: oklch(0.45 0.06 145);
    --chart-1: oklch(0.488 0.243 264.376);
    --chart-2: oklch(0.696 0.17 162.48);
    --chart-3: oklch(0.769 0.188 70.08);
    --chart-4: oklch(0.627 0.265 303.9);
    --chart-5: oklch(0.645 0.246 16.439);
    --sidebar: oklch(0.2 0.02 145);
    --sidebar-foreground: oklch(0.97 0.01 90);
    --sidebar-primary: oklch(0.488 0.243 264.376);
    --sidebar-primary-foreground: oklch(0.97 0.01 90);
    --sidebar-accent: oklch(0.24 0.02 145);
    --sidebar-accent-foreground: oklch(0.97 0.01 90);
    --sidebar-border: oklch(0.24 0.02 145);
    --sidebar-ring: oklch(0.45 0.06 145);
    --accent: #8aad87;
    --accent-deep: #a4c4a1;
    --accent-darker: #b8d4b5;
    --secondary: #f5b49e;
    --secondary-deep: #f8c8b4;
}

@theme inline {
    --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
    --color-background: var(--background);
    --color-foreground: var(--foreground);
    --color-card: var(--card);
    --color-card-foreground: var(--card-foreground);
    --color-popover: var(--popover);
    --color-popover-foreground: var(--popover-foreground);
    --color-primary: var(--primary);
    --color-primary-foreground: var(--primary-foreground);
    --color-secondary: var(--secondary);
    --color-secondary-foreground: var(--secondary-foreground);
    --color-muted: var(--muted);
    --color-muted-foreground: var(--muted-foreground);
    --color-accent: var(--accent);
    --color-accent-foreground: var(--accent-foreground);
    --color-destructive: var(--destructive);
    --color-destructive-foreground: var(--destructive-foreground);
    --color-border: var(--border);
    --color-input: var(--input);
    --color-ring: var(--ring);
    --color-chart-1: var(--chart-1);
    --color-chart-2: var(--chart-2);
    --color-chart-3: var(--chart-3);
    --color-chart-4: var(--chart-4);
    --color-chart-5: var(--chart-5);
    --radius-sm: calc(var(--radius) - 4px);
    --radius-md: calc(var(--radius) - 2px);
    --radius-lg: var(--radius);
    --radius-xl: calc(var(--radius) + 4px);
    --color-sidebar: var(--sidebar);
    --color-sidebar-foreground: var(--sidebar-foreground);
    --color-sidebar-primary: var(--sidebar-primary);
    --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
    --color-sidebar-accent: var(--sidebar-accent);
    --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
    --color-sidebar-border: var(--sidebar-border);
    --color-sidebar-ring: var(--sidebar-ring);
}

html {
    font-size: 18px;
}

html,
body,
#app {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-sans);
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: 0.01em;
    background-color: var(--bg-base);
    background:
        radial-gradient(
            1100px 620px at -8% -10%,
            var(--hero-a),
            transparent 58%
        ),
        radial-gradient(
            1050px 620px at 112% -12%,
            var(--hero-b),
            transparent 62%
        ),
        radial-gradient(
            720px 380px at 50% 115%,
            rgba(97, 124, 95, 0.1),
            transparent 68%
        ),
        linear-gradient(
            180deg,
            color-mix(in oklab, var(--wash) 68%, white) 0%,
            var(--base) 44%,
            var(--bg-base) 100%
        );
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.28;
    background:
        radial-gradient(
            circle at 20% 15%,
            rgba(255, 255, 255, 0.8),
            transparent 34%
        ),
        radial-gradient(
            circle at 78% 26%,
            rgba(97, 124, 95, 0.2),
            transparent 42%
        ),
        radial-gradient(
            circle at 42% 82%,
            rgba(243, 159, 129, 0.14),
            transparent 36%
        );
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.14;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(circle at 50% 30%, black, transparent 78%);
}

@layer base {
    a {
        color: var(--accent-deep);
        text-decoration-color: rgba(78, 106, 76, 0.4);
        text-decoration-thickness: 1px;
        text-underline-offset: 2px;
    }

    a:hover {
        color: var(--accent-darker);
    }
}

code {
    font-size: 0.9em;
    border: 1px solid var(--line);
    background: color-mix(in oklab, var(--surface-strong) 82%, white 18%);
    border-radius: 7px;
    padding: 2px 7px;
}

pre code {
    border: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: inherit;
}

.prose pre {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #1e2a1c;
    color: #e8f0e6;
}

.page-wrap {
    width: min(1200px, calc(100% - 2rem));
    margin-inline: auto;
}

.display-title {
    font-family: "Fraunces", Georgia, serif;
}

.island-shell {
    border: 1px solid var(--line);
    background: linear-gradient(165deg, var(--surface-strong), var(--surface));
    box-shadow:
        0 1px 0 var(--inset-glint) inset,
        0 22px 44px rgba(46, 59, 44, 0.1),
        0 6px 18px rgba(46, 59, 44, 0.08);
    backdrop-filter: blur(4px);
}

.feature-card {
    background: linear-gradient(
        165deg,
        color-mix(in oklab, var(--surface-strong) 93%, white 7%),
        var(--surface)
    );
    box-shadow:
        0 1px 0 var(--inset-glint) inset,
        0 18px 34px rgba(46, 59, 44, 0.1),
        0 4px 14px rgba(46, 59, 44, 0.06);
}

.feature-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in oklab, var(--accent-deep) 35%, var(--line));
}

button,
.island-shell,
a {
    transition:
        background-color 200ms ease,
        color 200ms ease,
        border-color 200ms ease,
        translate 300ms ease-out,
        transform 300ms ease-out,
        box-shadow 300ms ease-out;
}

.island-kicker {
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--kicker);
}

.rise-in {
    animation: rise-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .rise-in {
        animation: none;
    }

    .reveal-up,
    .reveal-child {
        opacity: 1;
        translate: 0 0;
        transition: none;
    }
}

.site-footer {
    border-top: 1px solid var(--line);
    background: color-mix(in oklab, var(--header-bg) 84%, transparent 16%);
}

/* ── scroll reveal ─────────────────────────────────── */

@layer base {
    .reveal-up {
        opacity: 0;
        translate: 0 28px;
        transition:
            opacity 800ms cubic-bezier(0.16, 1, 0.3, 1),
            translate 800ms cubic-bezier(0.16, 1, 0.3, 1),
            box-shadow 300ms ease-out;
    }

    .reveal-up.revealed {
        opacity: 1;
        translate: 0 0;
    }

    .reveal-child {
        opacity: 0;
        translate: 0 16px;
        transition:
            opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
            translate 600ms cubic-bezier(0.16, 1, 0.3, 1),
            box-shadow 300ms ease-out;
    }

    .revealed .reveal-child {
        opacity: 1;
        translate: 0 0;
    }
}

/* ── theme toggle ─────────────────────────────────── */

.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 3.75rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--chip-line);
    border-radius: 9999px;
    background: var(--chip-bg);
    box-shadow:
        0 1px 3px rgba(46, 59, 44, 0.08),
        inset 0 1px 0 var(--inset-glint);
    cursor: pointer;
    outline: none;
    transition:
        border-color 200ms ease,
        box-shadow 200ms ease;
}

.theme-toggle:hover {
    border-color: color-mix(in oklab, var(--accent-deep) 40%, var(--chip-line));
}

.theme-toggle:focus-visible {
    box-shadow:
        0 0 0 2px var(--bg-base),
        0 0 0 4px var(--accent);
}

.theme-toggle-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 0.375rem;
    pointer-events: none;
}

.theme-toggle-icon {
    width: 0.85rem;
    height: 0.85rem;
    color: var(--ink-soft);
    opacity: 0.35;
    flex-shrink: 0;
}

.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 9999px;
    background: linear-gradient(145deg, var(--accent), var(--accent-deep));
    box-shadow:
        0 2px 6px rgba(46, 59, 44, 0.2),
        0 1px 2px rgba(46, 59, 44, 0.12);
    color: white;
    transform: translateX(var(--thumb-x));
    transition:
        transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1),
        background 200ms ease;
}

.theme-toggle-thumb svg {
    width: 0.82rem;
    height: 0.82rem;
}

@layer base {
    * {
        @apply border-border outline-ring/50;
    }
    body {
        background-color: var(--background);
        color: var(--foreground);
    }
}

/* ── static waitlist landing page ─────────────────── */
.landing-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    color: #ffffff;
    font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
    background: #f7f5ef;
}

.waitlist-shell {
    flex: 1;
    display: flex;
    padding: clamp(0.8rem, 2vw, 2rem) clamp(1rem, 2.5vw, 3rem) clamp(0.7rem, 1.5vw, 1.4rem);
}

.waitlist-card {
    box-sizing: border-box;
    width: 100%;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: clamp(1.5rem, 3vh, 2.6rem) 1.25rem clamp(1.5rem, 3vh, 2.6rem);
    border-radius: clamp(0.875rem, 1.5vw, 1.5rem);
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.08), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.06), transparent 30%),
        #789374;
}

.waitlist-content {
    width: min(100%, 47rem);
    text-align: center;
}

.waitlist-logo {
    width: 9.25rem;
    height: auto;
    margin: 0 auto clamp(1.25rem, 2.4vh, 2rem);
    filter: brightness(0) invert(1);
}

.waitlist-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.88;
}

.waitlist-content h1 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 3.75rem;
    font-weight: 500;
    line-height: 1.03;
    letter-spacing: -0.035em;
}

.waitlist-subtitle {
    margin: 0.35rem auto 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 2.6rem;
    line-height: 1.12;
    max-width: 13em;
}

.waitlist-intro {
    max-width: 34rem;
    margin: clamp(1.15rem, 2.2vh, 1.65rem) auto clamp(1.1rem, 2.1vh, 1.6rem);
    font-size: 1rem;
    line-height: 1.55;
    letter-spacing: 0.01em;
}

.waitlist-form {
    padding-top: clamp(1rem, 2vh, 1.5rem);
    border-top: 1px solid rgba(255, 255, 255, 0.45);
    text-align: left;
}

.role-fieldset {
    margin: 0 0 1.35rem;
    padding: 0;
    border: 0;
}

.role-fieldset legend {
    margin-bottom: 0.55rem;
    font-size: 1rem;
    letter-spacing: 0.005em;
}

.role-options {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.role-options label {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.35rem 1.5rem 0.35rem 0;
    margin-right: 1.5rem;
    color: #ffffff;
    font-size: 1rem;
    letter-spacing: 0;
}

.role-options label:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.38);
}

.waitlist-form input[type="radio"],
.waitlist-form input[type="checkbox"] {
    appearance: none;
    flex: 0 0 auto;
    display: inline-grid;
    place-content: center;
    width: 1.55rem;
    height: 1.55rem;
    margin: 0;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: #ffffff;
}

.waitlist-form input[type="radio"] {
    border-radius: 50%;
}

.waitlist-form input[type="radio"]::before {
    content: "";
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 50%;
    transform: scale(0);
    background: #f39f81;
    transition: transform 150ms ease;
}

.waitlist-form input[type="checkbox"] {
    border-radius: 0.25rem;
    background: transparent;
}

.waitlist-form input[type="checkbox"]::before {
    content: "✓";
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 900;
    transform: scale(0);
    transition: transform 150ms ease;
}

.waitlist-form input[type="radio"]:checked::before,
.waitlist-form input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.waitlist-form input:focus-visible,
.waitlist-form button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.85);
    outline-offset: 3px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

.form-grid label > span,
.waitlist-form > label:not(.privacy-check) > span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.waitlist-form input[type="text"],
.waitlist-form input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 0.85rem;
    padding: 0.9rem 1.15rem;
    border: 1px solid rgba(46, 59, 44, 0.12);
    border-radius: 0.5rem;
    background: #ffffff;
    color: #303030;
    font: inherit;
    font-size: 1rem;
    letter-spacing: 0;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.waitlist-form input::placeholder {
    color: #9a9a9a;
    opacity: 1;
}

.privacy-check {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.1rem 0 1.25rem;
    color: #ffffff;
    font-size: 0.95rem;
    letter-spacing: 0;
}

.privacy-check a,
.waitlist-footer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.waitlist-form button {
    width: 100%;
    min-height: 3.8rem;
    border: 0;
    border-radius: 999px;
    background: #f39f81;
    color: #111111;
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.waitlist-form button:hover {
    background: #f5ad93;
    transform: translateY(-1px);
}

.waitlist-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
    padding: 0 2rem clamp(0.65rem, 1.2vw, 1rem);
    color: #666666;
    font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.005em;
}

@media (max-width: 720px) {
    .waitlist-card {
        min-height: auto;
        padding-block: 2.5rem 3rem;
    }

    .waitlist-logo {
        width: 8rem;
    }

    .waitlist-content h1 {
        font-size: 2.8rem;
    }

    .waitlist-subtitle {
        font-size: 2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .role-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .role-options label {
        border-right: 0 !important;
        margin-right: 0;
        padding-right: 0;
    }

    .waitlist-footer {
        flex-direction: column;
        padding-inline: 1rem;
    }
}

.form-success {
    margin: 1rem 0 0;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.45;
    text-align: center;
}
