/* ══════════════════════════════════════════════
   HAZELNUT MESSENGER — style.css
   Aesthetic: Dark Forest × Cryptography
   Palette: Deep green bg · Amber nut · Leaf green
══════════════════════════════════════════════ */

/* ─── LOCAL FONTS ────────────────────────────── */

/* Space Grotesk (body) – Florian Karsten, OFL 1.1 */
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/space-grotesk-300.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/space-grotesk-400.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/space-grotesk-500.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/space-grotesk-600.woff2') format('woff2'); }

/* Playfair Display (headings) – Claus Eggers Sørensen, OFL 1.1 */
@font-face { font-family: 'Playfair Display'; font-style: normal;  font-weight: 700; font-display: swap; src: url('fonts/playfair-display-700.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic;  font-weight: 700; font-display: swap; src: url('fonts/playfair-display-700-italic.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal;  font-weight: 900; font-display: swap; src: url('fonts/playfair-display-900.woff2') format('woff2'); }

/* JetBrains Mono (code/mono) – JetBrains, OFL 1.1 */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/jetbrains-mono-300.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/jetbrains-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/jetbrains-mono-500.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/jetbrains-mono-600.woff2') format('woff2'); }

/* ─── CUSTOM PROPERTIES ─────────────────────── */
:root {
  /* Backgrounds */
  --bg-deep:     #0b1a0b;
  --bg-mid:      #0e1f0e;
  --bg-card:     #121e12;
  --bg-card-h:   #172317;
  --bg-term:     #090f09;

  /* Brand greens */
  --green-br:    #6cd23a;
  --green-md:    #4caa26;
  --green-dk:    #2a5e18;
  --green-glow:  rgba(108, 210, 58, 0.16);
  --green-glow2: rgba(108, 210, 58, 0.08);

  /* Brand amber */
  --amber:       #c8752a;
  --amber-lt:    #df922e;
  --amber-dk:    #9a5518;
  --amber-glow:  rgba(200, 117, 42, 0.14);

  /* Borders */
  --bdr:         rgba(108, 210, 58, 0.11);
  --bdr-h:       rgba(108, 210, 58, 0.28);
  --bdr-amber:   rgba(200, 117, 42, 0.18);

  /* Text */
  --tx-1:   #f0ead8;
  --tx-2:   #a4a090;
  --tx-3:   #665e52;
  --tx-code: #7ce448;

  /* Typography */
  --ff-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --ff-body:    'Space Grotesk', system-ui, sans-serif;
  --ff-mono:    'JetBrains Mono', ui-monospace, 'Cascadia Code', 'Fira Code', monospace;

  /* Spacing / Shape */
  --r:    10px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Timing */
  --t:    0.22s ease;
  --t-sl: 0.42s ease;
}

/* ─── RESET ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: clip; }
body {
  background: var(--bg-deep);
  color: var(--tx-1);
  font-family: var(--ff-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle dot grid overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(108,210,58,0.055) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: 0;
}

/* ─── SCROLLBAR ──────────────────────────────── */
::-webkit-scrollbar            { width: 6px; }
::-webkit-scrollbar-track      { background: var(--bg-deep); }
::-webkit-scrollbar-thumb      { background: var(--green-dk); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover{ background: var(--green-md); }

/* ─── SELECTION ──────────────────────────────── */
::selection { background: rgba(108,210,58,0.28); color: var(--tx-1); }

/* ─── CANVAS ─────────────────────────────────── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* ─── NAVIGATION ─────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  /* Sit below browser chrome on iPadOS/iOS Safari */
  padding: env(safe-area-inset-top, 0px) 2rem 0;
  background: rgba(9, 18, 9, 0.88);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--bdr);
}
.nav.scrolled {
  background: rgba(9, 18, 9, 0.96);
}
/* Nav total height = 68px inner + safe area inset */
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--tx-1);
  font-family: var(--ff-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: opacity var(--t);
}
.nav-logo:hover { opacity: 0.85; }
.nav-icon { width: 36px; height: 36px; flex-shrink: 0; }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.nav-links a {
  color: var(--tx-2);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--t);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--tx-1); }
