:root {
    --bg: #ffffff;
    --paper: #ffffff;
    --paper-soft: #f7f8fb;
    --ink: #101218;
    --text: #101218;
    --muted: #5f6675;
    --soft: #8a91a1;
    --line: #e6e9ef;
    --line-strong: #d8dde7;
    --gold: #b78936;
    --gold-light: #e5c47a;
    --navy: #111827;
    --blue: #2b6eff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

body::selection { background: var(--gold-light); color: #111; }
button, input, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(circle at 12% 18%, rgba(183,137,54,.11), transparent 25%),
        radial-gradient(circle at 86% 16%, rgba(43,110,255,.08), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f9fafc 58%, #ffffff 100%);
    overflow: hidden;
}
.grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(16,18,24,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16,18,24,.035) 1px, transparent 1px);
    background-size: 70px 70px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.45), transparent 76%);
}
.orb {
    position: absolute;
    width: 32vw;
    min-width: 280px;
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .2;
    animation: float 12s ease-in-out infinite alternate;
}
.orb-one { background: #e5c47a; left: -14vw; top: 4vh; }
.orb-two { background: #9ec5ff; right: -12vw; top: 34vh; animation-delay: -4s; }
.orb-three { background: #f0f2f6; left: 38vw; bottom: -22vh; animation-delay: -7s; }

.site-shell {
    margin: 0 auto;
    background: none !important;
}
.nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1120px, calc(100% - 38px));
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 13px;
    border: 1px solid rgba(16,18,24,.09);
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 50px rgba(17,24,39,.08);
}
.brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    font-weight: 700;
    letter-spacing: .01em;
    color: var(--ink);
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #111827, #303746);
    color: #fff;
    box-shadow: 0 12px 28px rgba(17,24,39,.16);
    font-size: 13px;
}
.nav-cta {
    padding: 12px 18px;
    border-radius: 999px;
    background: #111827;
    border: 1px solid rgba(17,24,39,.12);
    color: #fff;
    transition: .25s ease;
    box-shadow: 0 12px 26px rgba(17,24,39,.16);
}
.nav-cta:hover { transform: translateY(-2px); background: #000; box-shadow: 0 18px 34px rgba(17,24,39,.2); }

.hero {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 128px 0 76px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
}
.hero-video-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .36;
    filter: saturate(1.04) contrast(1.04) brightness(1.18);
    transform: scale(1.02);
}
.hero-video-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.88) 38%, rgba(255,255,255,.62) 100%),
        linear-gradient(180deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.9) 100%);
}
.hero-card {
    text-align: left;
    width: min(940px, 100%);
    padding: clamp(22px, 5vw, 54px) 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    position: relative;
}
.hero-card::before { display: none; }
.eyebrow {
    margin: 0 0 18px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: 12px;
    font-weight: 700;
}
h1, h2, h3 { margin: 0; text-transform: capitalize; color: var(--ink); }
h1 {
    font-size: clamp(78px, 15vw, 180px);
    line-height: .84;
    letter-spacing: -.095em;
    font-weight: 700;
    color: var(--ink);
    text-shadow: none;
}

