/* ============================================================
   HEXROT — cyberpunk network-security landing
   ============================================================ */
:root {
  --bg: #05070a;
  --bg-2: #080c12;
  --panel: rgba(13, 19, 27, 0.72);
  --line: rgba(0, 240, 255, 0.14);
  --line-strong: rgba(0, 240, 255, 0.35);
  --text: #c7d6e0;
  --text-dim: #6c8294;
  --cyan: #00f0ff;
  --magenta: #ff2bd6;
  --lime: #b6ff3a;
  --amber: #ffb13a;
  --glow-cyan: 0 0 18px rgba(0, 240, 255, 0.55);
  --glow-mag: 0 0 18px rgba(255, 43, 214, 0.5);
  --mono: 'Share Tech Mono', ui-monospace, monospace;
  --display: 'Orbitron', var(--mono);
  --maxw: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  letter-spacing: 0.3px;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--cyan); color: #00131a; }

/* ---------- background fx ---------- */
#bg-canvas { position: fixed; inset: 0; z-index: -3; display: block; }

body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 500px at 78% -8%, rgba(255, 43, 214, 0.10), transparent 60%),
    radial-gradient(1000px 600px at 10% 8%, rgba(0, 240, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #05070a, #04060a 60%, #03050a);
}

.scanlines {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.20) 3px, rgba(0,0,0,0.20) 3px);
  mix-blend-mode: multiply; opacity: 0.5;
}
.vignette {
  position: fixed; inset: 0; z-index: 59; pointer-events: none;
  box-shadow: inset 0 0 220px 40px rgba(0,0,0,0.9);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.nav.scrolled {
  background: rgba(5, 7, 10, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; }
.brand-mark {
  font-family: var(--display); font-weight: 900; font-size: 1.4rem;
  color: var(--cyan); text-shadow: var(--glow-cyan);
}
.brand-text {
  font-family: var(--display); font-weight: 700; letter-spacing: 4px;
  font-size: 1.15rem; color: #eafcff;
}
.brand-text.small { font-size: .95rem; letter-spacing: 3px; }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.nav-links a {
  color: var(--text-dim); font-size: .9rem; text-transform: uppercase;
  letter-spacing: 1.5px; position: relative; transition: color .25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--cyan); box-shadow: var(--glow-cyan); transition: width .25s;
}
.nav-links a:hover { color: var(--cyan); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { margin-left: .5rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--cyan); box-shadow: var(--glow-cyan); transition: .3s; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font-family: var(--mono); font-size: .92rem;
  padding: .7rem 1.4rem; border: 1px solid var(--line-strong);
  text-transform: lowercase; letter-spacing: 1px; cursor: pointer;
  position: relative; transition: .22s; clip-path: polygon(0 0,100% 0,100% 70%,94% 100%,0 100%);
}
.btn-solid { background: var(--cyan); color: #00131a; border-color: var(--cyan); font-weight: bold; }
.btn-solid:hover { box-shadow: var(--glow-cyan); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--cyan); }
.btn-ghost:hover { background: rgba(0,240,255,0.08); box-shadow: var(--glow-cyan); transform: translateY(-2px); }
.btn.full { width: 100%; text-align: center; }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh; display: flex; align-items: center; position: relative;
  padding: 7rem clamp(1rem, 4vw, 3rem) 4rem;
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
  animation: gridpan 24s linear infinite;
}
@keyframes gridpan { to { background-position: 46px 46px; } }
.hero-inner { max-width: var(--maxw); margin: 0 auto; width: 100%; }
.hero-title {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(3.2rem, 13vw, 9.5rem); line-height: .92;
  letter-spacing: 6px; color: #eafcff; margin-bottom: .4rem;
}
.hero-tag {
  font-size: clamp(1rem, 2.4vw, 1.5rem); color: var(--cyan);
  text-shadow: var(--glow-cyan); margin-bottom: 1.2rem; min-height: 1.6em;
}
.hero-tag .prompt { color: var(--magenta); margin-right: .4rem; }
.caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { max-width: 60ch; color: var(--text-dim); font-size: 1.02rem; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.6rem; }
.hero-tags { list-style: none; display: flex; gap: .7rem; flex-wrap: wrap; }
.hero-tags li {
  font-size: .76rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--cyan); border: 1px solid var(--line-strong);
  padding: .4rem .85rem; background: rgba(0,240,255,0.04);
  clip-path: polygon(0 0,100% 0,100% 68%,90% 100%,0 100%);
}
.hero-tags li::before { content: "▹ "; color: var(--magenta); }

.scroll-hint {
  position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  color: var(--cyan); animation: bob 1.8s infinite; font-size: 1.2rem;
}
@keyframes bob { 0%,100%{transform:translate(-50%,0);} 50%{transform:translate(-50%,8px);} }

/* ---------- rotting neon logo ---------- */
.hero-title.rot {
  display: inline-flex; gap: .06em; color: #2c8f99;
}
.hero-title.rot span {
  position: relative; display: inline-block;
  color: #2c8f99;
  /* dim, half-dead cyan tube + heavy dark "drip" shadows below the letters */
  text-shadow:
    0 0 2px rgba(0, 240, 255, 0.45),
    0 0 12px rgba(0, 200, 220, 0.4),
    0 0 28px rgba(0, 120, 150, 0.45),
    0 3px 3px rgba(0, 8, 12, 0.9),
    0 8px 16px rgba(0, 4, 8, 0.85);
  animation: rotflicker 5.5s infinite steps(1);
}
/* stagger the flicker so the sign dies unevenly */
.hero-title.rot span:nth-child(1) { animation-delay: -0.2s; }
.hero-title.rot span:nth-child(2) { animation-delay: -1.7s; }
.hero-title.rot span:nth-child(3) { animation-delay: -3.1s; }
.hero-title.rot span:nth-child(4) { animation-delay: -0.9s; }
.hero-title.rot span:nth-child(5) { animation-delay: -2.4s; }
.hero-title.rot span:nth-child(6) { animation-delay: -4.0s; }

