/* ============================================================
   Ghostbreachh — style.css
   Single source of truth: ONE :root, ONE body, ONE .hero,
   ONE .glass-card. Purple = primary brand, cyan = tech accent.
   ============================================================ */

:root{
    --bg:        #05060f;   /* near-black with a violet tint */
    --bg-2:      #0a0c1c;
    --surface:   rgba(255,255,255,.05);
    --border:    rgba(255,255,255,.12);

    --purple:    #9d00ff;   /* PRIMARY brand color (Umar's pick) */
    --purple-2:  #bd00ff;
    --cyan:      #00f0ff;   /* tech accent */
    --cyan-2:    #4de1ff;
    --alert:     #ff2d55;   /* red eyes / critical accent */

    --text:      #eef1f8;
    --muted:     #9aa3b8;

    --mono: "JetBrains Mono","Fira Code",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    --sans: "Inter",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

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

html{ scroll-behavior:smooth; }

body{
    font-family:var(--sans);
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(157,0,255,.18), transparent 60%),
        radial-gradient(900px 500px at -10% 20%, rgba(0,240,255,.12), transparent 55%),
        linear-gradient(180deg, var(--bg), var(--bg-2) 60%, var(--bg));
    color:var(--text);
    line-height:1.65;
    overflow-x:hidden;
    min-height:100vh;
}

/* The faint cyber grid behind everything */
.cyber-grid{
    position:fixed; inset:0; z-index:-2; pointer-events:none;
    background-image:
        linear-gradient(rgba(157,0,255,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,240,255,.05) 1px, transparent 1px);
    background-size:44px 44px;
    mask-image:radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
}

/* Subtle film-grain, INLINED as an SVG data-URI (no external fetch = faster +
   no breakage if a 3rd-party host dies). */
