/* ===========================================================
   Design tokens — Blue & White
   =========================================================== */
:root {
    --navy:        #0A1F4D;
    --navy-deep:   #060F2E;
    --indigo:      #14318C;
    --blue:        #2E5CD9;
    --sky:         #7FA6FF;
    --white:       #FFFFFF;
    --paper:       #F3F6FC;
    --paper-line:  #DCE4F5;
    --ink:         #0E1733;
    --ink-soft:    #4A5578;

    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body:    'Inter', -apple-system, sans-serif;
    --font-mono:    'IBM Plex Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    height: 100svh;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    overflow: hidden;
}

/* ===========================================================
   Page frame — two panels, side by side, one fixed non-scrolling viewport
   =========================================================== */
.page {
    position: relative;
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: var(--paper);
}

.pixel-bridge {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

@media (max-width: 860px) {
    .pixel-bridge { z-index: 2; }
}

/* ===========================================================
   Portrait panel (left) — full-bleed photo, edge to edge
   =========================================================== */
.portrait-panel {
    position: relative;
    flex: 0 0 50%;
    height: 100%;
    overflow: visible;
    background: var(--navy-deep);
    clip-path: polygon(0% 0%, 90.000% 0.000%, 90.000% 1.786%, 92.000% 1.786%, 92.000% 3.571%, 94.000% 3.571%, 94.000% 5.357%, 92.000% 5.357%, 92.000% 7.143%, 92.000% 7.143%, 92.000% 8.929%, 92.000% 8.929%, 92.000% 10.714%, 92.000% 10.714%, 92.000% 12.500%, 90.000% 12.500%, 90.000% 14.286%, 88.000% 14.286%, 88.000% 16.071%, 88.000% 16.071%, 88.000% 17.857%, 86.000% 17.857%, 86.000% 19.643%, 86.000% 19.643%, 86.000% 21.429%, 84.000% 21.429%, 84.000% 23.214%, 82.000% 23.214%, 82.000% 25.000%, 82.000% 25.000%, 82.000% 26.786%, 82.000% 26.786%, 82.000% 28.571%, 82.000% 28.571%, 82.000% 30.357%, 84.000% 30.357%, 84.000% 32.143%, 82.000% 32.143%, 82.000% 33.929%, 80.000% 33.929%, 80.000% 35.714%, 82.000% 35.714%, 82.000% 37.500%, 82.000% 37.500%, 82.000% 39.286%, 84.000% 39.286%, 84.000% 41.071%, 84.000% 41.071%, 84.000% 42.857%, 86.000% 42.857%, 86.000% 44.643%, 86.000% 44.643%, 86.000% 46.429%, 88.000% 46.429%, 88.000% 48.214%, 88.000% 48.214%, 88.000% 50.000%, 88.000% 50.000%, 88.000% 51.786%, 88.000% 51.786%, 88.000% 53.571%, 88.000% 53.571%, 88.000% 55.357%, 84.000% 55.357%, 84.000% 57.143%, 84.000% 57.143%, 84.000% 58.929%, 86.000% 58.929%, 86.000% 60.714%, 86.000% 60.714%, 86.000% 62.500%, 86.000% 62.500%, 86.000% 64.286%, 86.000% 64.286%, 86.000% 66.071%, 84.000% 66.071%, 84.000% 67.857%, 82.000% 67.857%, 82.000% 69.643%, 82.000% 69.643%, 82.000% 71.429%, 84.000% 71.429%, 84.000% 73.214%, 82.000% 73.214%, 82.000% 75.000%, 80.000% 75.000%, 80.000% 76.786%, 78.000% 76.786%, 78.000% 78.571%, 78.000% 78.571%, 78.000% 80.357%, 78.000% 80.357%, 78.000% 82.143%, 78.000% 82.143%, 78.000% 83.929%, 80.000% 83.929%, 80.000% 85.714%, 80.000% 85.714%, 80.000% 87.500%, 78.000% 87.500%, 78.000% 89.286%, 78.000% 89.286%, 78.000% 91.071%, 78.000% 91.071%, 78.000% 92.857%, 80.000% 92.857%, 80.000% 94.643%, 80.000% 94.643%, 80.000% 96.429%, 78.000% 96.429%, 78.000% 98.214%, 78.000% 98.214%, 78.000% 100.000%, 0% 100%);
}

.portrait-photo {
    position: absolute;
    inset: 0;
    background-image: url('../images/ambedkar.jpg');
    background-size: cover;
    /* keeps head + shoulders + tie in frame; crops any excess from the very bottom only */
    background-position: center 18%;
    filter: grayscale(100%) contrast(1.12) brightness(0.97);
    /* zoom in past the source artwork's soft blurred/feathered border so only
       the clean portrait shows — the raw file fades to a hazy vignette at its
       own edges, which is what was showing as a grey band before */
    transform: scale(1.32);
    transform-origin: center 22%;
}

/* Blue duotone tint, applied via blend mode over the grayscale photo */
.portrait-tint {
    position: absolute;
    inset: 0;
    background: linear-gradient(155deg, var(--navy) 0%, var(--indigo) 55%, var(--blue) 100%);
    mix-blend-mode: color;
    opacity: 0.9;
}

/* Gentle edge vignette for depth, doesn't touch the face */
.portrait-vignette {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 120px rgba(6,15,46,0.5);
}

/* ===========================================================
   Content panel (right) — headline + docked subscribe card
   =========================================================== */
.content-panel {
    flex: 1 1 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    padding: 0 2rem;
}

/* ===========================================================
   Brand row
   =========================================================== */
.brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2.2vh 0 0;
    color: var(--indigo);
    flex: 0 0 auto;
}