/* the decayed letters — slumped, sickly, mostly burnt out */
.rot-x, .rot-o, .rot-t { color: #123e44 !important; }
.rot-x {
  transform: translateY(3px) rotate(2.5deg) scaleY(0.97);
  text-shadow: 0 0 3px rgba(0,120,150,0.5), 0 4px 5px rgba(0,0,0,0.95) !important;
  animation: rotdead 3.7s infinite steps(1) !important;
}
.rot-o {
  transform: translateY(2px) rotate(-3deg);
  /* magenta corrosion bleeding into the dead letter */
  color: #5e1a4c !important;
  text-shadow: 0 0 5px rgba(255,43,214,0.4), 0 4px 6px rgba(0,0,0,0.95) !important;
  animation: rotdead 4.6s infinite steps(1) !important;
  animation-delay: -1.3s !important;
}
.rot-t {
  transform: translateY(4px) rotate(1.5deg) scaleY(0.94);
  text-shadow: 0 0 3px rgba(0,120,150,0.45), 0 5px 6px rgba(0,0,0,0.95) !important;
  animation: rotdead 5.2s infinite steps(1) !important;
  animation-delay: -2.8s !important;
}

/* live letters: subtle dying-neon flicker */
@keyframes rotflicker {
  0%, 88%, 100% { opacity: 1; }
  90% { opacity: 0.55; }
  91% { opacity: 0.92; }
  93% { opacity: 0.4; }
  94% { opacity: 0.88; }
}
/* dead letters: mostly out, brief tortured stutters */
@keyframes rotdead {
  0%, 100% { opacity: 0.78; }
  12% { opacity: 0.5; }
  13% { opacity: 0.82; }
  40% { opacity: 0.45; }
  41% { opacity: 0.2; }
  42% { opacity: 0.6; }
  70% { opacity: 0.55; }
}

/* ---------- sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) clamp(1rem, 4vw, 3rem); }
.section-head { margin-bottom: 3rem; max-width: 70ch; }
.kicker {
  display: inline-block; font-size: .8rem; letter-spacing: 3px;
  color: var(--magenta); text-transform: uppercase; margin-bottom: .8rem;
}
.section-head h2 {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 4.4vw, 3rem);
  color: #eafcff; line-height: 1.1; margin-bottom: .8rem;
}
.section-head p { color: var(--text-dim); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; }
.card {
  background: var(--panel); border: 1px solid var(--line); padding: 1.8rem 1.6rem;
  position: relative; overflow: hidden; transition: .3s; backdrop-filter: blur(6px);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 92% 100%, 0 100%);
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--cyan), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform .35s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,0.5); }
.card:hover::before { transform: scaleX(1); }
.card-ico {
  font-size: 1.8rem; color: var(--cyan); text-shadow: var(--glow-cyan); margin-bottom: .8rem;
}
.card h3 { font-family: var(--display); font-weight: 500; font-size: 1.15rem; color: #fff; margin-bottom: .6rem; }
.card p { color: var(--text-dim); font-size: .92rem; margin-bottom: 1rem; }
.card ul { list-style: none; }
.card li { font-size: .82rem; color: var(--cyan); padding-left: 1.1rem; position: relative; opacity: .85; }
.card li::before { content: "▹"; position: absolute; left: 0; color: var(--magenta); }

/* ---------- methodology flow ---------- */
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.flow-step {
  border: 1px solid var(--line); padding: 2rem 1.6rem; background: var(--panel);
  position: relative; backdrop-filter: blur(6px); overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 92% 100%, 0 100%);
}
.flow-step::after {
  content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 100%;
  background: linear-gradient(180deg, var(--magenta), transparent);
}
.flow-step b {
  display: block; font-family: var(--display); font-weight: 900;
  font-size: 2.4rem; color: rgba(0,240,255,0.18); line-height: 1; margin-bottom: .6rem;
}
.flow-step h3 { font-family: var(--display); font-weight: 500; font-size: 1.2rem; color: #fff; margin-bottom: .6rem; }
.flow-step p { color: var(--text-dim); font-size: .92rem; }

/* ---------- contact ---------- */
.contact { display: flex; justify-content: center; }
.contact-card {
  width: 100%; max-width: 720px; background: var(--panel);
  border: 1px solid var(--line-strong); padding: clamp(1.6rem, 4vw, 3rem);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 50px rgba(255,43,214,0.07);
}
.contact-card h2 { font-family: var(--display); font-size: clamp(1.6rem,4vw,2.4rem); color:#eafcff; margin-bottom:.6rem; }
.contact-card > p { color: var(--text-dim); margin-bottom: 1.8rem; }
.contact-link { font-size: 1.05rem; letter-spacing: 1px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 2rem; padding: 2.4rem 1rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; text-align: center; display: grid; gap: .5rem; }
.footer-inner p { color: var(--text-dim); font-size: .85rem; }
.footer-fine { color: var(--text-dim); }
.blink { animation: blink 1.1s steps(1) infinite; color: var(--cyan); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(5,7,10,0.97); padding: 1.2rem 2rem; gap: 1rem; border-bottom: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