.kaprekar-number {
    position: relative;
    display: inline-flex;
    gap: clamp(4px, 1.1vw, 16px);
    align-items: center;
    font-variant-numeric: tabular-nums;
    perspective: 900px;
}
.kaprekar-number::before {
    content: "";
    position: absolute;
    inset: -10% -4%;
    background: radial-gradient(circle at 50% 50%, rgba(183,137,54,.20), transparent 60%);
    filter: blur(22px);
    opacity: .75;
    z-index: -1;
    animation: numberGlow 3.8s ease-in-out infinite alternate;
}
.kaprekar-number .digit {
    display: inline-grid;
    place-items: center;
    min-width: .62em;
    line-height: .86;
    transform-style: preserve-3d;
    will-change: transform, filter, opacity;
    background: linear-gradient(180deg, #101218 0%, #1d2533 48%, #b78936 120%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 18px 55px rgba(17,24,39,.15);
}
.kaprekar-number .digit.is-rolling {
    filter: blur(.5px);
    transform: translateY(-.05em) rotateX(18deg);
}
.kaprekar-number .digit.is-locked {
    animation: digitLock .65s cubic-bezier(.2,.9,.2,1) both;
}
@keyframes digitLock {
    0% { transform: translateY(-.24em) rotateX(58deg) scale(.96); opacity: .55; }
    55% { transform: translateY(.04em) rotateX(-10deg) scale(1.04); opacity: 1; }
    100% { transform: translateY(0) rotateX(0) scale(1); opacity: 1; }
}
@keyframes numberGlow {
    from { opacity: .35; transform: scale(.94); }
    to { opacity: .85; transform: scale(1.04); }
}

.tagline {
    margin: 26px 0 0;
    font-size: clamp(34px, 5vw, 60px);
    line-height: .98;
    font-weight: 700;
    max-width: 860px;
    letter-spacing: -.055em;
    color: var(--ink);
}
.intro {
    margin: 24px 0 0;
    max-width: 650px;
    color: var(--muted);
    font-size: clamp(16px, 1.7vw, 20px);
    line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-start; margin-top: 34px; }
.primary-btn, .ghost-btn, .submit-btn {
    min-height: 54px;
    padding: 0 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 0;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
    font-weight: 700;
}
.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, #101218, #2a3140);
    box-shadow: 0 18px 34px rgba(17,24,39,.18);
}
.primary-btn:hover, .ghost-btn:hover { transform: translateY(-3px); }
.primary-btn:hover { box-shadow: 0 24px 50px rgba(17,24,39,.24); background: #000; }
.ghost-btn {
    color: var(--ink);
    background: rgba(255,255,255,.72);
    border: 1px solid var(--line-strong);
    box-shadow: 0 14px 30px rgba(17,24,39,.06);
}
.ghost-btn:hover { border-color: rgba(183,137,54,.45); box-shadow: 0 18px 42px rgba(17,24,39,.1); background: #fff; }

.contact-section {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 34px;
    padding: clamp(24px, 5vw, 54px);
    margin: 22px 0 76px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.84);
    backdrop-filter: blur(18px);
    border-radius: 34px;
    box-shadow: 0 24px 80px rgba(17,24,39,.08);
}
.contact-copy h2 { font-size: clamp(34px, 5vw, 68px); line-height: .98; letter-spacing: -.06em; }
.contact-copy p:not(.eyebrow) { color: var(--muted); line-height: 1.65; font-size: 17px; }
.contact-form { display: grid; gap: 14px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label span { display: block; color: var(--soft); font-size: 13px; margin: 0 0 8px; }
input, textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--ink);
    border-radius: 18px;
    outline: none;
    padding: 15px 16px;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
    box-shadow: 0 8px 20px rgba(17,24,39,.035);
}
textarea { resize: vertical; min-height: 138px; }
input:focus, textarea:focus { border-color: rgba(183,137,54,.65); box-shadow: 0 0 0 4px rgba(183,137,54,.1); background: #fff; }
.captcha-row { display: flex; gap: 12px; align-items: center; }
.captcha-row strong {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #101218, #303746);
}
.submit-btn { width: 100%; margin-top: 8px; }
.micro-note { margin: 0; color: var(--soft); font-size: 12px; text-align: center; }
.form-alert { padding: 14px 16px; border-radius: 16px; font-size: 14px; }
.form-alert.success { background: rgba(22, 163, 74, .09); border: 1px solid rgba(22, 163, 74, .2); color: #0f7a3c; }
.form-alert.error { background: rgba(220, 38, 38, .08); border: 1px solid rgba(220, 38, 38, .18); color: #b91c1c; }
.honeypot { position: absolute; left: -9999px; opacity: 0; }
.footer {
    padding: 28px 18px 24px;
    text-align: center;
    color: rgba(16,18,24,.45);
    font-size: 10px;
    letter-spacing: .02em;
    border-top: 1px solid var(--line);
    background: #fff;
}
.footer p { margin: 4px 0; }
.footer-links { display: flex; justify-content: center; gap: 14px; margin-bottom: 12px; }
.footer-links button {
    background: transparent;
    border: 0;
    color: rgba(16,18,24,.64);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
}
.modal.is-open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17,24,39,.34); backdrop-filter: blur(9px); }
.modal-panel {
    position: relative;
    width: min(860px, calc(100% - 28px));
    max-height: calc(100svh - 40px);
    margin: 20px auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 35px 100px rgba(17,24,39,.25);
}
.modal-panel h2 { padding: 28px 32px 18px; font-size: 32px; letter-spacing: -.04em; }
.modal-content { max-height: calc(100svh - 150px); overflow-y: auto; padding: 0 32px 32px; color: var(--muted); line-height: 1.65; }
.modal-content h3 { color: var(--ink); margin-top: 22px; font-size: 18px; }
.modal-close {
    position: absolute;
    right: 18px;
    top: 16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 24px;
    cursor: pointer;
    z-index: 2;
}
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes float { to { transform: translate3d(4vw, -3vh, 0) scale(1.08); } }

@media (max-width: 820px) {
    .contact-section, .field-grid { grid-template-columns: 1fr; }
    .nav { top: 12px; }
    .brand span:last-child { display: none; }
    .hero { padding-top: 110px; }
    .hero-card { text-align: center; }
    .hero-actions { justify-content: center; }
    .captcha-row { align-items: stretch; flex-direction: column; }
    .captcha-row strong { justify-content: center; }
    h1 { font-size: clamp(74px, 21vw, 118px); }
}


/* Single-screen layout: top navigation removed. */
.nav { display: none !important; }
.hero { padding-top: 72px; }
.contact-modal-panel {
    width: min(760px, calc(100% - 28px));
    max-height: calc(100svh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.contact-modal-head {
    flex: 0 0 auto;
    padding: 30px 32px 10px;
}
.contact-modal-head h2 { padding: 0; font-size: clamp(30px, 4vw, 54px); line-height: 1; letter-spacing: -.055em; }
.contact-modal-head p:not(.eyebrow) { margin: 14px 0 0; color: var(--muted); line-height: 1.65; }
.contact-modal-panel .contact-form {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 10px 32px 32px;
}
.contact-modal-panel .contact-form::-webkit-scrollbar { width: 8px; }
.contact-modal-panel .contact-form::-webkit-scrollbar-track { background: rgba(17,24,39,.06); border-radius: 999px; }
.contact-modal-panel .contact-form::-webkit-scrollbar-thumb { background: rgba(17,24,39,.24); border-radius: 999px; }
.ajax-form-alert[hidden] { display: none; }
.ajax-form-alert { margin-bottom: 4px; }
.primary-btn[disabled], .submit-btn[disabled] { opacity: .65; cursor: wait; transform: none !important; }
@media (max-width: 820px) {
    .hero { padding-top: 72px; }
    .contact-modal-head, .contact-modal-panel .contact-form { padding-left: 20px; padding-right: 20px; }
}
