/* ================================
   Gokstad AI
   Shared styles for cinematic login + home landing
   ================================ */

/* ---------- Base ---------- */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow: hidden;
    background: #000;
    font-family: Arial, Helvetica, sans-serif;
}

body.login-page {
    position: relative;
    color: #e8eef2;
}

/* ---------- Background / Parallax ---------- */
#parallax-root {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    background: #000;
}

.layer {
    position: absolute;
    top: 50%;
    left: 50%;
    pointer-events: none;
    user-select: none;
    will-change: transform, opacity;
    transform-origin: center center;
    opacity: 0;
}

.layer.is-visible {
    opacity: 1;
}

/* Background layers */
.layer-1,
.layer-2 {
    width: 112vmax;
    height: 112vmax;
    object-fit: cover;
    transition: opacity 1.5s ease;
}

/* Rune layer */
.layer-3 {
    width: min(36vw, 440px);
    height: auto;
    top: 34%;
    left: 50%;
    filter: drop-shadow(0 0 18px rgba(0, 255, 110, 0.28));
    transition: opacity 0.75s ease;
}

/* Logo layer */
.layer-4 {
    width: min(44vw, 600px);
    height: auto;
    top: 28%;
    left: 50%;
    transition: opacity 1s ease;
}

/* ---------- Overlay ---------- */
.page-overlay {
    position: fixed;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(
            circle at center,
            rgba(0, 0, 0, 0.06) 0%,
            rgba(0, 0, 0, 0.26) 48%,
            rgba(0, 0, 0, 0.58) 100%
        );
    pointer-events: none;
}

/* ---------- Footer ---------- */
#privacyEthicsLink {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 6;
    padding: 10px 14px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.54);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.privacy-content {
    color: #b7c5cc;
    font-size: 12px;
    line-height: 1.4;
}

.privacy-content a {
    color: #d8f3ff;
    text-decoration: none;
}

.privacy-content a:hover {
    text-decoration: underline;
}

/* ================================
   LOGIN PAGE
   ================================ */

.login-shell {
    position: relative;
    z-index: 5;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10vh 20px 92px;
    box-sizing: border-box;
}

.login-panel {
    width: min(100%, 380px);
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    padding: 28px 24px 24px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
}

.login-panel h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    color: #ffffff;
}

