/* ============================================================
   Cloud9 Technology — Design Tokens
   Concept: "Above the horizon" — a night-sky base with a thin
   gradient horizon line as the recurring signature motif.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Color */
  --c-base:      #0a0e1a;
  --c-surface:    #10152459d;
  --c-surface-solid: #10152a;
  --c-surface-raised: #161d33;
  --c-line:       #232b45;
  --c-line-soft:  #1a2138;
  --c-teal:       #4fd1c5;
  --c-teal-dim:   #4fd1c533;
  --c-amber:      #f0a868;
  --c-amber-dim:  #f0a86833;
  --c-text:       #edf1fa;
  --c-text-muted: #8a93ac;
  --c-text-faint: #5b637d;

  /* Type */
  --f-display: 'Space Grotesk', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', 'SF Mono', monospace;

  /* Layout */
  --max-w: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-base);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* subtle ambient star/noise field behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(237,241,250,0.35), transparent 60%),
    radial-gradient(1px 1px at 78% 8%, rgba(237,241,250,0.25), transparent 60%),
    radial-gradient(1px 1px at 45% 32%, rgba(237,241,250,0.2), transparent 60%),
    radial-gradient(1px 1px at 92% 42%, rgba(237,241,250,0.3), transparent 60%),
    radial-gradient(1px 1px at 25% 65%, rgba(237,241,250,0.18), transparent 60%),
    radial-gradient(1px 1px at 60% 78%, rgba(237,241,250,0.22), transparent 60%),
    linear-gradient(180deg, #0a0e1a 0%, #0b1020 55%, #0a0e1a 100%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Typography ---------- */
h1, h2, h3, .display {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--c-text);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.15; }
h3 { font-size: 1.25rem; line-height: 1.3; }

p { color: var(--c-text-muted); margin: 0; }
.lede { font-size: 1.15rem; color: var(--c-text-muted); max-width: 620px; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-teal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-teal);
  box-shadow: 0 0 8px 1px var(--c-teal);
}
.eyebrow.amber { color: var(--c-amber); }
.eyebrow.amber::before { background: var(--c-amber); box-shadow: 0 0 8px 1px var(--c-amber); }

.mono { font-family: var(--f-mono); }

/* ---------- Nav ---------- */
header.site-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 14, 26, 0.72);
  border-bottom: 1px solid var(--c-line-soft);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-display); font-weight: 600; font-size: 1.05rem;
  color: var(--c-text);
}
.brand .mark {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #7fe9dd, var(--c-teal) 55%, #23847b 100%);
  box-shadow: 0 0 14px 1px var(--c-teal-dim);
}
.nav-links {
  display: flex; align-items: center; gap: 34px;
  font-size: 0.92rem;
}
.nav-links a { color: var(--c-text-muted); transition: color .18s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--c-text); }
.nav-cta {
  border: 1px solid var(--c-line);
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 0.88rem;
  color: var(--c-text) !important;
  transition: border-color .18s ease, background .18s ease;
}
.nav-cta:hover { border-color: var(--c-teal); background: var(--c-teal-dim); }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px;
  border-radius: 100px;
  font-size: 0.94rem; font-weight: 500;
  font-family: var(--f-body);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #6ee9dc, var(--c-teal));
  color: #06231f;
  font-weight: 600;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -8px var(--c-teal-dim); }
.btn-ghost {
  border-color: var(--c-line);
  color: var(--c-text);
}
.btn-ghost:hover { border-color: var(--c-teal); }
.btn-amber {
  background: linear-gradient(135deg, #f5c397, var(--c-amber));
  color: #2b1907; font-weight: 600;
}
.btn-amber:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -8px var(--c-amber-dim); }

/* ---------- Sections ---------- */
section { padding: 96px 0; position: relative; }
.section-tight { padding: 64px 0; }
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-line) 20%, var(--c-line) 80%, transparent);
  border: none;
  margin: 0;
}

/* Horizon line — signature motif */
.horizon {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-teal) 15%, var(--c-amber) 50%, var(--c-teal) 85%, transparent);
  opacity: 0.55;
  margin: 0;
}

