/* ==========================================================================
   Retrivo Gate - dark navy fintech, firkantet design
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark fintech palette */
    --bg-deep: #060d1a;
    --bg-base: #0a1628;
    --bg-elev: #0f1d33;
    --bg-card: #0d1a2f;

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-soft: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(96, 165, 250, 0.35);

    --text-bright: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.58);
    --text-faint: rgba(255, 255, 255, 0.38);

    --accent-blue: #3b82f6;
    --accent-blue-bright: #60a5fa;
    --accent-cyan: #22d3ee;

    --status-danger: #f87171;
    --status-danger-bg: rgba(248, 113, 113, 0.08);
    --status-warn: #fbbf24;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: var(--text-bright);
    background: var(--bg-base);
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 50%, rgba(30, 64, 130, 0.18) 0%, transparent 70%),
        linear-gradient(135deg, #060d1a 0%, #0a1628 45%, #0f2744 100%);
    min-height: 100vh;
    line-height: 1.5;
    overflow: hidden;
    position: relative;
}

/* ==========================================================================
   Baggrund: dot-grid + geometriske blokke i hjørnet (samme som før, dark)
   ========================================================================== */

.gate-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.gate-dot-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(96, 165, 250, 0.18) 1px, transparent 1.5px);
    background-size: 24px 24px;
    opacity: 0;
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0.4) 70%, transparent 100%);
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0.4) 70%, transparent 100%);
}

/* Diagonale lys-linjer (fintech terminal aesthetic).
   Base-styling for alle linjer; varianter (.is-primary etc.) overskriver
   position, højde, opacity og glow-intensitet. */
.gate-stripe-thin {
    position: absolute;
    width: 1px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(165, 243, 252, 0.25) 12%,
        var(--accent-cyan) 45%,
        var(--accent-cyan) 55%,
        rgba(165, 243, 252, 0.25) 88%,
        transparent 100%);
    opacity: 0;
    box-shadow:
        0 0 4px rgba(34, 211, 238, 0.5),
        0 0 10px rgba(34, 211, 238, 0.25);
    transform: rotate(8deg);
    transform-origin: top center;
    will-change: transform, opacity;
    backface-visibility: hidden;
    pointer-events: none;
}

/* Hovedstripen — den eksisterende, mest prominente */
.gate-stripe-thin.is-primary {
    top: -10%;
    right: 18%;
    width: 2px;
    height: 130%;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(165, 243, 252, 0.3) 15%,
        var(--accent-cyan) 40%,
        var(--accent-cyan) 60%,
        rgba(165, 243, 252, 0.3) 85%,
        transparent 100%);
    box-shadow:
        0 0 6px rgba(34, 211, 238, 0.6),
        0 0 14px rgba(34, 211, 238, 0.3);
}

/* Sekundær — tæt på hovedet, lavere intensitet */
.gate-stripe-thin.is-secondary {
    top: -10%;
    right: 9%;
    height: 90%;
}

/* Modgående — fra bunden op til midten */
.gate-stripe-thin.is-rising {
    bottom: -5%;
    right: 38%;
    height: 55%;
    transform-origin: bottom center;
    background: linear-gradient(0deg,
        transparent 0%,
        rgba(165, 243, 252, 0.25) 15%,
        var(--accent-cyan) 50%,
        rgba(165, 243, 252, 0.2) 85%,
        transparent 100%);
}

/* ==========================================================================
   Stage
   ========================================================================== */

.gate-stage {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.gate-container {
    width: 100%;
    max-width: 460px;
    position: relative;
}

/* ==========================================================================
   Brand-bjælke over kortet
   ========================================================================== */

.gate-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 0 4px;
}

.gate-logo {
    height: 56px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.18));
}

.gate-tagline {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.8px;
    color: var(--text-faint);
    text-transform: uppercase;
    text-align: right;
    line-height: 1.4;
    border-right: 2px solid var(--accent-blue);
    padding-right: 12px;
}

.gate-tagline-line {
    display: block;
}

.gate-tagline-line:first-child {
    color: var(--accent-blue-bright);
    font-weight: 700;
}

/* ==========================================================================
   Kort (firkantet, mørk fintech-card med ambient glow)
   ========================================================================== */

.gate-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    padding: 0;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(96, 165, 250, 0.04) inset;
}

/* Ambient glow under kortet */
.gate-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110%;
    height: 110%;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.18) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
    filter: blur(30px);
    opacity: 0;
    animation: cardGlow 4s ease-in-out infinite alternate;
    animation-delay: 2s;
}

@keyframes cardGlow {
    0% { opacity: 0.4; }
    100% { opacity: 0.85; }
}

/* Top accent-bar (animeres ind via scaleX fra venstre) */
.gate-card-accent {
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-cyan) 50%, var(--accent-blue) 100%);
    transform: scaleX(0);
    transform-origin: left center;
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.6);
}

/* Bund accent-bar (animeres ind via scaleX fra højre — spejlvendt) */
.gate-card-accent-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-cyan) 50%, var(--accent-blue) 100%);
    transform: scaleX(0);
    transform-origin: right center;
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.6);
    pointer-events: none;
}

/* Scanning-linje under top accent-baren (kører venstre → højre) */
.gate-card-scanner {
    position: absolute;
    top: 2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    pointer-events: none;
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.7);
    filter: blur(0.5px);
}

/* Scanning-linje over bund accent-baren (kører højre → venstre) */
.gate-card-scanner-bottom {
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    pointer-events: none;
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.7);
    filter: blur(0.5px);
}

