/* ==========================================================================
   Nortefy — Still Water v1.0
   Global tokens + base styles. All values are surfaced as CSS variables
   so any surface can be retuned from here.
   ========================================================================== */

:root {
  /* ---- Core palette ---- */
  --oyster:     #EEF0EC;  /* primary surface */
  --fog:        #D7DCD4;  /* secondary surface */
  --stone:      #2F554E;  /* grounding / inverse */
  --stone-dim:  color-mix(in srgb, #2F554E, black 30%);  /* 30% dimmer stone */
  --clay:       #B2694A;  /* single accent (large only) */
  --clay-deep:  #8F5238;  /* accent text / hover */
  --ember:      #8C2F2F;  /* problem / pain signal */
  --deep:       #1E2A2A;  /* dark mode ink */
  --paper:      #F5F6F2;  /* cards, utility surface */
  --moss:       #5A6960;  /* italic quiet voice */
  --ink:        #14201E;  /* body text, headlines */
  --rule:       #CFD4CB;  /* hairlines, dividers */

  /* ---- Semantic aliases ---- */
  --bg-color:       var(--oyster);
  --surface:        var(--oyster);
  --surface-alt:    var(--fog);
  --card-bg:        var(--paper);
  --text-color:     var(--ink);
  --muted-color:    var(--moss);
  --accent-color:   var(--clay);
  --accent-text:    var(--clay-deep);
  --accent-hover:   var(--clay-deep);
  --border-color:   var(--rule);
  --inverse-bg:     var(--stone);
  --inverse-text:   var(--oyster);
  --inverse-text-soft: rgba(238, 240, 236, 0.85);

  /* ---- Type families ---- */
  --font-serif: 'EB Garamond', 'Iowan Old Style', Georgia, serif;
  --font-sans:  'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ---- Type scale (major fourth, 1.333) ---- */
  --fs-display: 4rem;     /* ~64px */
  --fs-h1:      3rem;     /* 48px */
  --fs-h2:      2.25rem;  /* 36px */
  --fs-h3:      1.6rem;   /* ~26px */
  --fs-h4:      1.3rem;   /* ~21px */
  --fs-h5:      1.15rem;  /* ~18px */
  --fs-lede:    1.3rem;   /* ~21px */
  --fs-body-lg: 1.05rem;  /* ~17px */
  --fs-body:    1rem;     /* 16px */
  --fs-body-sm: 0.95rem;  /* ~15px */
  --fs-small:   0.82rem;  /* ~13px */
  --fs-mono:    0.82rem;  /* ~13px */

  /* ---- Line heights ---- */
  --lh-display: 1;
  --lh-tight:   1.05;
  --lh-snug:    1.2;
  --lh-body:    1.55;
  --lh-prose:   1.65;

  /* ---- Letter spacing ---- */
  --ls-display: -0.025em;
  --ls-tight:   -0.02em;
  --ls-heading: -0.015em;
  --ls-normal:  0;
  --ls-mono:    0.14em;
  --ls-label:   0.18em;

  /* ---- Font weights ---- */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  /* ---- Radii ---- */
  --radius-sm:   4px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-pill: 999px;

  /* ---- Spacing scale ---- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-7:  2.5rem;
  --space-8:  3rem;
  --space-10: 4rem;
  --space-12: 6rem;
  --space-14: 8rem;

  /* ---- Section / container ---- */
  --section-y:      var(--space-12);
  --container-max:  1200px;
  --container-pad:  var(--space-6);
  --measure:        62ch;   /* long-form prose */

  /* ---- Button tokens ---- */
  --btn-padding-y: 11px;
  --btn-padding-x: 22px;
  --btn-radius:    var(--radius-pill);
  --btn-border:    1px;
  --btn-hover-opacity: 0.88;

  /* ---- Input tokens (horizon line) ---- */
  --input-border-width: 1px;
  --input-padding-y-top: 10px;
  --input-padding-y-bottom: 8px;

  /* ---- Hairline & shadow (restrained on purpose) ---- */
  --hairline:   1px solid var(--rule);
  --shadow-sm:  0 1px 2px rgba(20, 32, 30, 0.04);
  --shadow-md:  0 4px 14px rgba(20, 32, 30, 0.06);
  --shadow-lg:  0 12px 32px rgba(20, 32, 30, 0.08);
  /* Floating overlays (toast, modal): close ambient + long diffuse drop. */
  --shadow-float:
    0 1px 2px rgba(20, 32, 30, 0.06),
    0 8px 20px rgba(20, 32, 30, 0.10),
    0 28px 56px rgba(20, 32, 30, 0.18);

  /* ---- Motion ---- */
  --transition-fast: all 0.15s ease-out;
  --transition:      all 0.2s ease-out;
  --transition-slow: all 0.32s ease-out;
}

/* ==========================================================================
   Reset
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover { color: var(--accent-text); }

.text-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--stone-dim);
}

.text-link:hover { text-decoration-color: currentColor; }

ul { list-style: none; }

::selection {
  background: var(--stone-dim);
  color: var(--oyster);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
  color: var(--text-color);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}
h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-heading);
}
h3 {
  font-size: var(--fs-h3);
  letter-spacing: var(--ls-heading);
}
h4 {
  font-size: var(--fs-h4);
}

h1 em, h2 em, h3 em, h4 em {
  font-style: italic;
  color: var(--muted-color);
  font-weight: var(--fw-regular);
}

p {
  margin-bottom: var(--space-5);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-color);
}

strong { font-weight: var(--fw-semibold); }
em     { font-style: italic; }

.muted  { color: var(--muted-color); }
.serif  { font-family: var(--font-serif); }
.sans   { font-family: var(--font-sans); }
.mono   { font-family: var(--font-mono); }

/* Netlify honeypot — off-screen so bots can fill it but humans can't see it. */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  color: var(--clay-deep);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-mono);
  margin: var(--space-4) 0 0;
}

