/* Codictio Landing — Design tokens from the app palette */

:root {
  /* Backgrounds */
  --bg-base: #0A0A0A;
  --bg-sidebar: #0F0F0F;
  --bg-card: #171717;
  --bg-card-dark: #0F0F0F;
  --bg-elevated: #141414;

  /* Borders */
  --border-subtle: #1A1A1A;
  --border-default: #1F1F1F;
  --border-elevated: #2A2A2A;
  --border-hover: #333333;

  /* Text */
  --text-primary: #FAFAFA;
  --text-secondary: #D4D4D4;
  --text-tertiary: #A3A3A3;
  --text-muted: #737373;
  --text-disabled: #525252;

  /* Accent */
  --accent-primary: #F97316;
  --accent-primary-dark: #EA580C;
  --accent-secondary: #8B5CF6;

  /* Status */
  --status-ready: #22C55E;

  /* Layout */
  --max-width: 1120px;
  --header-height: 64px;
}

/* ── Reset & base ─────────────────────────────────────── */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ── Typography ───────────────────────────────────────── */

h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }

/* ── Layout helpers ───────────────────────────────────── */

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

.section {
  padding: 96px 0;
}

.section--alt {
  background: var(--bg-elevated);
}

/* ── Header ───────────────────────────────────────────── */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.header__logo span {
  color: var(--accent-primary);
}

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

.header__nav a {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.header__nav .btn--primary {
  color: #fff;
}

.header__nav .btn--primary:hover {
  color: #fff;
}

/* ── Buttons ──────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 24px rgba(249, 115, 22, 0.25);
}

.btn--primary:hover {
  background: var(--accent-primary-dark);
  color: #fff;
  box-shadow: 0 0 32px rgba(249, 115, 22, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-elevated);
}

.btn--outline:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
  color: var(--text-primary);
}

.btn--small {
  padding: 10px 20px;
  font-size: 0.875rem;
  border-radius: 10px;
}

.btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Hero ─────────────────────────────────────────────── */

.hero {
  padding-top: calc(var(--header-height) + 80px);
  padding-bottom: 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-elevated);
  background: var(--bg-card);
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 32px;
}

.hero__badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-ready);
}

.hero__title {
  max-width: 720px;
  margin: 0 auto 24px;
}

.hero__title span {
  background: linear-gradient(135deg, var(--accent-primary), #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  max-width: 560px;
  margin: 0 auto 48px;
  color: var(--text-tertiary);
  font-size: 1.125rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Features grid ────────────────────────────────────── */

.features__header {
  text-align: center;
  margin-bottom: 64px;
}

.features__header p {
  color: var(--text-tertiary);
  margin-top: 16px;
  font-size: 1.0625rem;
}

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

.feature-card {
  padding: 32px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(249, 115, 22, 0.1);
  color: var(--accent-primary);
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.feature-card__title {
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-card__text {
  color: var(--text-tertiary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ── How it works ─────────────────────────────────────── */

.steps__header {
  text-align: center;
  margin-bottom: 64px;
}

.steps__header p {
  color: var(--text-tertiary);
  margin-top: 16px;
  font-size: 1.0625rem;
}

.steps__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}

.step {
  text-align: center;
  position: relative;
}

.step__number {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
}

.step__title {
  margin-bottom: 8px;
  color: var(--text-primary);
}

.step__text {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ── CTA banner ───────────────────────────────────────── */

.cta {
  text-align: center;
}

.cta__box {
  padding: 64px 48px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(139, 92, 246, 0.06));
  border: 1px solid var(--border-elevated);
}

.cta__box h2 {
  margin-bottom: 16px;
}

.cta__box p {
  color: var(--text-tertiary);
  font-size: 1.0625rem;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Footer ───────────────────────────────────────────── */

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

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__copy {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  color: var(--text-muted);
  font-size: 0.8125rem;
  transition: color 0.2s;
}

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

/* ── Legal pages ──────────────────────────────────────── */

.legal {
  padding-top: calc(var(--header-height) + 48px);
  padding-bottom: 96px;
}

.legal__content {
  max-width: 720px;
  margin: 0 auto;
}

.legal__content h1 {
  margin-bottom: 8px;
}

.legal__updated {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 48px;
}

.legal__content h2 {
  font-size: 1.375rem;
  margin-top: 48px;
  margin-bottom: 16px;
}

.legal__content h3 {
  font-size: 1.125rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal__content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.9375rem;
  line-height: 1.75;
}

.legal__content ul,
.legal__content ol {
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 24px;
  font-size: 0.9375rem;
  line-height: 1.75;
}

.legal__content li {
  margin-bottom: 8px;
}

.legal__content a {
  color: var(--accent-primary);
}

.legal__content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal__content .legal__emphasis {
  color: var(--text-primary);
  font-weight: 500;
  font-style: italic;
}

.legal__content .legal__caps {
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.legal__content blockquote {
  border-left: 3px solid var(--border-elevated);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--text-tertiary);
  font-style: italic;
}

/* ── Responsive ───────────────────────────────────────── */

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

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

@media (max-width: 640px) {
  .section {
    padding: 64px 0;
  }

  .hero {
    padding-top: calc(var(--header-height) + 48px);
    padding-bottom: 64px;
  }

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

  .steps__list {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cta__box {
    padding: 48px 24px;
  }

  .header__nav {
    gap: 20px;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}
