/* ════════════════════════════════════════════════════════════════
   SWIPE MOTION LAB — shared design system
   Dark editorial "Origin" aesthetic (see DESIGN.md)
   Used by index.html, blog/index.html and every blog article page.
════════════════════════════════════════════════════════════════ */

/* ─── TOKENS ─────────────────────────────────────────────────── */
:root {
  /* Colors */
  --obsidian:      #0f1011;  /* page canvas */
  --void-black:    #000000;
  --carbon:        #090a0b;  /* elevated surface */
  --graphite:      #2e2e2e;  /* card surface / frosted overlay */
  --slate:         #3f4041;
  --mist:          #6a6b6b;
  --frost:         #9f9fa0;  /* body text */
  --pearl:         #cacaca;
  --bone:          #f5f5f7;  /* headings / hairlines */
  --paper:         #ffffff;  /* primary text + the only CTA fill */

  /* Chromatic — product surfaces only, never controls */
  --amethyst:      #847dff;
  --lavender:      #d1c9ff;
  --deep-iris:     #4b49aa;
  --orchid:        #dd90d8;
  --cyan:          #00b3dd;
  --sky-wash:      #90b8f0;
  --twilight:      #195f97;
  --dusk-sky: linear-gradient(180deg, #0f1011 0%, #131d27 18%, #1a4788 37%, #408ac1 69%, #408ac1 100%);

  /* Borders */
  --hairline:      rgba(245,245,247,0.08);
  --hairline-2:    rgba(245,245,247,0.14);

  /* Type */
  --font-display:  "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body:     "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:     "Roboto Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Radius */
  --r-nav:   8px;
  --r-card:  16px;
  --r-feat:  30px;
  --r-pill:  999px;

  /* Spacing helpers */
  --max-w:     1200px;
  --max-w-prose: 720px;
  --section-gap: 120px;

  --shadow-pill: rgba(0,0,0,0.35) 0px 18px 30px 0px;
  --shadow-card: rgba(0,0,0,0.40) 0px 24px 60px 0px;
}

/* ─── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--obsidian);
  color: var(--frost);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--amethyst); color: var(--paper); }

/* ─── SHARED TYPE PRIMITIVES ─────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.182em;
  text-transform: uppercase;
  color: var(--frost);
}

.serif {
  font-family: var(--font-display);
  font-weight: 300;
  color: var(--bone);
  line-height: 0.95;
  letter-spacing: -0.5px;
}
.serif em { font-style: italic; font-weight: 300; }

.display { font-size: clamp(46px, 8vw, 96px); }
.heading-lg { font-size: clamp(38px, 5.5vw, 80px); }
.heading { font-size: clamp(30px, 4vw, 44px); }

.lede {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  color: var(--frost);
}

/* ─── BUTTONS ────────────────────────────────────────────────── */
/* The ONLY action color in the system: white pill + trailing arrow */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper); color: var(--carbon);
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.182em; text-transform: uppercase;
  padding: 13px 20px; border-radius: var(--r-pill);
  box-shadow: var(--shadow-pill);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.pill:hover { transform: translateY(-2px); background: var(--bone); box-shadow: rgba(0,0,0,0.45) 0px 22px 36px 0px; }
.pill .arrow { transition: transform .2s ease; }
.pill:hover .arrow { transform: translateX(3px); }

.ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--paper);
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.182em; text-transform: uppercase;
  padding: 13px 18px; border-radius: var(--r-nav);
  transition: color .18s ease, background .18s ease;
}
.ghost:hover { color: var(--frost); }