.brand-row .chakra-mark { width: 20px; height: 20px; opacity: 0.85; }
.brand-row .chakra-mark circle,
.brand-row .chakra-mark line { stroke: var(--indigo); }

.brand-row span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    opacity: 0.85;
}

/* ===========================================================
   Headline block
   =========================================================== */
.headline-block {
    flex: 0 0 auto;
    text-align: center;
    padding: 1.6vh 0.5rem 0;
    max-width: 460px;
}

.slogan-hi {
    font-family: 'Noto Serif Devanagari', var(--font-display);
    font-weight: 700;
    font-size: clamp(1.3rem, 3.6vh, 2.1rem);
    line-height: 1.3;
    margin: 0 0 0.5rem;
    color: var(--navy);
}

.slogan-en {
    font-family: var(--font-mono);
    font-size: clamp(0.6rem, 1.4vh, 0.74rem);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--blue);
    margin: 0;
}

.hero-sub {
    max-width: 420px;
    margin: 0.9rem auto 0;
    font-size: clamp(0.78rem, 1.6vh, 0.9rem);
    line-height: 1.5;
    color: var(--ink-soft);
    display: none;
}

@media (min-height: 760px) {
    .hero-sub { display: block; }
}

/* ===========================================================
   Docking zone — chakra halo behind the subscribe card,
   centered in whatever space remains in the content panel
   =========================================================== */
.dock {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.chakra-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(70vh, 92%, 460px);
    height: min(70vh, 92%, 460px);
    pointer-events: none;
}

.chakra-halo svg {
    width: 100%;
    height: 100%;
    animation: spin-slow 140s linear infinite;
    filter: drop-shadow(0 2px 14px rgba(10,31,77,0.3));
}

@media (prefers-reduced-motion: reduce) {
    .chakra-halo svg { animation: none; }
}

@keyframes spin-slow { to { transform: rotate(360deg); } }

.chakra-halo .rim {
    fill: none;
    stroke: var(--indigo);
    stroke-width: 8;
}

.chakra-halo .spoke {
    stroke: var(--indigo);
    stroke-width: 6;
    stroke-linecap: round;
}

.chakra-halo .hub {
    fill: var(--indigo);
}

.subscribe-card {
    position: relative;
    width: min(100%, 380px);
    background: var(--white);
    border-radius: 6px;
    padding: clamp(1.3rem, 3vh, 2rem) clamp(1.4rem, 3.4vw, 1.9rem) clamp(1rem, 2.4vh, 1.6rem);
    text-align: center;
    box-shadow: 0 30px 70px rgba(10,31,77,0.22), 0 0 0 1px var(--paper-line);
}

.subscribe-card .mark {
    width: 28px;
    height: 28px;
    margin: 0 auto 0.65rem;
    display: block;
}

.subscribe-card h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.2rem, 2.4vh, 1.45rem);
    margin: 0 0 0.3rem;
    color: var(--navy);
}

.subscribe-card .sub {
    font-size: clamp(0.78rem, 1.6vh, 0.86rem);
    color: var(--ink-soft);
    margin: 0 0 1rem;
    line-height: 1.4;
}

.field { text-align: left; margin-bottom: 0.75rem; }

/* ===========================================================
   Multi-step card content (phone -> otp -> done)
   =========================================================== */
.step { animation: step-in 0.22s ease; }

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

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

#stepDone .mark { margin-bottom: 0.6rem; }

#otpPhoneDisplay { color: var(--navy); font-weight: 600; }

#otp {
    letter-spacing: 0.5em;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.15rem;
}

.otp-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.link-btn {
    background: none;
    border: none;
    padding: 0.2rem 0;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--blue);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.link-btn:hover { color: var(--navy); }
.link-btn:disabled { color: var(--ink-soft); cursor: not-allowed; text-decoration: none; }
.link-btn:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

.field label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--indigo);
    margin-bottom: 0.35rem;
}

