/**
 * Atlas Research Group — Account Gate styles (v1.0.0)
 *
 * Covers BOTH the account wall (template-account-gate.php) and the
 * one-time RUO acknowledgment gate (template-ruo-gate.php).
 *
 * Scoped under body.atlas-gate-body so nothing leaks into the real site.
 * These templates load WITHOUT the normal header/footer chrome — the
 * user hasn't entered the site yet.
 */

/* ===== Reset / base ===== */
body.atlas-gate-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Poppins', system-ui, sans-serif;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    background: #050c15;
    overflow-x: hidden;
}
body.atlas-gate-body *,
body.atlas-gate-body *::before,
body.atlas-gate-body *::after {
    box-sizing: border-box;
}
body.atlas-gate-body a {
    color: #EAC861;
    text-decoration: none;
    transition: color .15s;
}
body.atlas-gate-body a:hover { color: #fff; }

/* Theme tokens scoped here so they don't fight the real-site vars */
body.atlas-gate-body {
    --g-bg-0: #050c15;
    --g-bg-1: #00090e;
    --g-gold-bright: #EAC861;
    --g-gold: #AF8843;
    --g-gold-dark: #7D5F2C;
    --g-text-mute: rgba(204,204,204,0.8);
    --g-text-faint: #d9d9d9;
    --g-radius: 10px;
}

/* ════════════════════════════════════════════════════════════════
   ACCOUNT WALL (template-account-gate.php)
   Two-column: brand panel left, signup form right.
   ════════════════════════════════════════════════════════════════ */
body.atlas-account-gate .atlas-gate {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    width: 100%;
}

/* ─── LEFT: Brand panel ─── */
.atlas-gate__brand {
    position: relative;
    overflow: hidden;
    padding: 56px 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    background:
        radial-gradient(120% 60% at 30% 0%, rgba(175,136,67,0.18), transparent 60%),
        linear-gradient(180deg, #050c15 0%, #00090e 100%);
    border-right: 1px solid rgba(175,136,67,0.18);
}
.atlas-gate__brand-bg {
    position: absolute;
    inset: 0;
    background: url('../img/home/atlas-logo-circle.png') center/contain no-repeat;
    background-position: right -200px center;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}
.atlas-gate__brand-honeycomb {
    position: absolute; inset: 0;
    background-image: url('../img/home/honeycomb-bg.png');
    background-repeat: repeat;
    background-size: 22vh auto;
    opacity: 0.06;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 0;
}
.atlas-gate__brand > *:not(.atlas-gate__brand-bg):not(.atlas-gate__brand-honeycomb) {
    position: relative;
    z-index: 1;
}

.atlas-gate__brand-top { display: flex; align-items: center; }
.atlas-gate__logo {
    height: 56px;
    width: auto;
    display: block;
}

.atlas-gate__eyebrow {
    font-family: 'Jura', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.32em;
    color: var(--g-gold-bright);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 14px;
}
.atlas-gate__eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--g-gold-bright));
}

.atlas-gate__hero-title {
    margin: 18px 0 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 56px;
    line-height: 60px;
    letter-spacing: -0.02em;
    color: #fff;
}
.atlas-gate__hero-title .gold {
    background: linear-gradient(180deg, #EAC861 0%, #AF8843 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.atlas-gate__hero-title .dot {
    background: linear-gradient(180deg, #EAC861 0%, #AF8843 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.atlas-gate__hero-lede {
    margin: 22px 0 0;
    font-size: 17px;
    line-height: 28px;
    color: var(--g-text-mute);
    max-width: 480px;
    text-wrap: pretty;
}

.atlas-gate__bullets {
    margin: 38px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.atlas-gate__bullets li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    color: var(--g-text-faint);
}
.atlas-gate__bullets .check {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--g-gold) 0%, var(--g-gold-dark) 100%);
    box-shadow: 0 0 12px rgba(175,136,67,0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.atlas-gate__brand-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Jura', sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(204,204,204,0.6);
}
.atlas-gate__shield {
    color: var(--g-gold);
    display: inline-flex;
    align-items: center;
}

/* ─── RIGHT: Form panel ─── */
.atlas-gate__form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: #fff;
    min-height: 100vh;
}
.atlas-gate__form {
    width: 100%;
    max-width: 440px;
    color: #1a1a1a;
}
.atlas-gate__form h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 30px;
    line-height: 1.2;
    color: #111;
    margin: 0;
}
.atlas-gate__sub {
    margin: 10px 0 32px;
    font-size: 14px;
    color: #6b7280;
}

.atlas-gate__field {
    margin-bottom: 18px;
}
.atlas-gate__field label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
}
.atlas-gate__field input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #111;
    background: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.atlas-gate__field input:focus {
    border-color: var(--g-gold);
    box-shadow: 0 0 0 3px rgba(175,136,67,0.15);
}
.atlas-gate__hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
}