.nav-gh {
  color: var(--green-br) !important;
  border: 1px solid var(--bdr);
  padding: 5px 12px;
  border-radius: 20px;
  font-family: var(--ff-mono) !important;
  font-size: 0.74rem !important;
  transition: background var(--t), border-color var(--t), box-shadow var(--t) !important;
}
.nav-gh:hover {
  background: var(--green-glow);
  border-color: var(--bdr-h) !important;
  box-shadow: 0 0 14px rgba(108,210,58,0.15);
}

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background var(--t);
}
.nav-burger:hover { background: rgba(255,255,255,0.05); }
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tx-2);
  border-radius: 2px;
  transition: var(--t);
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer */
.nav-drawer {
  position: fixed;
  top: 68px; left: 0; right: 0;
  z-index: 99;
  background: rgba(9, 18, 9, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bdr);
  padding: 1.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  transform: translateY(-108%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
.nav-drawer.open { transform: translateY(0); }
.drawer-link {
  color: var(--tx-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 14px 0;
  border-bottom: 1px solid var(--bdr);
  transition: color var(--t);
}
.drawer-link:last-child { border-bottom: none; }
.drawer-link:hover { color: var(--green-br); }

/* ─── SCROLL REVEAL ──────────────────────────── */
.reveal, .reveal-right {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-right { transform: translateX(36px); }
.reveal.visible, .reveal-right.visible { opacity: 1; transform: translate(0,0); }

/* ─── HERO ───────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  /* Account for nav height (68px) + safe-area inset + extra breathing room */
  padding: calc(68px + env(safe-area-inset-top, 0px) + 3rem) 4rem 6rem;
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200, 117, 42, 0.09);
  border: 1px solid var(--bdr-amber);
  color: var(--amber-lt);
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 1.8rem;
}
.badge-pulse {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--amber);
  animation: badgePulse 2.2s ease infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}

/* Hero title */
.hero-title {
  font-family: var(--ff-display);
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 900;
  line-height: 1.07;
  color: var(--tx-1);
  letter-spacing: -0.02em;
  margin-bottom: 1.6rem;
}
.hero-title em {
  font-style: italic;
  color: var(--green-br);
  display: inline;
}

/* Hero description */
.hero-desc {
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--tx-2);
  max-width: 500px;
  margin-bottom: 2.6rem;
  font-weight: 300;
}
.tag-tech {
  display: inline-block;
  background: rgba(108, 210, 58, 0.09);
  border: 1px solid rgba(108, 210, 58, 0.2);
  color: var(--green-br);
  font-family: var(--ff-mono);
  font-size: 0.8em;
  padding: 1px 7px;
  border-radius: 5px;
  vertical-align: 1px;
}

/* Hero actions */
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* ─── BUTTONS ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 12px 22px;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}
.btn-primary {
  background: var(--green-br);
  color: #091209;
}
.btn-primary:hover {
  background: #80e84e;
  box-shadow: 0 0 30px rgba(108,210,58,0.38);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--tx-1);
  border: 1px solid var(--bdr);
}
.btn-outline:hover {
  border-color: var(--bdr-h);
  background: var(--green-glow2);
  transform: translateY(-2px);
}
.btn-large { padding: 15px 28px; font-size: 0.98rem; }

/* ─── HERO VISUAL ────────────────────────────── */
.hero-visual {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-nut-wrap {
  position: relative;
  width: 300px; height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-nut {
  width: 210px; height: 210px;
  position: relative;
  z-index: 2;
  animation: nutFloat 5.5s ease-in-out infinite;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.55)) drop-shadow(0 0 30px rgba(108,210,58,0.12));
}
@keyframes nutFloat {
  0%, 100% { transform: translateY(0)   rotate(-2.5deg); }
  50%       { transform: translateY(-18px) rotate(2.5deg);  }
}
.nut-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: ringPulse 4s ease-in-out infinite;
  pointer-events: none;
}
.ring-1 { width: 240px; height: 240px; border-color: rgba(108,210,58,0.14); animation-delay: 0s; }
.ring-2 { width: 285px; height: 285px; border-color: rgba(108,210,58,0.07); animation-delay: 0.7s; }
.ring-3 { width: 330px; height: 330px; border-color: rgba(108,210,58,0.03); animation-delay: 1.4s; }
@keyframes ringPulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.05); opacity: 0.5; }
}

