/* ==========================================================
   CSS Custom Properties
   ========================================================== */
:root {
  --bg:           #0c0e14;
  --surface:      #131620;
  --surface-2:    #1a1e2c;
  --surface-3:    #222840;
  --border:       #2a2f44;
  --border-dim:   #1e2235;

  --accent:       #f5922e;
  --accent-light: rgba(245, 146, 46, 0.10);
  --accent-hover: #e07820;

  --blue:   #6ba3f5;
  --green:  #4bc990;
  --yellow: #f2ce4e;
  --red:    #f47367;
  --purple: #b97af7;

  --text:       #dde2f0;
  --text-muted: #7a84a0;
  --text-dim:   #49526a;

  --nav-h:       64px;
  --container-w: 1180px;
  --radius:      12px;
  --radius-sm:   8px;

  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.65);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.875em;
  background: var(--surface-3);
  color: var(--accent);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

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

/* ==========================================================
   Layout
   ========================================================== */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================
   Navigation
   ========================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(12, 14, 20, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-dim);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.3px;
}

.logo-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--accent) !important;
  color: #0c0e14 !important;
  font-weight: 600 !important;
  padding: 7px 16px !important;
  border-radius: 6px;
  font-size: 0.875rem !important;
  transition: background 0.15s !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  color: #0c0e14 !important;
}

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #0c0e14;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245, 146, 46, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-dim);
  background: var(--surface);
}

.btn-lg {
  font-size: 1rem;
  padding: 14px 28px;
}

/* ==========================================================
   Badges
   ========================================================== */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
  letter-spacing: 0.3px;
}

.badge-dev {
  border-color: rgba(245, 146, 46, 0.3);
  color: var(--accent);
  background: var(--accent-light);
}

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  padding: 86px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(245, 146, 46, 0.055) 0%, transparent 65%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-content-centered {
  grid-column: 1 / -1;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.hero-content-centered .hero-eyebrow {
  justify-content: center;
}

.hero-content-centered .hero-actions {
  justify-content: center;
}

.hero-content-centered .hero-subtitle {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 32px;
}

.hero-eyebrow {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -1.4px;
  margin-bottom: 20px;
  background: linear-gradient(145deg, var(--text) 55%, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.72;
  max-width: 460px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-platforms {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.6px;
}

/* ==========================================================
   App Window Mockup
   ========================================================== */
.hero-visual {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: -30px -20px -50px;
  background: radial-gradient(ellipse at 60% 40%, rgba(245, 146, 46, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.app-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  font-size: 11px;
  position: relative;
  z-index: 1;
  user-select: none;
}

/* Titlebar */
.app-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-dim);
}

.traffic-lights {
  display: flex;
  gap: 6px;
  margin-right: 6px;
}

.tl {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tl-red    { background: #ff5f57; }
.tl-yellow { background: #ffbd2e; }
.tl-green  { background: #28c940; }

.app-title-text {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  flex: 1;
  text-align: center;
}

.env-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 2px 9px;
  font-size: 10px;
  color: var(--text-muted);
}

.env-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* Body layout */
.app-body {
  display: flex;
  height: 360px;
  overflow: hidden;
}

/* Sidebar */
.app-sidebar {
  width: 138px;
  flex-shrink: 0;
  background: var(--surface-2);
  border-right: 1px solid var(--border-dim);
  padding: 8px 0;
  overflow: hidden;
}

.sidebar-heading {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-dim);
  padding: 5px 12px 4px;
  font-weight: 600;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}

.sidebar-active {
  background: rgba(245, 146, 46, 0.08);
  color: var(--text);
  border-right: 2px solid var(--accent);
}

.sidebar-divider {
  height: 1px;
  background: var(--border-dim);
  margin: 6px 12px;
}

/* HTTP method badges */
.m-get, .m-post, .m-put, .m-del, .m-patch {
  font-size: 8.5px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 1px 4px;
  border-radius: 2px;
  flex-shrink: 0;
}

.m-get   { color: var(--green);  background: rgba(75,  201, 144, 0.12); }
.m-post  { color: var(--blue);   background: rgba(107, 163, 245, 0.12); }
.m-put   { color: var(--yellow); background: rgba(242, 206,  78, 0.12); }
.m-del   { color: var(--red);    background: rgba(244, 115, 103, 0.12); }
.m-patch { color: var(--purple); background: rgba(185, 122, 247, 0.12); }

/* Editor area */
.app-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.url-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-dim);
  background: var(--surface-2);
  flex-shrink: 0;
}

.url-method {
  font-size: 9px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 3px 7px;
  border-radius: 3px;
  flex-shrink: 0;
}

.url-method.post { color: var(--blue);  background: rgba(107, 163, 245, 0.15); }
.url-method.get  { color: var(--green); background: rgba(75,  201, 144, 0.15); }

.url-text {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.url-segment {
  color: var(--text);
}

.send-btn {
  background: var(--accent);
  color: #0c0e14;
  font-weight: 700;
  font-size: 9px;
  padding: 4px 10px;
  border-radius: 4px;
  flex-shrink: 0;
  cursor: pointer;
}

.editor-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-dim);
  padding: 0 10px;
  flex-shrink: 0;
}

.etab {
  padding: 5px 8px;
  font-size: 10px;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.etab-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Code panes */
.code-pane {
  padding: 9px 12px;
  overflow: hidden;
  background: var(--surface);
}

.req-pane {
  height: 98px;
  border-bottom: 1px solid var(--border-dim);
  flex-shrink: 0;
}

.resp-pane {
  flex: 1;
  overflow: hidden;
}

.code-pane pre {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 10px;
  line-height: 1.75;
  color: var(--text-muted);
  white-space: pre;
}

/* JSON syntax tokens */
.j-brace { color: var(--text-muted); }
.j-key   { color: var(--blue); }
.j-str   { color: var(--green); }
.j-num   { color: var(--yellow); }
.j-bool  { color: var(--purple); }
.j-null  { color: var(--red); }
.j-var   { color: var(--accent); }
.j-p     { color: var(--text-dim); }

/* Response status bar */
.response-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
  background: var(--surface-2);
  flex-shrink: 0;
}

.status-pill {
  font-size: 9px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 2px 7px;
  border-radius: 3px;
}

.s2xx { color: var(--green);  background: rgba(75,  201, 144, 0.12); }
.s4xx { color: var(--yellow); background: rgba(242, 206,  78, 0.12); }
.s5xx { color: var(--red);    background: rgba(244, 115, 103, 0.12); }

.resp-meta {
  font-size: 9.5px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================
   Stats Strip
   ========================================================== */
.stats-strip {
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
  background: var(--surface);
  padding: 18px 0;
}

.stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 36px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stat-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

.stat-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
}

/* ==========================================================
   Section Headers
   ========================================================== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--text);
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ==========================================================
   Features
   ========================================================== */
.features {
  padding: 96px 0;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
}

.feature-icon-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  color: var(--accent);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.68;
}

/* ==========================================================
   Why Callsmith
   ========================================================== */
.why {
  padding: 96px 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 50%, var(--bg) 100%);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}