body::after{
    content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
    opacity:.035;
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a{ color:var(--cyan); text-decoration:none; }

/* ============ NAVBAR ============ */
.navbar{
    position:fixed; top:0; width:100%; z-index:999;
    display:flex; align-items:center; justify-content:space-between;
    padding:16px 7%;
    background:rgba(5,6,15,.55);
    backdrop-filter:blur(14px);
    border-bottom:1px solid var(--border);
    transition:padding .3s, background .3s;
}
.navbar.scrolled{ padding:10px 7%; background:rgba(5,6,15,.85); }

.logo{
    display:flex; align-items:center; gap:10px;
    font-family:var(--mono); font-weight:700; font-size:1.05rem;
    color:var(--text); letter-spacing:.5px;
}
.logo-mark{ filter:drop-shadow(0 0 6px rgba(255,45,85,.6)); }

.nav-links{ display:flex; gap:22px; list-style:none; font-family:var(--mono); font-size:.92rem; }
.nav-links a{ color:var(--muted); transition:color .2s; }
.nav-links a:hover{ color:var(--cyan); }

.hamburger{
    display:none; background:none; border:none; color:var(--text);
    font-size:1.5rem; cursor:pointer;
}

/* ============ HERO ============ */
.hero{ min-height:100vh; display:flex; align-items:center; padding:120px 7% 60px; }
.hero-grid{
    width:100%; max-width:1200px; margin:0 auto;
    display:grid; grid-template-columns:1.1fr .9fr; gap:48px; align-items:center;
}
.hero-content{ z-index:2; }

.hero-badge{
    display:inline-block; padding:8px 16px; border-radius:50px;
    border:1px solid var(--border); background:var(--surface);
    font-family:var(--mono); font-size:.8rem; letter-spacing:1px;
    color:var(--purple-2);
}
.hero-title{
    font-family:var(--mono); font-weight:800; line-height:1;
    font-size:clamp(2.6rem, 7vw, 5rem); margin:18px 0 6px;
    background:linear-gradient(120deg, var(--cyan), var(--purple-2));
    -webkit-background-clip:text; background-clip:text; color:transparent;
    text-shadow:0 0 40px rgba(157,0,255,.35);
}
.hero-sub{
    font-family:var(--mono); color:var(--muted); letter-spacing:2px;
    text-transform:uppercase; font-size:.95rem; margin-bottom:22px;
}

/* Fake terminal snippet — authority signal */
.terminal{
    background:rgba(8,10,22,.85); border:1px solid var(--border);
    border-radius:12px; overflow:hidden; margin-bottom:26px;
    box-shadow:0 20px 60px rgba(0,0,0,.5);
    font-family:var(--mono); font-size:.8rem;
}
.contact-terminal{ margin-top:22px; margin-bottom:18px; }
.terminal-bar{
    display:flex; align-items:center; gap:7px; padding:10px 14px;
    background:rgba(255,255,255,.04); border-bottom:1px solid var(--border);
}
.dot{ width:11px; height:11px; border-radius:50%; }
.dot.r{ background:#ff5f56; } .dot.y{ background:#ffbd2e; } .dot.g{ background:#27c93f; }
.terminal-title{ margin-left:8px; color:var(--muted); font-size:.75rem; }
.terminal-body{ padding:14px 16px; white-space:pre-wrap; color:var(--text); }
.c-prompt{ color:var(--purple-2); }
.c-out{ color:var(--muted); }
.cursor{ display:inline-block; width:8px; background:var(--cyan); animation:blink 1s steps(1) infinite; }

.hero-art{
    position:relative; overflow:hidden; border-radius:16px;
    transform-style:preserve-3d; transition:transform .35s ease; will-change:transform;
}
.hero-art img{
    width:100%; height:auto; border-radius:16px;
    border:1px solid var(--border);
    box-shadow:0 30px 80px rgba(0,0,0,.6), 0 0 50px rgba(157,0,255,.15);
}

/* ============ BUTTONS ============ */
.hero-buttons{ display:flex; gap:12px; flex-wrap:wrap; margin-top:8px; }
.btn-primary, .btn-secondary{
    display:inline-block; padding:14px 26px; border-radius:12px;
    font-family:var(--mono); font-weight:700; font-size:.9rem;
    cursor:pointer; border:1px solid transparent; transition:transform .25s, box-shadow .25s;
}
.btn-primary{
    background:linear-gradient(135deg, var(--purple), var(--cyan));
    color:#05060f; box-shadow:0 0 26px rgba(157,0,255,.5);
}
.btn-primary:hover{ transform:translateY(-3px); box-shadow:0 0 38px rgba(0,240,255,.6); }
.btn-secondary{
    background:var(--surface); border-color:var(--border); color:var(--text);
}
.btn-secondary:hover{ transform:translateY(-3px); border-color:var(--cyan); }

/* ============ SECTION SHELL ============ */
.section{ padding:100px 7%; max-width:1200px; margin:0 auto; }
.section-kicker{
    font-family:var(--mono); color:var(--purple-2); font-size:.85rem;
    margin-bottom:6px; opacity:.85;
}
.section-title{
    font-family:var(--mono); font-size:clamp(1.6rem,4vw,2.4rem);
    margin-bottom:14px;
    /* Echo the footer "fire" gradient on every section heading */
    background:linear-gradient(120deg, var(--cyan), var(--purple-2));
    -webkit-background-clip:text; background-clip:text; color:transparent;
}
.section-description{ color:var(--muted); max-width:680px; margin-bottom:40px; }

/* ============ GLASS CARD ============ */
.glass-card{
    background:var(--surface); backdrop-filter:blur(14px);
    border:1px solid var(--border); border-radius:18px; padding:28px;
    transition:transform .3s, border-color .3s, box-shadow .3s;
}
.glass-card:hover{
    transform:translateY(-8px);
    border-color:rgba(0,240,255,.4);
    box-shadow:0 0 26px rgba(0,240,255,.18);
}
/* Shared motion language: glare sweep on every glass surface (stats, about) */
.glass-card{ position:relative; overflow:hidden; }
.glass-card::after{
    content:""; position:absolute; inset:0; opacity:0; pointer-events:none;
    transition:opacity .3s;
    background:radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(157,0,255,.18), transparent 55%);
}
.glass-card:hover::after{ opacity:1; }
/* Perf: skip rendering work for below-the-fold sections until they scroll in */
.section, .contact-section{ content-visibility:auto; contain-intrinsic-size:auto 600px; }
.about-grid{ max-width:860px; }
.about-grid .glass-card{ padding:40px; }
.about-grid p{ color:var(--muted); line-height:1.9; font-size:1.04rem; text-align:center; }

/* ============ GRIDS ============ */
.grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:22px; }
/* Balanced 4-up: 4 across on desktop, 2x2 on tablet, 1 on phone.
   Avoids the lonely 3+1 wrap on 4-card sections at wide widths. */
