@import '/tokens.css';

/* ── Additional Marketing Variables ────────────────────────────────────────── */
/* These variables extend primr-tokens with marketing-specific colors */

:root {
  --surface-secondary: #f8f8f8;
  --surface-warm: #f5f0e8;
  --surface-warm-border: #e8e0d0;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--surface);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

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

/* ── Utilities ───────────────────────────────────────────────────────────── */
.wordmark {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 20px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: opacity 150ms, transform 80ms;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 150ms;
  text-decoration: none;
}
.btn-secondary:hover { color: var(--ink); }

.section-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.section-subtitle {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 52ch;
  margin: 0 auto;
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */
header { border-bottom: 0.5px solid var(--border); }

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-links-desktop {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-soft);
  transition: color 150ms;
  position: relative;
  padding-bottom: 2px;
}
.nav-link:hover { color: var(--ink); }

.nav-link.active {
  font-weight: 600;
  color: var(--accent);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-ctas {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav-signin {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 150ms;
}
.nav-signin:hover { color: var(--ink); }

.nav-cta-btn {
  padding: 8px 18px !important;
  font-size: 13.5px !important;
}

.nav-links-mobile {
  display: none;
  gap: 1.5rem;
  padding: 0 1.5rem 1rem;
  overflow-x: auto;
}

.nav-link-mobile {
  font-size: 14px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.nav-link-mobile.active {
  font-weight: 600;
  color: var(--accent);
}

@media (max-width: 680px) {
  .nav-links-desktop { display: none; }
  .nav-links-mobile { display: flex; }
  .navbar-inner { padding: 1rem 1.5rem; }
  .nav-signin { display: none; }
}
@media (max-width: 360px) {
  .nav-cta-btn { display: none; }
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  border-top: 0.5px solid var(--border);
  background: var(--surface-alt);
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2.5rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-wordmark {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.footer-tagline {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.7;
  margin: 0;
}

.footer-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}

.footer-col-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link {
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 150ms;
}
.footer-link:hover { color: var(--ink); }

.footer-bottom {
  border-top: 0.5px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Home page ───────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.step-connector {
  position: absolute;
  top: 18px;
  right: -0.75rem;
  width: 1.5rem;
  height: 1px;
  background: var(--border-mid);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .step-connector { display: none; }
}
@media (max-width: 400px) {
  .steps-grid { grid-template-columns: 1fr; }
}

/* ── About page ──────────────────────────────────────────────────────────── */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .story-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .values-grid { grid-template-columns: 1fr; }
}

/* ── Pricing page ────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.pricing-cta-default {
  display: block;
  text-align: center;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 8px;
  margin-bottom: 1.75rem;
  background: var(--accent);
  color: #fff;
  transition: opacity 150ms;
  text-decoration: none;
}
.pricing-cta-default:hover { opacity: 0.88; }

.pricing-cta-highlighted {
  display: block;
  text-align: center;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 8px;
  margin-bottom: 1.75rem;
  background: #fff;
  color: var(--accent);
  transition: opacity 150ms;
  text-decoration: none;
}
.pricing-cta-highlighted:hover { opacity: 0.88; }

@media (max-width: 1280px) {
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1080px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
}

/* ── FAQ accordion ───────────────────────────────────────────────────────── */
.faq-item {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 150ms;
}
.faq-item:hover { border-color: var(--border-mid); }
.faq-item.open { border-color: var(--border-mid); }

.faq-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.faq-question {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
  transition: color 150ms;
}
.faq-item.open .faq-question {
  font-weight: 600;
  color: var(--accent);
}

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms, transform 200ms;
  margin-top: 1px;
}
.faq-item.open .faq-icon {
  background: var(--accent-soft);
  transform: rotate(45deg);
}

.faq-icon svg line { stroke: var(--ink-muted); }
.faq-item.open .faq-icon svg line { stroke: var(--accent); }

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.75;
}
.faq-item.open .faq-answer { display: block; }

/* ── FAQ Accordion (for Pricing page) ──────────────────────────────────────── */

.faq-item.open .faq-content {
  display: block !important;
}

.faq-item.open .faq-btn {
  background: var(--surface);
  border-color: var(--accent);
}

.faq-item.open .faq-btn span {
  transform: rotate(45deg);
  transition: transform 150ms;
}

/* ── Showcase Hero ──────────────────────────────────────────── */
.showcase-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

.showcase-hero-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

.showcase-frame-wrapper {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
}

.showcase-frame {
  width: 100%;
  height: 800px;
  border: none;
  display: block;
  background: var(--surface);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .showcase-frame {
    height: 100svh;
  }
}

/* ── Editorial Redesign — Layout utilities ───────────────────────────────── */
.container-xl {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 768px) {
  .container-xl { padding: 0 24px; }
}

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--surface-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 0;
}

.cta-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.grid-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 48px;
}
@media (max-width: 480px) {
  .grid-steps { grid-template-columns: 1fr; }
}

.step-num {
  font-family: 'DM Mono', monospace;
  font-size: 28px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 12px;
  line-height: 1;
}

/* Spacing utilities */
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 32px; }
.text-muted { font-size: 13px; color: var(--ink-muted); margin: 0; }

/* ── Editorial Redesign — Typography ─────────────────────────────────────── */
.section-kicker {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.h1-hero {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(40px, 5.5vw, 60px);
  line-height: 1.07;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin-bottom: 24px;
}
.h1-hero em { font-style: italic; color: var(--accent); }

.h2-left {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.h4-half {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}

.hero-body {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 36px;
  max-width: 480px;
}

.body-text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.body-text-sm {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.btn-ghost {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 150ms;
}
.btn-ghost:hover { color: var(--ink); }

.stat-coral {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--color-coral);
}

/* ── Editorial Redesign — Layout classes ─────────────────────────────────── */
.hero-split {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 48px 80px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 48px; padding: 60px 24px; }
}

.section-warm {
  background: var(--surface-warm);
  border-top: 1px solid var(--surface-warm-border);
  border-bottom: 1px solid var(--surface-warm-border);
  padding: 80px 48px;
}
@media (max-width: 768px) {
  .section-warm { padding: 60px 24px; }
}

.section-split {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.4fr 0.6fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 900px) {
  .section-split { grid-template-columns: 1fr; gap: 32px; }
}

.example-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 64px;
}
.example-row.flip { direction: rtl; }
.example-row.flip > * { direction: ltr; }
@media (max-width: 768px) {
  .example-row, .example-row.flip { grid-template-columns: 1fr; direction: ltr; }
}

/* ── Editorial Redesign — Components ─────────────────────────────────────── */
.artifact-box {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-soft);
  position: relative;
  margin-top: 20px;
}
.artifact-box-label {
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--surface);
  padding: 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.artifact-line { padding: 2px 0; }
.artifact-line-active {
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 12px;
  margin-left: -14px;
  color: var(--accent);
}

.proof-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
}
.proof-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px 0;
  color: var(--ink-muted);
  font-size: 24px;
}
.proof-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
}
.proof-card-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .proof-flow { grid-template-columns: 1fr; }
  .proof-arrow { display: none; }
}

.component-tag {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  margin: 3px 4px 3px 0;
}

.example-visual {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 40px;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
  line-height: 2;
}

.example-tag {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.example-content { padding-top: 16px; }
.example-content h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 16px;
}
.example-content p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.section-cta-editorial {
  max-width: 640px;
  margin: 0 auto;
  padding: 100px 48px;
  text-align: left;
}
@media (max-width: 768px) {
  .section-cta-editorial { padding: 60px 24px; }
}
