/* ==========================================================================
   InnerWe — shared foundations
   Design tokens, reset, typography and the components both pages share.
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------- */

@font-face {
    font-family: 'Josefin Sans';
    src: url('../fonts/JosefinSans.woff2') format('woff2'),
         url('../fonts/JosefinSans.ttf') format('truetype');
    font-weight: 100 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Josefin Sans';
    src: url('../fonts/JosefinSans-Italic.woff2') format('woff2'),
         url('../fonts/JosefinSans-Italic.ttf') format('truetype');
    font-weight: 100 700;
    font-style: italic;
    font-display: swap;
}

/* --- Tokens --------------------------------------------------------------- */

:root {
    --bg: #F6F3FB;
    --surface: #FFFFFF;
    --panel: #FBFAFE;
    --ink: #2D1B3D;
    --ink-soft: #635571;
    --ink-faint: #76688C;
    --line: rgba(45, 27, 61, .10);
    /* Borders on interactive controls, kept at 3:1 for WCAG 1.4.11.
       Containers use the softer --line. */
    --control-border: #938A9B;
    --track: rgba(45, 27, 61, .08);
    --core: #2D1B3D;
    /* The mark's inner disc. Splits from --core, which also paints two
       full-width bands, so the disc can invert in dark mode on its own —
       matching mark-reverse.svg, where it is white with a plum wordmark. */
    --mark-core: #2D1B3D;
    --on-mark-core: #42F5B0;
    --mint: #42F5B0;
    /* --mint-deep: #0B7E59; */
    --mint-deep: #42F5B0;
    --violet: #8D63FF;
    --indigo: #6C4DFF;
    /* Text-weight accent. Splits from --indigo so it can lighten in dark mode
       without moving the brand colour itself. */
    --accent: #6C4DFF;
    --accent-hover: #522DFF;
    --danger: #FFB4A2;
    --on-mint: #15231D;
    --on-core: #F5F1FA;
    --on-core-soft: #C9BEDA;
    --phone-frame: #1C1029;
    --phone-screen: #FAF7FE;
    --nav-bg: rgba(246, 243, 251, .55);
    --nav-bg-solid: rgba(246, 243, 251, .88);
    --nav-bg-flat: rgba(246, 243, 251, .80);

    /* Mood spectrum — shared by the teaser buttons and result bars. */
    --m1: #42F5B0;
    --m2: #4FD6C4;
    --m3: #6C4DFF;
    --m4: #9C8FB0;
    --m5: #B07CFF;
    --m6: #7A5AF0;

    --shadow-card: 0 24px 50px -30px rgba(45, 27, 61, .4);
    --shadow-quote: 0 30px 70px -40px rgba(45, 27, 61, .35);
    --shadow-phone: 0 40px 80px -30px rgba(0, 0, 0, .7);
    --shadow-mint-sm: 0 8px 22px rgba(66, 245, 176, .4);
    --shadow-mint-lg: 0 18px 40px rgba(66, 245, 176, .35);

    --ease-out-soft: cubic-bezier(.2, .7, .2, 1);
    --nav-height: 71px;

    color-scheme: light;
}

/* The dark palette is declared twice on purpose: once for the explicit toggle,
   once for visitors who never touch it and browse with JavaScript disabled. */
:root[data-theme="dark"] {
    --bg: #1B0F28;
    --surface: #251636;
    --panel: #2C1B40;
    --ink: #F3EEFA;
    --ink-soft: #B6A9C8;
    --ink-faint: #9387A3;
    --line: rgba(255, 255, 255, .12);
    --control-border: #6F657A;
    --track: rgba(255, 255, 255, .09);
    --core: #251636;
    --mark-core: #FAF7FE;
    --on-mark-core: #2D1B3D;
    --mint-deep: #42F5B0;
    --accent: #9770FF;
    --accent-hover: #B397FF;
    --nav-bg: rgba(27, 15, 40, .5);
    --nav-bg-solid: rgba(27, 15, 40, .86);
    --nav-bg-flat: rgba(27, 15, 40, .72);

    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --bg: #1B0F28;
        --surface: #251636;
        --panel: #2C1B40;
        --ink: #F3EEFA;
        --ink-soft: #B6A9C8;
        --ink-faint: #9387A3;
        --line: rgba(255, 255, 255, .12);
        --control-border: #6F657A;
        --track: rgba(255, 255, 255, .09);
        --core: #251636;
        --mark-core: #FAF7FE;
        --on-mark-core: #2D1B3D;
        --mint-deep: #42F5B0;
        --accent: #9770FF;
        --accent-hover: #B397FF;
        --nav-bg: rgba(27, 15, 40, .5);
        --nav-bg-solid: rgba(27, 15, 40, .86);
        --nav-bg-flat: rgba(27, 15, 40, .72);

        color-scheme: dark;
    }
}

/* --- Reset ---------------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Josefin Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    transition: background .5s, color .5s;
}

img {
    max-width: 100%;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color .2s;
}

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

::selection {
    background: var(--mint);
    color: var(--on-mint);
}

:focus-visible {
    outline: 2px solid var(--indigo);
    outline-offset: 3px;
    border-radius: 4px;
}

:root[data-theme="dark"] :focus-visible {
    outline-color: var(--mint);
}

/* --- Utilities ------------------------------------------------------------ */

/* Beats the layout `display` that components set on themselves. */
[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--mint);
    color: var(--on-mint);
    font-size: 1rem;
    font-weight: 600;
    transform: translateY(-160%);
    transition: transform .2s;
}