/* ─── TECH STRIP ─────────────────────────────── */
.tech-strip {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--bdr);
  border-bottom: 1px solid var(--bdr);
  background: rgba(12, 22, 12, 0.7);
  padding: 14px 0;
  overflow: hidden;
}
.tech-strip-inner {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 0 4rem;
  flex-wrap: wrap;
  justify-content: center;
}
.tech-pill {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid;
  white-space: nowrap;
}
.tech-pill.green {
  color: var(--green-br);
  border-color: rgba(108,210,58,0.2);
  background: rgba(108,210,58,0.05);
}
.tech-pill.amber {
  color: var(--amber-lt);
  border-color: rgba(200,117,42,0.2);
  background: rgba(200,117,42,0.05);
}
.sep { color: var(--tx-3); font-size: 0.85rem; user-select: none; }

/* ─── SECTION COMMON ─────────────────────────── */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 7rem 4rem;
}
.section-label {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-br);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.12;
  color: var(--tx-1);
  letter-spacing: -0.02em;
  margin-bottom: 3.5rem;
}

/* ─── FEATURES ───────────────────────────────── */
.features { position: relative; z-index: 1; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.feat-card {
  background: var(--bg-card);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t), background var(--t), transform var(--t), box-shadow var(--t);
}
.feat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(108,210,58,0.04) 0%, transparent 65%);
  pointer-events: none;
  transition: opacity var(--t);
  opacity: 0;
}
.feat-card:hover::after { opacity: 1; }
.feat-card:hover {
  border-color: var(--bdr-h);
  background: var(--bg-card-h);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 20px rgba(108,210,58,0.06);
}
.feat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.3rem;
}
.feat-icon svg { width: 22px; height: 22px; }
.feat-icon.green {
  background: rgba(108,210,58,0.1);
  color: var(--green-br);
  border: 1px solid rgba(108,210,58,0.2);
}
.feat-icon.amber {
  background: rgba(200,117,42,0.1);
  color: var(--amber-lt);
  border: 1px solid rgba(200,117,42,0.22);
}
.feat-card h3 {
  font-family: var(--ff-display);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--tx-1);
  margin-bottom: 0.6rem;
}
.feat-card p {
  font-size: 0.88rem;
  line-height: 1.68;
  color: var(--tx-2);
  margin-bottom: 1.3rem;
  font-weight: 300;
}
.feat-tag {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  color: var(--tx-3);
  border: 1px solid var(--bdr);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* ─── SECURITY ───────────────────────────────── */
.security {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, transparent 0%, rgba(14,31,14,0.5) 40%, rgba(14,31,14,0.5) 60%, transparent 100%);
}
.security-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.sec-title { margin-bottom: 1.2rem; }
.security-desc {
  font-size: 0.95rem;
  line-height: 1.72;
  color: var(--tx-2);
  margin-bottom: 2.5rem;
  font-weight: 300;
}
.security-steps { display: flex; flex-direction: column; gap: 1.3rem; }
.step { display: flex; gap: 1.1rem; align-items: flex-start; }
.step-num {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--green-br);
  background: rgba(108,210,58,0.1);
  border: 1px solid rgba(108,210,58,0.2);
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  letter-spacing: 0.05em;
}
.step strong {
  display: block;
  font-size: 0.92rem;
  color: var(--tx-1);
  margin-bottom: 3px;
  font-weight: 600;
}
.step span {
  font-size: 0.83rem;
  color: var(--tx-2);
  line-height: 1.5;
  font-weight: 300;
}

