/* Unmidify shared components — nav, footer, typography, sections.
   Adapted from the DeskWolf _stitched_mockup pattern. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--cream-0); }
body {
  font-family: var(--font-sans);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }

/* ─── NAV ─── */
.nav {
  position: fixed;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px 8px 18px;
  background: rgba(250, 248, 243, 0.78);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--cream-line);
  border-radius: 999px;
  box-shadow: 0 6px 20px -8px rgba(11,15,26,0.08);
  transition: background .3s, border-color .3s;
  max-width: calc(100% - 28px);
}
.nav.on-dark {
  background: rgba(18, 23, 34, 0.65);
  border-color: rgba(255,255,255,0.08);
}
.nav.on-dark .nav__brand,
.nav.on-dark .nav__link { color: var(--bone); }
.nav.on-dark .nav__brand { border-right-color: rgba(255,255,255,0.12); }
.nav.on-dark .nav__cta { background: var(--bone); color: var(--ink-0); }

.nav__brand {
  display:flex; align-items:center; gap:8px;
  font-weight:700; font-size:15px;
  letter-spacing:-0.02em;
  color:var(--ink-0);
  padding-right:14px;
  border-right:1px solid var(--cream-line);
  margin-right:4px;
  transition: color .3s, border-color .3s;
  flex-shrink:0;
}

/* Unmidify brand mark — hard red square, Mirror's Edge inspired */
.nav__mark {
  width:22px; height:22px;
  border-radius:5px;
  background: var(--red);
  position: relative;
  box-shadow: 0 0 14px rgba(220,38,38,0.4);
}
.nav__mark::after {
  content:"";
  position:absolute; inset:5px;
  background: var(--bone);
  border-radius: 2px;
  clip-path: polygon(0 45%, 50% 0, 100% 45%, 80% 100%, 20% 100%);
  opacity: 0.9;
}
.nav.on-dark .nav__mark::after { background: var(--ink-0); opacity: 1; }

.nav__link {
  padding:7px 12px;
  border-radius:999px;
  font-size:14px;
  color:var(--text-2);
  transition: all .18s;
  white-space: nowrap;
}
.nav__link:hover { color:var(--ink-0); background:rgba(11,15,26,0.04); }
.nav__link.active { color: var(--red); font-weight: 500; }
.nav.on-dark .nav__link:hover { background: rgba(255,255,255,0.08); }
.nav.on-dark .nav__link.active { color: #ff6b6b; }

.nav__cta {
  margin-left:4px;
  padding:8px 14px;
  background:var(--ink-0);
  color:var(--bone);
  border-radius:999px;
  font-size:13px;
  font-weight:500;
  display:inline-flex;
  align-items:center; gap:6px;
  transition: transform .22s, box-shadow .28s, background .3s;
  box-shadow: 0 1px 2px rgba(11,15,26,0.12), 0 4px 10px -2px rgba(11,15,26,0.18), 0 14px 28px -8px rgba(11,15,26,0.22);
  white-space: nowrap;
}
.nav__cta:hover { transform: translateY(-1px); }

.nav__toggle {
  display: none !important;
  width: 36px; height: 36px;
  margin-left: 2px;
  border: none; background: transparent;
  cursor: pointer;
  align-items: center; justify-content: center;
  border-radius: 999px;
  color: var(--ink-0);
  transition: background .18s;
  flex-shrink: 0;
}
.nav__toggle:hover { background: rgba(11,15,26,0.06); }
.nav.on-dark .nav__toggle { color: var(--bone); }
.nav.on-dark .nav__toggle:hover { background: rgba(255,255,255,0.08); }
.nav__toggle-bars { display: inline-flex; flex-direction: column; gap: 4px; }
.nav__toggle-bars span {
  display: block; width: 18px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform .22s var(--ease-out-expo), opacity .18s;
}

/* Mobile drawer — full-screen overlay */
.nav-drawer[hidden] { display: none !important; }
.nav-drawer {
  position: fixed; inset: 0;
  z-index: 80;
  background: rgba(11,15,26,0.94);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; flex-direction: column;
  padding: 88px 24px 40px;
}
.nav-drawer.open { animation: navDrawerIn .24s var(--ease-out-expo); }
@keyframes navDrawerIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: none; }
}
.nav-drawer__close {
  position: absolute; top: 18px; right: 18px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04); color: var(--bone);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.nav-drawer__close:hover { background: rgba(255,255,255,0.1); }
