/* =========================================================
   ENCLAVE — "The Jharokha"
   A lit window at night, seen through a carved lattice.
   Ink + ivory, one claret accent. Serif display, quiet motion.
   ========================================================= */

:root {
    --ink: #0c0a0b;
    --ink-2: #141012;
    --ink-3: #1c1618;
    --ivory: #efe6d8;
    --muted: #a39a90;
    --line: rgba(239, 230, 216, 0.14);
    --line-strong: rgba(239, 230, 216, 0.28);
    --claret: #c8374d;
    --claret-hi: #dd4a61;
    --claret-glow: rgba(200, 55, 77, 0.35);

    --serif: 'Instrument Serif', 'Times New Roman', serif;
    --sans: 'Instrument Sans', system-ui, sans-serif;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --gutter: clamp(1rem, 4vw, 3.5rem);
    --max: 1320px;

    --fs-body: 1.0625rem;
    --fs-small: 0.8125rem;
    --fs-label: 0.72rem;
}

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

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
    background: var(--ink);
    color: var(--ivory);
    font-family: var(--sans);
    font-size: var(--fs-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a { color: inherit; }
em { font-style: italic; }
::selection { background: var(--claret); color: var(--ivory); }

:focus-visible {
    outline: 1px solid var(--claret-hi);
    outline-offset: 4px;
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Atmosphere ---------- */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 90;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.motion .grain { animation: grain 1.2s steps(6) infinite; }

@keyframes grain {
    0%, 100% { background-position: 0 0; }
    20% { background-position: -40px 30px; }
    40% { background-position: 30px -50px; }
    60% { background-position: -25px -15px; }
    80% { background-position: 45px 40px; }
}

/* ---------- Custom cursor (mouse only) ---------- */
.cursor { display: none; }

@media (hover: hover) and (pointer: fine) {
    .motion .cursor { display: block; }
    .cursor__dot, .cursor__ring {
        position: fixed;
        top: 0;
        left: 0;
        pointer-events: none;
        z-index: 100;
        border-radius: 50%;
        will-change: transform;
    }
    .cursor__dot {
        width: 6px;
        height: 6px;
        margin: -3px 0 0 -3px;
        background: var(--ivory);
    }
    .cursor__ring {
        width: 36px;
        height: 36px;
        margin: -18px 0 0 -18px;
        border: 1px solid var(--line-strong);
        transition: width 0.4s var(--ease), height 0.4s var(--ease), margin 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
    }
    .cursor.is-hover .cursor__ring {
        width: 64px;
        height: 64px;
        margin: -32px 0 0 -32px;
        border-color: var(--claret);
        background: rgba(200, 55, 77, 0.08);
    }
}

/* ---------- Loader ---------- */
.loader { display: none; }

.motion .loader {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: grid;
    place-items: center;
    background: var(--ink);
}

.loader__arch {
    width: clamp(70px, 9vw, 110px);
    height: auto;
    fill: none;
    stroke: var(--ivory);
    stroke-width: 3;
    stroke-dasharray: 1700;
    stroke-dashoffset: 1700;
    overflow: visible;
}

.loader__word {
    position: absolute;
    top: calc(50% + clamp(70px, 9vw, 110px) * 0.75 + 1.5rem);
    font-family: var(--serif);
    font-size: 1.25rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0;
}

/* ---------- Type primitives ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--fs-label);
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}

.eyebrow::before {
    content: '';
    width: 1.75rem;
    height: 1px;
    background: var(--claret);
}

.hero__eyebrow::before { display: none; }

.section-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.6rem, 6.5vw, 5.5rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
}

.section-title em, .join__title em, .hero__title em, .principle__title em, .done__title em {
    color: var(--claret-hi);
}

/* ---------- Buttons ---------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    min-height: 52px;
    padding: 0 1.75rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.5s var(--ease), border-color 0.5s var(--ease), transform 0.3s var(--ease);
}

.btn--primary {
    background: var(--claret);
    color: var(--ivory);
    box-shadow: 0 0 0 0 var(--claret-glow);
}

/* fill sweeps up from the bottom on hover */
.btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--ivory);
    transform: translateY(101%);
    transition: transform 0.6s var(--ease);
}

