/* EtechMail — "The Correspondence Press"
   A modern print shop for correspondence: warm cream paper, ink serif type,
   sealing-wax red actions, postal-blue details, ledger rules and postmarks. */

/* ===== SELF-HOSTED FONTS ===== */
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-italic-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-var.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Courier Prime';
  src: url('/fonts/courier-prime-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Courier Prime';
  src: url('/fonts/courier-prime-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ===== RESET & TOKENS ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --paper: #FAF6ED;
  --paper-warm: #F3EBDB;
  --card: #FFFDF7;
  --ink: #221E16;
  --ink-soft: #5B5342;
  --ink-faint: #8A8070;
  --wax: #B23A2E;
  --wax-deep: #8E2A20;
  --post-blue: #2E4B78;
  --stamp-green: #3E6B4F;
  --brass: #9C7B33;
  --rule: #E3D9C4;
  --rule-strong: #C9BCA0;

  /* Legacy token aliases (templates/utilities reference these) */
  --primary: #B23A2E;
  --primary-dark: #8E2A20;
  --primary-light: #C24537;
  --primary-bg: #F3EBDB;
  --secondary: #3E6B4F;
  --secondary-dark: #2F5540;
  --text: #221E16;
  --text-light: #5B5342;
  --text-muted: #8A8070;
  --bg: #FFFDF7;
  --bg-light: #F3EBDB;
  --bg-dark: #221E16;
  --border: #E3D9C4;

  --font-display: 'Fraunces', Georgia, 'Iowan Old Style', serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-mono: 'Courier Prime', 'Courier New', monospace;

  --radius: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --shadow: 0 2px 0 rgba(60, 45, 20, .08);
  --shadow-md: 0 3px 0 rgba(60, 45, 20, .07), 0 10px 22px -12px rgba(60, 45, 20, .22);
  --shadow-lg: 0 14px 28px -14px rgba(60, 45, 20, .25);
  --shadow-img: 0 4px 0 rgba(60, 45, 20, .06), 0 18px 32px -16px rgba(60, 45, 20, .28);
  --airmail: repeating-linear-gradient(45deg, #B23A2E 0 12px, #FAF6ED 12px 18px, #2E4B78 18px 30px, #FAF6ED 30px 36px);
  --max-width: 1200px;
  --transition: 0.22s ease;
}

html { scroll-behavior: smooth; }
/* Rotated postal decorations (wax seals, postmarks) may overhang by a few px —
   clip instead of scrolling; overflow-x:clip does not create a scroll container */
html, body { overflow-x: clip; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.18 0 0 0 0 0.08 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23p)'/%3E%3C/svg%3E");
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 640; letter-spacing: -0.01em; }
h1 em, h2 em { font-style: italic; color: var(--wax); }

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

:focus-visible { outline: 2px solid var(--post-blue); outline-offset: 2px; }

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

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

::selection { background: rgba(178, 58, 46, .18); }

/* ===== HEADER ===== */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 1000;
}
/* Airmail rule placement 1/5: under the site header */
.site-header::after {
  content: '';
  display: block;
  height: 6px;
  background: var(--airmail);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.logo svg { flex-shrink: 0; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-highlight { color: var(--wax); }
.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 2px;
}

/* Nav */
.nav-list { display: flex; list-style: none; gap: 2px; align-items: center; }

.nav-link {
  display: block;
  padding: 8px 14px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.nav-link:hover { color: var(--wax-deep); background: var(--paper-warm); }

.nav-cta {
  background: var(--wax) !important;
  color: #FFFDF7 !important;
  padding: 8px 18px !important;
  border-radius: var(--radius);
  border-bottom: 2px solid var(--wax-deep);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  text-decoration: none;
}
.nav-cta:hover { background: var(--wax-deep) !important; color: #FFFDF7 !important; }
.nav-cta:active { transform: translateY(1px); border-bottom-width: 1px; }

/* Dropdown */
.nav-dropdown { position: relative; }

.dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border-top: 5px solid;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  opacity: 0.5;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--card);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  list-style: none;
  z-index: 100;
}
.nav-dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu a {
  display: block;
  padding: 9px 14px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.dropdown-menu a:hover { background: var(--paper-warm); color: var(--wax-deep); }

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.mobile-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== BREADCRUMB ===== */
.breadcrumb { background: var(--paper-warm); border-bottom: 1px solid var(--rule); padding: 10px 0; }

.breadcrumb-list {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.breadcrumb-item + .breadcrumb-item::before {
  content: '\203A';
  margin-right: 6px;
  color: var(--ink-faint);
}
.breadcrumb-item a { color: var(--wax-deep); }
.breadcrumb-item.active span { color: var(--ink-soft); }

/* ===== POSTMARK & RUBBER-STAMP DEVICES ===== */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--post-blue);
  border: 2px solid var(--post-blue);
  outline: 1px dashed var(--post-blue);
  outline-offset: 3px;
  border-radius: 4px;
  padding: 7px 14px;
  transform: rotate(-2deg);
  margin-bottom: 26px;
  opacity: 0.92;
  background: transparent;
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--stamp-green); box-shadow: 0 0 0 3px rgba(62, 107, 79, .2); }

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--post-blue);
  border: 1.5px solid var(--post-blue);
  outline: 1px dashed var(--post-blue);
  outline-offset: 2px;
  border-radius: 3px;
  padding: 5px 12px;
  transform: rotate(-1.5deg);
  margin-bottom: 18px;
  opacity: 0.88;
  background: transparent;
}