.nav-drawer__link {
  display: block;
  padding: 16px 4px;
  font-size: 22px; font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--bone);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color .15s, padding .22s;
}
.nav-drawer__link:hover,
.nav-drawer__link.active { color: #ff6b6b; padding-left: 8px; }
.nav-drawer__cta {
  margin-top: 28px;
  padding: 16px 22px;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  font-size: 16px; font-weight: 500;
  text-align: center;
  box-shadow: 0 14px 30px -8px rgba(220,38,38,0.5);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
body.nav-drawer-open { overflow: hidden; }

/* ─── FOOTER ─── */
.foot {
  position:relative;
  background:
    radial-gradient(ellipse 50% 40% at 15% 0%, rgba(220,38,38,0.18), transparent 60%),
    radial-gradient(ellipse 40% 30% at 85% 20%, rgba(244,63,94,0.12), transparent 60%),
    var(--ink-0);
  color: rgba(247,245,240,0.68);
  padding: 72px 0 32px;
  overflow:hidden;
}
.foot > * { position:relative; z-index:1; }
.foot__grid {
  display:grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap:32px;
  padding-bottom:48px;
  border-bottom:1px solid rgba(255,255,255,0.08);
}
@media (max-width: 860px) { .foot__grid { grid-template-columns:1fr 1fr; } }
.foot__brand {
  display:flex; align-items:center; gap:8px;
  font-weight:700; color:var(--bone); font-size:17px;
  margin-bottom:16px;
}
.foot__brand-mark {
  width:24px; height:24px; border-radius:6px;
  background: var(--red);
  position:relative;
  box-shadow: 0 0 14px rgba(220,38,38,0.45);
}
.foot__brand-mark::after {
  content:""; position:absolute; inset:5px;
  background: var(--ink-0);
  clip-path: polygon(0 45%, 50% 0, 100% 45%, 80% 100%, 20% 100%);
}
.foot__tag { font-size:13.5px; max-width:280px; line-height:1.55; }
.foot__col h4 {
  font-size:11px; letter-spacing:0.14em; text-transform:uppercase;
  color: rgba(247,245,240,0.5);
  font-weight:600;
  margin:0 0 14px;
}
.foot__col a {
  display:block;
  font-size:14px; color: rgba(247,245,240,0.7);
  padding:4px 0;
  transition: color .15s;
}
.foot__col a:hover { color:var(--bone); }
.foot__bot {
  display:flex; justify-content:space-between; align-items:center;
  padding-top:28px;
  font-size:11px; letter-spacing:0.1em;
  color: rgba(247,245,240,0.4);
  font-weight:500;
  flex-wrap: wrap; gap: 14px;
}
.foot__bot a:hover { color: var(--bone); }

/* ─── TYPOGRAPHY ─── */
.eyebrow {
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow--red {
  color: var(--red);
  font-weight: 600;
  letter-spacing: 0.2em;
}
.eyebrow--amber {
  color: var(--amber);
  font-weight: 600;
  letter-spacing: 0.2em;
}
.h-display {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: var(--ink-0);
}
.h-1 {
  font-size: clamp(40px, 5.5vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--ink-0);
}
.h-2 {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.032em;
  font-weight: 600;
  color: var(--ink-0);
}
.h-3 {
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--ink-0);
}
.body-lg {
  font-size: clamp(17px, 1.25vw, 20px);
  line-height: 1.55;
  color: var(--text-2);
}
em.accent { font-style:normal; color: var(--red); }

.page-hero em.accent {
  color: #ff6b6b;
  text-shadow: 0 0 40px rgba(220,38,38,0.5);
}

/* Italic "mid" accent treatment used throughout */
.italic-mid {
  font-style: italic;
  color: var(--red);
}
.page-hero .italic-mid {
  color: #ff6b6b;
  text-shadow: 0 0 40px rgba(220,38,38,0.5);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 500; font-size: 15px;
  text-decoration: none;
  transition: transform .28s var(--ease-out-expo), box-shadow .32s var(--ease-out-expo), background .22s;
  cursor: pointer;
  border: none;
  font-family: inherit;
  position: relative;
}
.btn--primary {
  background: var(--ink-0);
  color: var(--bone);
  box-shadow: 0 1px 2px rgba(11,15,26,0.14), 0 6px 16px -4px rgba(11,15,26,0.18), 0 22px 42px -12px rgba(11,15,26,0.24);
}
.btn--primary:hover { transform: translateY(-2px); background: var(--ink-1); }
.btn--accent {
  background: var(--red);
  color: #fff;
  box-shadow: 0 1px 2px rgba(220,38,38,0.25), 0 8px 20px -4px rgba(220,38,38,0.35), 0 26px 52px -12px rgba(220,38,38,0.42);
}
.btn--accent:hover { transform: translateY(-2px); background: var(--red-2); }
.btn--ghost {
  background: rgba(255,255,255,0.55);
  color: var(--text-1);
  box-shadow: inset 0 0 0 1px var(--cream-line-strong), 0 1px 2px rgba(11,15,26,0.04), 0 6px 16px -6px rgba(11,15,26,0.08);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: rgba(255,255,255,0.88); transform: translateY(-2px); }
.btn--light {
  background: var(--bone);
  color: var(--ink-0);
  box-shadow: 0 1px 2px rgba(250,248,243,0.18), 0 8px 20px -4px rgba(250,248,243,0.22), 0 26px 52px -12px rgba(250,248,243,0.28);
}
.btn--light:hover { transform: translateY(-2px); }
.btn--ghost-dark {
  background: rgba(255,255,255,0.04);
  color: var(--bone);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn--ghost-dark:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(220,38,38,0.55);
  transform: translateY(-2px);
}

/* ─── PAGE HEROES (secondary pages — not homepage) ─── */
.page-hero {
  position: relative;
  padding: 140px 0 96px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(220,38,38,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 85% 60%, rgba(244,63,94,0.18) 0%, transparent 60%),
    var(--ink-0);
  color: var(--bone);
  overflow: hidden;
  isolation: isolate;
}
.page-hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 35%, transparent 85%);
  pointer-events: none;
  z-index: 0;
}
.page-hero__content { position: relative; z-index: 2; max-width: 880px; }
.page-hero__content.centered { margin: 0 auto; text-align: center; }
.page-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; font-weight: 500;
  color: rgba(247,245,240,0.8);
  margin-bottom: 24px;
}
.page-hero__eyebrow-dot {
  display:inline-flex; align-items:center; gap:6px;
  padding:3px 10px;
  background:rgba(16,185,129,0.16);
  color:#38f0a8;
  border-radius: 999px;
  font-weight:600;
}
.page-hero__eyebrow-dot::before {
  content:"";
  width:5px; height:5px; border-radius:50%;
  background:var(--green);
  animation: pulse 1.8s ease-out infinite;
}
.page-hero h1 {
  margin: 0 0 24px;
  font-size: clamp(44px, 6.5vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: var(--bone);
}
.page-hero p.lead {
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.5;
  color: rgba(247,245,240,0.72);
  max-width: 620px;
  margin: 0 0 32px;
}
.page-hero__content.centered p.lead { margin-left: auto; margin-right: auto; }
.page-hero__cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.page-hero__content.centered .page-hero__cta-row { justify-content: center; }

/* ─── SURFACES ─── */
.surface-dark {
  background:
    radial-gradient(ellipse 50% 30% at 80% 15%, rgba(220,38,38,0.22), transparent 60%),
    radial-gradient(ellipse 40% 30% at 10% 80%, rgba(244,63,94,0.18), transparent 60%),
    var(--ink-0);
  color: var(--cream-0);
}
.surface-cream { background: var(--cream-0); }
.surface-bone { background: var(--bone); }

/* ─── STAT STRIP ─── */
.stat-strip {
  padding:56px 0;
  border-top:1px solid var(--cream-line);
  border-bottom:1px solid var(--cream-line);
  background:var(--bone);
  overflow:hidden;
}
.stat-strip__grid {
  display:grid; grid-template-columns:repeat(4, 1fr);
}
@media (max-width: 780px) { .stat-strip__grid { grid-template-columns:repeat(2, 1fr); gap:32px; } }
.stat-strip__cell {
  padding:0 28px;
  border-right:1px solid var(--cream-line);
}
.stat-strip__cell:last-child { border-right:none; }
@media (max-width: 780px) { .stat-strip__cell { border-right:none; } }
.stat-strip__value {
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing:-0.035em;
  color:var(--ink-0);
  line-height:1;
  margin-bottom:10px;
  font-weight:600;
  font-variant-numeric: tabular-nums;
}
.stat-strip__label {
  font-size:11px; letter-spacing:0.16em;
  text-transform:uppercase;
  color:var(--text-3);
  font-weight:500;
}
.surface-dark .stat-strip { background: transparent; border-color: rgba(255,255,255,0.08); }
.surface-dark .stat-strip__value { color: var(--bone); }
.surface-dark .stat-strip__label { color: rgba(247,245,240,0.55); }
.surface-dark .stat-strip__cell { border-color: rgba(255,255,255,0.08); }

/* ─── SECTION PADDING ─── */
.section { padding: 140px 0; }
.section--tight { padding: 96px 0; }
.section__head { max-width: 720px; margin: 0 auto 72px; text-align: center; }
.section__head.left { margin: 0 0 72px; text-align: left; max-width: 820px; }
.section__head h2 { margin: 14px 0 18px; }
.section__head p { color: var(--text-2); }
.surface-dark .section__head p { color: rgba(247,245,240,0.65); }

/* ─── FEATURE GRID ─── */
.feat-grid {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feat-grid { grid-template-columns: 1fr; } }
.feat {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--cream-line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .28s var(--ease-out-expo), box-shadow .32s;
}
.feat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(220,38,38,0.2);
}
.feat__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--rose));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px -6px rgba(220,38,38,0.5);
  font-weight: 700;
  font-size: 18px;
}
.feat__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink-0);
  margin-bottom: 8px;
}
.feat__body {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0;
}

