/* ── Alpine Development Labs — shared design system ─────────── */

:root {
  --ink: #171d22;
  --ink-deep: #10161b;
  --paper: #f5f4ef;
  --pine: #1c465e;
  --mist: #d0d8da;
  --line: rgba(23, 29, 34, 0.12);
  --line-strong: rgba(23, 29, 34, 0.22);
  --warm: #a6855e;
  --rust: #b6532b;
  --success: #1c6b49;
  --danger: #8b2f2f;
  --shadow: 0 20px 60px rgba(20, 29, 36, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; }

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.display {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: -0.03em;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.eyebrow {
  font-size: 11px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: rgba(23, 29, 34, 0.55);
}

.rule {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(23, 29, 34, 0.25), transparent);
}

/* ── Topbar ─────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 24px 0 0;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--ink);
  color: var(--paper);
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
}

.brand-name {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: rgba(23, 29, 34, 0.72);
}

.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); font-weight: 700; }

/* dark variant used over the 3D hero */
.topbar.on-dark .topbar-inner {
  border-color: rgba(245, 244, 239, 0.16);
  background: rgba(16, 22, 27, 0.5);
}
.topbar.on-dark .eyebrow { color: rgba(245, 244, 239, 0.55); }
.topbar.on-dark .brand-name { color: var(--paper); }
.topbar.on-dark .brand-mark {
  background: var(--paper);
  color: var(--ink);
  border-color: rgba(245, 244, 239, 0.3);
}
.topbar.on-dark .nav { color: rgba(245, 244, 239, 0.72); }
.topbar.on-dark .nav a:hover,
.topbar.on-dark .nav a.active { color: #fff; }

/* ── Buttons ────────────────────────────────────── */
.button, .button-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 22px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover, .button-secondary:hover { transform: translateY(-2px); }

.button {
  background: var(--ink);
  color: var(--paper);
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.on-dark .button {
  background: var(--paper);
  color: var(--ink);
}

.on-dark .button-secondary {
  border-color: rgba(245, 244, 239, 0.32);
  background: rgba(245, 244, 239, 0.08);
  color: var(--paper);
}

/* ── Glass card ─────────────────────────────────── */
.glass {
  position: relative;
  border: 1px solid rgba(23, 29, 34, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.34));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.35), transparent 34%, transparent 70%, rgba(255,255,255,0.18));
}

/* ── Reveal animation ───────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  animation: fadeUp 0.85s cubic-bezier(.2,.8,.2,1) forwards;
}

.delay-1 { animation-delay: .06s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .28s; }
.delay-4 { animation-delay: .4s; }
.delay-5 { animation-delay: .52s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}

/* ── Paper texture + section scaffolding ────────── */
.page {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.page::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(0,0,0,.12) 0.5px, transparent 0.8px),
    radial-gradient(circle at 80% 40%, rgba(0,0,0,.08) 0.5px, transparent 0.8px),
    radial-gradient(circle at 50% 80%, rgba(0,0,0,.08) 0.6px, transparent 1px);
  background-size: 12px 12px, 16px 16px, 20px 20px;
  z-index: -1;
}

.section { padding: 72px 0 0; }

.section-title {
  margin-top: 10px;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.02;
}

.section-copy {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.9;
  color: rgba(23, 29, 34, 0.68);
}

/* ── Footer ─────────────────────────────────────── */
.footer {
  margin-top: 88px;
  padding: 44px 0 52px;
  border-top: 1px solid var(--line);
  color: rgba(23, 29, 34, 0.6);
  font-size: 13px;
}

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

.footer-motto {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.footer-links {
  display: flex;
  gap: 22px;
  font-weight: 700;
}

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

/* ═══════════════════════════════════════════════════
   HOME — 3D hero
   ═══════════════════════════════════════════════════ */
.hero3d {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink-deep);
  color: var(--paper);
  overflow: hidden;
}

.hero3d canvas#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero3d-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(16, 22, 27, 0.94) 0%, rgba(16, 22, 27, 0.25) 34%, transparent 60%),
    linear-gradient(105deg, rgba(16, 22, 27, 0.55), transparent 45%);
}

.hero3d-content {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 120px 0 72px;
}