/* Circular postmark roundel (fixed-size, controlled content) */
.postmark {
  width: 108px;
  height: 108px;
  border: 2px solid var(--post-blue);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--post-blue);
  text-align: center;
  position: relative;
  transform: rotate(-5deg);
  opacity: 0.9;
  background: var(--paper);
}
.postmark::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px dashed var(--post-blue);
  border-radius: 50%;
}
.postmark strong { font-size: 0.95rem; letter-spacing: 0; }

/* ===== HERO (home) ===== */
.hero {
  background: var(--paper);
  color: var(--ink);
  padding: 76px 0 64px;
  position: relative;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  text-align: left;
}

.hero h1 {
  font-size: clamp(2.3rem, 4.5vw, 3.5rem);
  font-weight: 640;
  margin-bottom: 22px;
  line-height: 1.08;
  font-variation-settings: 'opsz' 144;
}
.hero p { font-size: 1.12rem; color: var(--ink-soft); max-width: 620px; margin-bottom: 28px; line-height: 1.65; }

.hero-note { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-soft); margin-top: 14px; margin-bottom: 0; }

/* Typed specimen slip */
.specimen {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  padding: 10px 18px;
  margin-bottom: 26px;
  position: relative;
}
.specimen::before, .specimen::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border-color: var(--rule-strong);
  border-style: solid;
}
.specimen::before { top: -3px; left: -3px; border-width: 2px 0 0 2px; }
.specimen::after { bottom: -3px; right: -3px; border-width: 0 2px 2px 0; }