/* Side-shine — statiske vertikale lysfelter på kortets sider.
   Subtil ambient pulse drevet af GSAP (ikke CSS keyframes) for sync med
   master-timelinen. */
.gate-card-shine {
    position: absolute;
    top: 12%;
    bottom: 12%;
    width: 1px;
    pointer-events: none;
    opacity: 0;
    will-change: opacity;
    backface-visibility: hidden;
}

.gate-card-shine-left {
    left: -3px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(96, 165, 250, 0.5) 20%,
        rgba(96, 165, 250, 0.8) 50%,
        rgba(96, 165, 250, 0.5) 80%,
        transparent 100%);
    box-shadow:
        -2px 0 8px rgba(96, 165, 250, 0.32),
        -5px 0 20px rgba(59, 130, 246, 0.16);
}

.gate-card-shine-right {
    right: -3px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(96, 165, 250, 0.5) 20%,
        rgba(96, 165, 250, 0.8) 50%,
        rgba(96, 165, 250, 0.5) 80%,
        transparent 100%);
    box-shadow:
        2px 0 8px rgba(96, 165, 250, 0.32),
        5px 0 20px rgba(59, 130, 246, 0.16);
}

.gate-card-inner {
    padding: 36px 36px 32px;
    /* Animeres ind via clip-path */
    clip-path: inset(0 100% 0 0);
}

/* ==========================================================================
   Kort-indhold
   ========================================================================== */

.gate-meta {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.gate-meta-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-blue-bright);
}

.gate-meta-label i {
    font-size: 0.8rem;
}

.gate-card h1 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-bright);
    line-height: 1.2;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.gate-card h1 .gate-char {
    display: inline-block;
    will-change: transform, opacity;
}

.gate-card-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 26px;
}

/* ==========================================================================
   Form
   ========================================================================== */

.input-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 8px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--border-soft);
    color: var(--text-bright);
    font-family: inherit;
    font-size: 0.95rem;
    letter-spacing: 3px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border-radius: 0;
}

.input-group input:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(6, 13, 26, 0.7);
}

.input-group input:focus {
    border-color: var(--accent-blue-bright);
    box-shadow:
        inset 0 -2px 0 var(--accent-blue-bright),
        0 0 0 3px rgba(59, 130, 246, 0.12);
    background: rgba(6, 13, 26, 0.85);
}

.input-group input::placeholder {
    letter-spacing: 1px;
    color: var(--text-faint);
    font-weight: 400;
}

.input-group input.is-error {
    border-color: var(--status-danger);
    box-shadow:
        inset 0 -2px 0 var(--status-danger),
        0 0 0 3px rgba(248, 113, 113, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #2563eb 100%);
    color: var(--text-bright);
    border: 1px solid rgba(96, 165, 250, 0.4);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease, transform 0.15s ease;
    border-radius: 0;
    box-shadow:
        0 4px 16px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

/* Shimmer-effekt der sweeper henover knappen ved hover */
.submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transition: left 0.6s ease;
}

.submit-btn:hover::after {
    left: 100%;
}

.submit-btn span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.submit-btn i {
    font-size: 0.8rem;
    transition: transform 0.25s ease;
    position: relative;
    z-index: 1;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: var(--accent-blue-bright);
    box-shadow:
        0 6px 24px rgba(59, 130, 246, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.submit-btn:hover i {
    transform: translateX(4px);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-msg {
    display: none;
    align-items: center;
    gap: 0.5rem;
    color: var(--status-danger);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--status-danger-bg);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-left: 3px solid var(--status-danger);
}

.error-msg.is-visible {
    display: flex;
}

/* ==========================================================================
   Footer-bjælke
   ========================================================================== */

.gate-footer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    padding: 0 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* ==========================================================================
   Success overlay (full-screen sweep ved succes)
   ========================================================================== */

.gate-success-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #2563eb 100%);
    z-index: 100;
    transform: translateX(-100%);
    pointer-events: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 540px) {
    .gate-stage {
        padding: 18px;
    }

    .gate-brand-row {
        margin-bottom: 14px;
        gap: 10px;
    }

    .gate-logo {
        height: 40px;
    }

    .gate-tagline {
        font-size: 0.56rem;
        letter-spacing: 1.1px;
        padding-right: 8px;
        line-height: 1.35;
        gap: 1px;
        flex-shrink: 1;
        min-width: 0;
    }

    .gate-card-inner {
        padding: 26px 20px 22px;
    }

    .gate-card h1 {
        font-size: 1.3rem;
    }

    .gate-card-desc {
        font-size: 0.82rem;
    }

    /* Behold de tynde streger på mobil men dæmp tilstedeværelsen — skjul den
       sekundære (overlapper let den primære på smal viewport) og flyt rising
       ind så den ikke ligger uden for skærmen. */
    .gate-stripe-thin.is-secondary { display: none; }
    .gate-stripe-thin.is-primary { right: 8%; }
    .gate-stripe-thin.is-rising { right: 22%; height: 50%; }

    .gate-card-shine-left { left: -2px; }
    .gate-card-shine-right { right: -2px; }
}

@media (max-width: 380px) {
    .gate-logo {
        height: 36px;
    }

    .gate-tagline {
        font-size: 0.5rem;
        letter-spacing: 0.8px;
        padding-right: 6px;
    }

    .gate-card-inner {
        padding: 24px 18px 20px;
    }
}
