/* ============================================================
   CloudXpands — Shared Design System
   One stylesheet, every page. Edit tokens below to rebrand.
   ============================================================ */

/* ---- Fonts (loaded via <link> in each HTML head) ---- */

:root {
  /* Surfaces */
  --bg:        #070910;
  --bg-2:      #0a0d17;
  --surface:   #10141f;
  --surface-2: #161b29;
  --surface-3: #1d2334;

  /* Lines */
  --line:        rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Type colors */
  --ink:   #F4F4EF;
  --muted: #A4ADBF;
  --faint: #6B748A;

  /* Brand accents — change these two to re-skin the whole site */
  --lime: #C8FF4D;
  --cyan: #54E6E0;
  --violet: #8C7BFF;

  --lime-soft: rgba(200, 255, 77, 0.14);
  --cyan-soft: rgba(84, 230, 224, 0.12);

  --grad: linear-gradient(100deg, var(--lime), var(--cyan));
  --grad-soft: linear-gradient(135deg, var(--lime-soft), var(--cyan-soft));

  /* Type */
  --font-display: "Bricolage Grotesque", "Hanken Grotesk", sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* Shadow / glow */
  --glow-lime: 0 0 0 1px rgba(200,255,77,0.4), 0 14px 40px -12px rgba(200,255,77,0.45);
  --shadow:    0 30px 60px -25px rgba(0,0,0,0.7);

  /* Layout */
  --max: 1180px;
  --pad: clamp(20px, 5vw, 56px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

/* ---- Atmospheric background ---- */
.bg-fx {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden;
}
.bg-fx::before, .bg-fx::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55;
}
.bg-fx::before {
  width: 60vw; height: 60vw; top: -22vw; right: -14vw;
  background: radial-gradient(circle, rgba(200,255,77,0.22), transparent 62%);
}
.bg-fx::after {
  width: 55vw; height: 55vw; bottom: -24vw; left: -16vw;
  background: radial-gradient(circle, rgba(84,230,224,0.20), transparent 62%);
}
/* faint dot grid */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 80%);
}
/* grain */
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Layout helpers ---- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(64px, 9vw, 130px); position: relative; }
.center { text-align: center; }

/* ---- Eyebrow / kicker ---- */
.kicker {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--lime);
  display: inline-flex; align-items: center; gap: 9px;
}
.kicker::before {
  content: ""; width: 22px; height: 1px; background: var(--lime); display: inline-block;
}
.kicker.center-line { justify-content: center; }

/* ---- Typography ---- */
.h-display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -0.01em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.35rem); color: var(--muted); max-width: 60ch; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 100px;
  font-weight: 600; font-size: 0.97rem; letter-spacing: -0.01em;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  white-space: nowrap;
}
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--grad); color: #07140a; box-shadow: var(--glow-lime); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(200,255,77,0.6), 0 22px 50px -14px rgba(200,255,77,0.6); }
.btn-ghost { background: rgba(255,255,255,0.04); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: rgba(255,255,255,0.09); transform: translateY(-2px); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(7, 9, 16, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em; }
.brand .logo { width: 30px; height: 30px; flex: none; }
.brand b { color: var(--lime); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 0.93rem; font-weight: 500; color: var(--muted);
  padding: 9px 14px; border-radius: 100px; transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after { content: ""; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-strong); align-items: center; justify-content: center; }
.nav-toggle span { width: 18px; height: 2px; background: var(--ink); position: relative; transition: .25s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); transition: .25s; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.open span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(8,11,20,0.97); backdrop-filter: blur(18px);
    padding: 18px var(--pad) 30px; border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .28s var(--ease);
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 13px 16px; font-size: 1rem; }
  .nav .btn { display: none; }
  .nav-links .btn-primary-mobile { display: inline-flex; justify-content: center; margin-top: 8px; }
}
.btn-primary-mobile { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-block: clamp(70px, 12vw, 150px) clamp(50px, 8vw, 100px); position: relative; }
.hero .wrap { position: relative; z-index: 2; }
.hero h1 { max-width: 16ch; margin-top: 22px; }
.hero .lead { margin-top: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero-meta { margin-top: 54px; display: flex; flex-wrap: wrap; gap: 38px; }
.hero-meta .stat .n { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.hero-meta .stat .l { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-top: 4px; }

/* page hero (interior pages) */
.page-hero { padding-block: clamp(70px, 11vw, 140px) clamp(30px, 5vw, 60px); }
.page-hero h1 { max-width: 18ch; margin-top: 20px; font-size: clamp(2.4rem, 6vw, 4.4rem); }
.page-hero .lead { margin-top: 22px; }

/* ---- Load animation (staggered) ---- */
.rise { opacity: 0; transform: translateY(26px); animation: rise .9s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .15s; } .d3 { animation-delay: .25s; }
.d4 { animation-delay: .35s; } .d5 { animation-delay: .45s; } .d6 { animation-delay: .55s; }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rise, .reveal { animation: none !important; opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee { border-block: 1px solid var(--line); padding-block: 22px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: scroll 30s linear infinite; }
.marquee-track span { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); display: inline-flex; align-items: center; gap: 56px; }
.marquee-track span::after { content: "✦"; color: var(--lime); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.sec-head { max-width: 720px; margin-bottom: 56px; }
.sec-head.center { margin-inline: auto; }
.sec-head h2 { margin-top: 18px; }
.sec-head p { margin-top: 18px; }

/* ============================================================
   CARDS / GRIDS
   ============================================================ */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px;
  position: relative; overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad); opacity: 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; transition: opacity .35s;
  pointer-events: none;
}
.card:hover { transform: translateY(-6px); }
.card:hover::after { opacity: 0.9; }
.card .ic {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--line); margin-bottom: 20px; color: var(--lime);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.97rem; }
.card .idx { position: absolute; top: 24px; right: 26px; font-family: var(--font-mono); font-size: 12px; color: var(--faint); }

