/* ============================================================
   SSH Workbench — Landing Page
   Mobile-first, dark terminal aesthetic
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0A0E14;
  --bg-alt:      #10141A;
  --bg-card:     #181C22;
  --bg-card-h:   #1E2430;
  --teal:        #79DCDC;
  --teal-dim:    #4AADAD;
  --teal-glow:   rgba(121, 220, 220, 0.12);
  --gold:        #D4A843;
  --green:       #4EC9B0;
  --amber:       #E5A84B;
  --violet:      #B48EAD;
  --red:         #BF616A;
  --blue:        #81A1C1;
  --text:        #E4ECEC;
  --text-sec:    #A0ACAC;
  --text-muted:  #7A8888;
  --divider:     #252B35;
  --radius:      10px;
  --radius-lg:   16px;
  --font:        'Space Grotesk', system-ui, -apple-system, sans-serif;
  --mono:        'JetBrains Mono', 'Cascadia Mono', 'Fira Mono', monospace;
  --max-w:       1120px;
  --nav-h:       60px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dim); }

img { max-width: 100%; display: block; }

/* --- Utility --- */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s;
}
.nav--scrolled {
  background: rgba(10, 14, 20, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--divider);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.3px;
}
.nav-logo:hover { color: var(--text); }
.nav-logo-img {
  width: 32px; height: 32px;
  border-radius: 8px;
}
.nav-logo-text {
  display: none;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav menu */
.nav-links {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(10, 14, 20, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  list-style: none;
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.3s;
  border-bottom: 1px solid var(--divider);
}
.nav-links.open {
  transform: translateY(0);
  opacity: 1;
}
.nav-links li a {
  display: block;
  padding: 14px 16px;
  color: var(--text-sec);
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.nav-links li a:hover,
.nav-links li a:active {
  background: var(--teal-glow);
  color: var(--teal);
}
.nav-btn--outline {
  border: 1px solid var(--divider) !important;
  text-align: center;
  margin-top: 8px;
}
.nav-btn--muted { color: var(--text-muted) !important; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.2px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  border: none;
  min-height: 48px;                /* touch target */
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  background: var(--teal);
  color: var(--bg);
}
.btn--primary:hover {
  background: var(--teal-dim);
  color: var(--bg);
  box-shadow: 0 0 24px var(--teal-glow);
}
.btn--ghost {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--divider);
}
.btn--ghost:hover {
  border-color: var(--teal-dim);
  background: var(--teal-glow);
  color: var(--teal);
}
.btn--large {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* --- Hero --- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 24px) 0 40px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(121,220,220,0.06) 0%, transparent 60%),
    var(--bg);
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--teal-glow);
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 20px;
  border: 1px solid rgba(121, 220, 220, 0.15);
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(2rem, 7vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-sec);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