.btn--primary:hover { color: var(--ink); }
.btn--primary:hover::before { transform: translateY(0); }
.btn--primary:active { transform: scale(0.97); }
.btn--primary:disabled { opacity: 0.6; cursor: progress; }

.btn__icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    transition: transform 0.5s var(--ease);
}

.btn:hover .btn__icon { transform: translateX(4px); }

.btn--ghost {
    color: var(--ivory);
    border-color: var(--line-strong);
    background: transparent;
}

.btn--ghost:hover { border-color: var(--ivory); }

.btn-text {
    min-height: 44px;
    padding: 0 0.25rem;
    background: none;
    border: none;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s;
}

.btn-text:hover { color: var(--ivory); }

/* ---------- Nav ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1.25rem var(--gutter);
    transition: background 0.6s var(--ease), padding 0.6s var(--ease), border-color 0.6s var(--ease);
    border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    background: rgba(12, 10, 11, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom-color: var(--line);
}

.nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    justify-self: start;
    text-decoration: none;
    font-family: var(--serif);
    font-size: 1.55rem;
    letter-spacing: 0.01em;
}

.nav__mark {
    width: 15px;
    height: 22px;
    fill: none;
    stroke: var(--claret-hi);
    stroke-width: 28;
}

.nav__meta {
    font-size: var(--fs-label);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}

.nav__meta i { font-style: normal; margin: 0 0.5em; color: var(--claret); }

.nav__actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    justify-self: end;
}

.nav__apply {
    font-size: 0.875rem;
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.5s var(--ease);
    padding-bottom: 2px;
}

.nav__apply:hover { background-size: 100% 1px; }

.quick-exit {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 40px;
    padding: 0 0.6rem 0 1rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(12, 10, 11, 0.5);
    color: var(--ivory);
    font-family: var(--sans);
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.4s, background 0.4s;
}

.quick-exit:hover { border-color: var(--claret); background: rgba(200, 55, 77, 0.12); }

kbd {
    font-family: var(--sans);
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(239, 230, 216, 0.08);
    color: var(--muted);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 7rem var(--gutter) 6rem;
    overflow: hidden;
    text-align: center;
}

.window {
    --mx: 50%;
    --my: 62%;
    --r: 0px;
    position: absolute;
    left: 50%;
    top: 52%;
    height: min(82vh, 820px);
    aspect-ratio: 2 / 3;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.window::after {
    /* floor glow spilling out of the window */
    content: '';
    position: absolute;
    left: 50%;
    bottom: -18%;
    width: 160%;
    height: 40%;
    transform: translateX(-50%);
    background: radial-gradient(50% 50% at 50% 50%, rgba(200, 55, 77, 0.16), transparent 70%);
}

.window__layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Complementary masks: crisp lattice only inside the lens, frosted everywhere else */
.window__layer--clear {
    -webkit-mask-image: radial-gradient(circle at var(--mx) var(--my), #000 0, #000 calc(var(--r) * 0.45), transparent var(--r));
    mask-image: radial-gradient(circle at var(--mx) var(--my), #000 0, #000 calc(var(--r) * 0.45), transparent var(--r));
}

.window__layer--frost {
    -webkit-mask-image: radial-gradient(circle at var(--mx) var(--my), transparent 0, transparent calc(var(--r) * 0.45), #000 var(--r));
    mask-image: radial-gradient(circle at var(--mx) var(--my), transparent 0, transparent calc(var(--r) * 0.45), #000 var(--r));
}

.window__outline {
    fill: none;
    stroke: var(--ivory);
    stroke-width: 1.2;
    vector-effect: non-scaling-stroke;
    opacity: 0.7;
}

.window__outline--inner { opacity: 0.25; }

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
}

/* soft shadow pool behind the copy so it reads over the lit window */
.hero__content::before {
    content: '';
    position: absolute;
    inset: 10% -5% 0;
    z-index: -1;
    background: radial-gradient(closest-side, rgba(12, 10, 11, 0.72), rgba(12, 10, 11, 0.35) 60%, transparent);
    pointer-events: none;
}

.hero__eyebrow { margin-bottom: 2rem; }

.pulse {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--claret-hi);
}

.motion .pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--claret-hi);
    animation: pulse 3.2s var(--ease) infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(3.5); opacity: 0; }
}