/* feature list inside cards */
.flist { margin-top: 16px; display: grid; gap: 10px; }
.flist li { display: flex; gap: 11px; font-size: 0.95rem; color: var(--muted); }
.flist li::before { content: "→"; color: var(--lime); flex: none; }

/* ============================================================
   SPLIT (text + visual)
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split, .split.reverse { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }

/* product mock panel */
.panel {
  background: linear-gradient(150deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--line-strong); border-radius: var(--r-xl); padding: 22px;
  box-shadow: var(--shadow); position: relative;
}
.panel .bar { display: flex; gap: 7px; margin-bottom: 18px; }
.panel .bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-3); display: block; }
.panel .bar i:first-child { background: var(--lime); }
.panel .bar i:nth-child(2) { background: var(--cyan); }
.scanline { height: 8px; border-radius: 6px; background: var(--surface-3); margin-bottom: 12px; }
.scanline.w-70 { width: 70%; } .scanline.w-50 { width: 50%; } .scanline.w-90 { width: 90%; }
.scanline.lime { background: var(--lime-soft); }
.statpill { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2); margin-top: 12px; }
.statpill .v { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; }
.statpill .v.ok { color: var(--lime); }
.statpill .k { font-size: 0.85rem; color: var(--muted); }

/* ============================================================
   STEPS
   ============================================================ */
.steps { counter-reset: s; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step .num { counter-increment: s; font-family: var(--font-mono); font-size: 13px; color: var(--lime); padding-top: 4px; }
.step .num::before { content: "0" counter(s); }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); max-width: 60ch; }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta {
  border-radius: var(--r-xl); padding: clamp(40px, 7vw, 80px); text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--line-strong);
}
.cta::before {
  content: ""; position: absolute; width: 70%; height: 200%; top: -50%; left: 15%;
  background: radial-gradient(ellipse, rgba(200,255,77,0.18), transparent 60%); filter: blur(40px);
}
.cta > * { position: relative; }
.cta h2 { margin: 16px auto 18px; max-width: 16ch; }
.cta p { color: var(--muted); max-width: 50ch; margin: 0 auto 32px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   FORM
   ============================================================ */
.form { display: grid; gap: 18px; max-width: 560px; }
.field { display: grid; gap: 8px; }
.field label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 14px 16px; color: var(--ink); font-family: inherit; font-size: 1rem; transition: border-color .2s, background .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--lime); background: var(--surface); }
.field textarea { resize: vertical; min-height: 130px; }
.form .btn-primary { justify-content: center; }
.form-note { font-size: 0.85rem; color: var(--faint); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 70px); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-line { display: flex; gap: 14px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-line .ic { color: var(--lime); flex: none; margin-top: 2px; }
.contact-line .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.contact-line .v { font-size: 1.05rem; margin-top: 3px; }
.contact-line .v a:hover { color: var(--lime); }

/* ============================================================
   PRODUCT HERO (HouseInspector) — cyan-led variant
   ============================================================ */
.tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 100px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,0.03); color: var(--muted);
}
.tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.tag.live .dot { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

.badge-soon { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); border: 1px dashed var(--line-strong); padding: 4px 12px; border-radius: 100px; }

/* big featured product card */
.feature-card {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: center;
  background: linear-gradient(150deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--line-strong); border-radius: var(--r-xl); padding: clamp(28px, 5vw, 56px); overflow: hidden; position: relative;
}
.feature-card::before { content: ""; position: absolute; width: 50%; height: 150%; right: -10%; top: -25%; background: radial-gradient(ellipse, var(--cyan-soft), transparent 60%); filter: blur(30px); }
.feature-card > * { position: relative; }
@media (max-width: 820px) { .feature-card { grid-template-columns: 1fr; } }

/* ============================================================
   VALUES / ABOUT
   ============================================================ */
.value-row { display: grid; grid-template-columns: auto 1fr; gap: 22px; padding: 26px 0; border-top: 1px solid var(--line); align-items: start; }
.value-row:last-child { border-bottom: 1px solid var(--line); }
.value-row .vk { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem,2.4vw,2rem); color: var(--lime); min-width: 70px; }
.value-row h3 { margin-bottom: 8px; }
.value-row p { color: var(--muted); max-width: 62ch; }

.founder { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; }
@media (max-width: 600px){ .founder { grid-template-columns: 1fr; text-align: center; } }
.founder .ava { width: 84px; height: 84px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; color: #07140a; margin-inline: auto; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); padding-block: 64px 40px; margin-top: 40px; }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 820px) { .foot-top { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .foot-top { grid-template-columns: 1fr; } }
.foot-brand p { color: var(--muted); font-size: 0.95rem; margin-top: 16px; max-width: 32ch; }
.foot-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; font-weight: 500; }
.foot-col a { display: block; color: var(--muted); font-size: 0.95rem; padding: 6px 0; transition: color .2s; }
.foot-col a:hover { color: var(--lime); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 50px; padding-top: 26px; border-top: 1px solid var(--line); }
.foot-bottom p { font-size: 0.85rem; color: var(--faint); }
.foot-bottom .socials { display: flex; gap: 10px; }
.foot-bottom .socials a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--muted); transition: .2s; }
.foot-bottom .socials a:hover { color: var(--lime); border-color: var(--lime); transform: translateY(-2px); }

/* utilities */
.mt-s { margin-top: 14px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: 48px; }
.divider { height: 1px; background: var(--line); border: 0; }