/* Hero artwork: stamp-perforation mount */
.hero-art { position: relative; }
.hero-art img, .page-hero-art img {
  display: block;
  width: 100%;
  border: 1px solid var(--rule);
}
.stamp-mount, .hero-art, .page-hero-art { --perf: 16px; }
.hero-art .art-frame, .page-hero-art .art-mount, .stamp-mount {
  background-color: var(--card);
  background-image:
    radial-gradient(circle 5px at 8px 0, var(--paper) 5px, transparent 5.5px),
    radial-gradient(circle 5px at 8px 16px, var(--paper) 5px, transparent 5.5px),
    radial-gradient(circle 5px at 0 8px, var(--paper) 5px, transparent 5.5px),
    radial-gradient(circle 5px at 16px 8px, var(--paper) 5px, transparent 5.5px);
  background-size: var(--perf) var(--perf);
  background-position: top left, bottom left, left top, right top;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  padding: 18px;
  box-shadow: var(--shadow-img);
  transform: rotate(1.5deg);
}
/* Inner pages carry a bare <img> inside .page-hero-art — mount the container itself */
.page-hero-art {
  background-color: var(--card);
  background-image:
    radial-gradient(circle 5px at 8px 0, var(--paper) 5px, transparent 5.5px),
    radial-gradient(circle 5px at 8px 16px, var(--paper) 5px, transparent 5.5px),
    radial-gradient(circle 5px at 0 8px, var(--paper) 5px, transparent 5.5px),
    radial-gradient(circle 5px at 16px 8px, var(--paper) 5px, transparent 5.5px);
  background-size: var(--perf) var(--perf);
  background-position: top left, bottom left, left top, right top;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  padding: 16px;
  box-shadow: var(--shadow-img);
  transform: rotate(-1.2deg);
}
.hero-art .art-postmark {
  position: absolute;
  top: -34px;
  right: -18px;
  z-index: 2;
}

.hero .btn-group { justify-content: flex-start; }

/* Ledger strip stats */
.hero-stats {
  display: flex;
  gap: 0;
  margin-top: 40px;
  flex-wrap: wrap;
  border-top: 3px double var(--rule-strong);
  padding-top: 0;
}
.hero-stat {
  text-align: left;
  padding: 16px 28px 0 0;
  margin-right: 28px;
  border-right: 1px solid var(--rule);
}
.hero-stat:last-child { border-right: none; margin-right: 0; }
.hero-stat .stat-number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.7rem;
  display: block;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.hero-stat .stat-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ===== BUTTONS (letterpress) ===== */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background: var(--wax);
  color: #FFFDF7;
  border-bottom: 2px solid var(--wax-deep);
}
.btn-primary:hover { background: var(--wax-deep); color: #FFFDF7; }
.btn-primary:active { transform: translateY(1px); border-bottom-width: 1px; }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.btn-white {
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-white:hover { background: var(--ink); color: var(--paper); }

.btn-secondary {
  background: var(--stamp-green);
  color: #FFFDF7;
  border-bottom: 2px solid #2F5540;
}
.btn-secondary:hover { background: #2F5540; color: #FFFDF7; }
.btn-secondary:active { transform: translateY(1px); border-bottom-width: 1px; }

/* Heroes are light now — keep button treatment identical there */
.hero .btn-primary, .page-hero .btn-primary { background: var(--wax); color: #FFFDF7; }
.hero .btn-primary:hover, .page-hero .btn-primary:hover { background: var(--wax-deep); color: #FFFDF7; }
.hero .btn-outline, .page-hero .btn-outline { color: var(--ink); border-color: var(--ink); }
.hero .btn-outline:hover, .page-hero .btn-outline:hover { background: var(--ink); color: var(--paper); }

/* Dark CTA band keeps light-on-dark variants */
.cta-section .btn-outline { color: var(--paper); border-color: rgba(250, 246, 237, .8); }
.cta-section .btn-outline:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.btn-lg { padding: 15px 38px; font-size: 1.02rem; }

.btn-group { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== SECTIONS ===== */
.section { padding: 84px 0; }
.section-light { background: var(--paper-warm); }
.section-dark { background: var(--ink); color: var(--paper); }

.section h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 18px; line-height: 1.15; }
.section p { line-height: 1.75; }
.section-header { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-header h2 { margin-bottom: 14px; }
.section-header p { color: var(--ink-soft); font-size: 1.05rem; }
.section-dark .section-header p { color: rgba(250, 246, 237, .75); }

/* ===== FEATURE GRID ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 40px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}
.feature-card:hover { box-shadow: var(--shadow-lg); border-color: var(--rule-strong); transform: translateY(-3px); }

.feature-icon {
  width: 50px;
  height: 50px;
  background: var(--paper-warm);
  color: var(--post-blue);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.4rem;
}
.feature-icon svg { width: 26px; height: 26px; }

.feature-card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.feature-card h3 a { color: var(--ink); text-decoration: none; }
.feature-card h3 a:hover { color: var(--wax-deep); }
.feature-card p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.65; }

/* ===== MEDIA SPLIT ===== */
.media-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.media-split + .media-split { margin-top: 84px; }
.media-split.reverse .media-art { order: 2; }

.media-art { position: relative; }
.media-art img {
  width: 100%;
  border: 1px solid var(--rule);
  display: block;
}
.media-art .art-frame {
  background: var(--card);
  padding: 14px;
  box-shadow: var(--shadow-img);
  transform: rotate(-0.8deg);
}
.media-split.reverse .art-frame { transform: rotate(0.8deg); }

.media-copy h2 { margin-bottom: 16px; }
.media-copy > p { color: var(--ink-soft); margin-bottom: 20px; }

.check-list { list-style: none; margin: 0 0 24px; }
.check-list li {
  padding: 7px 0 7px 32px;
  position: relative;
  color: var(--ink);
  font-size: .97rem;
}
.check-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 7px;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--stamp-green);
  border-radius: 3px;
  color: var(--stamp-green);
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-3deg);
}

/* ===== PAR AVION TRUST BAND ===== */
/* Airmail rule placement 2/5: hero → trust band seam */
.trust-band {
  background: var(--card);
  border-bottom: 1px solid var(--rule);
  padding: 24px 0;
  position: relative;
}
.trust-band::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--airmail);
}
.trust-band { padding-top: 30px; }
.trust-band .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.trust-item svg { width: 18px; height: 18px; color: var(--post-blue); flex-shrink: 0; }
.trust-item + .trust-item::before { content: '\2766'; color: var(--brass); margin-right: 14px; font-size: .9rem; }

/* ===== SORTING DESK (bento) ===== */
.desk-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  border: 1px solid var(--rule-strong);
  background: var(--card);
  box-shadow: var(--shadow-md);
}
.desk-cell {
  padding: 32px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  min-height: 180px;
}
.desk-cell h3 { font-size: 1.1rem; margin-bottom: 8px; }
.desk-cell p { color: var(--ink-soft); font-size: .92rem; line-height: 1.6; }
.desk-span-3 { grid-column: span 3; }
.desk-span-4 { grid-column: span 4; }
.desk-span-5 { grid-column: span 5; }
.desk-span-6 { grid-column: span 6; }
.desk-span-8 { grid-column: span 8; }