/* ---------- Grids & Cards ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.card {
  background: linear-gradient(180deg, var(--c-surface-raised), var(--c-surface-solid));
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 30px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--c-line-soft); }

.product-card {
  background: var(--c-surface-solid);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s ease, border-color .25s ease;
}
.product-card:hover { transform: translateY(-4px); border-color: var(--c-line-soft); }
.product-card .pad { padding: 32px; }
.product-card .tag {
  display: inline-block;
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: 100px;
  border: 1px solid var(--c-line); color: var(--c-text-muted);
  margin-bottom: 16px; text-transform: uppercase;
}
.tag.live { color: var(--c-teal); border-color: var(--c-teal-dim); background: var(--c-teal-dim); }
.tag.pilot { color: var(--c-amber); border-color: var(--c-amber-dim); background: var(--c-amber-dim); }

/* ---------- Browser / device mockup frame ---------- */
.mockup {
  border-radius: var(--radius);
  border: 1px solid var(--c-line);
  background: var(--c-surface-solid);
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.6);
}
.mockup .chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--c-line);
  background: #0d1224;
}
.mockup .dot { width: 9px; height: 9px; border-radius: 50%; background: #2a3250; }
.mockup .chrome .url {
  margin-left: 12px;
  font-family: var(--f-mono); font-size: 0.72rem; color: var(--c-text-faint);
  background: #0a0e1c; padding: 4px 12px; border-radius: 6px; flex: 1;
}
.mockup .screen { padding: 22px; }

/* dashboard mock elements */
.mock-agentgrid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 14px; }
.mock-agent {
  background: var(--c-surface-raised); border: 1px solid var(--c-line);
  border-radius: 10px; padding: 14px;
}
.mock-agent .dotstat { width:7px;height:7px;border-radius:50%; display:inline-block; margin-right:6px; }
.mock-agent .name { font-size: 0.78rem; color: var(--c-text); font-weight: 600; margin-bottom: 6px; }
.mock-agent .stat { font-family: var(--f-mono); font-size: 0.68rem; color: var(--c-text-faint); }
.mock-bar { height: 6px; border-radius: 4px; background: var(--c-line-soft); overflow: hidden; margin-top:8px;}
.mock-bar > span { display:block; height:100%; background: linear-gradient(90deg, var(--c-teal), var(--c-amber)); }
.mock-feed { background: var(--c-surface-raised); border: 1px solid var(--c-line); border-radius: 10px; padding: 14px; }
.mock-feed .row { display:flex; justify-content:space-between; padding: 7px 0; border-bottom: 1px solid var(--c-line-soft); font-size: 0.75rem; }
.mock-feed .row:last-child { border-bottom: none; }
.mock-feed .row span:first-child { color: var(--c-text-muted); }
.mock-feed .row span:last-child { font-family: var(--f-mono); color: var(--c-text-faint); }

/* placeholder note used to mark where a real screenshot should replace the mockup */
.mock-note {
  margin-top: 10px;
  font-family: var(--f-mono); font-size: 0.68rem;
  color: var(--c-text-faint);
  text-align: center;
}

/* call mockup for Callifai */
.call-mock { display:flex; flex-direction:column; gap:10px; }
.call-mock .bubble {
  max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 0.82rem;
}
.call-mock .agent { align-self: flex-start; background: var(--c-surface-raised); border:1px solid var(--c-line); border-bottom-left-radius: 4px; }
.call-mock .lead { align-self: flex-end; background: var(--c-teal-dim); border: 1px solid var(--c-teal-dim); border-bottom-right-radius: 4px; color:#c8fff7;}
.waveform { display:flex; align-items:flex-end; gap:3px; height: 36px; margin: 6px 0; }
.waveform span { width:3px; background: linear-gradient(180deg, var(--c-teal), var(--c-amber)); border-radius:2px; opacity:.75; }

/* ---------- Stats ---------- */
.stat-row { display:flex; gap: 48px; flex-wrap: wrap; }
.stat .num { font-family: var(--f-display); font-size: 2.1rem; font-weight: 600; color: var(--c-text); }
.stat .label { font-size: 0.82rem; color: var(--c-text-muted); margin-top: 4px; }

/* ---------- Pricing ---------- */
.price-card { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 28px; background: var(--c-surface-solid); }
.price-card.featured { border-color: var(--c-teal-dim); background: linear-gradient(180deg, #12241f, var(--c-surface-solid)); }
.price-card .amt { font-family: var(--f-display); font-size: 2.4rem; color: var(--c-text); margin: 12px 0 4px; }
.price-card .amt span { font-size: 0.95rem; color: var(--c-text-muted); font-family: var(--f-body); }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.price-card li { font-size: 0.86rem; color: var(--c-text-muted); padding-left: 18px; position: relative; }
.price-card li::before { content: "—"; position: absolute; left: 0; color: var(--c-teal); }

/* ---------- Legal / investor table ---------- */
.legal-table { width: 100%; border-collapse: collapse; font-family: var(--f-mono); font-size: 0.86rem; }
.legal-table tr { border-bottom: 1px solid var(--c-line-soft); }
.legal-table td { padding: 14px 0; vertical-align: top; }
.legal-table td:first-child { color: var(--c-text-faint); width: 240px; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; padding-top: 17px;}
.legal-table td:last-child { color: var(--c-text); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--c-line-soft); padding: 56px 0 34px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
footer h4 { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-text-faint); margin-bottom: 14px; }
footer a, footer p { font-size: 0.86rem; color: var(--c-text-muted); }
footer .flinks { display:flex; flex-direction:column; gap: 10px; }
footer .flinks a:hover { color: var(--c-teal); }
.foot-bottom { display:flex; justify-content:space-between; align-items:center; margin-top: 48px; font-size: 0.78rem; color: var(--c-text-faint); flex-wrap: wrap; gap: 12px;}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .stat-row { gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

:focus-visible {
  outline: 2px solid var(--c-teal);
  outline-offset: 3px;
}