.grid--4{ grid-template-columns:repeat(4,1fr); }
@media (max-width:1024px){ .grid--4{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:480px){ .grid--4{ grid-template-columns:1fr; } }
.stats-grid{ margin-top:20px; }
.stats-grid h3{
    font-family:var(--mono); font-size:2.4rem; font-weight:800;
    background:linear-gradient(120deg,var(--cyan),var(--purple-2));
    -webkit-background-clip:text; background-clip:text; color:transparent;
}
.stats-grid p{ color:var(--muted); font-family:var(--mono); font-size:.85rem; }

/* ============ TILT CARD ============ */
.tilt-card{
    position:relative; overflow:hidden; border-radius:18px;
    background:var(--surface); border:1px solid var(--border);
    padding:26px; transition:transform .35s, border-color .35s, box-shadow .35s;
    transform-style:preserve-3d;
}
.tilt-card:hover{ border-color:rgba(157,0,255,.5); box-shadow:0 0 30px rgba(157,0,255,.2); }
.card-content{ position:relative; z-index:2; }
.card-icon{ font-size:1.8rem; margin-bottom:12px; }
.tilt-card h3{ font-family:var(--mono); font-size:1.05rem; margin-bottom:10px; color:var(--text); }
.tilt-card p{ color:var(--muted); font-size:.92rem; }
.card-tag{
    display:inline-block; margin-top:14px; padding:4px 10px; border-radius:6px;
    font-family:var(--mono); font-size:.7rem; letter-spacing:.5px;
    background:rgba(0,240,255,.1); color:var(--cyan); border:1px solid rgba(0,240,255,.25);
}
.card-glare{
    position:absolute; inset:0; z-index:1; opacity:0; pointer-events:none;
    transition:opacity .3s;
    background:radial-gradient(circle at 50% 50%, rgba(255,255,255,.18), transparent 55%);
}
.tilt-card:hover .card-glare{ opacity:1; }

/* ============ CONTACT ============ */
.contact-section{ padding:100px 7%; max-width:1100px; margin:0 auto; }
.contact-container{ display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:start; }
.contact-info .section-badge{
    font-family:var(--mono); font-size:.8rem; letter-spacing:2px; color:var(--purple-2);
}
.contact-info h2{ font-family:var(--mono); font-size:clamp(1.6rem,4vw,2.4rem); margin:10px 0 16px; }
.contact-description{ color:var(--muted); margin-bottom:20px; }
.contact-list{ list-style:none; display:flex; flex-wrap:wrap; gap:10px 18px; }
.contact-list li{ font-family:var(--mono); font-size:.88rem; color:var(--text); }
.contact-direct{ margin-top:22px; font-family:var(--mono); font-size:.85rem; color:var(--muted); }
.contact-direct a{ color:var(--cyan); }

.glass-form{
    background:var(--surface); border:1px solid var(--border);
    border-radius:18px; padding:28px; display:flex; flex-direction:column; gap:14px;
}
.form-group{ display:flex; flex-direction:column; gap:6px; }
.form-group label{ font-family:var(--mono); font-size:.8rem; color:var(--muted); }
.glass-form input, .glass-form select, .glass-form textarea{
    padding:13px; border-radius:10px; border:1px solid var(--border);
    background:rgba(255,255,255,.04); color:var(--text);
    font-family:var(--sans); font-size:.95rem;
    /* Native selects need an explicit transition; focus ring must be visible */
    transition:border-color .2s, box-shadow .2s;
}
/* FIX: the <option> list is painted by the OS, not our CSS. On light-OS /
   Android the options inherited a translucent bg + dark text and vanished.
   Force a solid dark bg + light text so every choice is readable everywhere. */
.glass-form select option{
    background:#0a0c1c; color:var(--text);
}
.glass-form input:focus, .glass-form select:focus, .glass-form textarea:focus{
    outline:none; border-color:var(--cyan); box-shadow:0 0 0 3px rgba(0,240,255,.15);
}
.glass-form textarea{ resize:vertical; }
.error{ color:var(--alert); font-family:var(--mono); font-size:.75rem; min-height:1em; }
#formStatus{ font-family:var(--mono); font-size:.85rem; color:var(--cyan); min-height:1.2em; }

/* ============ FOOTER ============ */
footer{ text-align:center; padding:40px 20px 60px; overflow:hidden; }
.footer-wordmark{
    font-family:var(--mono); font-weight:800; line-height:.8;
    /* 10 chars nowrap — keep vw small enough that the final 'H' never clips. */
    font-size:clamp(2.6rem, 13vw, 13rem);
    background:linear-gradient(120deg, rgba(157,0,255,.5), rgba(0,240,255,.5));
    -webkit-background-clip:text; background-clip:text; color:transparent;
    letter-spacing:-.02em; user-select:none; white-space:nowrap;
}
.footer-socials{
    font-family:var(--mono); font-size:.85rem; margin-top:18px;
}
.footer-socials a{ color:var(--cyan); }
.footer-socials .footer-sep{ margin:0 8px; opacity:.5; }
/* Solid strip behind the meta line so the small text always reads cleanly,
   even over the giant gradient wordmark behind it. */
.footer-meta{
    position:relative; z-index:2; display:inline-block;
    font-family:var(--mono); font-size:.82rem; color:var(--text);
    margin-top:10px; padding:10px 18px; border-radius:10px;
    background:rgba(5,6,15,.7); border:1px solid var(--border);
    backdrop-filter:blur(6px);
}
.footer-meta a{ color:var(--cyan); }
.footer-sep{ margin:0 10px; opacity:.5; }

/* ============ SCROLL REVEAL ============ */
/* Only hide when JS is active (.js on <html>). No-JS => everything visible. */
.js .reveal{
    opacity:0; visibility:hidden; transform:translateY(50px);
    transition:opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1), visibility .7s;
    will-change:opacity, transform;
}
.js .reveal.active{ opacity:1; visibility:visible; transform:none; }
@media (prefers-reduced-motion:reduce){
    .js .reveal{ opacity:1; visibility:visible; transform:none; transition:none; }
    .cursor{ animation:none; }
}