.hero__title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(3rem, 8.4vw, 8.75rem);
    line-height: 0.95;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 40px rgba(12, 10, 11, 0.6);
}

.hero__title > span, .hero__title > em { display: block; }

/* split-word reveal */
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.word__inner { display: inline-block; will-change: transform; }

.hero__sub {
    max-width: 34rem;
    margin: 2rem auto 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.3vw, 1.15rem);
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 2.5rem;
}

.hero__foot {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: var(--fs-label);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}

.hero__rule {
    flex: 1;
    height: 1px;
    background: var(--line);
    position: relative;
    overflow: hidden;
}

.motion .hero__rule::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 30%;
    background: linear-gradient(90deg, transparent, var(--claret), transparent);
    animation: travel 3.5s var(--ease) infinite;
}

@keyframes travel {
    from { transform: translateX(-100%); }
    to { transform: translateX(350%); }
}

/* ---------- Manifesto ---------- */
.manifesto {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(6rem, 16vh, 11rem) var(--gutter);
}

.manifesto__text {
    margin-top: 2.5rem;
    font-family: var(--serif);
    font-size: clamp(1.9rem, 4.4vw, 4rem);
    line-height: 1.12;
    letter-spacing: -0.015em;
}

.manifesto__text em { color: var(--claret-hi); }

.manifesto__text .mword { opacity: 1; transition: none; }

/* ---------- Principles ---------- */
.principles {
    max-width: var(--max);
    margin: 0 auto;
    padding: 2rem var(--gutter) clamp(5rem, 12vh, 9rem);
}

.section-head { margin-bottom: clamp(3rem, 7vh, 5rem); }
.section-head .eyebrow { margin-bottom: 1.5rem; }

.principles__list { list-style: none; }

.principle {
    position: relative;
    display: grid;
    grid-template-columns: 5rem minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: baseline;
    padding: 2.5rem 0;
}

.principle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--line-strong);
    transform-origin: left;
    transform: scaleX(var(--line, 1));
}

.principle:last-child::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--line-strong);
}

.principle__num {
    font-size: var(--fs-small);
    letter-spacing: 0.15em;
    color: var(--claret-hi);
}

.principle__title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2rem, 4.2vw, 3.6rem);
    line-height: 1;
    letter-spacing: -0.02em;
    transition: transform 0.7s var(--ease);
}

.principle__body {
    color: var(--muted);
    max-width: 30rem;
}

@media (hover: hover) {
    .principle:hover .principle__title { transform: translateX(0.75rem); }
}

/* ---------- Marquee ---------- */
.marquee {
    overflow: hidden;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1.4rem 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee__track {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    width: max-content;
    font-family: var(--serif);
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-style: italic;
    white-space: nowrap;
}

.marquee__track i { font-style: normal; font-size: 0.6em; color: var(--claret); }

.motion .marquee__track { animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee {
    to { transform: translateX(-50%); }
}

/* ---------- Verification ---------- */
.verify {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(6rem, 15vh, 10rem) var(--gutter) 0;
}

.verify__head .eyebrow { margin-bottom: 1.5rem; }

.verify__lede {
    max-width: 36rem;
    margin-top: 1.75rem;
    color: var(--muted);
}

.verify__steps {
    list-style: none;
    margin-top: clamp(3rem, 7vh, 5rem);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 3rem);
}

.vstep {
    position: relative;
    padding-top: 2rem;
}

.vstep::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--line-strong);
    transform-origin: left;
    transform: scaleX(var(--line, 1));
}