.surface-dark .feat {
  background: rgba(18,23,34,0.5);
  border-color: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
}
.surface-dark .feat:hover {
  border-color: rgba(220,38,38,0.4);
  background: rgba(18,23,34,0.7);
}
.surface-dark .feat__title { color: var(--bone); }
.surface-dark .feat__body { color: rgba(247,245,240,0.6); }

/* ─── SCROLL REVEAL ─── */
.rv {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--ease-out-expo), transform .9s var(--ease-out-expo);
}
.rv.vis { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; }
.d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; }
.d4 { transition-delay: .32s; }

/* ─── HERO MOUSE SPOTLIGHT (reusable for any dark hero) ─── */
.page-hero__spotlight {
  position: absolute; inset: 0;
  z-index: 1; pointer-events: none;
  --mx: 50%; --my: 40%;
  background: radial-gradient(circle 600px at var(--mx) var(--my), rgba(220,38,38,0.22) 0%, rgba(255,107,107,0.10) 30%, transparent 65%);
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out-expo);
}
.page-hero:hover .page-hero__spotlight { opacity: 1; }

/* ─── MOBILE POLISH ─── */

@media (max-width: 860px) {
  .nav__link { display: none !important; }
  .nav__toggle { display: inline-flex !important; }
  .nav__brand { border-right: none; padding-right: 0; margin-right: 2px; }
  .nav__cta { padding: 7px 14px; font-size: 12.5px; }
}