.hero3d .pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.hero3d .pill {
  border: 1px solid rgba(245, 244, 239, 0.22);
  background: rgba(16, 22, 27, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(245, 244, 239, 0.78);
}

.hero3d-title {
  max-width: 1020px;
  font-size: clamp(58px, 9vw, 132px);
  line-height: 0.9;
  color: #fff;
}

.hero3d-title em {
  font-style: italic;
  color: var(--mist);
}

.hero3d-copy {
  max-width: 680px;
  margin-top: 28px;
  font-size: 18px;
  line-height: 1.95;
  color: rgba(245, 244, 239, 0.78);
}

.hero3d-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero3d-status {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245, 244, 239, 0.45);
}

.hero3d-status .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #7fd6a4;
  box-shadow: 0 0 12px rgba(127, 214, 164, 0.8);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.scroll-hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(245, 244, 239, 0.4);
}

/* ── Home: pillars ──────────────────────────────── */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.pillar-card {
  border-radius: 30px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.pillar-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 80px rgba(20, 29, 36, 0.14);
}

.pillar-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: rgba(28, 70, 94, 0.8);
}

.pillar-card h3 {
  margin-top: 12px;
  font-size: 30px;
}

.pillar-card p {
  margin: 14px 0 22px;
  font-size: 15px;
  line-height: 1.95;
  color: rgba(23, 29, 34, 0.72);
}

.pillar-link {
  margin-top: auto;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pine);
}

.pillar-link:hover { text-decoration: underline; }

/* ── Home: ethos strip ──────────────────────────── */
.ethos {
  margin-top: 88px;
  padding: 56px 0;
  background: var(--ink);
  color: var(--paper);
}

.ethos .eyebrow { color: rgba(245, 244, 239, 0.5); }

.ethos-words {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 0;
  margin-top: 22px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(30px, 4.4vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.ethos-words .sep {
  margin: 0 18px;
  color: rgba(245, 244, 239, 0.3);
  font-size: 0.6em;
}

.ethos-words span:not(.sep):hover { color: var(--mist); }

.ethos-sub {
  margin-top: 20px;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(245, 244, 239, 0.62);
}

/* ── Home / blog: field note cards ──────────────── */
.note-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 0;
  border-radius: 30px;
  overflow: hidden;
  margin-top: 40px;
}

.note-card-image {
  position: relative;
  min-height: 340px;
}

.note-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.note-card:hover .note-card-image img { transform: scale(1.03); }

.note-card-body {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(28, 70, 94, 0.8);
}

.note-meta .date { color: rgba(23, 29, 34, 0.45); }

.note-card-body h3 {
  margin-top: 14px;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.04;
}

.note-card-body p {
  margin: 16px 0 24px;
  font-size: 15px;
  line-height: 1.95;
  color: rgba(23, 29, 34, 0.7);
}

/* ── Blog index ─────────────────────────────────── */
.blog-header {
  padding: 72px 0 12px;
  max-width: 760px;
}

.blog-coming {
  margin-top: 40px;
  border: 1.5px dashed rgba(23, 29, 34, 0.22);
  border-radius: 24px;
  padding: 30px;
  color: rgba(23, 29, 34, 0.55);
  font-size: 14px;
  line-height: 1.9;
}

.blog-coming strong {
  display: block;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: rgba(166, 133, 94, 0.9);
}

/* ═══════════════════════════════════════════════════
   ARTICLE
   ═══════════════════════════════════════════════════ */
.article-hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  color: #fff;
  background-size: cover;
  background-position: center;
}

.article-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10, 14, 12, 0.95), rgba(10, 14, 12, 0.15) 62%),
    linear-gradient(110deg, rgba(10, 14, 12, 0.4), transparent 55%);
}

.article-hero .topbar { position: relative; z-index: 3; }

.article-hero-inner {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 96px 0 96px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.article-title {
  max-width: 980px;
  margin: 22px 0 0;
  font-size: clamp(52px, 8.5vw, 118px);
  line-height: 0.9;
  color: #fff;
}

.article-dek {
  max-width: 760px;
  margin: 24px 0 0;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 28px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.article-shell {
  width: min(920px, calc(100% - 32px));
  margin: -56px auto 0;
  position: relative;
  z-index: 4;
}

.article-card {
  border-radius: 30px;
  overflow: hidden;
}

.article-body {
  padding: clamp(28px, 5.5vw, 72px);
  font-size: 17px;
  line-height: 1.85;
}

.article-body > * { max-width: 720px; }
.article-body > figure,
.article-body > .grid2,
.article-body > .compare,
.article-body > .metrics,
.article-body > .result-panel,
.article-body > .product-section { max-width: none; }

.article-body .lede {
  margin-top: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  line-height: 1.6;
  color: rgba(23, 29, 34, 0.86);
}

.article-body h2 {
  margin: 60px 0 18px;
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.04;
}

.article-body h3 {
  margin: 26px 0 8px;
  font-size: 19px;
  line-height: 1.3;
}

.article-body p { margin: 0 0 20px; }

.article-body figure { margin: 40px 0; }

.article-body figure img {
  width: 100%;
  max-height: 720px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ddd;
  cursor: zoom-in;
}

.article-body figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(23, 29, 34, 0.55);
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 40px 0;
}

.grid2 figure { margin: 0; }

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 34px 0;
}

