/* ==========================================================================
   RelayHold — website design system
   Dark, circuit-themed, glassmorphism over a deep-space blue.
   ========================================================================== */

:root {
  --bg: #070b14;
  --bg-raise: #0d1424;
  --bg-glass: rgba(19, 30, 54, 0.55);
  --line: rgba(88, 118, 170, 0.18);
  --line-bright: rgba(88, 118, 170, 0.4);
  --text: #e6ecf5;
  --muted: #8b96ad;
  --accent: #2c8cff;
  --accent-deep: #1a5fd8;
  --grad: linear-gradient(120deg, #2c8cff 0%, #1a5fd8 100%);
  --grad-text: linear-gradient(120deg, #6db4ff 0%, #2c8cff 60%, #1a5fd8 100%);
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --glow: 0 0 42px rgba(44, 140, 255, 0.35);
  --font: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(44, 140, 255, 0.35); }

/* ---- ambient background: gradient orbs + circuit grid ------------------- */

.bg-field {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: drift 16s ease-in-out infinite alternate;
}
.orb.a { width: 560px; height: 560px; left: -160px; top: -120px;
         background: radial-gradient(circle, rgba(44,140,255,0.5), transparent 65%); }
.orb.b { width: 640px; height: 640px; right: -220px; top: 18%;
         background: radial-gradient(circle, rgba(26,95,216,0.45), transparent 65%);
         animation-delay: -6s; }
.orb.c { width: 480px; height: 480px; left: 22%; bottom: -180px;
         background: radial-gradient(circle, rgba(44,140,255,0.32), transparent 65%);
         animation-delay: -11s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(60px, -40px, 0) scale(1.12); }
}

.grid-lines {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(88, 118, 170, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 118, 170, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 78%);
}

/* ---- layout -------------------------------------------------------------- */

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

section { padding: 96px 0; position: relative; }

/* ---- nav ----------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 11, 20, 0.7);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.4px;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; }

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active {
  text-shadow: 0 0 18px rgba(44, 140, 255, 0.55);
}

.nav-cta {
  background: var(--grad) !important;
  color: #fff !important;
  padding: 9px 20px;
  border-radius: 10px;
  box-shadow: var(--glow);
}

.nav-signin {
  border: 1px solid var(--line-bright);
  padding: 8px 18px;
  border-radius: 10px;
}
.nav-signin:hover { background: rgba(88, 118, 170, 0.1); text-decoration: none; }

.burger { display: none; margin-left: auto; background: none; border: none;
          color: var(--text); font-size: 26px; cursor: pointer; }

/* ---- buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.btn.primary {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--glow);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 0 60px rgba(44,140,255,0.55); }
.btn.ghost {
  background: rgba(44, 140, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--line-bright);
}
.btn.ghost:hover { background: rgba(44, 140, 255, 0.16); transform: translateY(-2px); }

/* ---- typography ------------------------------------------------------------ */

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: #6db4ff;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--grad);
  border-radius: 2px;
  box-shadow: var(--glow);
}

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-title { font-size: clamp(30px, 4.4vw, 44px); margin-bottom: 14px; }
.section-sub { color: var(--muted); font-size: 18px; max-width: 640px; }

.center { text-align: center; }
.center .section-sub { margin: 0 auto; }

/* ---- glass cards ------------------------------------------------------------ */

.card {
  background: var(--bg-glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-bright);
  box-shadow: var(--shadow);
}

.card .icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
  box-shadow: var(--glow);
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

/* ---- hero ------------------------------------------------------------------ */

.free-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: #9cc4ff;
  background: rgba(44, 140, 255, 0.08);
  border: 1px solid rgba(44, 140, 255, 0.35);
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 26px;
  box-shadow: 0 0 24px rgba(44, 140, 255, 0.15);
}
.free-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #28c840;
  box-shadow: 0 0 10px #28c840;
  animation: pulse 2s infinite;
}

.hero { padding-top: calc(var(--nav-h) + 84px); padding-bottom: 40px; }

