/* ─────────────────────────────────────────
   miroslav.ca — Aurora HUD
   ───────────────────────────────────────── */

/* ── Local fonts ── */
@font-face {
    font-family: 'Space Grotesk';
    src: url('../fonts/SpaceGrotesk-300.ttf') format('truetype');
    font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url('../fonts/SpaceGrotesk-400.ttf') format('truetype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url('../fonts/SpaceGrotesk-500.ttf') format('truetype');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url('../fonts/SpaceGrotesk-600.ttf') format('truetype');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url('../fonts/SpaceGrotesk-700.ttf') format('truetype');
    font-weight: 700; font-style: normal; font-display: swap;
}

:root {
    --accent:       #00e5ff;
    --accent-2:     #7df0ff;
    --accent-glow:  rgba(0, 229, 255, 0.5);
    --accent-soft:  rgba(0, 229, 255, 0.08);
    --border:       rgba(0, 229, 255, 0.12);
    --bg:           #060a12;
    --text:         #e8edf8;
    --text-dim:     rgba(232, 237, 248, 0.6);
    --text-muted:   rgba(232, 237, 248, 0.45);
    --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
    position: relative;
    background: var(--bg);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ── Aurora mesh background ── */
.aurora {
    position: fixed;
    inset: -10%;
    filter: blur(80px);
    opacity: 0.9;
    z-index: 0;
    pointer-events: none;
}
.blob {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
}
.blob.a {
    width: 46%; height: 60%; left: -8%; top: -10%;
    background: radial-gradient(closest-side, rgba(0, 229, 255, 0.8), transparent 70%);
    animation: blobA 22s ease-in-out infinite alternate;
}
.blob.b {
    width: 50%; height: 62%; right: -10%; top: 5%;
    background: radial-gradient(closest-side, rgba(10, 74, 142, 0.8), transparent 70%);
    animation: blobB 26s ease-in-out infinite alternate;
}
.blob.c {
    width: 60%; height: 58%; left: 18%; bottom: -18%;
    background: radial-gradient(closest-side, rgba(26, 111, 168, 0.6), transparent 70%);
    animation: blobC 28s ease-in-out infinite alternate;
}
.blob.d {
    width: 34%; height: 40%; left: 36%; top: 18%;
    background: radial-gradient(closest-side, rgba(125, 240, 255, 0.4), transparent 70%);
    animation: blobD 19s ease-in-out infinite alternate;
}
@keyframes blobA { to { transform: translate(8%, 12%) scale(1.1); } }
@keyframes blobB { to { transform: translate(-10%, 8%) scale(1.15); } }
@keyframes blobC { to { transform: translate(6%, -10%) scale(1.05); } }
@keyframes blobD { to { transform: translate(-12%, 18%) scale(0.85); } }

/* ── Starfield canvas ── */
.stars {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.7;
}

/* ── Noise grain ── */
.grain {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.13;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ── Vignette ── */
.vignette {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 60%, transparent 35%, rgba(0, 0, 0, 0.7) 100%);
}

/* ── HUD frame + corner brackets ── */
.frame {
    position: fixed;
    inset: 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    z-index: 5;
    pointer-events: none;
}
.corner {
    position: fixed;
    width: 26px;
    height: 26px;
    border: 1.5px solid var(--accent);
    opacity: 0.9;
    z-index: 6;
    pointer-events: none;
}
.corner.tl { top: 24px;    left: 24px;    border-right: 0;  border-bottom: 0; }
.corner.tr { top: 24px;    right: 24px;   border-left: 0;   border-bottom: 0; }
.corner.bl { bottom: 24px; left: 24px;    border-right: 0;  border-top: 0; }
.corner.br { bottom: 24px; right: 24px;   border-left: 0;   border-top: 0; }

/* ── HUD chrome bars ── */
.chrome {
    position: fixed;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 32px 56px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    z-index: 7;
}
.chrome.top { top: 0; }
.chrome.bot { bottom: 0; }
.chrome .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 10px;
    box-shadow: 0 0 10px var(--accent);
    animation: blink 1.4s steps(2, end) infinite;
    vertical-align: middle;
}
.chrome .bracket { color: var(--accent); }
@keyframes blink { 50% { opacity: 0.2; } }

.chrome.bot a:hover { color: var(--accent); }

/* ── Side rotated label ── */
.side {
    position: fixed;
    right: 42px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: right center;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.4em;
    color: rgba(0, 229, 255, 0.55);
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 7;
    pointer-events: none;
}

/* ── Main stage ── */
.stage {
    position: relative;
    z-index: 4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 100px 110px;
    text-align: center;
    gap: 28px;
}

/* ── Eyebrow ── */
.eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--accent-2);
    display: flex;
    align-items: center;
    gap: 14px;
}
.eyebrow::before, .eyebrow::after {
    content: '';
    width: 36px;
    height: 1px;
}
.eyebrow::before { background: linear-gradient(90deg, transparent, var(--accent)); }
.eyebrow::after  { background: linear-gradient(90deg, var(--accent), transparent); }

