/* ===========================================================
   EMERALD HACKS — design tokens
   =========================================================== */
:root{
  --void:        #0A0E12;
  --panel:       #121820;
  --panel-raised:#171F29;
  --line:        #232C36;
  --line-soft:   #1B232C;

  --ink:         #E9EEF3;
  --ink-dim:     #92A0AC;
  --ink-faint:   #5C6873;

  --recover:     #3FD9A4;
  --recover-dim: rgba(63, 217, 164, 0.12);
  --alert:       #E8734A;
  --alert-dim:   rgba(232, 115, 74, 0.12);

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body:    'Inter', 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;

  --wrap: 1180px;
  --radius: 10px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden; /* here, not on body — body overflow:hidden breaks position:fixed on iOS */
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3{
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

p{ margin: 0 0 1em; color: var(--ink-dim); overflow-wrap: break-word; }

a{ color: inherit; text-decoration: none; }

ul, ol{ margin: 0; padding: 0; list-style: none; }

img, svg{ vertical-align: middle; max-width: 100%; }

.wrap{
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 18px;
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--recover);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.dot-live{
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--recover);
  box-shadow: 0 0 0 0 var(--recover-dim);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse{
  0%   { box-shadow: 0 0 0 0 rgba(63,217,164,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(63,217,164,0); }
  100% { box-shadow: 0 0 0 0 rgba(63,217,164,0); }
}

/* buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 7px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  touch-action: manipulation;
  min-height: 48px;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn-primary{
  background: var(--recover);
  color: #06140F;
}
.btn-primary:hover{ background: #58e2b3; }
.btn-ghost{
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover{ border-color: var(--ink-faint); }
.btn-block{ width: 100%; }
.btn:disabled{ opacity: 0.6; cursor: not-allowed; transform: none; }

/* ===========================================================
   Header
   =========================================================== */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: 0.01em;
  flex-shrink: 0;
}
.brand-mark{ width: 24px; height: 24px; color: var(--recover); flex-shrink: 0; }

/* Desktop nav — hidden on mobile by default */
.main-nav{
  display: none;
}
.main-nav.nav-open{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--void);
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--line-soft);
  z-index: 49;
}
.main-nav.nav-open a{
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--line-soft);
  transition: color 0.15s ease;
}
.main-nav.nav-open a:last-child{ border-bottom: none; }
.main-nav.nav-open a:hover{ color: var(--ink); }

.nav-consult{ color: var(--recover) !important; }
.nav-cta{ display: none; padding: 10px 20px; font-size: 14.5px; }

.menu-toggle{
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin-right: -10px;
}
.menu-toggle span{
  width: 20px; height: 2px; background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
  border-radius: 2px;
  display: block;
}
.menu-toggle.is-active span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2){ opacity: 0; }
.menu-toggle.is-active span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ===========================================================
   Hero
   =========================================================== */