/* Mono label — used for section marks, tags, metadata */
.label, .mono-label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: var(--muted-color);
  font-weight: var(--fw-regular);
}

/* Section mark — quieter sibling of mono-label, used for in-body section
   dividers. Leading hairline replaces the page-header sparkle. */
.section-mark {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--stone);
  font-weight: var(--fw-medium);
}

.section-mark::before {
  content: "";
  flex: 0 0 auto;
  width: var(--space-6);
  height: 1px;
  background-color: var(--stone);
  opacity: 0.55;
}

/* Lede / italic quiet voice */
.lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-lede);
  line-height: 1.5;
  color: var(--muted-color);
}

/* ==========================================================================
   Layout utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section { padding: var(--section-y) 0; }

.text-center { text-align: center; }
.mb-1 { margin-bottom: var(--space-2); }
.mb-2 { margin-bottom: var(--space-4); }
.mb-3 { margin-bottom: var(--space-5); }
.mb-4 { margin-bottom: var(--space-6); }
.mt-4 { margin-top: var(--space-6); }

/* ==========================================================================
   Buttons — pill, soft, one strong verb
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--btn-radius);
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-body);
  line-height: 1.2;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: var(--transition-fast);
  border: var(--btn-border) solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { opacity: var(--btn-hover-opacity); }
.btn:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

/* Primary — Stone */
.btn-primary {
  background-color: var(--stone);
  border-color: var(--stone);
  color: var(--oyster);
}
.btn-primary:hover { color: var(--oyster); }

/* Secondary — Oyster + rule border */
.btn-secondary {
  background-color: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-secondary:hover {
  background-color: var(--clay);
  border-color: var(--clay);
  color: var(--oyster);
  opacity: 1;
}

/* Ghost — text only */
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}
.btn-ghost:hover { color: var(--accent-text); opacity: 1; }