.desk-price {
  background: var(--paper-warm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.desk-price .denom {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.6rem, 6vw, 5.2rem);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -2px;
}
.desk-price .denom-sub { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-soft); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 10px; }

.wax-dot {
  width: 34px; height: 34px;
  background: radial-gradient(circle at 35% 30%, #C24537, #8E2A20 70%);
  border-radius: 47% 53% 50% 50% / 55% 45% 55% 45%;
  position: absolute;
  top: 22px; right: 24px;
  box-shadow: 0 2px 4px rgba(60, 45, 20, .25);
}

/* DNS receipt slip */
.receipt {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--ink);
  line-height: 2.1;
}
.receipt .row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--rule); }
.receipt .verified {
  color: var(--stamp-green);
  border: 1.5px solid var(--stamp-green);
  border-radius: 3px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0 6px;
  align-self: center;
  transform: rotate(-2deg);
}

/* Uptime gauge */
.gauge {
  width: 92px; height: 46px;
  border-radius: 92px 92px 0 0;
  background: conic-gradient(from -90deg at 50% 100%, var(--brass) 0deg 178deg, var(--rule) 178deg 180deg);
  position: relative;
  margin-bottom: 14px;
}
.gauge::after {
  content: '';
  position: absolute;
  inset: 8px 8px 0;
  border-radius: 84px 84px 0 0;
  background: var(--card);
}

