@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");
@import "./tokens.css";

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 80px;
}

@media (max-width: 1023px) {
  .container {
    padding: 0 32px;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 20px;
  }
}

/* ─── Top bars (Section 1) ─── */
.terminal-bar {
  background: #000;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 24px;
  letter-spacing: 0.02em;
}

.terminal-bar .cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.live-banner {
  background: #ea580c;
  color: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 10px 16px;
  text-transform: uppercase;
}

.live-banner a {
  color: inherit;
}

.live-banner a:hover {
  text-decoration: underline;
}

/* ─── Nav ─── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 40px;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0);
  transition: background 200ms var(--ease), border-color 200ms var(--ease);
  pointer-events: none;
}

.site-nav.scrolled {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border);
}

.site-nav a {
  pointer-events: auto;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-nav.light a {
  color: #fff;
}

.site-nav.dark a {
  color: var(--heading);
}

.site-nav.has-bars {
  top: 68px;
}

/* ─── Buttons ─── */
.btn-get-started {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  height: 52px;
  padding: 0 32px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--heading);
  background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 100%);
  border: 1px solid #94a3b8;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 4px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.btn-get-started:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-get-started:active {
  transform: scale(0.98);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--primary-600);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 200ms var(--ease), transform 200ms var(--ease);
}

.btn-primary:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* ─── Section 1: Office Hero ─── */
.hero-office {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  margin-top: 68px;
}

.hero-office__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%),
    url("https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=2000&q=80") center/cover no-repeat;
  filter: grayscale(100%) contrast(1.1);
}

.hero-office__content {
  position: relative;
  z-index: 2;
  padding: 120px 24px 80px;
  max-width: 900px;
}

.hero-office__logo {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 400;
  margin: 0 0 32px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

.hero-office__headline {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 40px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-office__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  opacity: 0.85;
  z-index: 2;
}

/* ─── Section 2: CRT Desk ─── */
.hero-desk {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 80px 24px 120px;
  background: #d4d4d4 url("https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?auto=format&fit=crop&w=2000&q=80") center/cover;
  background-blend-mode: overlay;
}

.hero-desk__logo {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 56px);
  color: var(--heading);
  margin: 0 0 48px;
}

.hero-desk__lines {
  text-align: center;
  margin-bottom: 48px;
  max-width: 640px;
}

.hero-desk__lines p {
  margin: 0 0 12px;
  font-size: clamp(18px, 2.5vw, 24px);
  line-height: 1.4;
}

.hero-desk__lines .fade {
  color: #94a3b8;
  font-weight: 400;
}

.hero-desk__lines .bold {
  color: var(--heading);
  font-weight: 700;
  font-size: clamp(20px, 3vw, 28px);
}

.hero-desk__scene {
  position: relative;
  width: min(720px, 100%);
  margin-top: 24px;
}

.desk-setup {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.crt-monitor {
  width: 200px;
  height: 160px;
  background: #1a1a1a;
  border-radius: 8px 8px 4px 4px;
  border: 4px solid #333;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.crt-screen {
  width: 88%;
  height: 78%;
  background: #0a0a0a;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.2;
  box-shadow: inset 0 0 20px rgba(0, 255, 100, 0.05);
}

.crt-face .eyes { letter-spacing: 8px; }
.crt-face .mouth { margin-top: 4px; }

.desk-table {
  width: 320px;
  height: 12px;
  background: linear-gradient(180deg, #e2e8f0, #94a3b8);
  margin-top: -4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.desk-legs {
  display: flex;
  justify-content: space-between;
  width: 300px;
  margin-top: 0;
}

.desk-legs span {
  width: 4px;
  height: 80px;
  background: linear-gradient(180deg, #cbd5e1, #64748b);
}

.office-chair {
  width: 120px;
  height: 100px;
  margin-top: -20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100'%3E%3Cellipse cx='60' cy='55' rx='45' ry='35' fill='%231e293b'/%3E%3Crect x='50' y='75' width='20' height='20' fill='%23334155'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0.9;
}

.hero-desk .btn-get-started {
  margin-top: 48px;
}

/* ─── Section 3: AI Team ─── */
.hero-team {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px 24px;
  background: var(--bg);
  text-align: center;
}

.hero-team__copy {
  max-width: 520px;
  margin-bottom: 48px;
}

.hero-team__copy p {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  color: var(--heading);
  margin: 0 0 8px;
  line-height: 1.35;
}

.hero-team__copy .tagline {
  margin-top: 24px;
  font-weight: 600;
}

.team-illustration {
  width: min(640px, 100%);
  margin: 0 auto 48px;
  filter: grayscale(100%) contrast(1.05);
}

.team-illustration svg {
  width: 100%;
  height: auto;
}

/* ─── Section 4: Cloud CTA ─── */
.hero-cloud {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(248, 250, 252, 0.85) 100%),
    url("https://images.unsplash.com/photo-1534088568595-a066f410cbca?auto=format&fit=crop&w=2000&q=80") center/cover no-repeat;
}

.hero-cloud h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  color: var(--heading);
  margin: 0 0 40px;
  letter-spacing: -0.02em;
}

.hero-cloud .fine-print {
  margin-top: 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--caption);
}

/* ─── Agents section ─── */
.section-agents {
  padding: 128px 0;
  background: var(--surface);
}

.section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-600);
  margin-bottom: 16px;
}

.section-title {
  font-size: 40px;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.section-desc {
  font-size: 18px;
  line-height: 1.55;
  color: var(--body);
  max-width: 640px;
  margin: 0 0 48px;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1023px) {
  .agents-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639px) {
  .agents-grid {
    grid-template-columns: 1fr;
  }
}

.agent-card {
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 400ms var(--ease), transform 400ms var(--ease);
}

.agent-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.agent-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.agent-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 8px;
}

.agent-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  margin: 0;
}

/* ─── Features ─── */
.section-features {
  padding: 128px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 767px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 32px;
  transition: transform 400ms var(--ease);
}

.feature-card.tilt {
  transform-style: preserve-3d;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 8px;
}

.feature-card p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  color: var(--body);
}

.badge-accent {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
}

/* ─── Dashboard mock ─── */
.section-dashboard {
  padding: 128px 0;
  background: var(--secondary);
  color: #fff;
}

.dashboard-mock {
  background: #1e293b;
  border-radius: 16px;
  border: 1px solid #334155;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}

.dashboard-mock__bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #0f172a;
  border-bottom: 1px solid #334155;
}

.dashboard-mock__bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #475569;
}

.dashboard-mock__bar span:first-child { background: #ef4444; }
.dashboard-mock__bar span:nth-child(2) { background: #f59e0b; }
.dashboard-mock__bar span:nth-child(3) { background: #22c55e; }

.dashboard-mock__body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: #94a3b8;
}

.dashboard-mock__body .highlight {
  color: #a5b4fc;
}

.dashboard-mock__body .success {
  color: #4ade80;
}

/* ─── Footer CTA ─── */
.section-footer-cta {
  padding: 96px 0;
  text-align: center;
  background: var(--primary-50);
}

.section-footer-cta h2 {
  font-size: 40px;
  font-weight: 700;
  color: var(--heading);
  margin: 0 0 24px;
}

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  color: var(--caption);
}

/* ─── Scroll animations ─── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 50ms; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 100ms; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 150ms; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 200ms; opacity: 1; transform: none; }
#signup-email:focus,
#signup-idea:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}