.metric {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
}

.metric strong {
  display: block;
  font-size: 17px;
}

.metric span {
  font-size: 13px;
  color: rgba(23, 29, 34, 0.55);
}

.callout {
  margin: 36px 0;
  padding: 22px 26px;
  border-left: 5px solid var(--rust);
  border-radius: 0 18px 18px 0;
  background: rgba(182, 83, 43, 0.09);
}

.warning {
  margin: 36px 0;
  padding: 24px 26px;
  border-radius: 18px;
  color: var(--paper);
  background: var(--ink);
  font-size: 15px;
  line-height: 1.85;
}

.warning strong { color: #f0b98d; }

.steps { margin: 30px 0; }

.step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  align-items: start;
  margin: 24px 0;
}

.step .num {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
  font-weight: 800;
  font-size: 16px;
}

.step h3 { margin: 4px 0 6px; }
.step p { margin: 0; font-size: 15.5px; color: rgba(23, 29, 34, 0.75); }

.compare {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin: 40px 0;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #222;
  user-select: none;
  -webkit-user-select: none;
}

.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare .after { clip-path: inset(0 0 0 50%); }

.compare .divider {
  position: absolute;
  inset: 0 auto 0 50%;
  width: 3px;
  background: #fff;
}

.compare input {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.compare-label {
  position: absolute;
  top: 16px;
  padding: 6px 10px;
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.compare-label.before { left: 16px; }
.compare-label.after-label { right: 16px; }

.result-panel {
  margin: 48px 0 0;
  padding: 32px;
  border-radius: 20px;
  color: var(--paper);
  background: linear-gradient(135deg, var(--ink), var(--pine));
}

.result-panel h2 { margin: 0 0 14px !important; color: #fff; }
.result-panel p { margin: 0; color: rgba(245, 244, 239, 0.85); }

.product-section {
  margin: 56px 0 0;
  padding: 32px;
  border-radius: 22px;
  background: rgba(23, 29, 34, 0.05);
  border: 1px solid var(--line);
}

.product-section h2 { margin-top: 0 !important; }

.disclosure {
  margin: 18px 0 24px;
  padding: 16px 18px;
  border: 1px solid rgba(166, 133, 94, 0.45);
  border-radius: 14px;
  background: rgba(166, 133, 94, 0.1);
  font-size: 13.5px;
  line-height: 1.8;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.product-card .tag {
  width: max-content;
  margin-bottom: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--rust);
  background: rgba(182, 83, 43, 0.12);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.product-card h3 { margin: 0 0 6px; font-size: 16.5px; }

.product-card p {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(23, 29, 34, 0.62);
}

.shop-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.shop-link {
  display: inline-flex;
  padding: 9px 13px;
  border-radius: 9px;
  color: var(--paper);
  background: var(--pine);
  font-size: 12.5px;
  font-weight: 700;
  transition: transform 160ms ease;
}

.shop-link:hover { transform: translateY(-2px); }

.lightbox {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: none;
  place-items: center;
  padding: 2rem;
  background: rgba(10, 14, 12, 0.92);
  cursor: zoom-out;
}

.lightbox.open { display: grid; }

.lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
}

.article-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin: 48px auto 0;
  width: min(920px, calc(100% - 32px));
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
  .pillars-grid { grid-template-columns: 1fr; }
  .note-card { grid-template-columns: 1fr; }
  .note-card-image { min-height: 260px; }
}

@media (max-width: 760px) {
  .container { width: min(1200px, calc(100% - 28px)); }

  .topbar { padding-top: 14px; }

  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav { gap: 16px; flex-wrap: wrap; }

  .hero3d-content { padding-bottom: 88px; }
  .hero3d-copy { font-size: 16px; line-height: 1.85; }
  .hero3d-status { display: none; }

  .grid2, .metrics, .product-grid { grid-template-columns: 1fr; }

  .note-card-body { padding: 24px; }
  .pillar-card { padding: 24px; }

  .article-hero { min-height: 78vh; }
  .article-shell { margin-top: -36px; }
}