.atlas-gate__legal {
    margin: 20px 0 14px;
    font-size: 12px;
    line-height: 18px;
    color: #6b7280;
}
.atlas-gate__legal a {
    color: var(--g-gold-dark);
    text-decoration: underline;
}
.atlas-gate__legal a:hover { color: #111; }

.atlas-gate__error {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 6px;
    background: rgba(220,38,38,0.08);
    border: 1px solid rgba(220,38,38,0.3);
    color: #b91c1c;
    font-size: 13px;
    line-height: 18px;
    display: none;
}
.atlas-gate__error.is-visible { display: block; }

.atlas-gate__submit {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--g-gold) 0%, var(--g-gold-dark) 100%);
    box-shadow: 0 2px 12px rgba(175,136,67,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.04em;
    cursor: pointer;
    position: relative;
    transition: filter .15s, box-shadow .2s, transform .1s;
}
.atlas-gate__submit:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 18px rgba(175,136,67,0.55), inset 0 1px 0 rgba(255,255,255,0.2);
}
.atlas-gate__submit:active { transform: translateY(1px); }
.atlas-gate__submit:disabled { cursor: not-allowed; opacity: 0.7; }

.atlas-gate__submit .spinner {
    display: none;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: middle;
    animation: atlas-gate-spin 0.7s linear infinite;
}
.atlas-gate__submit.is-loading .label { opacity: 0.6; }
.atlas-gate__submit.is-loading .spinner { display: inline-block; }
@keyframes atlas-gate-spin { to { transform: rotate(360deg); } }

.atlas-gate__signin {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}
.atlas-gate__signin a {
    color: var(--g-gold-dark);
    font-weight: 600;
    margin-left: 4px;
    text-decoration: underline;
}
.atlas-gate__signin a:hover { color: #111; }

/* ════════════════════════════════════════════════════════════════
   RUO ACKNOWLEDGMENT GATE (template-ruo-gate.php)
   Single dark card centered on page.
   ════════════════════════════════════════════════════════════════ */
body.atlas-ruo-gate-body { background: var(--g-bg-0); overflow: hidden; }

/* Layered backdrop: blurred composition mimicking the homepage hero/products
   atmosphere. Sits fixed behind everything, heavily blurred + dimmed so the
   gate card reads clearly above it. Uses existing /assets/img/home/ PNGs. */
body.atlas-ruo-gate-body::before {
    content: '';
    position: fixed;
    inset: -8% -8% -8% -8%;  /* slight overscan so blur edges don't show */
    z-index: 0;
    background-color: var(--g-bg-0);
    background-image:
        /* Faint vials drifting in space */
        url('../img/home/peptide-2.png'),
        url('../img/home/peptide-3.png'),
        url('../img/home/peptide-4.png'),
        url('../img/home/peptide-1.png'),
        /* Atlas circle watermark dominant in the middle-left */
        url('../img/home/atlas-logo-circle.png'),
        /* Honeycomb texture wash */
        url('../img/home/honeycomb-bg.png'),
        /* Warm gold radial highlight + base gradient */
        radial-gradient(120% 60% at 50% 0%, rgba(175,136,67,0.22), transparent 60%),
        linear-gradient(180deg, var(--g-bg-0) 0%, var(--g-bg-1) 100%);
    background-repeat:
        no-repeat,
        no-repeat,
        no-repeat,
        no-repeat,
        no-repeat,
        repeat,
        no-repeat,
        no-repeat;
    background-position:
        12% 70%,
        85% 25%,
        70% 80%,
        20% 18%,
        center,
        0 0,
        center,
        center;
    background-size:
        320px auto,
        280px auto,
        260px auto,
        300px auto,
        80vh auto,
        18vw auto,
        cover,
        cover;
    filter: blur(28px) saturate(1.1) brightness(0.7);
    transform: scale(1.05); /* compensate for blur edge softening */
    pointer-events: none;
}

/* Soft vignette to focus the eye on the gate card */
body.atlas-ruo-gate-body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(60% 50% at 50% 50%, transparent 0%, rgba(0,0,0,0.45) 100%);
    pointer-events: none;
}

.atlas-ruo-gate {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.atlas-ruo-gate__honeycomb {
    /* Replaced by the body::before composite backdrop — kept as a no-op
       so the empty <div> in template-ruo-gate.php doesn't break layout. */
    display: none;
}

.atlas-ruo-gate__card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 540px;
    padding: 50px 48px 40px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(8,15,26,0.78) 0%, rgba(6,14,21,0.72) 100%);
    border: 1px solid rgba(234,200,97,0.32);
    box-shadow:
        0 40px 100px rgba(0,0,0,0.6),
        0 0 80px rgba(175,136,67,0.18),
        inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    text-align: center;
}
.atlas-ruo-gate__header { margin-bottom: 28px; }
.atlas-ruo-gate__logo {
    height: 44px;
    width: auto;
    display: inline-block;
}

