/* ==========================================================================
   Project Helix — Global Design System
   Scoped under .helix-page (applied to <body> by header.php) so it never
   bleeds into not-yet-migrated legacy templates, and so the old iteach
   style.css can't bleed into it either.
   ========================================================================== */

.helix-page {
    --helix-bg: #05070a;
    --helix-bg-alt: #0a0e14;
    --helix-panel: #131c27;
    --helix-input-bg: #1b2531;
    --helix-border: #26313f;
    --helix-teal: #2dd4c8;
    --helix-teal-bright: #4de8dc;
    --helix-green: #3ddc84;
    --helix-text: #f2f5f7;
    --helix-text-dim: #9aa7b2;
    --helix-font: 'Sora', 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    background: var(--helix-bg);
    color: var(--helix-text);
    font-family: var(--helix-font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.helix-page * {
    box-sizing: border-box;
}

.helix-page a {
    text-decoration: none;
    color: inherit;
}

.helix-page ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.helix-page img {
    max-width: 100%;
    display: block;
}

.helix-page ::selection {
    background: var(--helix-teal);
    color: #04211d;
}

.helix-page ::-moz-selection {
    background: var(--helix-teal);
    color: #04211d;
}

/* The old theme's global "h1, h2, h3, h4, h5, h6 { color; font-family; }" rule
   targets headings directly, so it beats anything Helix headings only get by
   inheriting from .helix-page. Set these explicitly on the headings to win. */
.helix-page h1,
.helix-page h2,
.helix-page h3,
.helix-page h4,
.helix-page h5,
.helix-page h6 {
    font-family: var(--helix-font);
    color: var(--helix-text);
}

.helix-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ---------------------------------- Generic page header ---------------------------------- */

.helix-page-header {
    border-bottom: 1px solid var(--helix-border);
    padding: 56px 0;
}

.helix-page-header h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.01em;
}

.helix-page-header p {
    color: var(--helix-text-dim);
    font-size: 1.05rem;
    margin: 12px 0 0;
    max-width: 640px;
}

/* ---------------------------------- Content / prose ---------------------------------- */

.helix-content {
    padding: 48px 0 80px;
}

.helix-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 40px 0 16px;
}

.helix-content h2:first-child {
    margin-top: 0;
}

.helix-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 32px 0 14px;
}

.helix-content p {
    color: var(--helix-text-dim);
    font-size: 1.02rem;
    line-height: 1.7;
    margin: 0 0 20px;
}

.helix-content ul,
.helix-content ol {
    color: var(--helix-text-dim);
    font-size: 1.02rem;
    line-height: 1.7;
    margin: 0 0 20px;
    padding-left: 22px;
    list-style: disc;
}

.helix-content ol {
    list-style: decimal;
}

.helix-content li {
    margin-bottom: 8px;
}

.helix-content a {
    color: var(--helix-teal-bright);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.helix-content blockquote {
    border-left: 3px solid var(--helix-teal);
    margin: 0 0 20px;
    padding: 4px 0 4px 20px;
    color: var(--helix-text);
    font-style: italic;
}

.helix-content img {
    border-radius: 8px;
    margin: 12px 0 24px;
}

.helix-content strong {
    color: var(--helix-text);
}

/* ---------------------------------- Generic card ---------------------------------- */

.helix-card {
    background: var(--helix-panel);
    border: 1px solid var(--helix-border);
    border-radius: 10px;
    padding: 28px;
}

.helix-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 10px;
}

.helix-card p {
    color: var(--helix-text-dim);
    font-size: 0.95rem;
    margin: 0;
}

/* ---------------------------------- Header ---------------------------------- */

.helix-header {
    border-bottom: 1px solid var(--helix-border);
    background: var(--helix-bg);
    position: relative;
    z-index: 20;
}

.helix-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    max-width: 1240px;
    margin: 0 auto;
}

.helix-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--helix-text);
}

.helix-brand span.dim {
    color: var(--helix-text-dim);
    font-weight: 400;
}

.helix-brand .divider {
    width: 1px;
    height: 28px;
    background: var(--helix-border);
}

.helix-brand .helix-logo-mark {
    display: flex;
    align-items: center;
    gap: 10px;
}

.helix-brand .helix-logo-icon {
    height: 34px;
    width: auto;
    display: block;
}

.helix-brand .helix-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.helix-brand .helix-logo-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--helix-text);
}

.helix-brand .helix-logo-sub {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: var(--helix-teal-bright);
}

.helix-nav {
    display: flex;
    align-items: center;
    gap: 36px;
}

.helix-nav ul {
    display: flex;
    align-items: center;
    gap: 32px;
}

.helix-nav ul li a {
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    font-weight: 600;
    color: var(--helix-text);
    text-transform: uppercase;
    opacity: 0.85;
    transition: opacity 0.15s ease;
}

.helix-nav ul li a:hover {
    opacity: 1;
    color: var(--helix-teal-bright);
}

.helix-header__actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.helix-mobile-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px;
}

.helix-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--helix-text);
    margin: 5px 0;
}