/* Accent — Clay. Rare. Campaign level. */
.btn-accent {
  background-color: var(--clay);
  border-color: var(--clay);
  color: var(--oyster);
}
.btn-accent:hover { color: var(--oyster); }

.btn-full { width: 100%; }

/* Close button — shared design for modal, toast, and any dismissible surface.
   Override --close-btn-color / --close-btn-hover-color / --close-btn-hover-bg
   in a parent scope for dark surfaces. */
.close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--fs-h3);
  line-height: 1;
  color: var(--close-btn-color, var(--muted-color));
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.close-btn:hover {
  color: var(--close-btn-hover-color, var(--ink));
  background-color: var(--close-btn-hover-bg, var(--surface-alt));
}

/* ==========================================================================
   Forms — horizon line (1px bottom border)
   ========================================================================== */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: var(--muted-color);
  font-weight: var(--fw-regular);
}

.form-input {
  width: 100%;
  padding: var(--input-padding-y-top) 0 var(--input-padding-y-bottom);
  border: 0;
  border-bottom: var(--input-border-width) solid var(--rule);
  border-radius: 0;
  background-color: transparent;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-h5);
  color: var(--text-color);
  transition: var(--transition-fast);
}

.form-input::placeholder {
  color: var(--muted-color);
  opacity: 0.7;
  font-style: italic;
}

.form-input:focus {
  outline: none;
  border-bottom-color: var(--clay);
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
}

/* ==========================================================================
   Header — quiet, sticky, hairline rule
   ========================================================================== */
.header {
  padding: var(--space-5) 0;
  border-bottom: var(--hairline);
  background-color: rgba(238, 240, 236, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-serif);
  font-weight: var(--fw-medium);
  font-size: var(--fs-h3);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  overflow: visible;
  display: block;
}

/* Re-skin the existing .logo-accent span as the italic "te" (per branding). */
.logo-accent {
  font-style: italic;
  font-weight: var(--fw-medium);
  color: var(--ink);
}

.logo-horizon {
  stroke-dasharray: 96;
  stroke-dashoffset: 0;
}

@keyframes horizon-draw {
  0%   { stroke-dashoffset: 96; }
  100% { stroke-dashoffset: 0; }
}

@keyframes disk-fade {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

.logo:hover { color: var(--ink); }

.logo:hover .logo-horizon {
  animation: horizon-draw 0.56s ease-out;
}

.logo:hover .logo-disk {
  animation: disk-fade 0.56s ease-out;
}

.nav-links {
  display: flex;
  gap: var(--space-7);
}

.nav-links a {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-body-sm);
  color: var(--ink);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background-color: var(--clay);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s ease-out;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.login-link {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-body-sm);
  color: var(--ink);
  transition: var(--transition-fast);
}

.login-link:hover { color: var(--ink); opacity: var(--btn-hover-opacity); }

.burger-menu { display: none; }
.mobile-drawer { display: contents; }

