/* ============================================================
   dilemma.studio — A studio of two minds.
   Palette: Bone (#F2EDE4), Iron (#1A1A1A), Velvet (#0B0B0F),
            Sun (#E9C46A), Wine (#7B2D26), Mist (#C9C2B8)
   Type:    Fraunces (display), Inter (text), JetBrains Mono (meta)
   ============================================================ */

:root {
    --bone: #F2EDE4;
    --bone-soft: #E8E1D3;
    --iron: #1A1A1A;
    --iron-soft: #2A2A2A;
    --velvet: #0B0B0F;
    --velvet-soft: #14141B;
    --sun: #E9C46A;
    --wine: #7B2D26;
    --mist: #C9C2B8;
    --mist-dark: #4A4A4A;

    --split: 50%;
    --ease: cubic-bezier(0.65, 0, 0.35, 1);
    --slow: cubic-bezier(0.83, 0, 0.17, 1);
}

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

html, body {
    background: var(--bone);
    color: var(--iron);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
}

/* ------------------------------------------------------------
   STAGE — the dual half-screen
   ------------------------------------------------------------ */
.dilemma-stage {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    display: flex;
}

.half {
    position: relative;
    height: 100%;
    overflow: hidden;
    transition: width 0.9s var(--slow), background-color 0.9s var(--ease), color 0.9s var(--ease);
    will-change: width;
}

.half-left {
    width: var(--split);
    background: var(--bone);
    color: var(--iron);
}

.half-right {
    width: calc(100% - var(--split));
    background: var(--velvet);
    color: var(--bone);
}

.half-inner {
    position: relative;
    width: 100vw;
    height: 100%;
    padding: 48px 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The right half draws its own full-width inner, anchored to the right. */
.half-right .half-inner {
    margin-left: auto;
    transform: translateX(0);
}

.half-left .half-inner {
    margin-right: auto;
}

/* Subtle grain overlay on each half */
.half::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 3px 3px;
    opacity: 0.45;
    mix-blend-mode: multiply;
}

.half-right::before {
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    mix-blend-mode: screen;
}

/* Corner marks */
.corner-mark {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
}

.corner-mark.top-left { top: 32px; left: 40px; }
.corner-mark.top-right { top: 32px; right: 40px; }
.corner-mark.bottom-left { bottom: 32px; left: 40px; }
.corner-mark.bottom-right { bottom: 32px; right: 40px; }

/* The right half corners are mirrored within its own inner */
.half-right .corner-mark.top-left { left: auto; right: calc(50vw + 40px); }
.half-right .corner-mark.bottom-left { left: auto; right: calc(50vw + 40px); }
.half-right .corner-mark.top-right { right: 40px; }
.half-right .corner-mark.bottom-right { right: 40px; }

.half-left .corner-mark.top-right { right: calc(50vw + 40px); }
.half-left .corner-mark.bottom-right { right: calc(50vw + 40px); }

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

/* Text block */
.text-block {
    max-width: 520px;
    width: 100%;
}

.half-left .text-block {
    margin-left: 8vw;
}

.half-right .text-block {
    margin-right: 8vw;
    margin-left: auto;
    text-align: right;
}

.eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 28px;
    opacity: 0.6;
}

.claim {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: clamp(56px, 9.5vw, 148px);
    line-height: 0.92;
    letter-spacing: -0.025em;
    margin-bottom: 36px;
}

.claim-line {
    display: block;
    overflow: hidden;
}

.claim-line:nth-child(2) {
    font-style: italic;
    font-weight: 400;
    padding-left: 0.25em;
}

.half-right .claim-line:nth-child(2) {
    padding-left: 0;
    padding-right: 0.25em;
}

.consequence {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(15px, 1.2vw, 19px);
    line-height: 1.5;
    max-width: 380px;
    opacity: 0.78;
}

.half-right .consequence {
    margin-left: auto;
}

/* ------------------------------------------------------------
   SEAM — the vertical divider with brand
   ------------------------------------------------------------ */
