/* Arka Landing Page Styles.
   The :root palette below is SPLICED IN AT BUILD TIME from brand.css (see
   build.ts#copyWithBrandTokens) — edit it there, not here. The blog loads
   this file directly, so it inherits the tokens too. */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --border-subtle: #222222;
  --border-accent: #333333;
  --text-primary: #f0f0f0;
  --text-secondary: #999999;
  --text-muted: #666666;
  --accent: #8b0000;
  --accent-hover: #6b0000;
  --accent-glow: rgba(139, 0, 0, 0.15);
  /* The brand red lightened until it stays legible as small text or an icon
     directly on --bg-primary (4.2:1 vs 2.0:1 for --accent). Fills, where the
     foreground is white, keep using --accent. */
  --accent-text: #cb454a;
  --gradient-start: #8b0000;
  --gradient-end: #b22234;

  /* The wash a ghost control paints on hover, and the scrim behind a modal.
     Both are a function of the ground, which is why they are tokens rather
     than the literal rgba() the shell pages used to repeat. */
  --hover-wash: rgba(255, 255, 255, 0.03);
  --scrim: rgba(0, 0, 0, 0.75);

  /* Status. Destructive actions (delete a project, a failed request) and the
     one success note on /auth/. Not brand — a red button here means damage,
     not Arka. --danger-ink is what reads on a --danger FILL. */
  --danger: #ff6b6b;
  --danger-hover: #e05555;
  --danger-wash: rgba(255, 107, 107, 0.4);
  --danger-ink: #1a0000;
  --success: #69db7c;

  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Light. Same names, same contracts, different values — a page swaps ground
   and ink by setting data-theme, never by knowing a hex. The fills
   (--accent, the gradient pair) do NOT flip: white on #8b0000 is 10.4:1 either
   way, and the brand is the brand. --accent-text does flip, because its
   contract is "the brand red made legible as ink on --bg-primary" and on a
   near-white ground that is the true #8b0000 (9.5:1), not the lightened one. */
:root[data-theme="light"] {
  --bg-primary: #fafaf9;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --border-subtle: #e7e5e4;
  --border-accent: #d6d3d1;
  --text-primary: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #78716c;
  --accent-text: #8b0000;

  --hover-wash: rgba(0, 0, 0, 0.04);
  --scrim: rgba(0, 0, 0, 0.45);

  --danger: #b91c1c;
  --danger-hover: #991b1b;
  --danger-wash: rgba(185, 28, 28, 0.35);
  --danger-ink: #ffffff;
  --success: #2f7d32;
}

:root {
  /* landing-only layout tokens; the brand palette comes from brand.css */
  --section-gap: 120px;
  --content-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #333 #0a0a0a;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Navigation ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.nav.scrolled {
  border-bottom-color: var(--border-subtle);
}

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-icon {
  width: 37px;
  height: auto;
  flex-shrink: 0;
  display: block;
}