.vstep__num {
    display: block;
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(2.6rem, 4vw, 3.4rem);
    line-height: 1;
    color: var(--claret-hi);
    margin-bottom: 1.5rem;
}

.vstep__title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    line-height: 1.1;
    margin-bottom: 0.9rem;
}

.vstep__body { color: var(--muted); }

.ledger {
    margin-top: clamp(3rem, 7vh, 4.5rem);
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--line);
    background: var(--ink-2);
}

.ledger__col { padding: clamp(1.5rem, 3vw, 2.25rem); }
.ledger__col + .ledger__col { border-left: 1px solid var(--line); }

.ledger__label {
    font-size: var(--fs-label);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.1rem;
}

.ledger ul { list-style: none; display: grid; gap: 0.6rem; }

.ledger li {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    font-family: var(--serif);
    font-size: clamp(1.2rem, 1.8vw, 1.45rem);
    line-height: 1.3;
}

.ledger li::before {
    content: '✓';
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--claret-hi);
}

.ledger__col--gone li { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(221, 74, 97, 0.7); text-decoration-thickness: 1px; }
.ledger__col--gone li::before { content: '✕'; }

/* ---------- Cities ---------- */
.cities {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(5rem, 12vh, 8rem) var(--gutter) 0;
    text-align: center;
}

.cities__list {
    margin-top: 1.75rem;
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3.4vw, 2.9rem);
    line-height: 1.35;
}

.cities__list span { transition: color 0.4s; }
.cities__list span:hover { color: var(--claret-hi); }
.cities__list i { font-style: normal; margin: 0 0.4em; color: var(--muted); }

/* ---------- Join ---------- */
.join {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(6rem, 15vh, 10rem) var(--gutter);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(3rem, 7vw, 7rem);
    align-items: start;
}

.join__intro { position: sticky; top: 8rem; }

.join__title {
    margin-top: 1.5rem;
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(3rem, 7vw, 6.5rem);
    line-height: 0.95;
    letter-spacing: -0.025em;
}

.join__lede {
    margin-top: 2rem;
    max-width: 28rem;
    color: var(--muted);
}

.join__assurances {
    list-style: none;
    margin-top: 2.5rem;
    display: grid;
    gap: 0.9rem;
}

.join__assurances li {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    font-size: 0.95rem;
}

.join__assurances li::before {
    content: '';
    width: 9px;
    height: 13px;
    flex-shrink: 0;
    background: var(--claret-hi);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 600'%3E%3Cpath d='M20 600 V262 C20 150 112 118 200 30 C288 118 380 150 380 262 V600 Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 600'%3E%3Cpath d='M20 600 V262 C20 150 112 118 200 30 C288 118 380 150 380 262 V600 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.join__panel {
    position: relative;
    padding: clamp(1.75rem, 4vw, 3.25rem);
    border: 1px solid var(--line);
    border-radius: 2px;
    background: linear-gradient(180deg, var(--ink-2), var(--ink));
}

/* arched top edge on the panel */
.join__panel::before {
    content: '';
    position: absolute;
    left: -1px;
    right: -1px;
    top: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--claret), transparent);
}

.steps-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.steps-meta__label {
    font-size: var(--fs-label);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    white-space: nowrap;
}

.steps-meta__label i { font-style: normal; color: var(--muted); }

.progress {
    flex: 1;
    height: 1px;
    background: var(--line);
    position: relative;
}

.progress__bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--claret-hi);
}

.form { position: relative; }

.field {
    margin-bottom: 1.75rem;
    border: none;
}