/* ── Title (scramble + glitch) ── */
.title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(64px, 11vw, 160px);
    line-height: 0.92;
    letter-spacing: -0.045em;
    color: #fff;
    cursor: default;
    font-variant-numeric: tabular-nums;
    display: inline-block;
}
.title .dotch {
    color: var(--accent);
    text-shadow: 0 0 12px var(--accent-glow);
}
.title .cursor {
    display: inline-block;
    width: 2px;
    height: 0.7em;
    background: var(--accent);
    margin-left: 0.1em;
    vertical-align: -8%;
    animation: caret 1s steps(2, end) infinite;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}
@keyframes caret { 50% { opacity: 0; } }

/* RGB-split glitch layers */
.glitch { position: relative; display: inline-block; }
.layer.base { position: relative; display: inline-block; }
.layer.r, .layer.c {
    position: absolute;
    inset: 0;
    display: inline-block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.layer.r {
    color: var(--accent);
    mix-blend-mode: screen;
    clip-path: polygon(0 0, 100% 0, 100% 44%, 0 44%);
    animation: glitchR 2.4s steps(1, end) infinite;
    text-shadow: 0 0 16px rgba(0, 229, 255, 0.4);
}
.layer.c {
    color: #a8f4ff;
    mix-blend-mode: screen;
    clip-path: polygon(0 56%, 100% 56%, 100% 100%, 0 100%);
    animation: glitchC 2.4s steps(1, end) infinite;
}
@keyframes glitchR {
    0%, 78%, 100% { transform: translate(0, 0); }
    80% { transform: translate(-6px, 2px); }
    83% { transform: translate(4px, -1px); }
    86% { transform: translate(-3px, 1px); }
    90% { transform: translate(0, 0); }
}
@keyframes glitchC {
    0%, 78%, 100% { transform: translate(0, 0); }
    80% { transform: translate(5px, -2px); }
    83% { transform: translate(-3px, 1px); }
    86% { transform: translate(2px, -1px); }
    90% { transform: translate(0, 0); }
}
.title:hover .layer.r,
.title:hover .layer.c { animation-duration: 0.6s; }

/* ── Tagline ── */
.tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.35;
    max-width: 880px;
    color: var(--text);
    letter-spacing: -0.012em;
}
.tagline em {
    font-style: normal;
    color: var(--accent-2);
    font-weight: 500;
    text-shadow: 0 0 18px rgba(125, 240, 255, 0.35);
}

/* ── Cards ── */
.cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1060px;
    width: 100%;
    margin-top: 4px;
}
.card {
    position: relative;
    text-align: left;
    padding: 24px 26px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s, background 0.3s;
}
.card:hover {
    border-color: rgba(0, 229, 255, 0.5);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 1px;
    background: var(--accent);
}
.card .k {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.32em;
    color: var(--accent-2);
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
}
.card .k b {
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.14em;
}
.card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: rgba(232, 237, 248, 0.78);
}

/* ── Short desktop windows ── prevent fixed chrome from overlapping
   card content when the viewport isn't tall enough for the full stack. */
@media (min-width: 1025px) and (max-height: 820px) {
    .stage { padding: 28px 100px 28px; min-height: auto; }
    .chrome {
        position: relative;
        left: auto; right: auto;
    }
}

/* ── Tablet ── */
@media (max-width: 1024px) {
    .stage { padding: 28px 56px 28px; gap: 24px; min-height: calc(100vh - 200px); }
    .frame { inset: 24px; }
    .corner.tl { top: 18px; left: 18px; }
    .corner.tr { top: 18px; right: 18px; }
    .corner.bl { bottom: 18px; left: 18px; }
    .corner.br { bottom: 18px; right: 18px; }

    /* Chrome flows naturally so it never covers scrolled card content */
    .chrome {
        position: relative;
        left: auto; right: auto;
        padding: 26px 36px;
        font-size: 10px;
        letter-spacing: 0.2em;
    }
    .side { right: 26px; font-size: 9px; letter-spacing: 0.32em; }
}

/* ── Mobile ── */
@media (max-width: 720px) {
    body { overflow-y: auto; }

    /* Hide pure-decorative chrome elements that don't fit */
    .frame, .side { display: none; }
    .corner { width: 18px; height: 18px; }
    .corner.tl { top: 10px; left: 10px; }
    .corner.tr { top: 10px; right: 10px; }
    .corner.bl { bottom: 10px; left: 10px; }
    .corner.br { bottom: 10px; right: 10px; }

    /* Chrome bars flow naturally instead of fixed-positioned */
    .chrome {
        position: relative;
        left: auto; right: auto;
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
        padding: 22px 22px;
        font-size: 9px;
        letter-spacing: 0.18em;
    }

    .stage {
        padding: 28px 22px 28px;
        gap: 22px;
        min-height: calc(100vh - 180px);
    }
    .eyebrow {
        font-size: 10px;
        letter-spacing: 0.3em;
        text-align: center;
    }
    .eyebrow::before, .eyebrow::after { width: 20px; }
    .title { font-size: clamp(48px, 14vw, 88px); }
    .tagline { font-size: 17px; line-height: 1.45; }
    .cards { grid-template-columns: 1fr; max-width: 100%; gap: 14px; }
    .card { padding: 20px 22px; }
    .card p { font-size: 13.5px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .blob, .layer.r, .layer.c, .chrome .dot, .title .cursor { animation: none; }
}
