/* ============================================================
   DraftLoop marketing site — vanilla CSS
   Design system: dark premium, system fonts, responsive-first.
   No webfonts, no external resources.
   ============================================================ */

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ─── Tokens ─── */
:root {
  --bg: #0a0a0a;
  --bg-elevated: #121212;
  --bg-surface: #1a1a1a;
  --border: #2a2a2a;
  --border-hover: #3d3d3d;
  --fg: #f5f5f5;
  --fg-muted: #a8a8a8;
  --fg-subtle: #6b6b6b;
  --accent: #ff5733;
  --accent-hover: #ff6d4d;
  --accent-fg: #ffffff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 10px 40px rgba(0,0,0,0.4);
  --maxw: 1200px;
  --maxw-article: 760px;
  --gap: clamp(1rem, 2vw, 1.5rem);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ─── Base ─── */
html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

::selection { background: var(--accent); color: var(--accent-fg); }

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

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-top: 3rem; margin-bottom: 1rem; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-top: 2rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s;
}
a:hover { color: var(--accent-hover); }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--fg-muted);
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.35rem; }

/* ─── Layout ─── */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* ─── Skip link (a11y) ─── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.5rem 1rem;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--fg);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-name::after {
  content: ".";
  color: var(--accent);
}

.main-nav {
  display: none;
  gap: 1.75rem;
}

.main-nav a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s;
}
.main-nav a:hover { color: var(--fg); }

@media (min-width: 768px) {
  .main-nav { display: flex; }
}

/* ─── CTA buttons ─── */
.cta {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.cta-primary {
  background: var(--accent);
  color: var(--accent-fg);
}
.cta-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-fg);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 87, 51, 0.35);
}

.cta-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.cta-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  color: var(--fg);
}

.cta-large { padding: 1rem 2rem; font-size: 1.05rem; }

/* ─── Hero ─── */
.hero {
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 8vw, 6rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 87, 51, 0.15), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(255, 87, 51, 0.08), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero .container { position: relative; z-index: 1; }

.hero h1 {
  max-width: 900px;
  margin: 0 auto 1.5rem;
}

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

.hero-lede {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--fg-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.55;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.hero-trust {
  color: var(--fg-subtle);
  font-size: 0.9rem;
}

/* ─── Sections ─── */
.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
  border-top: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  margin-top: 0;
}

.section-header p {
  color: var(--fg-muted);
  font-size: 1.1rem;
  margin-top: 1rem;
}

/* ─── Feature grid ─── */
.feature-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.feature-card h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.feature-card p {
  color: var(--fg-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(255, 87, 51, 0.12);
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

/* ─── Silo cards ─── */
.silo-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .silo-grid { grid-template-columns: repeat(3, 1fr); }
}

.silo-card {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.silo-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  color: inherit;
}

.silo-card h3 {
  margin-top: 0;
  color: var(--fg);
}

.silo-card p {
  color: var(--fg-muted);
  margin-bottom: 1rem;
}

.silo-card-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ─── Pricing callout ─── */
.pricing-callout {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
}

.pricing-callout h2 { margin-top: 0; }

.pricing-callout p { color: var(--fg-muted); max-width: 560px; margin: 0 auto 1.5rem; }

/* ─── Article ─── */
.article-main {
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.article {
  max-width: var(--maxw-article);
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.breadcrumb a {
  color: var(--fg-muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span[aria-current="page"] { color: var(--fg); }

.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.article-lede {
  font-size: 1.2rem;
  color: var(--fg-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--fg-subtle);
  margin-bottom: 0;
}

.article-meta time::after {
  content: " · ";
  color: var(--fg-subtle);
}

.article-body {
  font-size: 1.05rem;
}

.article-body h2 { scroll-margin-top: 80px; }
.article-body h3 { scroll-margin-top: 80px; }

.article-body img {
  border-radius: var(--radius-sm);
  margin: 1.5rem 0;
}

.article-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.back-link {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.back-link:hover { color: var(--accent); }

.cta-block {
  margin-top: 2rem;
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.site-footer .container {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .site-footer .container { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .site-footer .container { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-col h3 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  color: var(--fg);
  margin-top: 0;
}

.footer-col p {
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  color: var(--fg-subtle);
  font-size: 0.85rem;
  margin: 0;
}

/* ─── Maintenance banner ─── */
.maintenance-banner {
  background: var(--warning);
  color: #1a1a1a;
  padding: 0.75rem 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  position: sticky;
  top: 0;
  z-index: 200;
}

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

/* ─── Print ─── */
@media print {
  .site-header, .site-footer, .article-footer .cta-block { display: none; }
  body { background: white; color: black; }
  a { color: black; }
}