/* ─── NAV ────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 0 40px;
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
nav.scrolled {
  background: rgba(15,16,17,0.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 1px 0 var(--hairline);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  background: #080808 url('icon.png') center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
}
.brand-name {
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  color: var(--paper); letter-spacing: -0.2px;
}
.nav-center { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.182em; text-transform: uppercase; color: var(--paper);
  padding: 8px 14px; border-radius: var(--r-nav);
  transition: color .18s ease, background .18s ease;
}
.nav-link:hover { background: rgba(245,245,247,0.06); color: var(--frost); }
.nav-right { display: flex; align-items: center; gap: 6px; }

/* ─── NEWSLETTER INPUT (floating frosted bar) ────────────────── */
.news-form {
  display: flex; align-items: center; gap: 8px;
  background: rgba(46,46,46,0.55);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-feat);
  padding: 8px 8px 8px 22px;
  width: 100%; max-width: 460px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color .2s ease, background .2s ease;
}
.news-form:focus-within { border-color: rgba(245,245,247,0.3); background: rgba(46,46,46,0.7); }
.news-form input {
  flex: 1; background: none; border: none; outline: none;
  font-family: var(--font-body); font-size: 15px; color: var(--paper);
  padding: 10px 0;
}
.news-form input::placeholder { color: var(--frost); }
.news-form button {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--paper); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--carbon); transition: transform .18s ease, background .18s ease;
}
.news-form button:hover { transform: scale(1.06); background: var(--bone); }
.news-note { font-size: 13px; color: var(--mist); margin-top: 14px; }
.news-note.ok { color: var(--sky-wash); }