.field label, .field legend {
    display: block;
    margin-bottom: 0.6rem;
    font-size: var(--fs-label);
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

.field legend {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--ivory);
    line-height: 1.15;
    margin-bottom: 0.5rem;
}

.field__hint {
    margin-top: 0.6rem;
    font-size: var(--fs-small);
    color: var(--muted);
}

fieldset.field .field__hint { margin: 0 0 1.25rem; }

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

input, select {
    width: 100%;
    min-height: 54px;
    padding: 0 1rem;
    background: rgba(239, 230, 216, 0.03);
    border: 1px solid var(--line);
    border-radius: 2px;
    color: var(--ivory);
    font-family: var(--sans);
    font-size: 1rem;
    transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}

input::placeholder { color: rgba(163, 154, 144, 0.6); }

input:hover, select:hover { border-color: var(--line-strong); }

input:focus, select:focus {
    outline: none;
    border-color: var(--claret-hi);
    background: rgba(200, 55, 77, 0.05);
}

select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 2.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a39a90' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

select:invalid { color: rgba(163, 154, 144, 0.75); }

option { background: var(--ink-3); color: var(--ivory); }

/* ---------- Custom dropdown (desktop; phones keep their native picker) ---------- */
.select {
    position: relative;
}

/* the real <select> stays in the DOM for value + validation, just out of sight */
.select select {
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    min-height: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.select__trigger {
    width: 100%;
    min-height: 54px;
    padding: 0 3rem 0 1rem;
    display: flex;
    align-items: center;
    background: rgba(239, 230, 216, 0.03);
    border: 1px solid var(--line);
    border-radius: 2px;
    color: rgba(163, 154, 144, 0.75);
    font-family: var(--sans);
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    position: relative;
    transition: border-color 0.4s var(--ease), background 0.4s var(--ease), color 0.3s;
}

.select.has-value .select__trigger { color: var(--ivory); }
.select__trigger:hover { border-color: var(--line-strong); }

.select__trigger:focus-visible,
.select.is-open .select__trigger {
    outline: none;
    border-color: var(--claret-hi);
    background: rgba(200, 55, 77, 0.05);
}

.select__chevron {
    position: absolute;
    right: 1.1rem;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.5;
    transition: transform 0.5s var(--ease), stroke 0.3s;
}

.select.is-open .select__chevron { transform: rotate(180deg); stroke: var(--claret-hi); }

.select__list {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    max-height: 288px;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
    padding: 0.4rem;
    background: var(--ink-3);
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    clip-path: inset(0 0 100% 0);
    transition: opacity 0.3s var(--ease), transform 0.45s var(--ease), clip-path 0.45s var(--ease), visibility 0s linear 0.45s;
    scrollbar-width: thin;
    scrollbar-color: rgba(239, 230, 216, 0.2) transparent;
}

.select.is-open .select__list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
    transition: opacity 0.3s var(--ease), transform 0.45s var(--ease), clip-path 0.45s var(--ease), visibility 0s;
}

.select__list::-webkit-scrollbar { width: 6px; }
.select__list::-webkit-scrollbar-thumb { background: rgba(239, 230, 216, 0.18); border-radius: 3px; }

.select__option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 44px;
    padding: 0 1rem 0 1.15rem;
    border-radius: 2px;
    color: var(--muted);
    font-size: 0.97rem;
    cursor: pointer;
    transition: background 0.25s, color 0.25s;
}

/* claret bar slides in on the highlighted option */
.select__option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 2px;
    height: 0;
    background: var(--claret-hi);
    transform: translateY(-50%);
    transition: height 0.3s var(--ease);
}

.select__option.is-active {
    background: rgba(200, 55, 77, 0.1);
    color: var(--ivory);
}

.select__option.is-active::before { height: 55%; }

.select__option[aria-selected="true"] { color: var(--ivory); }