@media (max-width: 768px) {
  .header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .logo { position: relative; z-index: 2; }

  .burger-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    padding: var(--space-2);
    margin-left: auto;
    position: relative;
    z-index: 2;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--ink);
    transition: color var(--transition-fast);
  }

  .burger-menu:hover { color: var(--accent-text); }

  .burger-menu span {
    display: block;
    height: 1.25px;
    background-color: currentColor;
    transition:
      width 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
      transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
    transform-origin: center;
  }

  .burger-menu span:nth-child(1) { width: 24px; }
  .burger-menu span:nth-child(2) { width: 14px; }
  .burger-menu:hover span:nth-child(2) { width: 24px; }
  .mobile-drawer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    inset: 0;
    padding: calc(var(--space-5) * 2 + 2.25rem) var(--space-6) var(--space-8);
    background-color: rgba(238, 240, 236, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity 0.35s ease,
      transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
      visibility 0s linear 0.35s;
    pointer-events: none;
    z-index: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .header.mobile-open .mobile-drawer {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition:
      opacity 0.35s ease,
      transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .nav-links,
  .header-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .nav-links {
    gap: var(--space-4);
    padding: var(--space-5) 0 var(--space-6);
  }

  .nav-links a {
    font-family: var(--font-serif);
    font-size: var(--fs-h3);
    padding: var(--space-2) var(--space-3);
  }

  .header-actions {
    gap: var(--space-4);
    padding-top: var(--space-6);
    margin-top: auto;
    border-top: var(--hairline);
  }

  .header-actions .login-link { font-size: var(--fs-body-lg); }

  .header-actions .btn {
    width: 100%;
    max-width: 320px;
    text-align: center;
  }

  .header.mobile-open .nav-links > *,
  .header.mobile-open .header-actions > * {
    animation: drawer-item 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .header.mobile-open .nav-links > *:nth-child(1) { animation-delay: 0.10s; }
  .header.mobile-open .nav-links > *:nth-child(2) { animation-delay: 0.14s; }
  .header.mobile-open .nav-links > *:nth-child(3) { animation-delay: 0.18s; }
  .header.mobile-open .header-actions > *:nth-child(1) { animation-delay: 0.22s; }
  .header.mobile-open .header-actions > *:nth-child(2) { animation-delay: 0.26s; }

  .header.mobile-open .burger-menu { align-items: center; }
  .header.mobile-open .burger-menu span { width: 28px; }
  .header.mobile-open .burger-menu span:nth-child(1) { transform: translateY(3.625px) rotate(45deg); }
  .header.mobile-open .burger-menu span:nth-child(2) { transform: translateY(-3.625px) rotate(-45deg); }
}

@keyframes drawer-item {
  from { transform: translateY(10px); }
  to   { transform: none; }
}

body.menu-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .mobile-drawer,
  .header.mobile-open .mobile-drawer,
  .header.mobile-open .nav-links > *,
  .header.mobile-open .header-actions > *,
  .burger-menu span { transition: none; animation: none; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  padding: var(--space-10) 0 var(--space-8);
  border-top: var(--hairline);
  background-color: rgba(238, 240, 236, 0.86);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  letter-spacing: -0.015em;
  margin-bottom: var(--space-4);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-logo .logo-mark {
  width: 2rem;
  height: 2rem;
}

.footer-tagline {
  max-width: 250px;
  font-size: var(--fs-body-sm);
  color: var(--muted-color);
}

.footer-made-with {
  margin-top: var(--space-2);
  font-size: var(--fs-body-sm);
  color: var(--muted-color);
}

.footer-heart {
  color: #e11d48;
}

.footer-links {
  display: flex;
  gap: var(--space-10);
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: var(--muted-color);
  font-weight: var(--fw-regular);
  margin-bottom: var(--space-4);
}

.footer-col ul li {
  margin-bottom: var(--space-3);
}

.footer-col ul li a {
  color: var(--ink);
  font-size: var(--fs-body-sm);
  transition: var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--ink);
  opacity: var(--btn-hover-opacity);
}

.footer-bottom {
  margin-top: var(--space-6);
  text-align: left;
  color: var(--muted-color);
  font-size: var(--fs-small);
}

/* ==========================================================================
   Page header — shared across all inner pages
   ========================================================================== */
.page-header {
  text-align: center;
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-8);
  border-bottom: var(--hairline);
}

.page-header .mono-label {
  display: inline-block;
  margin-bottom: var(--space-5);
}

.page-header h1 {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  margin: 0 auto var(--space-5);
  max-width: 28ch;
}

.page-header .lede {
  max-width: 56ch;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .page-header {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
  }
  .page-header h1 { font-size: var(--fs-h1); }
}

/* ==========================================================================
   Quote block — shared pull-quote style
   ========================================================================== */
.quote-block {
  padding: var(--space-7) var(--space-8);
  border-left: 2px solid var(--clay);
  background-color: var(--paper);
  margin: var(--space-10) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-h3);
  line-height: 1.35;
  color: var(--stone);
  letter-spacing: -0.01em;
  border-radius: 0 var(--radius) var(--radius) 0;
}