/* ===== CORRESPONDENCE LEDGER (CSS webmail proof) ===== */
.ledger-window {
  background: var(--card);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-md);
  font-family: var(--font-mono);
  font-size: .78rem;
}
.ledger-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
}
.ledger-bar i { width: 9px; height: 9px; border: 1px solid var(--rule-strong); border-radius: 50%; }
.ledger-head {
  display: grid;
  grid-template-columns: 1.1fr 2fr .9fr;
  gap: 10px;
  padding: 10px 16px 8px;
  border-bottom: 3px double var(--rule-strong);
  color: var(--ink-soft);
  letter-spacing: 1.5px;
  font-size: .62rem;
  font-weight: 700;
}
.ledger-row {
  display: grid;
  grid-template-columns: 1.1fr 2fr .9fr;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  align-items: center;
  position: relative;
}
.ledger-row .from { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger-row .subj { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger-row .time { text-align: right; color: var(--ink-faint); }
.ledger-row.unread .from::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--wax);
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: 1px;
}
.ledger-row .delivered {
  position: absolute;
  right: 84px;
  color: var(--stamp-green);
  border: 1.5px solid var(--stamp-green);
  border-radius: 3px;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 1px 6px;
  transform: rotate(-4deg);
  background: var(--card);
}

/* ===== PRICING (postage stamps) ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: start;
}

.pricing-card {
  --perf: 16px;
  background-color: var(--card);
  background-image:
    radial-gradient(circle 5px at 8px 0, var(--paper) 5px, transparent 5.5px),
    radial-gradient(circle 5px at 8px 16px, var(--paper) 5px, transparent 5.5px),
    radial-gradient(circle 5px at 0 8px, var(--paper) 5px, transparent 5.5px),
    radial-gradient(circle 5px at 16px 8px, var(--paper) 5px, transparent 5.5px);
  background-size: var(--perf) var(--perf);
  background-position: top left, bottom left, left top, right top;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  border: 1px solid var(--rule);
  padding: 42px 34px;
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--shadow);
  position: relative;
}
.section-light .pricing-card {
  background-image:
    radial-gradient(circle 5px at 8px 0, var(--paper-warm) 5px, transparent 5.5px),
    radial-gradient(circle 5px at 8px 16px, var(--paper-warm) 5px, transparent 5.5px),
    radial-gradient(circle 5px at 0 8px, var(--paper-warm) 5px, transparent 5.5px),
    radial-gradient(circle 5px at 16px 8px, var(--paper-warm) 5px, transparent 5.5px);
}
.pricing-card:hover { box-shadow: var(--shadow-lg); }

/* Airmail rule placement 3/5: featured plan top edge */
.pricing-card.popular {
  border-color: var(--rule-strong);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}
.pricing-card.popular::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--airmail);
}
.pricing-card.popular::before {
  content: 'BEST VALUE';
  position: absolute;
  top: -26px;
  right: -14px;
  width: 74px;
  height: 74px;
  background: radial-gradient(circle at 35% 30%, #C24537, #8E2A20 72%);
  border-radius: 47% 53% 50% 50% / 55% 45% 55% 45%;
  color: #FFFDF7;
  font-family: var(--font-mono);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(8deg);
  box-shadow: 0 3px 6px rgba(60, 45, 20, .3);
  z-index: 2;
}

.pricing-card h3 { font-size: 1.35rem; margin-bottom: 8px; }
.pricing-card .price {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3.2rem;
  color: var(--ink);
  margin: 14px 0;
  letter-spacing: -2px;
}
.pricing-card .price span { font-family: var(--font-mono); font-size: .95rem; font-weight: 400; color: var(--ink-soft); letter-spacing: 0; }
.pricing-card .price-desc { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 24px; }

.pricing-features { list-style: none; text-align: left; margin-bottom: 30px; }
.pricing-features li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--rule);
  font-size: 0.9rem;
  color: var(--ink);
}
.pricing-features li::before {
  content: '\2713';
  color: var(--stamp-green);
  font-weight: 700;
  margin-right: 10px;
}

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
  border: 1px solid var(--rule);
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:hover { border-color: var(--rule-strong); }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: var(--card);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  width: 100%;
  text-align: left;
  color: var(--ink);
  transition: color var(--transition);
}
.faq-question:hover { color: var(--wax-deep); }
.faq-question::after {
  content: '+';
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink-faint);
  flex-shrink: 0;
  margin-left: 16px;
}
.faq-item.active .faq-question::after { content: '\2212'; color: var(--wax); }