/* tiny arch mark beside the chosen value */
.select__option[aria-selected="true"]::after {
    content: '';
    width: 8px;
    height: 12px;
    flex-shrink: 0;
    background: var(--claret-hi);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 600'%3E%3Cpath d='M20 600 V262 C20 150 112 118 200 30 C288 118 380 150 380 262 V600 Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 600'%3E%3Cpath d='M20 600 V262 C20 150 112 118 200 30 C288 118 380 150 380 262 V600 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.select.is-invalid .select__trigger { border-color: rgba(221, 74, 97, 0.7); }

.chip-group, .contact-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.chip {
    min-height: 46px;
    padding: 0 1.25rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--ivory);
    font-family: var(--sans);
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease);
}

.chip small { color: var(--muted); font-size: 0.75rem; margin-left: 0.35rem; transition: color 0.4s; }

.chip:hover { border-color: var(--ivory); }

.chip.active {
    background: var(--ivory);
    border-color: var(--ivory);
    color: var(--ink);
}

.chip.active small { color: rgba(12, 10, 11, 0.6); }

.captcha { margin: -0.5rem 0 1.25rem; }
.captcha:empty { display: none; }

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.consent {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    font-size: 0.9rem;
    color: var(--muted);
    cursor: pointer;
    line-height: 1.55;
}

.consent input {
    position: absolute;
    opacity: 0;
    width: 20px;
    height: 20px;
    min-height: 0;
    margin: 0;
}

.consent__box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 0.1rem;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    display: grid;
    place-items: center;
    transition: background 0.3s, border-color 0.3s;
}

.consent__box::after {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 1.5px solid var(--ink);
    border-bottom: 1.5px solid var(--ink);
    transform: rotate(-45deg) translate(1px, -1px) scale(0);
    transition: transform 0.3s var(--ease);
}

.consent input:checked + .consent__box { background: var(--ivory); border-color: var(--ivory); }
.consent input:checked + .consent__box::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.consent input:focus-visible + .consent__box { outline: 1px solid var(--claret-hi); outline-offset: 3px; }

.consent a { color: var(--ivory); text-underline-offset: 3px; }

.form-error {
    margin-top: 1.25rem;
    padding-left: 0.9rem;
    border-left: 2px solid var(--claret-hi);
    font-size: 0.9rem;
    color: #f0a9b3;
}

.form-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.25rem;
}

.form-nav--end { justify-content: flex-end; }

.form-step--done {
    text-align: center;
    padding: 1rem 0;
}

.done__arch {
    width: 56px;
    height: 84px;
    fill: url(#lamp);
    stroke: var(--ivory);
    stroke-width: 6;
    margin-bottom: 1.75rem;
}

.done__title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    line-height: 1;
}

.done__text {
    max-width: 26rem;
    margin: 1.25rem auto 0;
    color: var(--muted);
}

/* ---------- FAQ ---------- */
.faq {
    max-width: var(--max);
    margin: 0 auto;
    padding: 2rem var(--gutter) clamp(6rem, 15vh, 10rem);
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(3rem, 7vw, 7rem);
}

.faq__head .eyebrow { margin-bottom: 1.5rem; }

.faq__note {
    margin-top: 1.75rem;
    max-width: 22rem;
    color: var(--muted);
}

.faq__item { border-top: 1px solid var(--line-strong); }
.faq__item:last-child { border-bottom: 1px solid var(--line-strong); }

.faq__item summary {
    position: relative;
    list-style: none;
    cursor: pointer;
    padding: 1.6rem 3rem 1.6rem 0;
    font-family: var(--serif);
    font-size: clamp(1.3rem, 2vw, 1.65rem);
    line-height: 1.25;
    transition: color 0.4s;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::before,
.faq__item summary::after {
    content: '';
    position: absolute;
    right: 0.4rem;
    top: 50%;
    width: 14px;
    height: 1px;
    background: var(--claret-hi);
    transition: transform 0.5s var(--ease);
}

.faq__item summary::after { transform: rotate(90deg); }
.faq__item[open] summary::after { transform: rotate(0deg); }
.faq__item summary:hover { color: var(--claret-hi); }

.faq__item p {
    padding: 0 3rem 1.75rem 0;
    color: var(--muted);
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--line);
    padding: 0 var(--gutter) 2rem;
    overflow: hidden;
}