@media (max-width: 768px) {
  .quote-block {
    padding: var(--space-5) var(--space-6);
    font-size: var(--fs-h4);
  }
}

/* ==========================================================================
   Cleanup — collapse trailing margins inside common containers
   ========================================================================== */
main > *:last-child,
section > *:last-child,
.container > *:last-child,
.module-section:last-child,
.tab-content > *:last-child,
.pillar > *:last-child,
.steps > *:last-child,
.testimonials > *:last-child {
  margin-bottom: 0 !important;
}

section:last-of-type {
  border-bottom: 0;
}

/* ==========================================================================
   Responsive type tuning
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --fs-display: 2.75rem;
    --fs-h1:      2.25rem;
    --fs-h2:      1.75rem;
    --fs-h3:      1.35rem;
    --section-y:  var(--space-10);
    --container-pad: var(--space-5);
  }
}

/* ==========================================================================
   Modal — opens via :target (#some-modal-id), shared across pages.
   Paper card, hairline border, soft drift-in. Used by promotion (claim
   coupon) and pricing (waitlist).
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease-out, visibility 0s linear 0.2s;
}

.modal:target {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s ease-out, visibility 0s linear 0s;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(20, 32, 30, 0.55);
  display: block;
}

.modal-card {
  position: relative;
  background-color: var(--paper);
  color: var(--ink);
  border-radius: var(--radius-lg);
  border: var(--hairline);
  box-shadow: var(--shadow-float);
  padding: var(--space-8) var(--space-7);
  width: 100%;
  max-width: 460px;
  text-align: left;
  transform: translateY(8px);
  transition: transform 0.24s ease-out;
}

.modal:target .modal-card {
  transform: translateY(0);
}

.modal .close-btn {
  position: absolute;
  top: var(--space-4);
  right: var(--space-5);
}

.modal-icon {
  display: block;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-5);
}

.modal-card .mono-label {
  display: inline-block;
  margin-bottom: var(--space-4);
  color: var(--muted-color);
}

.modal-card h2 {
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-heading);
  color: var(--ink);
  margin: 0 0 var(--space-3);
  font-weight: var(--fw-regular);
}

.modal-card h2 em {
  font-style: italic;
  color: var(--clay-deep);
  font-weight: var(--fw-regular);
}

.modal-lede {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--muted-color);
  font-size: var(--fs-lede);
  line-height: var(--lh-prose);
  margin: 0 0 var(--space-7);
}

.modal-form .form-group {
  margin-bottom: var(--space-7);
}

.modal-fineprint {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: var(--muted-color);
  margin: var(--space-5) 0 0;
  text-align: center;
  opacity: 0.8;
}

.modal .form-success {
  text-align: center;
}

@media (max-width: 480px) {
  .modal-card { padding: var(--space-7) var(--space-5); }
  .modal-card h2 { font-size: var(--fs-h4); }
}

/* ==========================================================================
   Promo toast — quiet bottom-right whisper announcing the lifetime offer.
   Stone ground (signature inverse), clay as the single accent, mono label,
   Garamond italic headline. No gradients. Slides up + fades in.
   Site-wide: rendered on index/about/modules/pricing/manifesto, so styles
   live in style.css (loaded everywhere) rather than a page-specific file.
   ========================================================================== */
.promo-toast {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  z-index: 900;
  width: 340px;
  max-width: calc(100vw - var(--space-8));
  background-color: var(--stone);
  color: var(--oyster);
  padding: var(--space-6) var(--space-6) var(--space-5);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.32s ease-out,
    transform 0.32s ease-out,
    visibility 0s linear 0.32s;
}

.promo-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition:
    opacity 0.32s ease-out,
    transform 0.32s ease-out,
    visibility 0s linear 0s;
}