.seam {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--split);
    transform: translateX(-50%);
    width: 88px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0;
    pointer-events: none;
    transition: left 0.9s var(--slow);
}

.seam::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: linear-gradient(180deg,
        rgba(26,26,26,0) 0%,
        rgba(26,26,26,0.3) 12%,
        rgba(26,26,26,0.3) 88%,
        rgba(26,26,26,0) 100%);
    transform: translateX(-0.5px);
}

.seam-handle {
    width: 36px;
    height: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: ew-resize;
    pointer-events: auto;
    user-select: none;
    background: var(--bone);
    border: 1px solid rgba(26,26,26,0.25);
    border-radius: 24px;
    transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}

.seam-handle:hover {
    transform: scale(1.08);
    background: var(--sun);
}

.seam-handle.dragging {
    transform: scale(1.12);
    background: var(--sun);
}

.handle-line {
    width: 1px;
    height: 18px;
    background: var(--iron);
    opacity: 0.6;
}

.handle-knot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--iron);
    margin: 6px 0;
}

/* Brand */
.brand {
    pointer-events: auto;
    text-align: center;
    color: var(--iron);
    background: var(--bone);
    padding: 14px 22px;
    border: 1px solid rgba(26,26,26,0.2);
    border-radius: 6px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.08);
    transition: background 0.6s var(--ease), color 0.6s var(--ease), border-color 0.6s var(--ease);
}

.brand-mark {
    display: flex;
    align-items: baseline;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    font-family: 'Fraunces', serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
}

.brand-name {
    font-size: 22px;
}

.brand-dot {
    font-size: 22px;
    color: var(--wine);
    margin: 0 1px;
}

.brand-tld {
    font-size: 22px;
    font-style: italic;
    font-weight: 400;
}

.brand-tag {
    margin-top: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.6;
    white-space: nowrap;
}

/* Counter */
.seam-counter {
    pointer-events: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: var(--iron);
    background: var(--bone);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid rgba(26,26,26,0.15);
    display: flex;
    gap: 4px;
    align-items: baseline;
    transition: background 0.6s var(--ease), color 0.6s var(--ease);
}

.ratio-left, .ratio-right {
    font-weight: 500;
    min-width: 22px;
    display: inline-block;
    text-align: center;
}

.slash {
    opacity: 0.4;
}

/* ------------------------------------------------------------
   VAULT — the section below the fold
   ------------------------------------------------------------ */
.vault {
    position: relative;
    background: var(--bone);
    color: var(--iron);
    padding: 140px 8vw 80px;
    overflow: hidden;
}

.vault::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 80px;
    background: var(--iron);
    opacity: 0.4;
}

.vault::after {
    content: "";
    position: absolute;
    top: 76px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--wine);
    border-radius: 50%;
}

.vault-head {
    max-width: 980px;
    margin: 0 auto 120px;
    text-align: center;
}

.vault-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 32px;
    color: var(--mist-dark);
}

.vault-title {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: clamp(40px, 5.4vw, 84px);
    line-height: 1.04;
    letter-spacing: -0.02em;
    margin-bottom: 36px;
}

.vault-italic {
    font-style: italic;
    font-weight: 400;
    color: var(--wine);
}

.vault-blurb {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(16px, 1.3vw, 21px);
    line-height: 1.55;
    max-width: 640px;
    margin: 0 auto;
    color: var(--mist-dark);
}

/* Dilemma list */
.dilemma-list {
    list-style: none;
    max-width: 1100px;
    margin: 0 auto 160px;
    border-top: 1px solid rgba(26,26,26,0.18);
}

.dilemma-item {
    display: grid;
    grid-template-columns: 80px 1fr 200px;
    gap: 32px;
    padding: 36px 0;
    border-bottom: 1px solid rgba(26,26,26,0.18);
    align-items: start;
    cursor: pointer;
    transition: background 0.4s var(--ease), padding 0.4s var(--ease);
}

.dilemma-item:hover {
    background: var(--bone-soft);
    padding-left: 16px;
    padding-right: 16px;
}