.faq-answer {
  display: none;
  padding: 0 24px 20px;
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 0.95rem;
}
.faq-item.active .faq-answer { display: block; animation: unfold .25s ease; }
@keyframes unfold { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ===== ARTICLE / GUIDE CONTENT ===== */
.article-content { max-width: 780px; margin: 0 auto; }

.article-content h1 { font-size: 2.4rem; margin-bottom: 16px; line-height: 1.15; }
.article-content h2 {
  font-size: 1.7rem;
  margin: 48px 0 16px;
  padding-top: 18px;
  border-top: 3px double var(--rule-strong);
}
.article-content h3 { font-size: 1.25rem; margin: 32px 0 12px; }
.article-content p { margin-bottom: 16px; color: var(--ink); }
.article-content ul, .article-content ol { margin: 0 0 16px 24px; color: var(--ink); }
.article-content li { margin-bottom: 8px; }
.article-content img { border: 1px solid var(--rule); background: var(--card); padding: 10px; box-shadow: var(--shadow-md); }

.article-meta { font-family: var(--font-mono); color: var(--ink-soft); font-size: 0.78rem; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 32px; }

/* Table of Contents — ledger card */
.toc {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  padding: 22px 30px;
  margin-bottom: 40px;
}
.toc h4 { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 2px; color: var(--ink-soft); margin-bottom: 12px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; font-size: 0.95rem; }
.toc a { color: var(--wax-deep); }

/* Typed specimen / code blocks */
.code-block {
  background: var(--paper-warm);
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 22px 26px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 24px;
  position: relative;
}
.code-block::before, .code-block::after {
  content: '';
  position: absolute;
  width: 9px; height: 9px;
  border-color: var(--rule-strong);
  border-style: solid;
}
.code-block::before { top: -3px; left: -3px; border-width: 2px 0 0 2px; }
.code-block::after { bottom: -3px; right: -3px; border-width: 0 2px 2px 0; }

/* Callout — typed memo */
.callout {
  background: var(--paper-warm);
  border-left: 3px solid var(--wax);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.callout p { margin: 0; color: var(--ink); }
.callout strong { color: var(--wax-deep); }

/* ===== COMPARISON TABLE (ledger) ===== */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 28px;
  font-size: 0.92rem;
  background: transparent;
}
.comparison-table th, .comparison-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.comparison-table th {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 3px double var(--rule-strong);
  background: transparent;
}
.comparison-table td:nth-child(2) { font-family: var(--font-mono); }
.comparison-table tr:hover { background: rgba(243, 235, 219, .5); }
.comparison-table .highlight-col, .comparison-table td.yes { color: var(--stamp-green); font-weight: 700; }

/* Airmail rule placement 4/5: our row in the ledger */
.comparison-table tr.us td {
  background-color: var(--card);
  background-image: var(--airmail);
  background-size: 100% 4px;
  background-repeat: no-repeat;
  background-position: top;
  padding-top: 17px;
  color: var(--wax-deep);
  font-weight: 700;
}
.comparison-table tr.us td.yes { color: var(--stamp-green); }
.table-scroll, .comparison-table-wrapper { overflow-x: auto; }

/* ===== CTA SECTION (sealed envelope band) ===== */
.cta-section {
  background: var(--ink);
  color: var(--paper);
  padding: 76px 0;
  text-align: center;
  position: relative;
}
.cta-section h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin-bottom: 16px; color: var(--paper); }
.cta-section h2 em { color: #E5B8B2; }
.cta-section p { color: rgba(250, 246, 237, .8); margin-bottom: 30px; max-width: 580px; margin-left: auto; margin-right: auto; }

/* ===== HOW IT WORKS (wax-seal steps) ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 52px; left: 6%; right: 6%;
  border-top: 2px dashed var(--rule-strong);
}

.step-card {
  text-align: center;
  padding: 28px 22px;
  background: var(--card);
  border: 1px solid var(--rule);
  transition: all var(--transition);
  position: relative;
  box-shadow: var(--shadow);
}
.step-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.step-number {
  width: 54px;
  height: 54px;
  background: radial-gradient(circle at 35% 30%, #C24537, #8E2A20 72%);
  color: #FFFDF7;
  border-radius: 47% 53% 50% 50% / 55% 45% 55% 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 auto 16px;
  box-shadow: 0 3px 6px rgba(60, 45, 20, .3);
}

.step-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step-card p { color: var(--ink-soft); font-size: 0.9rem; }

/* ===== TESTIMONIALS (postcards) ===== */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.testimonial-card {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 30px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: all var(--transition);
}
.testimonial-card:nth-child(1) { transform: rotate(0.8deg); }
.testimonial-card:nth-child(2) { transform: rotate(-0.6deg); }
.testimonial-card:nth-child(3) { transform: rotate(0.5deg); }
@media (hover: hover) {
  .testimonial-card:hover { transform: rotate(0) translateY(-3px); box-shadow: var(--shadow-lg); }
}

.testimonial-stars { color: var(--brass); font-size: .95rem; letter-spacing: 3px; }
.testimonial-card blockquote {
  color: var(--ink);
  font-size: .97rem;
  font-style: italic;
  line-height: 1.7;
  flex: 1;
}
.testimonial-who { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 44px; height: 44px;
  background: var(--paper-warm);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}
.testimonial-who strong { display: block; font-size: .92rem; font-family: var(--font-body); }
.testimonial-who span { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; }

/* ===== CONTACT FORM ===== */
.contact-form { max-width: 600px; margin: 0 auto; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.9rem; }

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--card);
  color: var(--ink);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--post-blue);
  box-shadow: 0 0 0 3px rgba(46, 75, 120, .15);
}
.form-group textarea { min-height: 140px; resize: vertical; }