.promo-toast-icon {
  display: block;
  width: 32px;
  height: 32px;
  margin-bottom: var(--space-4);
}

.promo-toast .mono-label {
  display: inline-block;
  margin-bottom: var(--space-4);
  color: rgba(238, 240, 236, 0.65);
}

.promo-toast h3 {
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-heading);
  font-weight: var(--fw-regular);
  color: var(--oyster);
  margin: 0 0 var(--space-4);
}

.promo-toast h3 em {
  font-style: italic;
  color: var(--oyster);
}

.promo-toast-copy {
  font-family: var(--font-sans);
  font-size: var(--fs-body-sm);
  line-height: 1.5;
  color: var(--inverse-text-soft);
  margin: 0 0 var(--space-4);
}

.promo-toast-copy strong {
  font-family: var(--font-serif);
  font-weight: var(--fw-medium);
  font-size: var(--fs-h5);
  color: var(--oyster);
}

.promo-toast-strike {
  text-decoration: line-through;
  color: rgba(238, 240, 236, 0.45);
  font-family: var(--font-serif);
  margin-left: var(--space-2);
}

.promo-toast-meta {
  margin-bottom: var(--space-5);
}

.promo-toast-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 10px 5px;
  border-radius: var(--radius-pill);
  background-color: rgba(238, 240, 236, 0.06);
  border: 1px solid rgba(238, 240, 236, 0.14);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: rgba(238, 240, 236, 0.78);
}

.promo-toast-hourglass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--inverse-text-soft);
  line-height: 0;
}

.promo-toast-hourglass svg {
  overflow: visible;
  transform-origin: 50% 50%;
  animation: promoHgFlip 5s ease-in-out infinite;
}

.promo-toast-hourglass .sand-top,
.promo-toast-hourglass .sand-bot {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.promo-toast-hourglass .sand-top {
  animation: promoHgDrain 5s ease-in-out infinite;
}

.promo-toast-hourglass .sand-bot {
  animation: promoHgFill 5s ease-in-out infinite;
}

.promo-toast-hourglass .sand-stream {
  animation: promoHgStream 0.45s ease-in-out infinite;
}

@keyframes promoHgDrain {
  0%   { transform: scaleY(1); }
  43%  { transform: scaleY(0); }
  50%  { transform: scaleY(0); }
  93%  { transform: scaleY(1); }
  100% { transform: scaleY(1); }
}

@keyframes promoHgFill {
  0%   { transform: scaleY(0); }
  43%  { transform: scaleY(1); }
  50%  { transform: scaleY(1); }
  93%  { transform: scaleY(0); }
  100% { transform: scaleY(0); }
}

@keyframes promoHgFlip {
  0%, 43%  { transform: rotate(0deg); }
  50%, 93% { transform: rotate(180deg); }
  100%     { transform: rotate(360deg); }
}

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

.promo-toast-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--btn-radius);
  background-color: var(--clay);
  border: 1px solid var(--clay);
  color: var(--oyster);
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-body-sm);
  text-decoration: none;
  transition: var(--transition-fast);
}

.promo-toast-cta:hover {
  opacity: var(--btn-hover-opacity);
  color: var(--oyster);
}

.promo-toast .close-btn {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  --close-btn-color: rgba(238, 240, 236, 0.55);
  --close-btn-hover-color: var(--oyster);
  --close-btn-hover-bg: rgba(238, 240, 236, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .promo-toast { transition: opacity 0.2s ease-out, visibility 0s linear 0.2s; transform: none; }
  .promo-toast.is-visible { transform: none; }
  .promo-toast-hourglass svg,
  .promo-toast-hourglass .sand-top,
  .promo-toast-hourglass .sand-bot,
  .promo-toast-hourglass .sand-stream { animation: none; }
}

@media (max-width: 768px) {
  .promo-toast,
  .promo-toast.is-visible {
    display: none !important;
  }
}