.dilemma-item.flipped .opt-a {
    text-decoration: line-through;
    opacity: 0.35;
}

.dilemma-item.flipped .opt-b {
    color: var(--wine);
    font-style: italic;
}

.dilemma-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: var(--mist-dark);
    padding-top: 6px;
}

.dilemma-body {
    min-width: 0;
}

.dilemma-q {
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: clamp(22px, 2.3vw, 32px);
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.dilemma-a {
    font-family: 'Fraunces', serif;
    font-size: clamp(15px, 1.15vw, 18px);
    line-height: 1.5;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.opt {
    transition: color 0.3s var(--ease), opacity 0.3s var(--ease), text-decoration 0.3s var(--ease);
}

.vs {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--wine);
    padding: 0 4px;
    border-left: 1px solid rgba(123,45,38,0.4);
    border-right: 1px solid rgba(123,45,38,0.4);
}

.dilemma-note {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 14px;
    line-height: 1.5;
    color: var(--mist-dark);
}

.dilemma-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mist-dark);
    text-align: right;
    padding-top: 10px;
}

/* ------------------------------------------------------------
   MANIFESTO
   ------------------------------------------------------------ */
.manifesto {
    max-width: 1100px;
    margin: 0 auto 160px;
    background: var(--velvet);
    color: var(--bone);
    padding: 100px 8vw;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.manifesto::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 4px 4px;
    pointer-events: none;
    mix-blend-mode: screen;
}

.manifesto-grid {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    gap: 0;
    align-items: center;
}

.m-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.m-col-this {
    text-align: right;
    padding-right: 12px;
}

.m-col-that {
    text-align: left;
    padding-left: 12px;
}

.m-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sun);
    margin-bottom: 12px;
}

.m-line {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: clamp(20px, 2vw, 30px);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.m-col-this .m-line:nth-child(odd) {
    font-style: italic;
}

.m-col-that .m-line:nth-child(even) {
    font-style: italic;
}

.m-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--sun);
}

.m-divider-cap {
    font-family: 'Fraunces', serif;
    font-size: 28px;
    line-height: 1;
}

.m-divider-line {
    width: 1px;
    flex: 1;
    background: var(--sun);
    opacity: 0.5;
    margin: 12px 0;
    min-height: 80px;
}

/* ------------------------------------------------------------
   SERVICES
   ------------------------------------------------------------ */
.services {
    max-width: 1100px;
    margin: 0 auto 160px;
}

.services-head {
    text-align: center;
    margin-bottom: 80px;
}

.services-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 24px;
    color: var(--mist-dark);
}

.services-title {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(28px, 3.4vw, 48px);
    line-height: 1.15;
    max-width: 720px;
    margin: 0 auto;
    letter-spacing: -0.01em;
}

.services-rooms {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(26,26,26,0.18);
    border: 1px solid rgba(26,26,26,0.18);
}

.room {
    background: var(--bone);
    padding: 56px 40px;
    transition: background 0.4s var(--ease), color 0.4s var(--ease);
    cursor: pointer;
}

.room:hover {
    background: var(--velvet);
    color: var(--bone);
}

.room:hover .room-num,
.room:hover .room-meta {
    color: var(--sun);
}

.room-num {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 22px;
    color: var(--wine);
    margin-bottom: 32px;
    transition: color 0.4s var(--ease);
}

.room-title {
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: clamp(22px, 1.8vw, 26px);
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.room-text {
    font-family: 'Fraunces', serif;
    font-size: 16px;
    line-height: 1.55;
    margin-bottom: 28px;
}

.room-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mist-dark);
    transition: color 0.4s var(--ease);
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
.vault-foot {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 60px;
    border-top: 1px solid rgba(26,26,26,0.18);
}

.foot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 60px;
}

.foot-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.foot-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--mist-dark);
    margin-bottom: 12px;
}

.foot-line {
    font-family: 'Fraunces', serif;
    font-size: 16px;
    line-height: 1.5;
}

