/* ===========================
   HashDAG — Base Styles (clean)
   =========================== */

/* Root Vars */
:root{
  --blue:#0077C3; --blue-600:#0066A5;
  --ink:#0B0F16; --panel:#0F1724;
  --text:#E9F0F9; --muted:#8FA3BF; --line:#1C2433;
  --success:#27C093; --error:#FF6B6B;
  --radius:14px; --maxw:1200px; --gutter:24px;
  --logo-h-desktop:56px; --logo-h-mobile:48px;
  --shadow-strong: 0 24px 70px rgba(0,0,0,.48), 0 2px 0 rgba(0,119,195,.05) inset;
  --shadow-card:   0 18px 56px rgba(0,0,0,.42), 0 1px 0 rgba(255,255,255,.04) inset, 0 0 0 1px rgba(0,119,195,.06) inset;
  --header-h:86px;
}

/* Reset & Base */
*,*:before,*:after{ box-sizing:border-box }
html,body{ margin:0; padding:0 }
body{
  background: radial-gradient(1200px 600px at 80% -10%, rgba(0,119,195,.10), transparent 60%), var(--ink);
  color:var(--text);
  font:16px/1.6 Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* Links: no global underline-on-hover (prevents "URL hover" look in header) */
a{ color:inherit; text-decoration:none }
a:hover{ text-decoration:none }

/* Layout */
.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 var(--gutter) }
section{ scroll-margin-top: calc(var(--header-h) + 28px); }

/* ===========================
   Unified Button Style
   =========================== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:14px 24px;
  border-radius:14px;

background: linear-gradient(135deg, #005EA8 0%, #0077C3 45%, #0096FF 100%);
box-shadow:
  0 6px 18px rgba(0,119,195,.35),
  inset 0 0 0 1px rgba(255,255,255,.06);  font-weight:600;
  font-size:14px;

  border:none;
  cursor:pointer;
  text-decoration:none;

  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;

  -webkit-appearance:none;
  appearance:none;
}
.btn:hover:not(:disabled){
  transform:translateY(-2px);
  box-shadow:0 12px 30px rgba(0,140,255,.45);
}
.btn:active:not(:disabled){
  transform:translateY(0);
  box-shadow:0 4px 14px rgba(0,119,195,.25);
}
.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  box-shadow:none;
}
.btn.small{ font-size:13px; padding:8px 14px; border-radius:10px }
.btn.ghost{
  background:transparent;
  border:1px solid rgba(255,255,255,.12);
  color:var(--text);
  box-shadow:none;
}

/* ===========================
   Header / Navigation
   =========================== */