/* ===== FOOTER ===== */
/* Airmail rule placement 5/5: footer top */
.site-footer {
  background: var(--ink);
  color: rgba(250, 246, 237, .82);
  padding: 64px 0 0;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--airmail);
}
.site-footer { padding-top: 70px; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(250, 246, 237, .14);
}

.footer-col .footer-heading {
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; color: rgba(250, 246, 237, .82); font-size: 0.9rem; }
.footer-col a {
  color: rgba(250, 246, 237, .82);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--paper); text-decoration: underline; }

.footer-brand { margin-top: 20px; }
.footer-brand .logo-text { font-size: 1.1rem; color: var(--paper); }
.footer-brand .logo-highlight { color: #E5B8B2; }
.footer-brand .logo-sub { color: rgba(250, 246, 237, .75) !important; }
.footer-brand p { font-size: 0.8rem; color: rgba(250, 246, 237, .7); margin-top: 8px; line-height: 1.5; }
.footer-logo-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; margin-bottom: 12px; }
.footer-logo-link span { color: var(--paper); }
.footer-logo-link:hover span { color: #E5B8B2; }

.footer-bottom { padding: 24px 0; text-align: center; }
.footer-bottom p { color: rgba(250, 246, 237, .6); font-family: var(--font-mono); font-size: 0.78rem; }

/* ===== RELATED ===== */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.related-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 22px;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}
.related-card:hover { box-shadow: var(--shadow-md); border-color: var(--rule-strong); transform: translateY(-2px); }
.related-card h3 { font-size: 1.02rem; margin-bottom: 8px; color: var(--ink); }
.related-card p { font-size: 0.85rem; color: var(--ink-soft); }

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.contact-grid { grid-template-columns: 1fr 1.5fr; gap: 3rem; align-items: start; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.text-muted { color: var(--ink-soft); }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  background: var(--paper);
  color: var(--ink);
  padding: 60px 0 56px;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}
