/* ────────────────────────────────────────────────────────────────
   Glovix landing — Anthropic-ish cream palette × chat cyan accent
   ──────────────────────────────────────────────────────────────── */

:root {
  /* Palette */
  --cream: #f6f5f1;
  --cream-2: #eeece4;
  --ink: #1a1a1a;
  --ink-soft: #2e2e2e;
  --muted: #6a6862;
  --muted-2: #9c998f;
  --border: #e3dfd4;
  --border-soft: #ece8dd;
  --accent: hsl(185, 48%, 32%);
  --accent-hover: hsl(185, 50%, 26%);
  --accent-soft: hsl(185, 45%, 94%);
  --ok: hsl(142, 55%, 38%);
  --card: #fffefa;
  --shadow-sm: 0 1px 2px rgba(30, 28, 22, 0.04), 0 0 0 1px rgba(30, 28, 22, 0.03);
  --shadow-md: 0 4px 24px -6px rgba(30, 28, 22, 0.08), 0 0 0 1px rgba(30, 28, 22, 0.04);
  --shadow-lg: 0 24px 60px -20px rgba(30, 28, 22, 0.18), 0 0 0 1px rgba(30, 28, 22, 0.05);

  /* Type */
  --f-serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --f-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

/* ────────────────────────────────────────────────────────────────
   NAV
   ──────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(246, 245, 241, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled {
  border-bottom-color: var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a {
  transition: color 0.15s ease;
}
.nav-links a:hover {
  color: var(--ink);
}

.nav-cta {
  font-size: 13px;
  padding: 8px 14px;
}

@media (max-width: 720px) {
  .nav {
    padding: 14px 20px;
  }
  .nav-links {
    display: none;
  }
}

/* ────────────────────────────────────────────────────────────────
   BUTTONS
   ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  border-radius: 999px;
  padding: 10px 18px;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--card);
  border-color: #c8c3b4;
}
.btn-lg {
  font-size: 15px;
  padding: 13px 24px;
}
.btn-xl {
  font-size: 16px;
  padding: 16px 30px;
}

/* ────────────────────────────────────────────────────────────────
   HERO
   ──────────────────────────────────────────────────────────────── */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 40px 120px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 72px;
  align-items: center;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 48px 24px 80px;
    gap: 48px;
  }
}

.hero-inner {
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 24px;
}
.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 hsla(185, 48%, 32%, 0.5); }
  70% { box-shadow: 0 0 0 10px hsla(185, 48%, 32%, 0); }
  100% { box-shadow: 0 0 0 0 hsla(185, 48%, 32%, 0); }
}

.hero-title {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--ink);
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 36px;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted-2);
}
.dot {
  color: var(--muted-2);
  opacity: 0.5;
}

/* ─── Chat mock ─── */
.hero-mock {
  position: relative;
}
.mock-window {
  background: #0e0e0e;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
  transform: rotate(0.4deg);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mock-window:hover {
  transform: rotate(0deg) translateY(-4px);
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  background: #151515;
  border-bottom: 1px solid #242424;
}
.mock-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.mock-url {
  flex: 1;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 11px;
  color: #888;
  background: #0e0e0e;
  border: 1px solid #242424;
  border-radius: 6px;
  padding: 3px 10px;
  margin-left: 12px;
}
.mock-body {
  padding: 20px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13px;
  color: #d8d8d8;
}
.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  line-height: 1.4;
}
.msg-user {
  align-self: flex-end;
  background: #1e1e1e;
  color: #e8e8e8;
  border-bottom-right-radius: 4px;
}
.msg-assistant {
  align-self: flex-start;
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #161616;
  border: 1px solid #262626;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  color: #ccc;
  width: fit-content;
  max-width: 100%;
}
.tool-pill svg {
  color: hsl(185, 70%, 55%);
  flex-shrink: 0;
}
.tool-detail {
  color: #888;
  font-family: var(--f-mono);
  font-size: 11px;
  margin-left: auto;
  padding-left: 8px;
}
.tool-ok {
  color: hsl(142, 60%, 55%);
  font-weight: 600;
  font-size: 11px;
  margin-left: auto;
  padding-left: 8px;
}
.mock-text {
  color: #ccc;
  padding: 0 2px;
  margin-top: 4px;
}
.mock-preview-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: hsla(185, 55%, 18%, 0.6);
  border: 1px solid hsl(185, 55%, 30%);
  color: hsl(185, 70%, 75%);
  padding: 8px 12px;
  border-radius: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  width: fit-content;
}