/* ─── FOOTER ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--hairline);
  padding: 72px 40px 40px;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid var(--hairline);
}
.footer-brand .brand { margin-bottom: 18px; }
.footer-brand p { font-size: 14px; color: var(--frost); max-width: 260px; line-height: 1.6; font-weight: 300; }
.footer-col h4 {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.182em;
  text-transform: uppercase; color: var(--mist); margin-bottom: 18px; font-weight: 400;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 14px; color: var(--frost); font-weight: 300; transition: color .18s ease; }
.footer-col a:hover { color: var(--paper); }
.footer-bottom {
  max-width: var(--max-w); margin: 0 auto; padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.footer-bottom p { font-size: 12.5px; color: var(--mist); }

/* ─── GENERIC SECTION SHELL ──────────────────────────────────── */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 40px; }
.section { padding: var(--section-gap) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head .eyebrow { display: block; margin-bottom: 20px; }
.section-head p { margin-top: 22px; }

/* ─── RESPONSIVE (shared) ────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-center { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 680px) {
  nav { padding: 0 20px; }
  .wrap { padding: 0 20px; }
  footer { padding: 56px 20px 32px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .brand-name { font-size: 14px; }
  .nav-right .ghost { display: none; }
}

/* ─── ARTICLE / PROSE (blog posts) ──────────────────────────── */
.article { padding: 160px 40px 40px; }
.article-inner { max-width: var(--max-w-prose); margin: 0 auto; }
.article-back {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.182em;
  text-transform: uppercase; color: var(--frost); display: inline-flex; gap: 8px;
  margin-bottom: 40px; transition: color .18s ease;
}
.article-back:hover { color: var(--paper); }
.article-meta {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.182em;
  text-transform: uppercase; color: var(--amethyst); margin-bottom: 22px;
}
.article-title {
  font-family: var(--font-display); font-weight: 300; color: var(--bone);
  font-size: clamp(34px, 5vw, 56px); line-height: 1.02; letter-spacing: -0.5px;
  margin-bottom: 24px;
}
.article-title em { font-style: italic; }
.article-lede {
  font-family: var(--font-body); font-weight: 300; font-size: 20px; line-height: 1.55;
  color: var(--frost); margin-bottom: 32px;
}
.article-hr { border: none; border-top: 1px solid var(--hairline); margin: 0 0 48px; }
.article-byline {
  display: flex; align-items: center; gap: 12px; margin-bottom: 48px;
  font-size: 13px; color: var(--mist);
}
.article-byline .dot { width: 28px; height: 28px; border-radius: 8px; background: #080808 url('icon.png') center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10); flex-shrink: 0; }

.prose { font-size: 17px; line-height: 1.75; color: var(--frost); font-weight: 300; }
.prose > * + * { margin-top: 24px; }
.prose h2 {
  font-family: var(--font-display); font-weight: 400; color: var(--bone);
  font-size: clamp(26px, 3.5vw, 34px); line-height: 1.1; letter-spacing: -0.3px;
  margin-top: 52px;
}
.prose h3 {
  font-family: var(--font-body); font-weight: 500; color: var(--bone);
  font-size: 19px; margin-top: 36px;
}
.prose a { color: var(--sky-wash); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--paper); }
.prose strong { color: var(--bone); font-weight: 500; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-top: 10px; }
.prose blockquote {
  border-left: 2px solid var(--amethyst); padding-left: 24px; margin-left: 0;
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 24px; line-height: 1.4; color: var(--bone);
}
.prose .callout {
  background: var(--obsidian); border: 1px solid var(--hairline-2);
  border-left: 2px solid var(--mist); border-radius: var(--r-card);
  padding: 22px 26px;
}
.prose .callout .callout-label {
  display: block; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.182em; text-transform: uppercase; color: var(--frost); margin-bottom: 10px;
}
.prose .callout p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--frost); }
.prose .callout.reject { border-left-color: #e0556b; }
.prose .callout.reject .callout-label { color: #e0556b; }
.prose .callout.warn { border-left-color: #e0b341; }
.prose .callout.warn .callout-label { color: #e0b341; }
.prose .callout.tip { border-left-color: var(--cyan); }
.prose .callout.tip .callout-label { color: var(--cyan); }

.prose figure {
  border-radius: var(--r-feat); overflow: hidden; background: linear-gradient(160deg, #1a1430, #0f1011);
  padding: 40px; text-align: center;
}
.prose figure img { width: 230px; margin: 0 auto; border-radius: 34px; box-shadow: var(--shadow-card); }
.prose figcaption { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.182em; text-transform: uppercase; color: var(--mist); margin-top: 22px; }
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--r-card); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px; }
.prose th, .prose td { text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.prose tr:last-child td { border-bottom: none; }
.prose thead th {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.182em; text-transform: uppercase;
  color: var(--frost); font-weight: 400; background: var(--carbon);
}
.prose tbody td { color: var(--frost); font-weight: 300; line-height: 1.5; }
.prose tbody th { font-weight: 500; color: var(--bone); }

.article-end {
  margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.article-end p { font-size: 15px; color: var(--frost); font-weight: 300; max-width: 380px; }

/* Newsletter band — appended to the footer of every blog post */
.post-newsletter { padding: 0 40px 96px; }
.post-newsletter-inner {
  max-width: var(--max-w-prose); margin: 0 auto;
  background: var(--carbon); border: 1px solid var(--hairline); border-radius: var(--r-feat);
  padding: 48px 44px; text-align: center;
}
.post-newsletter .eyebrow { display: block; margin-bottom: 16px; }
.post-newsletter h2 {
  font-family: var(--font-display); font-weight: 400; color: var(--bone);
  font-size: clamp(26px, 3.5vw, 34px); line-height: 1.1; letter-spacing: -0.3px;
  margin: 0 auto 14px; max-width: 18ch;
}
.post-newsletter h2 em { font-style: italic; }
.post-newsletter p { color: var(--frost); font-weight: 300; max-width: 440px; margin: 0 auto 24px; line-height: 1.6; }
.post-newsletter .news-form { margin: 0 auto; }
.post-newsletter .news-note { text-align: center; }
@media (max-width: 680px) {
  .post-newsletter { padding: 0 20px 64px; }
  .post-newsletter-inner { padding: 36px 24px; }
}

@media (max-width: 680px) {
  .article { padding: 120px 20px 32px; }
  .prose { font-size: 16px; }
}

/* fade-in on load utility */
.fade { animation: fadeUp .7s ease both; }
.fade-1 { animation-delay: .08s; }
.fade-2 { animation-delay: .16s; }
.fade-3 { animation-delay: .24s; }
.fade-4 { animation-delay: .32s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