.page-hero h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 16px; line-height: 1.12; font-variation-settings: 'opsz' 100; }
.page-hero p { color: var(--ink-soft); max-width: 640px; margin: 0 auto 26px; font-size: 1.06rem; line-height: 1.7; }
.page-hero p a { color: var(--wax-deep); }
.page-hero .btn-group { margin-bottom: 8px; }
.page-hero .hero-stats { margin-top: 36px; justify-content: center; }

.page-hero-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: center;
  text-align: left;
}
.page-hero-inner .page-hero-copy p { margin-left: 0; }
.page-hero-inner .btn-group { justify-content: flex-start; }
.page-hero-inner .hero-stats { justify-content: flex-start; }

.page-hero-art { position: relative; max-width: 440px; margin-left: auto; }

/* ===== 404 ===== */
.page-404 { text-align: center; padding: 100px 20px; }
.page-404 h1 { font-size: 6rem; font-weight: 900; color: var(--wax); margin-bottom: 16px; }
.page-404 h2 { font-size: 1.5rem; margin-bottom: 16px; }
.page-404 p { color: var(--ink-soft); margin-bottom: 32px; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .testimonial-card, .hero-eyebrow, .section-tag, .postmark,
  .hero-art .art-frame, .page-hero-art .art-frame, .media-art .art-frame { transform: none !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .hero-split { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero .btn-group { justify-content: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-stats { justify-content: center; }
  .hero-stat { text-align: center; padding-right: 20px; margin-right: 20px; }
  .hero-art { max-width: 520px; margin: 0 auto; }
  .hero-art .art-postmark { top: -22px; right: -6px; }

  .page-hero-inner { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .page-hero-inner .btn-group { justify-content: center; }
  .page-hero-inner .hero-stats { justify-content: center; }
  .page-hero-inner .page-hero-copy p { margin-left: auto; margin-right: auto; }
  .page-hero-art { margin: 0 auto; max-width: 400px; }

  .media-split { grid-template-columns: 1fr; gap: 36px; }
  .media-split.reverse .media-art { order: 0; }
  .media-art { max-width: 520px; margin: 0 auto; }

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

  .desk-cell { grid-column: span 6 !important; }
}

@media (max-width: 768px) {
  .mobile-toggle { display: flex; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    max-height: calc(100vh - 74px);
    overflow-y: auto;
  }
  .nav-menu.active { display: block; }
  .nav-list { flex-direction: column; gap: 0; align-items: stretch; }
  .nav-link { padding: 12px 16px; }
  .nav-cta { display: block; text-align: center; margin: 8px 16px; }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
    display: none;
    min-width: 0;
  }
  .nav-dropdown.active .dropdown-menu { display: block; }
  .nav-dropdown:hover .dropdown-menu { display: none; }
  .nav-dropdown.active:hover .dropdown-menu { display: block; }

  .hero { padding: 52px 0 56px; }
  .hero-stats { gap: 0; }
  .hero-stat .stat-number { font-size: 1.4rem; }

  .section { padding: 56px 0; }

  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.popular { transform: none; }
  .pricing-card.popular::before { right: 6px; top: -20px; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid::before { display: none; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .related-grid { grid-template-columns: 1fr; }

  .article-content h1 { font-size: 1.8rem; }
  .article-content h2 { font-size: 1.35rem; }

  .trust-band .container { justify-content: center; }
  .trust-item + .trust-item::before { display: none; }

  .desk-cell { grid-column: span 12 !important; min-height: 0; }

  .page-404 h1 { font-size: 4rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  body { font-size: 16px; }
  .hero { padding: 40px 0 48px; }
  .steps-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-group { flex-direction: column; align-items: stretch; }
  .hero-art, .page-hero-art, .media-art { max-width: 100%; }
  .hero-art .art-postmark { display: none; }
  .postmark { width: 92px; height: 92px; font-size: .55rem; }
}