/* Terminal */
.terminal-wrap { position: sticky; top: 6rem; }
.terminal {
  background: var(--bg-term);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  overflow: hidden;
  font-family: var(--ff-mono);
  box-shadow: 0 0 80px rgba(0,0,0,0.6), 0 0 30px rgba(108,210,58,0.08);
}
.terminal-bar {
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--bdr);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.tdot-green { background: #28c840; }
.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  color: var(--tx-3);
  margin-left: -56px;
  letter-spacing: 0.04em;
}
.terminal-body {
  padding: 1.3rem 1.6rem;
  min-height: 320px;
  overflow-y: auto;
  max-height: 420px;
}
.t-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 5px;
  font-size: 0.78rem;
  line-height: 1.55;
  min-height: 1.2rem;
}
.t-prompt { color: var(--green-br); user-select: none; flex-shrink: 0; }
.t-cmd { color: var(--tx-1); }
.t-out { color: #6a7060; padding-left: 16px; word-break: break-all; }
.t-out.success { color: var(--green-br); }
.t-out.warn    { color: var(--amber-lt); }
.t-cursor {
  display: inline-block;
  width: 7px; height: 14px;
  background: var(--green-br);
  animation: blink 1.1s step-end infinite;
  vertical-align: -3px;
  margin-left: 1px;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ─── CHATROOMS ──────────────────────────────── */
.chatrooms { position: relative; z-index: 1; }
.chatrooms-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

/* Phone mockup */
.chatroom-demo { display: flex; justify-content: center; }
.demo-phone {
  background: var(--bg-card);
  border: 1px solid var(--bdr);
  border-radius: var(--r-xl);
  overflow: hidden;
  width: 100%;
  max-width: 310px;
  box-shadow: 0 0 70px rgba(0,0,0,0.45), 0 0 25px rgba(108,210,58,0.07);
}
.demo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--bdr);
  background: rgba(255,255,255,0.02);
}
.demo-logo-sm { width: 26px; height: 26px; flex-shrink: 0; }
.demo-header span {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1rem;
}
.demo-server-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 15px;
  font-size: 0.72rem;
  background: rgba(108,210,58,0.04);
  border-bottom: 1px solid var(--bdr);
}
.demo-label { color: var(--tx-3); font-family: var(--ff-mono); }
.demo-value { color: var(--green-br); font-family: var(--ff-mono); font-size: 0.68rem; }
.demo-rooms { border-bottom: 1px solid var(--bdr); }
.demo-room {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background var(--t);
}
.demo-room:last-child { border-bottom: none; }
.demo-room:hover { background: rgba(255,255,255,0.03); }
.demo-room.active { background: rgba(108,210,58,0.06); }
.room-icon { width: 15px; height: 15px; color: var(--tx-3); flex-shrink: 0; }
.room-name { flex: 1; color: var(--tx-1); font-family: var(--ff-mono); font-size: 0.78rem; }
.room-badge {
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(108,210,58,0.07);
  color: var(--green-br);
  border: 1px solid rgba(108,210,58,0.14);
  font-family: var(--ff-mono);
}
.room-badge.locked {
  background: rgba(200,117,42,0.07);
  color: var(--amber-lt);
  border-color: rgba(200,117,42,0.18);
}
.add-room {
  color: var(--green-br);
  font-family: var(--ff-mono);
  font-size: 0.76rem;
  justify-content: center;
  opacity: 0.6;
  transition: opacity var(--t);
}
.add-room:hover { opacity: 1; }
.demo-messages {
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 110px;
}
.demo-msg {
  display: flex;
  gap: 7px;
  align-items: flex-end;
  font-size: 0.8rem;
}
.demo-msg.me { flex-direction: row-reverse; }
.msg-user {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  color: var(--tx-3);
  white-space: nowrap;
  margin-bottom: 1px;
}
.msg-text {
  background: rgba(255,255,255,0.07);
  padding: 6px 10px;
  border-radius: 12px 12px 12px 2px;
  color: var(--tx-1);
  font-size: 0.82rem;
  max-width: 150px;
}
.demo-msg.me .msg-text {
  background: rgba(108,210,58,0.13);
  border-radius: 12px 12px 2px 12px;
}
.demo-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--bdr);
  align-items: center;
}
.demo-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 0.78rem;
  color: var(--tx-3);
}
.demo-send {
  background: var(--green-br);
  color: #091209;
  border: none;
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 0.88rem;
  cursor: pointer;
  font-weight: 700;
  transition: background var(--t);
}
.demo-send:hover { background: #80e84e; }

/* Info items */
.chatrooms-info { display: flex; flex-direction: column; gap: 2.2rem; }
.info-item { display: flex; gap: 1.3rem; align-items: flex-start; }
.info-num {
  font-family: var(--ff-display);
  font-size: 1.8rem;
  line-height: 1;
  min-width: 44px;
  text-align: center;
  padding-top: 2px;
}
.info-item strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--tx-1);
  margin-bottom: 4px;
}
.info-item p {
  font-size: 0.86rem;
  color: var(--tx-2);
  line-height: 1.62;
  font-weight: 300;
}