.field input[type="tel"] {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1.5px solid var(--paper-line);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.94rem;
    background: var(--paper);
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field input[type="tel"]:focus {
    outline: none;
    border-color: var(--blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(46,92,217,0.18);
}

/* Honeypot: visually hidden but present in the DOM */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

button.subscribe-btn {
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 130%);
    color: var(--white);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.94rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

button.subscribe-btn:hover { box-shadow: 0 10px 24px rgba(20,49,140,0.35); }
button.subscribe-btn:active { transform: translateY(1px); }
button.subscribe-btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
button.subscribe-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.form-msg { margin-top: 0.8rem; font-size: 0.84rem; min-height: 1.2em; }
.form-msg.ok  { color: #1E6E4A; }
.form-msg.err { color: #B23B34; }

.trust-row {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--paper-line);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.trust-row svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--blue); }

/* ===========================================================
   Footer strip
   =========================================================== */
.footer-strip {
    flex: 0 0 auto;
    width: 100%;
    text-align: center;
    padding: 0 0 2.4vh;
    color: var(--ink-soft);
}

.footer-strip .quote {
    max-width: 440px;
    margin: 0 auto;
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(0.7rem, 1.5vh, 0.86rem);
    line-height: 1.4;
    color: var(--indigo);
}

.footer-strip .attribution {
    margin-top: 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* ===========================================================
   Responsive — stack vertically on narrow screens, still no scroll
   =========================================================== */
@media (max-width: 860px) {
    .page { flex-direction: column; }

    .portrait-panel {
        flex: 0 0 36%;
        clip-path: polygon(0% 0%, 100% 0%, 100.000% 85.000%, 97.500% 85.000%, 97.500% 85.000%, 95.000% 85.000%, 95.000% 85.000%, 92.500% 85.000%, 92.500% 85.000%, 90.000% 85.000%, 90.000% 80.000%, 87.500% 80.000%, 87.500% 80.000%, 85.000% 80.000%, 85.000% 85.000%, 82.500% 85.000%, 82.500% 80.000%, 80.000% 80.000%, 80.000% 75.000%, 77.500% 75.000%, 77.500% 80.000%, 75.000% 80.000%, 75.000% 80.000%, 72.500% 80.000%, 72.500% 75.000%, 70.000% 75.000%, 70.000% 70.000%, 67.500% 70.000%, 67.500% 70.000%, 65.000% 70.000%, 65.000% 70.000%, 62.500% 70.000%, 62.500% 70.000%, 60.000% 70.000%, 60.000% 75.000%, 57.500% 75.000%, 57.500% 70.000%, 55.000% 70.000%, 55.000% 70.000%, 52.500% 70.000%, 52.500% 70.000%, 50.000% 70.000%, 50.000% 75.000%, 47.500% 75.000%, 47.500% 75.000%, 45.000% 75.000%, 45.000% 70.000%, 42.500% 70.000%, 42.500% 70.000%, 40.000% 70.000%, 40.000% 75.000%, 37.500% 75.000%, 37.500% 70.000%, 35.000% 70.000%, 35.000% 70.000%, 32.500% 70.000%, 32.500% 70.000%, 30.000% 70.000%, 30.000% 70.000%, 27.500% 70.000%, 27.500% 75.000%, 25.000% 75.000%, 25.000% 70.000%, 22.500% 70.000%, 22.500% 70.000%, 20.000% 70.000%, 20.000% 75.000%, 17.500% 75.000%, 17.500% 70.000%, 15.000% 70.000%, 15.000% 70.000%, 12.500% 70.000%, 12.500% 70.000%, 10.000% 70.000%, 10.000% 75.000%, 7.500% 75.000%, 7.500% 70.000%, 5.000% 70.000%, 5.000% 75.000%, 2.500% 75.000%, 2.500% 75.000%, 0.000% 75.000%);
    }
    .portrait-photo { background-position: center 12%; }

    /* Safety net: content-panel can scroll internally on unusually short or
       narrow devices instead of silently clipping content with no way to
       reach it. On typical phones everything still fits and this never
       engages, but it guarantees the slogan/card/footer are always reachable. */
    .content-panel {
        flex: 1 1 64%;
        padding: 0 1.25rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .brand-row { padding-top: 1.4vh; }
    .headline-block { padding-top: 0.8vh; flex: 0 0 auto; }
    .slogan-hi { font-size: clamp(1.1rem, 3.4vh, 1.6rem); margin-bottom: 0.4rem; }
    .slogan-en { margin-bottom: 0; }

    .dock { flex: 1 1 auto; padding: 0.6vh 0; }
    .subscribe-card { padding: 1rem 1.2rem 0.85rem; }
    .footer-strip { flex: 0 0 auto; padding-bottom: 1.4vh; }
}

@media (max-height: 700px) {
    .slogan-hi { font-size: clamp(1rem, 3vh, 1.4rem); margin-bottom: 0.3rem; }
    .subscribe-card { padding: 0.9rem 1.1rem 0.75rem; }
    .subscribe-card .sub { margin-bottom: 0.55rem; }
    .trust-row { margin-top: 0.5rem; padding-top: 0.45rem; }
    .footer-strip { padding-bottom: 1vh; }
}