.foot-mark {
    font-size: 36px;
    color: var(--wine);
    margin-bottom: 8px;
    line-height: 1;
}

.foot-fine {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mist-dark);
    text-align: center;
    padding: 24px 0;
}

/* ------------------------------------------------------------
   LEAN KNOB
   ------------------------------------------------------------ */
.lean-knob {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 96px;
    height: 96px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--iron);
    transition: transform 0.4s var(--ease);
    pointer-events: auto;
}

.lean-knob:hover {
    transform: scale(1.08);
}

.knob-ring {
    position: absolute;
    inset: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    opacity: 0.5;
    transition: opacity 0.4s var(--ease);
}

.knob-ring::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px dashed currentColor;
    border-radius: 50%;
    animation: knob-spin 24s linear infinite;
}

.knob-text {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 18px;
    letter-spacing: -0.01em;
    z-index: 1;
}

@keyframes knob-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* When the stage is leaned hard right, the knob sits on velvet */
body.leaned-right .lean-knob { color: var(--bone); }
body.leaned-left .lean-knob { color: var(--iron); }

/* ------------------------------------------------------------
   STATE MODIFIERS — when one side is favored
   ------------------------------------------------------------ */
.dilemma-stage.lean-left .half-right .text-block,
.dilemma-stage.lean-right .half-left .text-block {
    opacity: 0.35;
}

.dilemma-stage.lean-left .half-left .claim,
.dilemma-stage.lean-right .half-right .claim {
    letter-spacing: -0.02em;
}

.text-block {
    transition: opacity 0.6s var(--ease);
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 900px) {
    .dilemma-stage {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .half {
        width: 100% !important;
        height: 50vh;
        min-height: 420px;
    }

    .half-inner {
        width: 100%;
        padding: 80px 32px;
    }

    .half-left .text-block,
    .half-right .text-block {
        margin: 0 auto;
        text-align: left;
    }

    .half-right .consequence {
        margin-left: 0;
    }

    .corner-mark.top-left,
    .corner-mark.bottom-left {
        left: 24px !important;
        right: auto !important;
    }

    .corner-mark.top-right,
    .corner-mark.bottom-right {
        right: 24px !important;
        left: auto !important;
    }

    .seam {
        position: absolute;
        top: 50vh;
        left: 0;
        right: 0;
        bottom: auto;
        width: 100%;
        height: 88px;
        flex-direction: row;
        transform: translateY(-50%);
        padding: 0 24px;
    }

    .seam::before {
        top: 50%;
        left: 0;
        right: 0;
        bottom: auto;
        width: 100%;
        height: 1px;
        background: linear-gradient(90deg,
            rgba(26,26,26,0) 0%,
            rgba(26,26,26,0.3) 12%,
            rgba(26,26,26,0.3) 88%,
            rgba(26,26,26,0) 100%);
    }

    .seam-handle {
        width: 88px;
        height: 36px;
        flex-direction: row;
        cursor: ns-resize;
    }

    .handle-line {
        width: 18px;
        height: 1px;
    }

    .handle-knot {
        margin: 0 6px;
    }

    .vault {
        padding: 100px 24px 60px;
    }

    .dilemma-item {
        grid-template-columns: 50px 1fr;
        gap: 16px;
    }

    .dilemma-meta {
        grid-column: 2;
        text-align: left;
        padding-top: 0;
    }

    .manifesto {
        padding: 60px 24px;
    }

    .manifesto-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .m-col-this, .m-col-that {
        text-align: center;
        padding: 0;
    }

    .m-divider {
        flex-direction: row;
        height: auto;
        width: 100%;
    }

    .m-divider-line {
        height: 1px;
        width: auto;
        flex: 1;
        margin: 0 12px;
        min-height: 0;
    }

    .services-rooms {
        grid-template-columns: 1fr;
    }

    .foot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .foot-grid {
        grid-template-columns: 1fr;
    }

    .lean-knob {
        width: 72px;
        height: 72px;
        bottom: 20px;
        right: 20px;
    }

    .knob-text {
        font-size: 14px;
    }
}