header{
  position:fixed; top:0; left:0; right:0; z-index:50;
  backdrop-filter:saturate(120%) blur(10px);
  background:linear-gradient(to bottom, rgba(11,15,22,.9), rgba(11,15,22,.55));
  border-bottom:1px solid var(--line);
}
.nav{
  height:var(--header-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.brand img{
  height:var(--logo-h-desktop);
  width:auto;
  display:block;
  filter:brightness(1.1) contrast(1.05);
}

/* Navigation — Friedlos-Blue Glow (always overrides global link styles) */
.links{ display:flex; gap:32px; align-items:center }
.links a{
  color: rgba(0,119,195,0.9);
  text-shadow: 0 0 6px rgba(0,119,195,0.3);
  font-weight:500;
  position:relative;
  transition: color .25s ease, text-shadow .25s ease;
  text-decoration:none !important; /* hard-stop underline */
}
.links a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-6px;
  width:0;
  height:2px;
  background:linear-gradient(90deg,#0077C3,#66B7FF);
  border-radius:1px;
  box-shadow:0 0 6px rgba(0,119,195,.5);
  transition:width .3s ease;
}
.links a:hover{
  color:#B7E3FF;
  text-shadow:0 0 10px rgba(0,119,195,.6);
  text-decoration:none !important;
}
.links a:hover::after{ width:100% }

/* ===========================
   Live Price Ticker (compact)
   =========================== */
.ticker{
  position:absolute;
  left:0; right:0;
  top: calc(100% + 8px);
  pointer-events:none;
}
.ticker-inner{
  pointer-events:auto;
  width:fit-content;
  max-width:100%;
  margin:0 auto;

  display:flex;
  align-items:center;
  gap:10px;

  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(28,36,51,.9);
  background: rgba(12, 18, 28, 0.55);
  backdrop-filter: blur(12px);

  color: rgba(233,240,249,.82);
  font-size: 12px;
  line-height: 1;

  box-shadow: 0 0 22px rgba(0,119,195,0.10);

  white-space:nowrap;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.ticker-inner::-webkit-scrollbar{ height:0 }
.ticker-label{
  font-size:10px;
  letter-spacing:.7px;
  text-transform:uppercase;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(0,119,195,.28);
  background: rgba(0,119,195,.10);
  color:#B7E3FF;
}
.ticker-item{ color: rgba(233,240,249,.86); }
.ticker-item strong{ font-weight:600; margin-right:4px; }
.ticker-sep{ opacity:.25; }
.ticker-meta{ margin-left:8px; opacity:.55; font-size:11px; }

/* Mini arrow indicator */
.ticker-arrow{
  display:inline-block;
  margin-left:6px;
  font-size:11px;
  opacity:0;
  transform: translateY(1px) scale(.92);
}
@keyframes arrowPop{
  0%{ opacity:0; transform: translateY(1px) scale(.92); filter:blur(.2px); }
  18%{ opacity:1; transform: translateY(0) scale(1); filter:blur(0); }
  70%{ opacity:1; }
  100%{ opacity:0; transform: translateY(-1px) scale(.98); }
}
.ticker-arrow.up{ color:#5CFFB2; text-shadow:0 0 10px rgba(0,255,140,.35); }
.ticker-arrow.down{ color:#FF6B6B; text-shadow:0 0 10px rgba(255,60,60,.35); }
.ticker-arrow.pop{ animation: arrowPop 2.8s ease forwards; }

/* ===========================
   Hero
   =========================== */
.hero{
  position:relative;
  overflow:hidden;
  text-align:center;
  height:100vh;
  min-height:100vh;
}
@supports (height: 100svh){
  .hero{ height:100svh; min-height:100svh; }
}
.hero .inner{
  height:100%;
  min-height:100%;
  display:grid;
  place-items:center;
  padding: calc(var(--header-h) + 22px) 0 10vh;
  position:relative;
  z-index:4;
}

.hero-bg,.hero-noise,.hero-code{ position:absolute; inset:0; pointer-events:none }
.hero-bg{
  background:url('../assets/hero-bg.jpg') center/cover no-repeat;
  opacity:.25;
  transform:translateZ(0);
  z-index:1;
}
.hero-noise{
  background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" opacity="0.06"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)"/></svg>') center/cover repeat;
  mix-blend-mode:overlay;
  opacity:.35;
  z-index:2;
}
.hero-code{ opacity:.38; z-index:3; }
#codeRain{ position:absolute; inset:0; width:100%; height:100%; }

/* Hero logo: single source of truth */
.hero-logo-brand{
  display:block;
  width: clamp(130px, 41vw, 260px);
  max-width:260px;
  height:auto;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,.35));
}

/* CRT / glitch wrapper */
.logo-crt{
  --logo:url('../assets/hashdag-logo.png'); /* FIX: use real hashdag logo */
  position:relative;
  display:inline-block;
  line-height:0;
  isolation:isolate;
}
.logo-crt::before,
.logo-crt::after{
  content:"";
  position:absolute;
  inset:0;
  background-image:var(--logo);
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  opacity:.85;
  pointer-events:none;
}
.logo-crt::before{
  filter:contrast(1.05) saturate(1.08);
  transform:translate3d(0,0,0);
  animation:logoGlitchShiftC 2.2s infinite;
}
.logo-crt::after{
  filter:contrast(1.05) saturate(1.08);
  transform:translate3d(0,0,0);
  mix-blend-mode:screen;
  opacity:.6;
  animation:logoGlitchShiftM 2.2s infinite;
}
.logo-crt .hero-logo-brand{
  will-change:clip-path, transform, filter, opacity;
  animation:
    logoGlitchSlices 2.2s steps(22) infinite,
    logoFlicker 0.14s steps(2) infinite;
}

@keyframes logoGlitchShiftC{
  0%{transform:translateX(0) skewX(0deg)}
  8%{transform:translateX(1.5px) skewX(0.6deg)}
  9%{transform:translateX(-1px) skewX(-0.4deg)}
  10%{transform:translateX(0) skewX(0deg)}
  33%{transform:translateX(2px) skewX(0.8deg)}
  35%{transform:translateX(-1px) skewX(-0.5deg)}
  36%{transform:translateX(0) skewX(0deg)}
  61%{transform:translateX(1.2px) skewX(0.4deg)}
  63%{transform:translateX(-1px) skewX(-0.3deg)}
  64%{transform:translateX(0)}
  100%{transform:translateX(0)}
}
@keyframes logoGlitchShiftM{
  0%{transform:translateX(0) skewX(0deg)}
  14%{transform:translateX(-1.5px) skewX(-0.6deg)}
  15%{transform:translateX(1px) skewX(0.4deg)}
  16%{transform:translateX(0)}
  43%{transform:translateX(-2px) skewX(-0.8deg)}
  45%{transform:translateX(1px) skewX(0.5deg)}
  46%{transform:translateX(0)}
  73%{transform:translateX(-1.2px) skewX(-0.4deg)}
  75%{transform:translateX(1px) skewX(0.3deg)}
  76%{transform:translateX(0)}
  100%{transform:translateX(0)}
}
@keyframes logoGlitchSlices{
  0%{clip-path:inset(0 0 0 0); transform:none; filter:none; opacity:1}
  8%{clip-path:inset(12% 0 70% 0); transform:translateX(6px)}
  9%{clip-path:inset(62% 0 18% 0); transform:translateX(-3px)}
  10%{clip-path:inset(0 0 0 0); transform:none}
  33%{clip-path:inset(22% 0 60% 0); transform:translateX(-4px)}
  34%{clip-path:inset(48% 0 34% 0); transform:translateX(4px)}
  35%{clip-path:inset(0 0 0 0); transform:none}
  61%{clip-path:inset(8% 0 74% 0); transform:translateX(3px)}
  62%{clip-path:inset(70% 0 10% 0); transform:translateX(-3px)}
  63%{clip-path:inset(0 0 0 0); transform:none}
  80%{filter:brightness(1.25) contrast(1.2); opacity:.96}
  82%{filter:none; opacity:1}
  100%{clip-path:inset(0 0 0 0); transform:none; filter:none; opacity:1}
}
@keyframes logoFlicker{
  0%,100%{ filter:brightness(1) contrast(1.05); opacity:1 }
  45%{ filter:brightness(1.35) contrast(1.35); opacity:.9 }
  60%{ filter:brightness(0.8) contrast(1.15); opacity:.85 }
}

/* Subtext */
.sub{ font-size:clamp(16px,2.4vw,20px); color:#C9D7EE; margin-top:26px }
.kernsatz{ margin-top:10px; font-size:clamp(15px,2.2vw,18px); color:var(--muted) }
.cta{ margin-top:24px }

/* ===========================
   Sections & Panels
   =========================== */
section{ padding:100px 0 }
.grid-2{ display:grid; grid-template-columns:1.2fr 1fr; gap:40px }
.panel{
  background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:32px;
  box-shadow:var(--shadow-strong);
}

/* Cards */
.cards{ display:grid; grid-template-columns:repeat(4,1fr); gap:24px; margin-top:10px }
.card{
  position:relative;
  border:1px solid rgba(0,119,195,.18);
  border-radius:16px;
  padding:28px 24px;
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  box-shadow:0 6px 16px rgba(0,0,0,.38), 0 0 14px rgba(0,119,195,.14), inset 0 0 0 1px rgba(255,255,255,.04);
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  text-align:center;
  content-visibility:auto;
  contain-intrinsic-size:280px 220px;
}
@supports (backdrop-filter: blur(1px)) {
  @media (min-width: 900px) { .card{ backdrop-filter: blur(6px) saturate(115%) } }
}
.card:hover{
  transform:translateY(-5px);
  border-color:rgba(0,119,195,.45);
  box-shadow:0 12px 36px rgba(0,0,0,.52), 0 0 26px rgba(0,119,195,.36), 0 0 48px rgba(0,209,255,.20), inset 0 0 0 1px rgba(255,255,255,.08);
}
.card::after{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:inherit;
  background:radial-gradient(80% 120% at 50% 20%, rgba(0,209,255,0) 0%, rgba(0,209,255,.12) 45%, transparent 80%);
  opacity:0;
  filter:blur(10px);
  transition:opacity .35s ease, filter .35s ease;
  z-index:0;
}
.card:hover::after{ opacity:1; filter:blur(14px) }
.card *{ position:relative; z-index:1 }
.card h3{ margin:14px 0 8px; font-family:"Space Grotesk"; font-weight:600 }
.card p{ color:var(--muted); margin:0 }
.icon-wrap{ display:grid; place-items:center; height:96px; margin-bottom:12px }
.i{
  width:56px; height:56px; stroke-width:2.25; fill:none;
  stroke-linecap:round; stroke-linejoin:round;
  filter: drop-shadow(0 6px 18px rgba(0,119,195,.35));
}
.principles{ margin-top:26px; text-align:center; color:var(--muted) }

/* ===========================
   Contact / Forms
   =========================== */
form{ display:grid; gap:16px }
label{ font-weight:500 }
.field{ display:flex; flex-direction:column; gap:8px }
input[type="text"], input[type="email"], textarea{
  width:100%;
  padding:16px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#0e1523;
  color:var(--text);
  outline:none;
  font-size:16px;
}
textarea{ min-height:160px; resize:vertical }
.row{ display:grid; grid-template-columns:1fr 1fr; gap:16px }
.consent{ font-size:14px; color:var(--muted) }

/* Focus Glow */
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus{
  border-color: rgba(0,119,195,.45);
  box-shadow:
    0 6px 16px rgba(0,0,0,.38),
    0 0 14px rgba(0,119,195,.24),
    0 0 0 1px rgba(255,255,255,.06) inset;
  transition: border-color .2s ease, box-shadow .2s ease;
  outline:none;
}

/* Messages */
.msg{
  display:none; width:100%;
  padding:14px 16px; margin:0 0 18px 0;
  border-radius:12px;
  text-align:center;
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.02));
  box-shadow:0 6px 16px rgba(0,0,0,.38), 0 0 14px rgba(0,119,195,.14), inset 0 0 0 1px rgba(255,255,255,.04);
  font-size:15px;
}
.msg.ok{ background:rgba(0,119,195,.12); border-color:rgba(0,119,195,.45); color:#cfe0ff; }
.msg.err{ background:rgba(255,107,107,.12); border-color:rgba(255,107,107,.45); color:#ffd6d6; }

/* ===========================
   Footer
   =========================== */
.footer{ padding:40px 0; border-top:1px solid var(--line); color:var(--muted); font-size:14px }
.footer-links{
  display:flex;
  justify-content:center;
  gap:32px;
}
.footer-links a{
  color:var(--muted);
  font-size:14px;
  transition: color .25s ease, text-shadow .25s ease;
}
.footer-links a:hover{ color:#B7E3FF; text-shadow:0 0 8px rgba(0,119,195,.45) }
@media (max-width: 600px){
  .footer-links{ gap:18px; }
}

/* ===========================
   Reveal
   =========================== */
.reveal{ opacity:0; transform:translateY(18px); transition:opacity .5s ease, transform .5s ease }
.reveal.show{ opacity:1; transform:none }

/* ===========================
   Cookie-Bar
   =========================== */
.cookie-bar{
  position:fixed; left:16px; right:16px; bottom:16px;
  display:flex; gap:12px; align-items:center; justify-content:space-between;
  padding:12px 14px; border-radius:12px;
  background:rgba(15,23,36,.88);
  border:1px solid rgba(0,119,195,.25);
  box-shadow:0 12px 28px rgba(0,0,0,.45), 0 0 12px rgba(0,119,195,.18);
  backdrop-filter: blur(8px) saturate(125%);
  font-size:14px; color:var(--text);
  z-index:3000;
  animation: cookieFadeIn .45s ease;
}
.cookie-bar .cookie-actions{ display:flex; gap:8px; flex-shrink:0 }
.hidden{ display:none !important }
@keyframes cookieFadeIn{ from{opacity:0; transform:translateY(8px)} to{opacity:1; transform:translateY(0)} }
body.has-cookie{ padding-bottom:80px }
body.modal-open{ position:fixed; width:100%; overflow:hidden }

/* ===========================
   Modals
   =========================== */
.modal-overlay{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
  z-index:4000;
}
.modal{
  display:none;
  position:relative;
  width: min(680px, calc(100vw - 40px));
  max-height: 90vh;
  overflow-y:auto;
  border:1px solid var(--line);
  border-radius:14px;
  padding:26px;
  color:var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
  box-shadow: var(--shadow-strong);
  z-index:4100;
  animation: modalIn .25s ease;
}
.modal[open]{ display:block; }
@keyframes modalIn{ from{opacity:0; transform:scale(.96)} to{opacity:1; transform:scale(1)} }
.modal-close{
  position: sticky;
  top: 0;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(11,15,22,.9), rgba(11,15,22,.55));
  color: #bcd;
  font-size: 18px;
  cursor: pointer;
  padding: 8px 12px;
  z-index: 5;
}
.modal-close:hover{ background: rgba(0,119,195,.25); color:#fff }

@media (max-width: 640px){
  .modal{ width: calc(100vw - 24px); max-height: 92svh; padding: 20px }
  .modal-close{ font-size:20px; padding:10px 12px }
}

/* Hide reCAPTCHA badge */
.grecaptcha-badge{ visibility:hidden !important; }

/* ===========================
   Motion Reduction
   =========================== */
@media (prefers-reduced-motion: reduce){
  .card{ transition:none }
  .hero-code{ display:none }
  .logo-crt::before,
  .logo-crt::after,
  .logo-crt .hero-logo-brand{ animation:none !important; transform:none !important }
}

/* ===========================
   Responsive
   =========================== */
@media (max-width:1080px){
  .grid-2{ grid-template-columns:1fr }
  .cards{ grid-template-columns:repeat(2,1fr) }
}
@media (max-width:720px){
  :root{ --header-h:72px; }
  .brand img{ height:var(--logo-h-mobile) }
  .nav{ height:var(--header-h) }
  .links{ display:none }
  .hero-code{ opacity:.28 }
  .hero .inner{ padding: calc(var(--header-h) + 18px) 0 8vh; }
  .hero-logo-brand{   width: clamp(160px, 60vw, 300px); max-width:300px; }
  .cards{ grid-template-columns:1fr }
  section{ padding:80px 0 }
  .panel{ padding:22px }
  .row{ grid-template-columns:1fr }

  .ticker-label{ display:none; }
  .ticker-meta{ display:none; }
  .ticker{ top: calc(100% + 6px); }
}