.login-subtitle {
    margin: 0 0 22px;
    text-align: center;
    color: #bcd6df;
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-group label {
    font-size: 14px;
    font-weight: 600;
    color: #dbe7ed;
}

.field-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(12, 16, 20, 0.88);
    color: #f2f7fa;
    font-size: 15px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.field-group input:focus {
    border-color: #00c8ff;
    box-shadow: 0 0 0 3px rgba(0, 200, 255, 0.16);
    background: rgba(16, 20, 26, 0.96);
}

.login-button {
    margin-top: 6px;
    padding: 13px 16px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, #11d6ff 0%, #00b8ea 100%);
    color: #031117;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.08s ease, filter 0.2s ease;
}

.login-button:hover {
    filter: brightness(1.06);
}

.login-button:active {
    transform: translateY(1px);
}

.error-message {
    margin: 2px 0 0;
    color: #ff6b6b;
    font-size: 14px;
    text-align: center;
}

.signup-line {
    margin: 18px 0 0;
    text-align: center;
    color: #c3d0d7;
    font-size: 14px;
}

.signup-line a {
    color: #00c8ff;
    text-decoration: none;
}

.signup-line a:hover {
    text-decoration: underline;
}

/* ================================
   HOME PAGE
   ================================ */

.home-shell {
    position: relative;
    z-index: 5;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 20px 78px;
    box-sizing: border-box;
}

.home-panel {
    width: min(92vw, 980px);
    background: rgba(0, 0, 0, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 22px;
    padding: clamp(16px, 2vw, 30px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
    text-align: center;
    transform-origin: center bottom;
}

.home-intro {
    margin: 0 auto 18px;
    max-width: 760px;
    font-size: clamp(13px, 1.2vw, 16px);
    line-height: 1.5;
    color: #d9e4ea;
}

.home-actions {
    display: flex;
    justify-content: center;
    gap: clamp(8px, 1vw, 14px);
    margin-bottom: 20px;
    flex-wrap: nowrap;
}

.home-button {
    display: inline-block;
    min-width: 0;
    padding: clamp(10px, 1vw, 13px) clamp(14px, 1.3vw, 20px);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(12px, 1vw, 15px);
    transition: transform 0.08s ease, filter 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.home-button.primary {
    background: linear-gradient(180deg, #11d6ff 0%, #00b8ea 100%);
    color: #031117;
}

.home-button.secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e8eef2;
}

.home-button:hover {
    filter: brightness(1.06);
}

.home-button:active {
    transform: translateY(1px);
}

.home-plans {
    margin-top: 10px;
    text-align: center;
}

.home-plan-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(8px, 1vw, 14px);
    margin-top: 8px;
}

.home-plan-card {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: clamp(10px, 1.2vw, 14px) clamp(8px, 1vw, 12px);
    text-align: center;
    font-size: clamp(11px, 0.95vw, 13px);
}

.home-plan-card h4 {
    margin: 0 0 4px;
    font-size: clamp(13px, 1.1vw, 16px);
    color: #fff;
}

.home-plan-price {
    font-size: clamp(15px, 1.4vw, 18px);
    color: #00c8ff;
    margin-bottom: 8px;
}

.home-plan-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #cfdde5;
}

.home-plan-card li {
    margin-bottom: 4px;
    line-height: 1.35;
}

.home-plan-note {
    margin-top: 10px;
    font-size: clamp(11px, 0.9vw, 12px);
    color: #9fb8c9;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 1100px) {
    .home-panel {
        width: min(94vw, 920px);
    }
}

@media (max-width: 900px) {
    .home-shell {
        padding: 0 14px 76px;
    }

    .home-panel {
        width: 96vw;
        padding: 14px;
    }

    .home-intro {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .home-actions {
        gap: 8px;
        margin-bottom: 16px;
    }

    .home-button {
        font-size: 12px;
        padding: 10px 12px;
    }

    .home-plan-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .home-plan-card {
        padding: 10px 8px;
        font-size: 11px;
    }

    .home-plan-card h4 {
        font-size: 13px;
    }

    .home-plan-price {
        font-size: 15px;
    }
}

@media (max-width: 700px) {
    .login-shell {
        justify-content: flex-end;
        padding: 0 16px 122px;
    }

    .login-panel {
        width: 100%;
        max-width: 390px;
        padding: 22px 18px 20px;
        margin-top: 12px;
    }

    .login-panel h1 {
        font-size: 24px;
    }

    .signup-line {
        margin: 14px 0 14px;
    }

    .layer-1,
    .layer-2 {
        width: 146vmax;
        height: 146vmax;
    }

    .layer-3 {
        width: min(54vw, 260px);
        top: 28%;
    }

    .layer-4 {
        width: min(72vw, 340px);
        top: 22%;
    }
}

@media (max-width: 680px) {
    .home-shell {
        padding: 0 12px 74px;
    }

    .home-panel {
        width: 96vw;
        padding: 14px 12px;
    }

    .home-actions {
        flex-wrap: wrap;
    }

    .home-plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 380px) {
    .home-shell {
        padding: 0 8px 70px;
        align-items: flex-end;
    }

    .home-panel {
        width: 96vw;
        padding: 10px 8px;
    }

    .home-plan-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-height: 760px) {
    .login-shell {
        justify-content: flex-end;
        padding-top: 20px;
    }

    .layer-3 {
        top: 26%;
    }

    .layer-4 {
        top: 20%;
    }

    .login-panel {
        margin-top: 14px;
    }
}

@media (min-width: 701px) {
    .login-panel {
        margin-top: 380px;
    }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .layer,
    .field-group input,
    .login-button,
    .home-button {
        transition: none !important;
    }
}