.why-card {
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border-dim);
}

.why-callsmith {
  background: linear-gradient(135deg, rgba(245, 146, 46, 0.05) 0%, var(--surface) 100%);
  border-color: rgba(245, 146, 46, 0.22);
}

.why-other {
  background: var(--surface);
}

.why-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-dim);
}

.why-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.why-badge {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(245, 146, 46, 0.28);
  padding: 2px 8px;
  border-radius: 100px;
}

.why-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.why-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.why-list li::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center;
}

.why-pro {
  color: var(--text);
}

.why-pro::before {
  background-color: rgba(75, 201, 144, 0.14);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 5l2.5 2.5L8.5 2.5' stroke='%234bc990' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.why-con::before {
  background-color: rgba(244, 115, 103, 0.14);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 2.5l5 5M7.5 2.5l-5 5' stroke='%23f47367' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ==========================================================
   Platforms
   ========================================================== */
.platforms {
  padding: 96px 0;
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 680px;
  margin: 0 auto 28px;
}

.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 20px;
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}

.platform-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
}

.platform-os-icon {
  color: var(--text-dim);
  margin-bottom: 14px;
  transition: color 0.2s;
}

.platform-card:hover .platform-os-icon {
  color: var(--accent);
}

.platform-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.platform-arch {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.platforms-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ==========================================================
   CTA
   ========================================================== */
.cta {
  padding: 96px 0;
  background: var(--surface);
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(245, 146, 46, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
}

.cta h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 14px;
  color: var(--text);
}

.cta p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================
   Footer
   ========================================================== */
footer {
  padding: 60px 0 0;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-dim);
}

.footer-brand {
  max-width: 260px;
}

.footer-logo {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  gap: 60px;
}

.footer-nav-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav-group h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.footer-nav-group a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-nav-group a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 22px 0;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-bottom a {
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-bottom a:hover {
  color: var(--text);
}

/* ==========================================================
   Responsive — Tablet
   ========================================================== */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
    max-width: 100%;
  }

  .app-window {
    max-width: 100%;
  }

  .hero-subtitle {
    max-width: 100%;
  }

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

  .why-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-nav {
    gap: 40px;
  }
}

/* ==========================================================
   Responsive — Mobile
   ========================================================== */
@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .hero {
    padding: 60px 0 72px;
  }

  .hero h1 {
    letter-spacing: -1px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .platforms-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
  }

  .stats-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .stat-sep {
    display: none;
  }

  .stat-item {
    padding: 5px 0;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .cta-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-nav {
    flex-direction: column;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .app-window {
    font-size: 9px;
    max-width: 100%;
    width: 100%;
  }

  .app-body {
    height: 260px;
  }

  .app-sidebar {
    width: 96px;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}