.skip-link:focus-visible {
    color: var(--on-mint);
    transform: none;
}

.eyebrow {
    margin: 0 0 20px;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--mint-deep);
}

/* --- Brand lockup --------------------------------------------------------- */

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-mark {
    display: block;
    width: auto;
    height: 34px;
}

/* Both marks ship in the markup so the swap survives a JS-less dark mode. */
:root[data-theme="dark"] .brand-mark-light,
.brand-mark-dark {
    display: none;
}

:root[data-theme="dark"] .brand-mark-dark {
    display: block;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .brand-mark-light {
        display: none;
    }

    :root:not([data-theme]) .brand-mark-dark {
        display: block;
    }
}

.brand-name {
    font-size: 1.32rem;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1;
    color: var(--ink);
}

.brand-name-we {
    color: var(--mint-deep);
}

.brand:hover .brand-name {
    color: var(--ink);
}

/* --- Theme toggle --------------------------------------------------------- */

.theme-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--control-border);
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

/* Keeps the 38px circle the design asks for while giving the pointer a
   comfortable 44px target. */
.theme-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    translate: -50% -50%;
}

.theme-toggle:hover {
    background: var(--line);
}

.theme-toggle .icon-sun {
    display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-toggle .icon-sun {
        display: block;
    }

    :root:not([data-theme]) .theme-toggle .icon-moon {
        display: none;
    }
}

/* --- Language ------------------------------------------------------------- */

/* Held back only while a non-English catalog is in flight, so a translated
   visitor never sees English first. Both the head snippet and i18n.js clear
   this, and each carries a timeout, so it can never strand the page. */
:root[data-i18n-loading] body {
    visibility: hidden;
}

/* The switcher's markup is built by i18n.js from the one language list, so it
   never has to be kept in step by hand. The mount point is sized here instead,
   which keeps filling it in from shifting the header. */
.lang-switch {
    position: relative;
    display: flex;
    min-width: 68px;
    height: 38px;
    align-items: center;
}

.lang-toggle {
    display: flex;
    height: 38px;
    align-items: center;
    gap: 6px;
    padding: 0 13px;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.lang-toggle:hover {
    background: var(--line);
}

.lang-globe {
    flex: none;
    opacity: .8;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 70;
    display: flex;
    min-width: 158px;
    flex-direction: column;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.lang-option {
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.lang-option:hover {
    background: var(--line);
    color: var(--ink);
}

.lang-option.is-active {
    color: var(--accent);
    font-weight: 600;
}

/* --- Buttons -------------------------------------------------------------- */

.cta-nav {
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--mint);
    color: var(--on-mint);
    font-size: 1rem;
    font-weight: 600;
    transition: transform .2s, box-shadow .2s;
}

.cta-nav:hover {
    color: var(--on-mint);
    transform: translateY(-1px);
    box-shadow: var(--shadow-mint-sm);
}

.cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 17px 34px;
    border-radius: 999px;
    background: var(--mint);
    color: var(--on-mint);
    font-size: 1.15rem;
    font-weight: 600;
    transition: transform .2s, box-shadow .2s;
}

.cta-primary:hover {
    color: var(--on-mint);
    transform: translateY(-2px);
    box-shadow: var(--shadow-mint-lg);
}

/* --- Scroll reveal -------------------------------------------------------- */

/* Only hide revealable content once the observer is confirmed to be running,
   so no-JS visitors and search engines always get the resting state.
   The standalone `translate` property is used rather than `transform` so a
   revealed element keeps whatever transform it carries of its own. */
.js-reveal [data-reveal] {
    opacity: 0;
    translate: 0 30px;
    transition: opacity .8s var(--ease-out-soft), translate .8s var(--ease-out-soft);
}

.js-reveal [data-reveal].is-revealed {
    opacity: 1;
    translate: none;
}

/* --- Reduced motion ------------------------------------------------------- */

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

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

    .js-reveal [data-reveal] {
        opacity: 1;
        translate: none;
    }
}

/* --- Waitlist ------------------------------------------------------------- */

/* Shared by the promo page's closing band and the teaser's sign-up band. Both
   sit on the plum core, so the colours here are fixed rather than themed. */

.waitlist {
    max-width: 460px;
    margin: 0 auto;
}

.waitlist-intro {
    margin: 0 0 16px;
    font-size: 1.02rem;
    font-weight: 300;
    color: var(--on-core-soft);
}

.waitlist-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.waitlist-input {
    flex: 1;
    min-width: 200px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.waitlist-input::placeholder {
    color: rgba(255, 255, 255, .62);
}

.waitlist-input:focus-visible {
    border-color: var(--mint);
}

/* Bots fill in every field they find; people never see this one. */
.waitlist-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.waitlist-submit {
    padding: 14px 26px;
    border: none;
    border-radius: 999px;
    background: #FFFFFF;
    /* The band stays dark in both themes, so this pair is fixed. */
    color: #2D1B3D;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .2s;
}

.waitlist-submit:hover:not(:disabled) {
    transform: translateY(-2px);
}

.waitlist-submit:disabled {
    cursor: progress;
    opacity: .6;
}

.waitlist-done {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border: 1px solid rgba(66, 245, 176, .4);
    border-radius: 999px;
    background: rgba(66, 245, 176, .14);
    color: var(--mint);
    font-size: 1.05rem;
    font-weight: 600;
}

.waitlist-error {
    margin: 14px 0 0;
    font-size: .95rem;
    color: var(--danger);
}