.helix-welcome {
    font-size: 0.85rem;
    color: var(--helix-text-dim);
    margin-right: 4px;
}

/* ---------------------------------- Buttons ---------------------------------- */

.helix-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.helix-btn--primary {
    background: var(--helix-teal);
    color: #04211d;
}

.helix-btn--primary:hover {
    background: var(--helix-teal-bright);
}

.helix-btn--outline {
    border-color: var(--helix-border);
    color: var(--helix-text);
    background: transparent;
}

.helix-btn--outline:hover {
    border-color: var(--helix-teal);
    color: var(--helix-teal-bright);
}

.helix-btn--ghost {
    border-color: var(--helix-border);
    color: var(--helix-text);
    background: transparent;
    padding: 11px 22px;
}

.helix-btn--large {
    padding: 15px 30px;
    font-size: 0.9rem;
}

/* ---------------------------------- Hero ---------------------------------- */

.helix-hero {
    position: relative;
    overflow: hidden;
    padding: 20px 0 40px;
}

.helix-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 32px;
}

.helix-hero h1 {
    font-size: 3.4rem;
    line-height: 1.08;
    font-weight: 800;
    margin: 0 0 24px;
    letter-spacing: -0.01em;
}

.helix-hero h1 .teal {
    color: var(--helix-teal-bright);
}

.helix-hero p.helix-lede {
    font-size: 1.1rem;
    color: var(--helix-text-dim);
    max-width: 460px;
    margin: 0 0 36px;
}

.helix-hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Robot / visual panel */

.helix-hero__visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 480px;
}

.helix-hero__glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(45, 212, 200, 0.18) 0%, rgba(45, 212, 200, 0) 60%);
    pointer-events: none;
}

.helix-hero__ring {
    position: absolute;
    border: 1px solid rgba(45, 212, 200, 0.35);
    border-radius: 50%;
}

.helix-hero__ring--1 {
    width: 380px;
    height: 380px;
}

.helix-hero__ring--2 {
    width: 460px;
    height: 460px;
    border-color: rgba(45, 212, 200, 0.18);
}

.helix-hero__figure {
    position: relative;
    width: 340px;
    max-width: 80%;
    z-index: 2;
}

/* Placeholder box shown until a real mascot image is added */
.helix-hero__figure .helix-figure-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 1px dashed rgba(45, 212, 200, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--helix-text-dim);
    font-size: 0.8rem;
    padding: 20px;
    background: rgba(45, 212, 200, 0.04);
}

.helix-hero__caption {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-top: -35px;
}

.helix-hero__caption h3 {
    font-size: 1rem;
    letter-spacing: 0.08em;
    margin: 0 0 10px;
    font-weight: 700;
}

.helix-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(61, 220, 132, 0.12);
    color: var(--helix-green);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.helix-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--helix-green);
}

/* ---------------------------------- Feature strip ---------------------------------- */

.helix-features {
    border-top: 1px solid var(--helix-border);
    padding: 44px 0;
}

.helix-features__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.helix-feature {
    display: flex;
    align-items: center;
    gap: 16px;
}

.helix-feature__icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--helix-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--helix-teal-bright);
}

.helix-feature__icon svg {
    width: 22px;
    height: 22px;
}

.helix-feature h4 {
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    margin: 0 0 4px;
    font-weight: 700;
}

.helix-feature p {
    font-size: 0.85rem;
    color: var(--helix-text-dim);
    margin: 0;
}

/* ---------------------------------- Login page ---------------------------------- */

.helix-login {
    padding: 56px 0 90px;
}

.helix-login__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
    align-items: start;
}

.helix-login__form {
    background: var(--helix-panel);
    border: 1px solid var(--helix-border);
    border-radius: 10px;
    padding: 36px;
}

.helix-login__help h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 10px;
}

.helix-login__help p {
    color: var(--helix-text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 16px;
}

/* Generic form styling — covers login/shortcode forms dropped in via the_content() */
.helix-content form,
.helix-login__form form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.helix-content label,
.helix-login__form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--helix-text-dim);
    margin-bottom: 6px;
}

.helix-content input[type="text"],
.helix-content input[type="email"],
.helix-content input[type="password"],
.helix-content input[type="search"],
.helix-content textarea,
.helix-login__form input[type="text"],
.helix-login__form input[type="email"],
.helix-login__form input[type="password"],
.helix-login__form input[type="search"],
.helix-login__form textarea {
    width: 100%;
    background: var(--helix-input-bg);
    border: 1px solid var(--helix-border);
    border-radius: 6px;
    padding: 12px 14px;
    color: var(--helix-text);
    font-family: var(--helix-font);
    font-size: 0.95rem;
}

.helix-content input[type="text"]:focus,
.helix-content input[type="email"]:focus,
.helix-content input[type="password"]:focus,
.helix-content textarea:focus,
.helix-login__form input:focus,
.helix-login__form textarea:focus {
    outline: none;
    border-color: var(--helix-teal);
}

.helix-content input[type="submit"],
.helix-content button[type="submit"],
.helix-login__form input[type="submit"],
.helix-login__form button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    background: var(--helix-teal);
    color: #04211d;
    border: 0;
    border-radius: 6px;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: var(--helix-font);
    cursor: pointer;
}