.nav-logo span {
  background: linear-gradient(
    135deg,
    var(--gradient-start),
    var(--gradient-end)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

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

.nav-cta {
  padding: 8px 20px;
  background: var(--accent);
  color: #fff !important;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s !important;
}

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

/* ---- Sections ---- */

section {
  padding: 0 32px;
}

.section-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* ---- Hero ---- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(139, 0, 0, 0.08);
  border: 1px solid rgba(139, 0, 0, 0.2);
  border-radius: 100px;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 32px;
}

.hero h1 {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 48px;
}

.hero-seats-group {
  margin: -28px auto 36px;
}

.hero-seats {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.hero-seats + .hero-seats {
  margin-top: 6px;
}

.hero-seats strong {
  color: var(--accent);
  font-weight: 600;
}

.hero-seats a {
  color: var(--accent);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-logo {
  display: block;
  width: clamp(242px, 30.8vw, 374px);
  height: auto;
  margin: 72px auto 0;
  opacity: 0.95;
}

/* landing.ts swaps the <img> for the live room (ui/roomLogo.ts), which draws
   itself in. Until the script arrives the <img> waits unseen — a finished logo
   that vanished and redrew would read as a glitch — and fades in by itself if
   the script never comes. */
img.hero-logo {
  animation: hero-logo-fallback 0.5s ease 1.2s both;
}

@keyframes hero-logo-fallback {
  from {
    opacity: 0;
  }
}

svg.hero-logo {
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  img.hero-logo {
    animation: none;
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

/* ---- How It Works ---- */

.how-it-works {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 64px;
}

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

.step-card {
  padding: 36px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.step-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-glow);
  border: 1px solid rgba(139, 0, 0, 0.25);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
}

.step-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.step-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- Features ---- */

.features {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

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

.feature-card {
  padding: 32px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--border-accent);
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-glow);
  border: 1px solid rgba(139, 0, 0, 0.2);
  margin-bottom: 20px;
  font-size: 18px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- Demo ---- */

.demo {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

.demo-frame-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #0d0d0d;
  margin-top: 48px;
}

.demo-frame-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 0 80px rgba(139, 0, 0, 0.06);
  z-index: 1;
}

.demo-frame {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 16px;
}

.demo-hint {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Example Room Cards ---- */

.examples-strip {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.example-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 130px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
}

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

.example-card.active {
  border-color: var(--accent);
  background: linear-gradient(
    180deg,
    rgba(139, 0, 0, 0.08) 0%,
    var(--bg-card) 100%
  );
}

.example-card.active .example-label {
  color: var(--text-primary);
}

.example-thumb {
  width: 100px;
  height: 60px;
  display: block;
}

.example-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.2s;
}

/* ---- API Preview ---- */

.api-preview {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.api-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}

.code-block {
  background: #0d0d0d;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
}

.code-block-header {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.code-block pre {
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #c8c8c8;
}

.code-block .key {
  color: #7b93db;
}
.code-block .str {
  color: #98c379;
}
.code-block .num {
  color: #d19a66;
}
.code-block .comment {
  color: #5c6370;
  font-style: italic;
}

/* Under the API sample: where a key comes from, and the reference. */
.api-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
}

/* ---- Pricing ---- */

.pricing {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

/* Three self-serve plans across the content width. */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
  max-width: var(--content-width);
}

.pricing-card {
  position: relative;
  padding: 40px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
}

.pricing-card--featured {
  border-color: var(--accent);
  background: linear-gradient(
    180deg,
    rgba(139, 0, 0, 0.06) 0%,
    var(--bg-card) 40%
  );
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.pricing-tier {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.pricing-price {
  margin-bottom: 12px;
}

.price-amount {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
}

.price-period {
  font-size: 16px;
  color: var(--text-muted);
  margin-left: 2px;
}

.pricing-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.5;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  flex: 1;
}

.pricing-features li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li::before {
  content: "\2713";
  color: var(--accent);
  margin-right: 10px;
  font-weight: 700;
  font-size: 13px;
}

.pricing-btn {
  text-align: center;
  width: 100%;
  justify-content: center;
}

/* Billing terms in one line, and where higher volume goes now that there is
   no Enterprise card. */
.pricing-note {
  margin-top: 28px;
  max-width: 760px;
  font-size: 14px;
  color: var(--text-muted);
}

.pricing-volume {
  margin-top: 10px;
  max-width: 760px;
  font-size: 15px;
  color: var(--text-secondary);
}

.pricing-note a,
.pricing-volume a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

/* ---- Footer ---- */

.footer {
  padding: 48px 32px;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

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

.footer-credits {
  max-width: var(--content-width);
  margin: 20px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.2s;
}

.footer-credit:hover {
  color: var(--text-secondary);
}

.footer-credit-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ---- Scroll Animations ---- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.35s;
}

/* ---- Responsive ---- */

/* Three cards want ~300px each. Below that they stack — earlier than the
   768px breakpoint, which is sized for the two-column sections. */
@media (max-width: 960px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  :root {
    --section-gap: 80px;
  }

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

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

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

  .demo-frame-wrapper {
    aspect-ratio: 4 / 3;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-credits {
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}