/* Terminal mockup */
.hero-terminal {
  width: 100%;
  max-width: 600px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--divider);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: #1A1F28;
  border-bottom: 1px solid var(--divider);
}
.terminal-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.terminal-dot--red   { background: #BF616A; }
.terminal-dot--yellow { background: #EBCB8B; }
.terminal-dot--green  { background: #A3BE8C; }
.terminal-title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.terminal-body {
  background: var(--bg-alt);
  padding: 16px;
  font-family: var(--mono);
  font-size: clamp(0.72rem, 2vw, 0.85rem);
  line-height: 1.8;
}
.terminal-line { white-space: nowrap; overflow: hidden; }
.t-prompt { color: var(--teal); }
.t-muted  { color: var(--text-muted); }
.t-green  { color: var(--green); }
.t-cursor { color: var(--teal); animation: none; }
.t-cursor--off { opacity: 0; }

/* --- Stats --- */
.stats {
  padding: 48px 0;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  background: var(--bg-alt);
}
.stats-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -1px;
  font-family: var(--mono);
}
.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* --- Features --- */
.features {
  padding: 80px 0;
  background: var(--bg);
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.section-sub {
  color: var(--text-sec);
  font-size: 1rem;
  max-width: 500px;
  margin-bottom: 48px;
  line-height: 1.6;
}
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.3s, transform 0.2s, background 0.3s;
}
.feature-card:hover {
  border-color: var(--teal-dim);
  background: var(--bg-card-h);
}
.feature-icon {
  width: 40px; height: 40px;
  color: var(--teal);
  margin-bottom: 16px;
}
.feature-icon svg { width: 100%; height: 100%; }
.feature-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.feature-desc {
  font-size: 0.9rem;
  color: var(--text-sec);
  line-height: 1.65;
}

/* --- Security --- */
.security {
  padding: 80px 0;
  background: var(--bg-alt);
}
.security-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.security-item {
  padding: 24px;
  border-left: 3px solid var(--teal);
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.security-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}
.security-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.security-item p {
  font-size: 0.85rem;
  color: var(--text-sec);
  line-height: 1.65;
}

/* --- Roadmap --- */
.roadmap {
  padding: 80px 0;
  background: var(--bg);
}
.roadmap-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.roadmap-card {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}
.roadmap-status {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 14px;
}
.roadmap-status--active {
  background: rgba(78, 201, 176, 0.15);
  color: var(--green);
}
.roadmap-status--next {
  background: rgba(121, 220, 220, 0.12);
  color: var(--teal);
}
.roadmap-status--future {
  background: rgba(180, 142, 173, 0.12);
  color: var(--violet);
}
.roadmap-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.roadmap-card p {
  font-size: 0.9rem;
  color: var(--text-sec);
  line-height: 1.65;
}

/* --- CTA --- */
.cta {
  padding: 80px 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(121,220,220,0.06) 0%, transparent 60%),
    var(--bg-alt);
  text-align: center;
  border-top: 1px solid var(--divider);
}
.cta-icon { margin-bottom: 20px; }
.cta-app-icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.cta-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.cta-sub {
  color: var(--text-sec);
  font-size: 1rem;
  margin-bottom: 32px;
}
.cta-actions {
  display: flex;
  justify-content: center;
}

/* --- Footer --- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--divider);
  background: var(--bg);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
}
.footer-company {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--teal); }
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Reveal animation --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive — Tablet (640px+)
   ============================================================ */
@media (min-width: 640px) {
  .nav-logo-text { display: inline; }

  .stats-inner {
    grid-template-columns: repeat(4, 1fr);
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .security-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .roadmap-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-terminal {
    max-width: 560px;
  }
}

/* ============================================================
   Responsive — Desktop (960px+)
   ============================================================ */
@media (min-width: 960px) {
  :root { --nav-h: 64px; }

  /* Desktop nav */
  .nav-toggle { display: none; }

  .nav-links {
    position: static;
    flex-direction: row;
    align-items: center;
    transform: none;
    opacity: 1;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    gap: 4px;
    border-bottom: none;
  }
  .nav-links li a {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  .nav-btn--outline {
    margin-top: 0 !important;
  }

  /* Hero side-by-side */
  .hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    align-items: center;
    gap: 0 48px;
  }
  .hero-badge   { grid-column: 1; }
  .hero-title   { grid-column: 1; }
  .hero-sub     { grid-column: 1; }
  .hero-actions { grid-column: 1; }
  .hero-terminal {
    grid-column: 2;
    grid-row: 1 / span 4;
    max-width: 100%;
    justify-self: end;
  }

  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .security-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .roadmap-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-card:hover {
    transform: translateY(-3px);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ============================================================
   Responsive — Large (1200px+)
   ============================================================ */
@media (min-width: 1200px) {
  .hero-title {
    font-size: 3.8rem;
  }
  .stat-num {
    font-size: 2.2rem;
  }
}

/* ============================================================
   Touch & accessibility
   ============================================================ */
@media (hover: none) {
  .feature-card:hover {
    transform: none;
    border-color: var(--divider);
    background: var(--bg-card);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* Ensure touch targets are at least 44px */
@media (pointer: coarse) {
  .nav-links li a { min-height: 48px; display: flex; align-items: center; }
  .btn { min-height: 48px; }
  .footer-links a { padding: 8px 4px; min-height: 44px; display: inline-flex; align-items: center; }
}