.helix-content input[type="submit"]:hover,
.helix-content button[type="submit"]:hover,
.helix-login__form input[type="submit"]:hover,
.helix-login__form button[type="submit"]:hover {
    background: var(--helix-teal-bright);
}

.helix-content input[type="checkbox"],
.helix-login__form input[type="checkbox"] {
    accent-color: var(--helix-teal);
    margin-right: 6px;
}

@media (max-width: 800px) {
    .helix-login__grid { grid-template-columns: 1fr; }
}

/* Login/form error messages — covers the common patterns different login
   plugins use (WP core #login_error, Ultimate Member .um-error, generic
   .error/.message.error). If none of these match what your plugin outputs,
   send a screenshot of the element's class/id from the browser inspector
   and I'll add the right selector. */
.helix-content .mepr_error,
.helix-login__form .mepr_error,
.helix-content #login_error,
.helix-content .login .message,
.helix-content .um-error,
.helix-content .um-notice,
.helix-content div.error,
.helix-content p.error,
.helix-content .woocommerce-error,
.helix-content .alert-danger,
.helix-login__form #login_error,
.helix-login__form .login .message,
.helix-login__form .um-error,
.helix-login__form .um-notice,
.helix-login__form div.error,
.helix-login__form p.error {
    background: rgba(255, 92, 92, 0.1) !important;
    border: 1px solid rgba(255, 92, 92, 0.4) !important;
    border-left: 3px solid #ff5c5c !important;
    border-radius: 6px;
    padding: 14px 18px;
    color: var(--helix-text-dim);
    font-size: 0.92rem;
    margin: 0 0 20px;
}

.helix-content #login_error strong,
.helix-content .um-error strong,
.helix-content .mepr_error strong,
.helix-login__form #login_error strong,
.helix-login__form .um-error strong,
.helix-login__form .mepr_error strong {
    color: #ff8585;
    font-weight: 700;
}

.helix-content .mepr_error ul,
.helix-login__form .mepr_error ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.helix-content .mepr_error li,
.helix-login__form .mepr_error li {
    margin: 0;
}

.helix-content .mepr_error li + li,
.helix-login__form .mepr_error li + li {
    margin-top: 8px;
}

.helix-content #login_error a,
.helix-login__form #login_error a {
    color: var(--helix-teal-bright);
}

/* ---------------------------------- 404 ---------------------------------- */

.helix-404 {
    position: relative;
    overflow: hidden;
    padding: 110px 0 130px;
    text-align: center;
}

.helix-404__glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(45, 212, 200, 0.14) 0%, rgba(45, 212, 200, 0) 60%);
    pointer-events: none;
}

.helix-404__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(45, 212, 200, 0.22);
    border-radius: 50%;
}

.helix-404__ring--1 { width: 340px; height: 340px; }
.helix-404__ring--2 { width: 460px; height: 460px; border-color: rgba(45, 212, 200, 0.12); }

.helix-404__inner {
    position: relative;
    z-index: 2;
    max-width: 560px;
    margin: 0 auto;
    padding: 0 32px;
}

.helix-404__code {
    font-size: 7rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--helix-teal-bright);
    margin: 0 0 12px;
    text-shadow: 0 0 40px rgba(45, 212, 200, 0.35);
}

.helix-404__inner h1 {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0 0 14px;
}

.helix-404__inner p {
    color: var(--helix-text-dim);
    font-size: 1.02rem;
    line-height: 1.6;
    margin: 0 0 36px;
}

.helix-404__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 560px) {
    .helix-404__code { font-size: 4.5rem; }
    .helix-404 { padding: 70px 0 90px; }
}

/* ---------------------------------- Footer ---------------------------------- */

.helix-footer {
    border-top: 1px solid var(--helix-border);
    padding: 32px 0;
}

.helix-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.helix-footer p {
    color: var(--helix-text-dim);
    font-size: 0.8rem;
    margin: 0;
}

.helix-footer ul {
    display: flex;
    gap: 20px;
}

.helix-footer ul a {
    font-size: 0.8rem;
    color: var(--helix-text-dim);
}

.helix-footer ul a:hover {
    color: var(--helix-teal-bright);
}

/* ---------------------------------- Responsive ---------------------------------- */

@media (max-width: 960px) {
    .helix-nav { display: none; }
    .helix-nav.is-open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--helix-bg);
        border-bottom: 1px solid var(--helix-border);
        padding: 20px 32px;
        z-index: 30;
    }
    .helix-nav.is-open ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }
    .helix-mobile-toggle { display: block; }
    .helix-hero__inner { grid-template-columns: 1fr; text-align: center; }
    .helix-hero p.helix-lede { margin-left: auto; margin-right: auto; }
    .helix-hero__actions { justify-content: center; }
    .helix-hero h1 { font-size: 2.6rem; }
    .helix-features__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .helix-features__grid { grid-template-columns: 1fr; }
    .helix-header__inner { padding: 16px 20px; }
    .helix-header__actions .helix-btn--outline { display: none; }
}