/* ============ RESPONSIVE LADDER ============ */
/* Tablet: keep two columns but ease padding; reveal sidebar banner below */
@media (max-width:1024px){
    .section{ padding:90px 6%; }
    .hero{ padding:110px 6% 50px; }
    .hero-grid{ gap:36px; }
}
/* Phone: stack everything, hamburger nav */
@media (max-width:860px){
    .nav-links{
        position:absolute; top:100%; right:0; width:100%;
        flex-direction:column; gap:0; background:rgba(5,6,15,.97);
        border-bottom:1px solid var(--border); display:none;
    }
    .nav-links.active{ display:flex; }
    .nav-links li{ padding:14px 7%; border-top:1px solid var(--border); }
    .hamburger{ display:block; }

    .hero-grid{ grid-template-columns:1fr; gap:30px; }
    .hero-art{ order:-1; }            /* show banner first on mobile */
    .contact-container{ grid-template-columns:1fr; gap:30px; }
    .hero-buttons{ flex-direction:column; }
    .btn-secondary{ margin-left:0; }
}
/* Small phone: tighten type + spacing so nothing overflows */
@media (max-width:480px){
    .section{ padding:70px 5%; }
    .hero{ padding:100px 5% 40px; min-height:auto; }
    /* The word "ghostbreachh" is long; let it wrap and shrink so it never
       clips the right edge of a 390px screen. */
    .hero-title{ font-size:clamp(1.9rem,9vw,2.6rem); word-break:break-word; }
    .hero-art img{ max-height:38vh; object-fit:cover; }
    .terminal-body{ font-size:.72rem; }
    .glass-form{ padding:20px; }
    .footer-wordmark{ font-size:clamp(2.4rem,18vw,6rem); }
}