.footer__word {
    font-family: var(--serif);
    font-size: clamp(5rem, 24vw, 22rem);
    line-height: 0.8;
    letter-spacing: -0.04em;
    text-align: center;
    margin: 0.12em 0 0.05em;
    background: linear-gradient(180deg, rgba(239, 230, 216, 0.16), rgba(239, 230, 216, 0.02));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    user-select: none;
}

.footer__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 2rem;
    font-size: var(--fs-small);
    color: var(--muted);
}

.footer__row a { text-decoration: none; color: var(--ivory); }
.footer__row a:hover { color: var(--claret-hi); }

/* ---------- Legal pages (privacy / terms) ---------- */
.legal-nav { grid-template-columns: 1fr; }
.legal { max-width: 760px; margin: 0 auto; padding: 8rem var(--gutter) 6rem; }
.legal h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.8rem, 7vw, 4.5rem); line-height: 1; letter-spacing: -0.02em; margin-bottom: 1rem; }
.legal h2 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; margin: 3rem 0 0.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: 0.9rem; }
.legal strong { color: var(--ivory); font-weight: 500; }
.legal ul { padding-left: 1.25rem; display: grid; gap: 0.5rem; margin: 0.75rem 0; }
.legal a { color: var(--ivory); text-underline-offset: 3px; }
.legal__meta { font-size: var(--fs-small); letter-spacing: 0.1em; text-transform: uppercase; }
.legal__back { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--line); }

/* ---------- Motion initial states (only when JS + motion enabled) ---------- */
.motion [data-reveal], .motion [data-hero-fade] { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .nav__meta { display: none; }
    .nav { grid-template-columns: 1fr auto; }
    .join, .faq { grid-template-columns: 1fr; }
    .join__intro { position: static; }
    .principle { grid-template-columns: 3rem minmax(0, 1fr); gap: 0.75rem 1.25rem; }
    .principle__body { grid-column: 2; }
    .verify__steps { grid-template-columns: 1fr; }
    .ledger { grid-template-columns: 1fr; }
    .ledger__col + .ledger__col { border-left: none; border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
    :root { --fs-body: 1rem; }
    .nav { padding: 1rem; }
    .nav.is-scrolled { padding: 0.7rem 1rem; }
    .nav__apply { display: none; }
    .quick-exit kbd { display: none; }
    .nav__brand { font-size: 1.35rem; }
    .hero { padding: 6rem 1rem 5.5rem; }
    .window { height: min(72vh, 138vw); top: 50%; }
    .hero__title { font-size: clamp(2.9rem, 14vw, 4.4rem); }
    .hero__cta .btn { width: 100%; justify-content: center; }
    .hero__hint { display: none; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .form-nav .btn { flex: 1; justify-content: center; }
    .join__panel { padding: 1.5rem 1.25rem; }
    .faq__item p { padding-right: 0; }
    .footer__row { justify-content: center; text-align: center; }
    .footer__esc { display: none; }
}

/* ---------- Phone performance: keep the look, drop the per-frame repaint work ---------- */
.window { will-change: transform, opacity; }   /* own GPU layer: scrolling moves it without re-drawing the blur */

@media (max-width: 768px), (pointer: coarse) {
    .motion .grain { animation: none; }         /* static grain: no full-screen repaints */
    .nav.is-scrolled {                           /* live backdrop blur is slow on Android */
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(12, 10, 11, 0.94);
    }
    .marquee { -webkit-mask-image: none; mask-image: none; }
    .hero__title { text-shadow: 0 2px 18px rgba(12, 10, 11, 0.55); }
    .word__inner { will-change: auto; }          /* fewer GPU layers to hold in memory */
    .select__list { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
