/* =========================================================
   DROP THE EDGE — Shared design system
   Editorial / refined-minimal · gallery print meets premium SaaS
   ========================================================= */

:root {
  --ink: #0A0A0B;
  --ink-soft: #14141A;
  --mist: #1A1A1F;
  --bone: #F5F2EC;
  --bone-warm: #EDE8DD;
  --paper: #FAF8F3;
  --stone: #8C8983;
  --stone-soft: #B5B1A8;
  --line: rgba(10, 10, 11, 0.08);
  --line-strong: rgba(10, 10, 11, 0.15);
  --line-dark: rgba(245, 242, 236, 0.12);
  --edge: #FF4D2E;
  --edge-soft: #FF6B4A;

  --display: 'Fraunces', Georgia, serif;
  --sans: 'Inter Tight', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --max: 1400px;
  --max-narrow: 920px;
  --gutter: clamp(20px, 4vw, 64px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--sans);
  background: var(--bone);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; }

/* ===== Reusable ===== */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: var(--max-narrow); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 500;
}
.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.96;
  font-variation-settings: "opsz" 100, "SOFT" 50, "WONK" 0;
}
.display em {
  font-style: italic;
  font-variation-settings: "opsz" 100, "SOFT" 100, "WONK" 1;
  color: var(--edge);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: all 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--bone); }
.btn-primary:hover { background: var(--edge); transform: translateY(-1px); }
.btn-primary .arrow { transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: var(--bone); color: var(--ink); }
.btn-light:hover { background: var(--edge); color: var(--bone); transform: translateY(-1px); }
.btn-light .arrow { transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.btn-light:hover .arrow { transform: translateX(4px); }

/* =====================================================
   NAV
   ===================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 0;
  transition: all 300ms ease;
}
.nav.scrolled {
  background: rgba(245, 242, 236, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.nav.dark { color: var(--bone); }
.nav.dark.scrolled {
  background: rgba(10, 10, 11, 0.85);
  border-bottom: 1px solid var(--line-dark);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.logo {
  display: flex;
  align-items: center;
  height: 28px;
}
.logo img, .logo svg {
  display: block;
  height: 100%;
  width: auto;
  max-width: 220px;
}
/* Hide old text-and-dot logo if it's still around (graceful fallback) */
.logo-dot { display: none; }
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a { font-size: 14px; font-weight: 500; opacity: 0.7; transition: opacity 200ms; }
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-cta { display: flex; gap: 12px; align-items: center; }
.nav-status {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--stone);
  display: flex; align-items: center; gap: 8px;
}
.nav.dark .nav-status { color: var(--stone-soft); }
.nav.dark .btn-primary { background: var(--bone); color: var(--ink); }
.nav.dark .btn-primary:hover { background: var(--edge); color: var(--bone); }

.pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: #2ECC71;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* Mobile menu */
.menu-toggle { display: none; width: 32px; height: 32px; position: relative; }
.menu-toggle span { position: absolute; left: 6px; right: 6px; height: 1.5px; background: currentColor; transition: all 300ms; }
.menu-toggle span:nth-child(1) { top: 11px; }
.menu-toggle span:nth-child(2) { top: 19px; }
.menu-toggle.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-status { display: none; }
  .menu-toggle { display: block; }
  .nav-links.mobile-open {
    display: flex; position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bone);
    flex-direction: column;
    padding: 30px var(--gutter);
    gap: 20px;
    border-bottom: 1px solid var(--line);
  }
  .nav.dark .nav-links.mobile-open { background: var(--ink); }
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  background: var(--ink);
  color: var(--stone-soft);
  padding: 80px 0 40px;
  border-top: 1px solid var(--line-dark);
}
.footer-cta {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px;
  padding-bottom: 60px; margin-bottom: 60px;
  border-bottom: 1px solid var(--line-dark);
  align-items: end;
}
.footer-cta h2 {
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--bone);
}
.footer-cta h2 em { color: var(--edge); font-style: italic; }
.footer-cta-right { text-align: right; display: flex; flex-direction: column; gap: 16px; align-items: flex-end; }
.footer-cta-right p { color: var(--stone-soft); max-width: 320px; font-size: 14px; line-height: 1.55; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .logo { color: var(--bone); margin-bottom: 16px; height: 36px; }
.footer-brand .logo img { max-width: 260px; }
.footer-brand p { font-size: 14px; max-width: 320px; line-height: 1.55; }
.footer-col h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone);
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; font-size: 14px; }
.footer-col a:hover { color: var(--bone); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--line-dark);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-bottom a:hover { color: var(--bone); }
@media (max-width: 880px) {
  .footer-cta { grid-template-columns: 1fr; gap: 30px; }
  .footer-cta-right { text-align: left; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* =====================================================
   STICKY CTA
   ===================================================== */
.sticky-cta {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 90;
  opacity: 0;
  transform: translateY(20px);
  transition: all 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.sticky-cta.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.sticky-cta .btn-primary { box-shadow: 0 10px 30px -8px rgba(10, 10, 11, 0.4); }

/* =====================================================
   PAGE INTRO (shared across sub-pages)
   ===================================================== */
.intro {
  padding: 180px 0 100px;
  border-bottom: 1px solid var(--line);
}
.intro-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 8px 16px;
  background: rgba(10, 10, 11, 0.05);
  border-radius: 999px;
  margin-bottom: 32px;
}
.intro-eyebrow .dot { width: 6px; height: 6px; background: var(--edge); border-radius: 50%; }
.intro h1 {
  font-size: clamp(48px, 7vw, 104px);
  margin-bottom: 32px;
  max-width: 1100px;
}
.intro-sub {
  font-size: clamp(17px, 1.4vw, 20px);
  opacity: 0.7;
  max-width: 640px;
  line-height: 1.55;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.reveal { opacity: 0; transform: translateY(24px);
  transition: opacity 800ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: translateY(0); }

::selection { background: var(--edge); color: white; }

/* =====================================================
   SECTION HEADS (shared)
   ===================================================== */
.section-head {
  margin-bottom: 80px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: end;
}
.section-head .label-block { }
.section-head .eyebrow { margin-bottom: 24px; display: block; }
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(40px, 5.5vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.section-head h2 em { color: var(--edge); font-style: italic; }
.section-head .blurb { color: var(--stone); font-size: 16px; max-width: 380px; line-height: 1.55; }
@media (max-width: 880px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 50px; }
}

/* =====================================================
   FINAL CTA SECTION (reusable)
   ===================================================== */
.final {
  padding: 120px 0 100px;
  background: var(--ink);
  color: var(--bone);
  position: relative;
  overflow: hidden;
}
.final::before {
  content: ""; position: absolute;
  bottom: -300px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(255, 77, 46, 0.2), transparent 70%);
  pointer-events: none;
}
.final-inner { text-align: center; position: relative; z-index: 1; }
.final-status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  background: rgba(245, 242, 236, 0.08);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-soft);
  margin-bottom: 40px;
}
.final h2 {
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin-bottom: 32px;
  max-width: 900px;
  margin-left: auto; margin-right: auto;
}
.final h2 em { color: var(--edge); font-style: italic; }
.final p { font-size: 18px; color: var(--stone-soft); max-width: 540px; margin: 0 auto 48px; line-height: 1.55; }
.final-ctas { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.final .btn-ghost { color: var(--bone); border-color: var(--line-dark); }
.final .btn-ghost:hover { border-color: var(--bone); }

/* Inline SVG logo — two variants in DOM, CSS picks based on body class */
.nav .logo .logo-light-svg { display: none; }
.nav .logo .logo-dark-svg { display: block; }
/* On dark-hero pages, while the nav is transparent (not scrolled), use the light logo + white nav text */
body.dark-hero .nav:not(.scrolled) .logo .logo-dark-svg { display: none; }
body.dark-hero .nav:not(.scrolled) .logo .logo-light-svg { display: block; }
body.dark-hero .nav:not(.scrolled) .nav-links a { color: var(--bone); }
body.dark-hero .nav:not(.scrolled) .nav-status { color: rgba(245, 242, 236, 0.75); }
body.dark-hero .nav:not(.scrolled) .nav-toggle span { background: var(--bone); }
body.dark-hero .nav:not(.scrolled) .btn-primary { background: var(--bone); color: var(--ink); }
body.dark-hero .nav:not(.scrolled) .btn-primary:hover { background: var(--edge); color: var(--bone); }
/* On always-dark nav pages (e.g. Process), use the light logo at all times */
.nav.dark .logo .logo-dark-svg { display: none; }
.nav.dark .logo .logo-light-svg { display: block; }
/* Footer logo: footer only contains the light variant, always show it */
.footer-brand .logo svg { display: block !important; }

/* =========================================================
   Accessibility & resilience additions
   ========================================================= */

/* Visible keyboard focus (was missing entirely) */
:focus-visible {
  outline: 2px solid var(--edge);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip-to-content link for keyboard / screen-reader users */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1000;
  background: var(--ink);
  color: var(--bone);
  padding: 12px 20px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