.atlas-ruo-gate__seal {
    width: 84px;
    height: 84px;
    margin: 4px auto 22px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--g-gold) 0%, var(--g-gold-dark) 100%);
    box-shadow: 0 0 0 4px rgba(234,200,97,0.16), 0 0 36px rgba(234,200,97,0.35), inset 0 2px 0 rgba(255,255,255,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.atlas-ruo-gate h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1.2;
    color: #fff;
    margin: 0;
    letter-spacing: -0.01em;
}
.atlas-ruo-gate__lede {
    margin: 14px auto 32px;
    font-size: 15px;
    line-height: 24px;
    color: var(--g-text-mute);
    max-width: 420px;
    text-wrap: pretty;
}

.atlas-ruo-gate__check {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: 10px;
    background: rgba(175,136,67,0.05);
    border: 1px solid rgba(175,136,67,0.2);
    cursor: pointer;
    text-align: left;
    transition: background .15s, border-color .15s;
}
.atlas-ruo-gate__check:hover {
    background: rgba(175,136,67,0.1);
    border-color: rgba(234,200,97,0.4);
}
.atlas-ruo-gate__check input {
    /* Visually hidden but accessible */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
.atlas-ruo-gate__check .box {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: transparent;
    border: 2px solid rgba(234,200,97,0.5);
    margin-top: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s;
}
.atlas-ruo-gate__check .box svg {
    opacity: 0;
    transition: opacity .15s;
}
.atlas-ruo-gate__check input:checked + .box {
    background: linear-gradient(180deg, var(--g-gold) 0%, var(--g-gold-dark) 100%);
    border-color: var(--g-gold);
    box-shadow: 0 0 10px rgba(175,136,67,0.4);
}
.atlas-ruo-gate__check input:checked + .box svg { opacity: 1; }
.atlas-ruo-gate__check input:focus-visible + .box {
    outline: 2px solid var(--g-gold-bright);
    outline-offset: 2px;
}
.atlas-ruo-gate__check .text {
    flex: 1;
    font-size: 14px;
    line-height: 22px;
    color: var(--g-text-faint);
}
.atlas-ruo-gate__check .text strong { color: #fff; font-weight: 600; }
.atlas-ruo-gate__check .text a {
    color: var(--g-gold-bright);
    text-decoration: underline;
}

.atlas-ruo-gate__error {
    margin: 16px 0 8px;
    padding: 10px 14px;
    border-radius: 6px;
    background: rgba(255,80,80,0.1);
    border: 1px solid rgba(255,80,80,0.35);
    color: #ff9494;
    font-size: 13px;
    line-height: 18px;
    text-align: left;
    display: none;
}
.atlas-ruo-gate__error.is-visible { display: block; }

.atlas-ruo-gate__submit {
    margin-top: 24px;
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--g-gold) 0%, var(--g-gold-dark) 100%);
    box-shadow: 0 4px 18px rgba(175,136,67,0.45), inset 0 1px 0 rgba(255,255,255,0.15);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter .15s, box-shadow .2s, transform .1s;
}
.atlas-ruo-gate__submit:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 6px 24px rgba(175,136,67,0.6), inset 0 1px 0 rgba(255,255,255,0.2);
}
.atlas-ruo-gate__submit:active:not(:disabled) { transform: translateY(1px); }
.atlas-ruo-gate__submit:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    filter: grayscale(0.6);
}
.atlas-ruo-gate__submit .spinner {
    display: none;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: middle;
    animation: atlas-gate-spin 0.7s linear infinite;
}
.atlas-ruo-gate__submit.is-loading .label { opacity: 0.6; }
.atlas-ruo-gate__submit.is-loading .spinner { display: inline-block; }

.atlas-ruo-gate__exit {
    margin: 24px 0 0;
    font-size: 13px;
    color: var(--g-text-mute);
}
.atlas-ruo-gate__exit a {
    color: var(--g-gold-bright);
    text-decoration: underline;
    margin-left: 4px;
}
.atlas-ruo-gate__exit a:hover { color: #fff; }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    body.atlas-account-gate .atlas-gate { grid-template-columns: 1fr; }
    .atlas-gate__brand {
        min-height: auto;
        padding: 40px 32px;
    }
    .atlas-gate__hero-title { font-size: 38px; line-height: 44px; }
    .atlas-gate__bullets { margin-top: 22px; }
    .atlas-gate__brand-footer { margin-top: 30px; }
    .atlas-gate__form-wrap {
        min-height: auto;
        padding: 50px 32px 60px;
    }
}
@media (max-width: 560px) {
    .atlas-gate__brand { padding: 32px 22px; }
    .atlas-gate__hero-title { font-size: 30px; line-height: 36px; }
    .atlas-gate__hero-lede { font-size: 15px; line-height: 24px; }
    .atlas-gate__form-wrap { padding: 40px 22px 50px; }
    .atlas-gate__form h2 { font-size: 24px; }

    .atlas-ruo-gate__card { padding: 36px 24px 30px; }
    .atlas-ruo-gate h1 { font-size: 24px; }
    .atlas-ruo-gate__check { padding: 12px 14px; }
    .atlas-ruo-gate__check .text { font-size: 13px; line-height: 20px; }
}