@media (max-width: 720px) {
  .nav {
    top: 10px;
    padding: 4px 4px 4px 12px;
    gap: 4px;
    border-radius: 999px;
    width: max-content;
    max-width: calc(100% - 20px);
  }
  .nav__brand { font-size: 13.5px; gap: 6px; }
  .nav__mark { width: 18px; height: 18px; border-radius: 5px; }
  .nav__cta {
    padding: 7px 12px;
    font-size: 12px;
    gap: 4px;
    margin-left: 0;
    white-space: nowrap;
  }
  .nav__cta svg { width: 9px; height: 9px; }
  .nav__toggle { width: 32px; height: 32px; }

  .page-hero { padding: 108px 0 64px; }
  .page-hero__content { text-align: left; }
  .page-hero__content.centered { text-align: center; }
  .page-hero__eyebrow { font-size: 11px; padding: 5px 12px 5px 6px; margin-bottom: 18px; }
  .page-hero h1 { font-size: clamp(32px, 9vw, 48px); line-height: 1.04; letter-spacing: -0.03em; margin-bottom: 18px; }
  .page-hero p.lead { font-size: 16px; line-height: 1.5; margin-bottom: 24px; }

  .page-hero__cta-row,
  .hero__ctas,
  .cta__row { gap: 10px !important; }
  .page-hero__cta-row .btn,
  .page-hero__cta-row .dw-btn,
  .hero__ctas .dw-btn,
  .hero__ctas .btn,
  .cta__row .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 14.5px;
  }

  .h-1 { font-size: clamp(30px, 8vw, 44px); }
  .h-2 { font-size: clamp(26px, 7vw, 36px); }
  .h-3 { font-size: clamp(20px, 5.5vw, 28px); }

  .section { padding: 80px 0; }
  .section--tight { padding: 64px 0; }
  .section__head { margin-bottom: 40px; }

  .stat-strip { padding: 40px 0; }
  .stat-strip__cell { padding: 0 16px; }
  .stat-strip__value { font-size: clamp(28px, 8vw, 44px); margin-bottom: 6px; }
  .stat-strip__label { font-size: 10px; }

  .foot { padding: 56px 0 24px; }
  .foot__grid { gap: 28px 20px; padding-bottom: 32px; }
  .foot__grid > div:first-child { grid-column: 1 / -1; }
  .foot__tag { max-width: 100%; }
  .foot__col h4 { margin-bottom: 10px; }
  .foot__bot { padding-top: 20px; font-size: 10px; gap: 10px; }

  .dw-container { padding: 0 20px; }
}

@media (max-width: 420px) {
  .nav__cta { padding: 6px 10px; font-size: 11px; }
  .page-hero h1 { font-size: clamp(28px, 9vw, 38px); }
  .dw-container { padding: 0 16px; }
}

/* ─── KEYFRAMES ─── */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .rv { opacity:1; transform:none; }
}