.mock-shadow {
  position: absolute;
  inset: auto 0 -30px 0;
  height: 40px;
  background: radial-gradient(ellipse at center, rgba(30, 28, 22, 0.18) 0%, transparent 70%);
  filter: blur(8px);
  z-index: 1;
}

/* ────────────────────────────────────────────────────────────────
   SECTIONS
   ──────────────────────────────────────────────────────────────── */
.section-head {
  max-width: 720px;
  margin: 0 auto 64px;
  text-align: center;
}
.section-title {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-top: 16px;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ─── FEATURES ─── */
.features {
  max-width: 1180px;
  margin: 0 auto;
  padding: 80px 40px;
}

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

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .features {
    padding: 56px 20px;
  }
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 28px 26px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.feature-card:hover {
  border-color: #cfc9b8;
  transform: translateY(-2px);
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature-card h3 {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* ─── HOW IT WORKS ─── */
.how {
  background: var(--cream-2);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 96px 40px;
}
@media (max-width: 600px) {
  .how {
    padding: 64px 20px;
  }
}

.steps {
  list-style: none;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step {
  display: flex;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child {
  border-bottom: none;
}
.step-num {
  font-family: var(--f-serif);
  font-size: 48px;
  line-height: 1;
  color: var(--muted-2);
  font-weight: 400;
  font-style: italic;
  min-width: 100px;
}
.step-body h3 {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.step-body p {
  font-size: 15.5px;
  color: var(--muted);
  max-width: 560px;
}

.how-cta {
  text-align: center;
  margin-top: 56px;
}

/* ─── E2B THANKS ─── */
.thanks {
  padding: 120px 40px;
  background:
    radial-gradient(ellipse at 30% 0%, hsla(185, 48%, 92%, 0.6) 0%, transparent 50%),
    var(--cream);
}
@media (max-width: 600px) {
  .thanks {
    padding: 80px 20px;
  }
}
.thanks-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.thanks-accent {
  font-style: italic;
  color: var(--accent);
}
.thanks-text {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  margin: 24px auto 40px;
  max-width: 600px;
}
.thanks-text a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  transition: color 0.15s ease;
}
.thanks-text a:hover {
  color: var(--accent-hover);
}

.e2b-banner {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}
.e2b-banner:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.e2b-banner > img {
  width: 100%;
  height: auto;
  display: block;
}
/* Fallback inside banner: hidden when real <img> loads, shown when <img>
   is removed by onerror. The JS handler removes the <img> and adds
   .e2b-banner--fallback class to the anchor so CSS knows to show this. */
.e2b-banner-fallback {
  display: none;
  padding: 56px 32px;
  text-align: center;
}
.e2b-banner:has(> img) .e2b-banner-fallback,
.e2b-banner:not(.e2b-banner--fallback) .e2b-banner-fallback {
  display: none;
}
.e2b-banner--fallback .e2b-banner-fallback {
  display: block;
}
.e2b-banner-fallback img {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: block;
  color: var(--ink);
}
.e2b-banner-fallback-title {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 12px;
}
.e2b-banner-fallback-sub {
  font-size: 14px;
  color: var(--muted);
}

.thanks-footer {
  margin-top: 32px;
}
.e2b-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #000;
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  transition: transform 0.2s ease;
}
.e2b-logo-link:hover {
  transform: translateY(-1px);
}
.e2b-logo {
  width: 18px;
  height: 18px;
  filter: invert(1);
}

/* ─── FINAL CTA ─── */
.final-cta {
  text-align: center;
  padding: 120px 40px;
  border-top: 1px solid var(--border-soft);
}
@media (max-width: 600px) {
  .final-cta {
    padding: 80px 20px;
  }
}
.final-title {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.final-sub {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 36px;
}

/* ─── FOOTER ─── */
.foot {
  border-top: 1px solid var(--border);
  padding: 40px;
  background: var(--cream);
}
@media (max-width: 600px) {
  .foot {
    padding: 32px 20px;
  }
}
.foot-row {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.foot-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--muted);
  flex-wrap: wrap;
}
.foot-links a {
  transition: color 0.15s ease;
}
.foot-links a:hover {
  color: var(--ink);
}
.foot-bottom {
  max-width: 1180px;
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted-2);
}
.foot-bottom a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.foot-bottom a:hover {
  border-bottom-color: currentColor;
}

/* Motion reduce */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