.hero h1 {
  font-size: clamp(42px, 6.4vw, 76px);
  font-weight: 800;
  margin-bottom: 22px;
  max-width: 900px;
}
.hero p.lead {
  color: var(--muted);
  font-size: clamp(17px, 2.2vw, 21px);
  max-width: 640px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-meta {
  display: flex; gap: 34px; margin-top: 54px; flex-wrap: wrap;
}
.hero-meta .m { font-family: var(--mono); }
.hero-meta .m b { font-size: 26px; font-weight: 700; display: block; color: var(--text); }
.hero-meta .m span { color: var(--muted); font-size: 13px; letter-spacing: 1px;
                     text-transform: uppercase; }

/* ---- CSS-drawn app mockup --------------------------------------------------- */

.mockup {
  margin-top: 80px;
  border-radius: 16px;
  border: 1px solid var(--line-bright);
  background: linear-gradient(180deg, #101a30 0%, #0a1122 100%);
  box-shadow: var(--shadow), var(--glow);
  overflow: hidden;
}
.mockup-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line);
}
.mockup-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.mockup-bar .dot:nth-child(1) { background: #ff5f57; }
.mockup-bar .dot:nth-child(2) { background: #febc2e; }
.mockup-bar .dot:nth-child(3) { background: #28c840; }
.mockup-bar .title {
  margin-left: 14px; color: var(--muted); font-size: 13px; font-family: var(--mono);
}
.mockup-body {
  padding: 44px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}
.mockup-id .lbl { font-size: 13px; color: var(--muted); text-transform: uppercase;
                 letter-spacing: 2px; margin-bottom: 8px; font-family: var(--mono); }
.mockup-id .id {
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 20px;
  text-shadow: none;
}
.mockup-id .pw-box {
  display: inline-block;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--text);
  background: rgba(44, 140, 255, 0.1);
  border: 1px solid var(--line-bright);
  padding: 10px 18px;
  border-radius: 10px;
  letter-spacing: 3px;
}
.mockup-right .row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.mockup-right .row .pulse {
  width: 9px; height: 9px; border-radius: 50%;
  background: #28c840;
  box-shadow: 0 0 12px #28c840;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.mockup-right .row .name { font-size: 14.5px; font-weight: 600; }
.mockup-right .row .sub { font-size: 12.5px; color: var(--muted); font-family: var(--mono); }

/* ---- steps ----------------------------------------------------------------- */

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { position: relative; padding-top: 8px; }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: #6db4ff;
  background: rgba(44, 140, 255, 0.1);
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  padding: 6px 12px;
  display: inline-block;
  margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---- download cards ---------------------------------------------------------- */

.dl-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dl-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.dl-card:hover::after { opacity: 0.05; }
.dl-card h3 { font-size: 21px; }
.dl-card .tag {
  font-family: var(--mono);
  font-size: 12px;
  color: #6db4ff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.dl-card ul {
  list-style: none;
  margin: 6px 0 18px;
}
.dl-card ul li {
  color: var(--muted);
  font-size: 14.5px;
  padding: 4px 0 4px 24px;
  position: relative;
}
.dl-card ul li::before {
  content: "▸";
  position: absolute;
  left: 4px;
  color: var(--accent);
}
.dl-card .btn { align-self: flex-start; margin-top: auto; }
.dl-card .size { font-size: 13px; color: var(--muted); font-family: var(--mono); }

.note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: rgba(44, 140, 255, 0.06);
  border-radius: 12px;
  padding: 18px 22px;
  color: var(--muted);
  font-size: 15px;
}
.note b { color: var(--text); }

/* ---- prose (license/about) ---------------------------------------------------- */

.prose { max-width: 780px; }
.prose h2 { font-size: 26px; margin: 44px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--muted); font-size: 16.5px; margin-bottom: 12px; }
.prose ul { padding-left: 24px; }
.prose a { color: #6db4ff; text-decoration: none; border-bottom: 1px solid rgba(109,180,255,0.35); }
.prose a:hover { border-bottom-color: #6db4ff; }
.prose code {
  font-family: var(--mono);
  background: rgba(44, 140, 255, 0.1);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 14px;
  color: #9cc4ff;
}

.attribution {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  border: 1px solid var(--line-bright);
  background: var(--bg-glass);
  border-radius: var(--radius);
  padding: 28px;
  margin: 36px 0;
  backdrop-filter: blur(10px);
}
.attribution img { width: 58px; height: 58px; border-radius: 14px; flex-shrink: 0; }
.attribution p { color: var(--muted); font-size: 15px; margin: 0; }
.attribution b { color: var(--text); }

/* ---- footer ------------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 54px;
  margin-top: 60px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
}
.footer-inner .brand { font-size: 16px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.footer-note { width: 100%; color: var(--muted); font-size: 13px; margin-top: 18px;
               font-family: var(--mono); opacity: 0.75; }

/* ---- scroll reveal --------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .orb { animation: none; }
}

/* ---- responsive --------------------------------------------------------------------- */

@media (max-width: 920px) {
  .grid-3, .steps { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .mockup-body { grid-template-columns: 1fr; padding: 30px; }
  .mockup-id .id { font-size: 30px; }
}

@media (max-width: 760px) {
  .burger { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    background: rgba(7, 11, 20, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 22px 28px;
    gap: 18px;
  }
  .nav-links.open { display: flex; }
  section { padding: 68px 0; }
}