/* CLIDE — marketing site styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #141414;
  color: rgba(255,255,255,0.9);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* Gradient accent — black > dark brown > gold */
.grad {
  background: linear-gradient(135deg, #000000 0%, #3b1a08 45%, #c8860a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

a { color: inherit; }

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Sticky nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10,10,10,0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #3d3c3c;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-brand {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.85rem;
}

.nav-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: #e8a020; }

.nav-github {
  display: inline-flex;
  align-items: center;
}

.nav-github svg {
  width: 18px;
  height: 18px;
}

/* Mobile menu toggle (CSS-only, no JS) */
.nav-toggle { display: none; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.nav-burger span {
  display: block;
  height: 2px;
  width: 22px;
  background: rgba(255,255,255,0.7);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

@media (max-width: 640px) {
  .nav-burger { display: flex; }

  .nav-links {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10,10,10,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #3d3c3c;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links a {
    padding: 0.9rem 1.5rem;
    border-top: 1px solid #3d3c3c;
    font-size: 0.95rem;
  }

  .nav-toggle:checked ~ .nav-links {
    max-height: 420px;
  }

  /* Burger → X animation when open */
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Hero */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid #3d3c3c;
  background:
    radial-gradient(60% 60% at 70% 10%, rgba(200,134,10,0.18) 0%, transparent 60%),
    linear-gradient(180deg, #000000 0%, #6b3a17 80%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-name {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: rgba(255,255,255,0.95);
  background: linear-gradient(45deg, #d5d0bc 0%, #e8a020 60%, #c8860a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  margin-top: 1rem;
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  font-weight: bold;
  display: inline-block;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);}

/* Beta badge: a small gold pill beside the name */
.badge {
  display: inline-block;
  vertical-align: middle;
  border: 1px solid rgba(232,160,32,0.5);
  border-radius: 999px;
  padding: 0 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8a020;
}

/* The badge as a superscript to the hero name; a click shows what beta means.
   A native popover: closes on a click elsewhere or Escape, with no JS. */
.hero-title {
  position: relative;
  width: fit-content;
}

.hero-stage {
  position: absolute;
  left: 100%;
  top: 0.5rem;
  margin-left: 0.25rem;
  background: none;
  font-family: inherit;
  cursor: pointer;
  anchor-name: --stage;
  transition: border-color 0.2s, background 0.2s;
}

.hero-stage:hover {
  border-color: #e8a020;
  background: rgba(232,160,32,0.1);
}

.stage-note {
  width: 15rem;
  padding: 0.75rem;
  border: 1px solid #3d3c3c;
  border-radius: 6px;
  background: #222121;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Under the badge where the browser can anchor it; centred otherwise. */
@supports (anchor-name: --stage) {
  .stage-note {
    position-anchor: --stage;
    inset: auto;
    top: anchor(bottom);
    /* Shifted left, if need be, to stay on a narrow screen. */
    left: min(anchor(left), calc(100% - 15rem - 1rem));
    margin: 0.5rem 0 0;
  }
}

.hero-description {
  margin-top: 1.25rem;
  max-width: 560px;
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
}

/* Hero app mockup (pure CSS) */
.mockup {
  background: #0a0a0a;
  border: 1px solid #3d3c3c;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  overflow: hidden;
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #3d3c3c;
}

.mockup-dot { width: 10px; height: 10px; border-radius: 50%; }
.mockup-dot.r { background: #ff5f57; }
.mockup-dot.y { background: #febc2e; }
.mockup-dot.g { background: #28c840; }

.mockup-body { padding: 0.9rem 1rem 1.1rem; }

.mockup-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.55rem;
}

.mockup-check { color: #28c840; }

.mockup-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0.3rem;
}

.mockup-field {
  background: rgba(217,217,217,0.05);
  border-radius: 4px;
  height: 26px;
  margin-bottom: 0.7rem;
}

.mockup-send {
  display: inline-block;
  background: #222121;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 3px;
  padding: 0.35rem 0.9rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #e8a020;
}

/* Features */
.features {
  padding: 4rem 0;
  border-bottom: 1px solid #3d3c3c;
}

.section-heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.feature-card {
  background: #0a0a0a;
  border: 1px solid #3d3c3c;
  border-radius: 5px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

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

.feature-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 0.85rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e8a020;
  background: linear-gradient(135deg, rgba(200,134,10,0.18), rgba(59,26,8,0.25));
}

.feature-icon svg { width: 17px; height: 17px; }

.feature-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.4rem;
}

.feature-body {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.45);
}

/* How it works */
.how {
  padding: 4rem 0;
  border-bottom: 1px solid #3d3c3c;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  counter-reset: step;
}

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #141414;
  background: linear-gradient(135deg, #e8a020, #c8860a);
  margin-bottom: 0.8rem;
}

.step-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.35rem;
}

.step-body {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
}

/* Automation platform */
.automation {
  padding: 4.5rem 0;
  border-bottom: 1px solid #3d3c3c;
  background:
    radial-gradient(70% 80% at 20% 0%, rgba(200,134,10,0.1) 0%, transparent 60%),
    #0a0a0a;
}

.automation-heading {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 620px;
  background: linear-gradient(45deg, #ffffff 0%, #e8a020 70%, #c8860a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.automation-body {
  margin-top: 1.1rem;
  max-width: 600px;
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
}

.pillars {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.pillar {
  border-left: 2px solid #7a4a10;
  padding-left: 1rem;
}

.pillar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e8a020;
  margin-bottom: 0.35rem;
}

.pillar-body {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* Coming soon */
.soon {
  padding: 4.5rem 0;
  border-bottom: 1px solid #3d3c3c;
}

.soon-subheading {
  margin-top: 2.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}

.soon-text {
  margin-top: 0.4rem;
  max-width: 600px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
}

.packs {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.75rem;
}

.pack {
  background: #0a0a0a;
  border: 1px solid #3d3c3c;
  border-radius: 5px;
  padding: 0.9rem 1rem;
  transition: border-color 0.2s;
}

.pack:hover { border-color: #7a4a10; }

.pack-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e8a020;
  margin-bottom: 0.25rem;
}

.pack-body {
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.45);
}

.invite {
  margin-top: 2.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem;
  border: 1px solid #7a4a10;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(200,134,10,0.12), rgba(59,26,8,0.2));
}

.invite-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
}

.invite-body {
  margin-top: 0.3rem;
  max-width: 420px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}

.invite-cta {
  flex-shrink: 0;
  background: linear-gradient(135deg, #e8a020, #c8860a);
  color: #141414;
  border-radius: 4px;
  padding: 0.65rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  transition: filter 0.2s;
}

.invite-cta:hover { filter: brightness(1.1); }

.pillars-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Download */
.download {
  padding: 4rem 0;
  border-bottom: 1px solid #3d3c3c;
}

.download-lead {
  margin-top: 0.75rem;
  max-width: 44rem;
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
}

.download-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.download-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #222121;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.download-tab:hover { border-color: #7a4a10; color: rgba(255,255,255,0.85); }
.download-tab[aria-selected="true"] { border-color: #e8a020; color: #fff; }
.download-tab svg { width: 16px; height: 16px; color: #e8a020; }

.download-panel {
  margin-top: 1rem;
  max-width: 44rem;
  background: #141414;
  border: 1px solid #3d3c3c;
  border-radius: 6px;
  padding: 1.25rem;
}

.download-panel[hidden] { display: none; }

.download-step {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
}

.download-command {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  background: #0a0a0a;
  border: 1px solid #3d3c3c;
  border-radius: 4px;
  padding: 0.6rem 0.6rem 0.6rem 0.9rem;
}

.download-command code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: #f0b440;
}

.download-copy {
  flex-shrink: 0;
  background: #222121;
  border: 1px solid #3d3c3c;
  border-radius: 4px;
  padding: 0.3rem 0.7rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
}

.download-copy:hover { border-color: #7a4a10; }

.download-hint {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}

.download-hint a, .download-note a { color: rgba(255,255,255,0.7); }

.download-files {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.download-file {
  display: inline-flex;
  align-items: center;
  background: #222121;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: border-color 0.2s;
}

.download-file:hover { border-color: #7a4a10; }

.download-first {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
}

.download-first summary { cursor: pointer; color: rgba(255,255,255,0.75); }
.download-first p { margin-top: 0.4rem; }
.download-first code, .download-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.download-note {
  margin-top: 0.9rem;
  max-width: 44rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

.notify {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

.notify-body {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
}

/* Footer */
.footer {
  padding: 2.5rem 0;
}

.footer-text {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.25);
}

.footer-text a {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: rgba(255,255,255,0.4);
}

.footer-text a:hover {
  color: rgba(255,255,255,0.7);
}

/* Link that opens the essay */
.article-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #e8a020;
  text-decoration: none;
  border-bottom: 1px solid rgba(232,160,32,0.4);
  transition: border-color 0.2s, color 0.2s;
}

.article-link:hover {
  color: #f0b440;
  border-color: #f0b440;
}

/* The essay, in a modal dialog */
html:has(dialog.article[open]) { overflow: hidden; }

.article {
  width: min(680px, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid #3d3c3c;
  border-radius: 8px;
  background: #141414;
  color: rgba(255,255,255,0.75);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  overscroll-behavior: contain;
}

.article::backdrop {
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}

.article-bar {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 0.75rem 0;
  pointer-events: none;
}

.article-close {
  pointer-events: auto;
  width: 34px;
  height: 34px;
  border: 1px solid #3d3c3c;
  border-radius: 50%;
  background: #222121;
  color: rgba(255,255,255,0.7);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.article-close:hover {
  border-color: #e8a020;
  color: #e8a020;
}

.article-body {
  padding: 0 2.5rem 3rem;
  margin-top: -1rem;
}

.article-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.article-title {
  margin-top: 0.5rem;
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(45deg, #d5d0bc 0%, #e8a020 60%, #c8860a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-lede {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
}

.article-body h3 {
  margin-top: 2.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #e8a020;
}

.article-body p { margin-top: 0.85rem; }

.article-signoff {
  margin-top: 2.25rem !important;
  padding-top: 1.5rem;
  border-top: 1px solid #3d3c3c;
  font-weight: 800;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.9);
}

@media (max-width: 640px) {
  .article-body { padding: 0 1.25rem 2.5rem; }
}

/* Responsive */
@media (max-width: 680px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mockup { order: -1; }
}

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