.hero{
  position: relative;
  overflow: hidden;
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--line-soft);
}
.hero-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.trace-path path{
  animation: dash-flow 6s linear infinite;
}
@keyframes dash-flow{
  to{ stroke-dashoffset: -240; }
}
.node-label{
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--ink-faint);
}
.node-label.dim{ fill: #46505A; }
.node-label.recover{ fill: var(--recover); }

.hero-inner{
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.hero h1{
  font-size: clamp(32px, 8vw, 60px);
  margin-bottom: 22px;
}
.hero-sub{
  font-size: 16px;
  max-width: 560px;
  margin-bottom: 32px;
}
.hero-actions{
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-actions .btn{ width: 100%; }

.hero-stats{
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0;
}
.hero-stats dt{
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.hero-stats dd{
  margin: 0;
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--ink);
}

.disclaimer-strip{
  font-size: 13.5px;
  color: var(--ink-faint);
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.disclaimer-strip a{ color: var(--recover); white-space: nowrap; }

/* ===========================================================
   About
   =========================================================== */
.about{ padding: 56px 0; border-bottom: 1px solid var(--line-soft); }
.about-grid{
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.about-copy h2{ font-size: clamp(22px, 5vw, 34px); }
.about-facts{ margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.about-facts li{
  padding-left: 20px;
  position: relative;
  color: var(--ink-dim);
  font-size: 15px;
}
.about-facts li::before{
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  border: 1.5px solid var(--recover);
  border-radius: 2px;
}
.about-facts span{ color: var(--ink); font-weight: 600; }

.about-graphic{ width: 100%; height: auto; display: block; border-radius: var(--radius); }
.case-mono{ font-family: var(--font-mono); font-size: 13px; fill: var(--ink-faint); letter-spacing: 0.04em; }
.case-label{ font-family: var(--font-mono); font-size: 11px; fill: var(--ink-faint); letter-spacing: 0.06em; }
.case-value{ font-family: var(--font-display); font-size: 17px; font-weight: 600; fill: var(--ink); }
.case-value.recover{ fill: var(--recover); }
.case-value.dim{ fill: var(--ink-dim); font-weight: 400; font-family: var(--font-body); font-size: 14px; }

/* ===========================================================
   Services
   =========================================================== */
.services{ padding: 56px 0; border-bottom: 1px solid var(--line-soft); }
.services h2{ font-size: clamp(22px, 5vw, 34px); }
.section-sub{ font-size: 16px; margin-bottom: 32px; }

.service-list{
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-list li{
  background: var(--panel);
  padding: 24px 20px;
  display: flex;
  gap: 18px;
}
.service-index{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--recover);
  padding-top: 3px;
  flex-shrink: 0;
}
.service-list h3{ font-size: 17px; margin-bottom: 8px; }
.service-list p{ font-size: 14.5px; margin: 0; }

/* ===========================================================
   Tools
   =========================================================== */
.tools{ padding: 56px 0; border-bottom: 1px solid var(--line-soft); }
.tools h2{ font-size: clamp(22px, 5vw, 34px); }
.tool-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 32px;
}
.tool-card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: border-color 0.2s ease;
}
.tool-card:hover{ border-color: var(--recover); }
.tool-card h3{ font-size: 16px; margin-bottom: 8px; }
.tool-card p{ font-size: 14px; margin: 0; }

/* ===========================================================
   Reviews
   =========================================================== */
.reviews{ padding: 56px 0; border-bottom: 1px solid var(--line-soft); }
.reviews h2{ font-size: clamp(22px, 5vw, 34px); margin-bottom: 32px; }
.review-grid{
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.review-card{
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
}
.review-card blockquote{
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}
.review-card figcaption{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* ===========================================================
   Consultation / Form
   =========================================================== */
.consult{
  position: relative;
  padding: 56px 0;
  overflow: hidden;
  background: var(--panel);
}
.consult-bg{
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.6; z-index: 0;
}
.consult-grid-layout{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.consult-copy h2{ font-size: clamp(22px, 5vw, 34px); }
.consult-points{ margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.consult-points li{
  font-size: 14.5px;
  color: var(--ink-dim);
  padding-left: 20px;
  position: relative;
  line-height: 1.55;
}
.consult-points li::before{
  content: "→";
  position: absolute;
  left: 0;
  color: var(--recover);
  font-family: var(--font-mono);
}

.case-form{
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 18px;
}
.field{ margin-bottom: 20px; }
.field label{
  display: block;
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 7px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.field input, .field textarea{
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px; /* prevents iOS auto-zoom */
  transition: border-color 0.15s ease;
}
.field input:focus, .field textarea:focus{
  outline: none;
  border-color: var(--recover);
}
.field textarea{ resize: vertical; min-height: 100px; }

.checkbox-field{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
  cursor: pointer;
}
.checkbox-field input{
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--recover);
  flex-shrink: 0;
}
.checkbox-field span{ font-size: 13.5px; color: var(--ink-dim); line-height: 1.5; }

.form-fineprint{
  font-size: 12.5px;
  color: var(--ink-faint);
  text-align: center;
  margin: 14px 0 0;
}

.form-status{
  display: none;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  word-break: break-word;
}
.form-status.visible{ display: block; }
.form-status.success{ background: var(--recover-dim); color: var(--recover); }
.form-status.error{ background: var(--alert-dim); color: var(--alert); }
.form-status.pending{ background: var(--line-soft); color: var(--ink-dim); }

/* ===========================================================
   Footer
   =========================================================== */
.site-footer{ padding: 56px 0 40px; }
.footer-inner{ display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.footer-brand{
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink-dim);
  font-size: 14px;
  letter-spacing: 0.01em;
}
.footer-brand .brand-mark{ width: 20px; height: 20px; color: var(--ink-faint); }
.footer-disclaimer{ max-width: 620px; font-size: 12.5px; color: var(--ink-faint); line-height: 1.6; }
.footer-copy{ font-size: 12.5px; color: var(--ink-faint); margin: 0; }

/* ===========================================================
   Success Modal
   =========================================================== */
.modal-backdrop{
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  background: rgba(8, 11, 15, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-backdrop.is-open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal-card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px 20px 28px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  transform: translateY(12px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.is-open .modal-card{ transform: translateY(0); }
.modal-close-icon{
  position: absolute;
  top: 12px; right: 12px;
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}
.modal-close-icon:hover{ color: var(--ink); }
.modal-icon-badge{
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--recover-dim);
  color: var(--recover);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  border: 1px solid rgba(63, 217, 164, 0.2);
}
.modal-icon-badge svg{ width: 22px; height: 22px; display: block; }
.modal-card h3{ font-size: 20px; margin-bottom: 10px; }
.modal-card p{ font-size: 14px; line-height: 1.6; margin-bottom: 18px; }
.modal-ref-badge{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--recover);
  background: var(--void);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: inline-block;
  word-break: break-all;
}

/* ===========================================================
   Responsive — mobile-first progressive enhancement
   =========================================================== */

/* Small phones and up (480px+) */
@media (min-width: 480px){
  .wrap{ padding: 0 24px; }
  .hero-actions{ flex-direction: row; }
  .hero-actions .btn{ width: auto; }
  .hero-stats{ flex-direction: row; gap: 36px; flex-wrap: wrap; }
  .tool-grid{ grid-template-columns: repeat(2, 1fr); }
}

/* Tablets (768px+) */
@media (min-width: 768px){
  .hero{ padding: 80px 0 56px; }
  .about, .services, .tools, .reviews, .consult{ padding: 80px 0; }
  .review-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .tool-grid{ grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .service-list{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .case-form{ padding: 32px; }
  .modal-card{ padding: 44px 36px 36px; }
}

/* Desktop (960px+) */
@media (min-width: 960px){
  .hero{ padding: 96px 0 64px; }
  .about, .services, .tools, .reviews, .consult{ padding: 96px 0; }

  /* Show desktop nav, hide hamburger */
  .main-nav{
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 14.5px;
    color: var(--ink-dim);
  }
  .main-nav a{ transition: color 0.15s ease; white-space: nowrap; }
  .main-nav a:hover{ color: var(--ink); }
  .nav-cta{ display: inline-flex; }
  .menu-toggle{ display: none; }

  /* Two-column layouts */
  .about-grid{
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 72px;
    align-items: center;
  }
  .consult-grid-layout{
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 72px;
    align-items: start;
  }

  .section-sub{ max-width: 560px; margin-bottom: 48px; }
  .service-list li{ padding: 32px; }
}