/* ─── SETUP ──────────────────────────────────── */
.setup { position: relative; z-index: 1; }
.setup-sub {
  font-size: 0.98rem;
  color: var(--tx-2);
  max-width: 560px;
  margin-bottom: 3.2rem;
  margin-top: -2.2rem;
  font-weight: 300;
  line-height: 1.68;
}
.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  max-width: 660px;
  margin-bottom: 2.4rem;
}
.setup-step { display: flex; gap: 1.4rem; align-items: flex-start; }
.setup-num {
  font-family: var(--ff-display);
  font-size: 2.8rem;
  font-weight: 900;
  color: rgba(108,210,58,0.2);
  min-width: 48px;
  line-height: 1;
  margin-top: -4px;
  flex-shrink: 0;
}
.setup-step-content { flex: 1; }
.setup-step h3 {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--tx-1);
  margin-bottom: 0.7rem;
}
.code-block {
  background: var(--bg-term);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  padding: 12px 15px;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  justify-content: space-between;
  transition: border-color var(--t);
}
.code-block:hover { border-color: var(--bdr-h); }
.code-block code {
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  color: var(--tx-code);
  line-height: 1.62;
  white-space: pre-wrap;
  word-break: break-all;
}
.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--tx-3);
  padding: 4px;
  border-radius: 5px;
  flex-shrink: 0;
  transition: color var(--t), background var(--t);
  margin-top: 1px;
}
.copy-btn svg { width: 15px; height: 15px; display: block; }
.copy-btn:hover { color: var(--green-br); background: rgba(108,210,58,0.08); }
.copy-btn.copied { color: var(--green-br); }

/* Inline code */
.inline-code {
  font-family: var(--ff-mono);
  font-size: 0.85em;
  color: var(--tx-code);
  background: rgba(108,210,58,0.07);
  border: 1px solid rgba(108,210,58,0.15);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Setup note */
.setup-note {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem 1.4rem;
  background: rgba(108,210,58,0.04);
  border: 1px solid rgba(108,210,58,0.11);
  border-radius: var(--r);
  margin-bottom: 3.2rem;
  max-width: 660px;
}
.setup-note svg { width: 17px; height: 17px; color: var(--green-br); flex-shrink: 0; margin-top: 2px; }
.setup-note p { font-size: 0.86rem; color: var(--tx-2); line-height: 1.65; font-weight: 300; }

/* Download CTA */
.download-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ─── FOOTER ─────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--bdr);
  padding: 3.5rem 0;
  background: rgba(9,16,9,0.8);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  text-align: center;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 700;
}
.footer-icon { width: 30px; height: 30px; }
.footer-manifesto {
  font-size: 0.86rem;
  color: var(--tx-3);
  max-width: 400px;
  line-height: 1.65;
  font-weight: 300;
}
.footer-links { display: flex; gap: 2rem; }
.footer-links a {
  color: var(--tx-3);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color var(--t);
}
.footer-links a:hover { color: var(--green-br); }
.footer-copy {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: rgba(100, 92, 80, 0.6);
  letter-spacing: 0.04em;
}

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .security-layout, .chatrooms-layout { grid-template-columns: 1fr; gap: 3rem; }
  .terminal-wrap { position: relative; top: 0; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 7.5rem 1.5rem 4.5rem;
    gap: 2.5rem;
    min-height: auto;
  }
  .hero-desc { margin: 0 auto 2.2rem; }
  .hero-actions { justify-content: center; }
  .hero-badge { margin: 0 auto 1.8rem; }

  .hero-nut-wrap { width: 230px; height: 230px; }
  .hero-nut    { width: 165px; height: 165px; }
  .ring-1 { width: 192px; height: 192px; }
  .ring-2 { width: 228px; height: 228px; }
  .ring-3 { display: none; }

  .section-inner { padding: 4.5rem 1.5rem; }
  .features-grid { grid-template-columns: 1fr; }

  .tech-strip-inner { padding: 0 1.5rem; gap: 0.9rem; }
  .sep { display: none; }

  .setup-step { flex-direction: column; }
  .setup-num { font-size: 2rem; }

  .chatrooms-layout { gap: 3rem; }
  .chatrooms-info { gap: 1.6rem; }

  .download-cta { flex-direction: column; align-items: center; }
  .download-cta .btn { width: 100%; max-width: 360px; justify-content: center; }

  .footer-inner { padding: 0 1.5rem; }
  .footer-links { gap: 1.5rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.4rem; }
  .section-title { font-size: 1.8rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { text-align: center; justify-content: center; }
}
