/* =========================================================
   DERBAZI — styles.css (FULL) — CLEAN + FIXED
   Scope of this pass:
   - Keep your current visual system intact
   - Clean mobile-menu stacking + pointer-events (no duplicates)
   - Add a proper glassmorphic modal system for thank-you popup
   - Add :focus-visible polish (Tier-1 accessibility)
   - Keep prefers-reduced-motion support
   ========================================================= */

/* ---------- Design tokens ---------- */
:root{
  /* Brand */
  --primary: #0A2540;
  --primary-2: #123458;
  --accent: #00C4B4;

  /* Backgrounds */
  --bg: #0A0F14;
  --bg-2: #0A0F14;

  /* Surfaces */
  --surface: rgba(15,23,30,0.75);
  --surface-strong: rgba(15,23,30,0.88);

  /* Borders */
  --border: rgba(248,250,252,0.10);
  --border-strong: rgba(248,250,252,0.16);

  /* Text */
  --text-main: #F8FAFC;
  --text-muted: rgba(248,250,252,0.82);
  --text-dim: rgba(248,250,252,0.68);

  /* Shadows */
  --shadow: 0 18px 50px rgba(0,0,0,0.45);

  /* Inputs */
  --input-bg: rgba(255,255,255,0.06);
  --input-bg-focus: rgba(255,255,255,0.10);
  --input-border: rgba(248,250,252,0.14);
  --input-placeholder: rgba(248,250,252,0.46);

  /* System */
  --radius: 18px;
  --container: 1120px;
  --gutter: 24px;
  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-serif: "Lora", ui-serif, Georgia, serif;
  --ease: cubic-bezier(.2,.8,.2,1);
}

/* ---------- Optional day mode ---------- */
body[data-theme="day"]{
  --bg: #F5F7FA;
  --bg-2: #EEF2F6;
  --surface: rgba(255,255,255,0.78);
  --surface-strong: rgba(255,255,255,0.92);
  --border: rgba(10,37,64,0.12);
  --border-strong: rgba(10,37,64,0.18);
  --text-main: #0A2540;
  --text-muted: rgba(10,37,64,0.82);
  --text-dim: rgba(10,37,64,0.68);
  --shadow: 0 16px 42px rgba(10,37,64,0.12);
  --input-bg: #FFFFFF;
  --input-bg-focus: #FFFFFF;
  --input-border: rgba(10,37,64,0.22);
  --input-placeholder: rgba(10,37,64,0.48);
}

@media (prefers-color-scheme: light){
  body:not([data-theme="dark"]){
    --bg: #F5F7FA;
    --bg-2: #EEF2F6;
    --surface: rgba(255,255,255,0.78);
    --surface-strong: rgba(255,255,255,0.92);
    --border: rgba(10,37,64,0.12);
    --border-strong: rgba(10,37,64,0.18);
    --text-main: #0A2540;
    --text-muted: rgba(10,37,64,0.82);
    --text-dim: rgba(10,37,64,0.68);
    --shadow: 0 16px 42px rgba(10,37,64,0.12);
    --input-bg: #FFFFFF;
    --input-bg-focus: #FFFFFF;
    --input-border: rgba(10,37,64,0.22);
    --input-placeholder: rgba(10,37,64,0.48);
  }
}

/* ---------- Resets ---------- */
*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  color: var(--text-main);
  font-family: var(--font-sans);
  background:
    radial-gradient(900px 520px at 18% 20%, rgba(0,196,180,0.10), transparent 60%),
    radial-gradient(760px 520px at 88% 30%, rgba(10,37,64,0.18), transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a{ color: inherit; }
img{ max-width: 100%; display:block; }

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

.section-surface{ padding: 84px 0; }

/* ---------- Type ---------- */
h1, h2, h3{
  margin: 0;
  letter-spacing: -0.02em;
}

h1{
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(44px, 4vw, 68px);
  line-height: 1.06;
}

h2{
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(30px, 2.6vw, 42px);
  line-height: 1.12;
  color: var(--text-main);
}

h3{
  font-weight: 800;
  font-size: 18px;
  line-height: 1.25;
  color: var(--text-main);
}

p{ margin: 0; color: var(--text-muted); }
.subtitle{ color: var(--text-muted); }
.highlight{ color: var(--accent); }

/* ---------- Focus polish ---------- */
:focus{ outline: none; }
:focus-visible{
  outline: 3px solid rgba(0,196,180,0.55);
  outline-offset: 3px;
  border-radius: 12px;
}

/* ---------- Buttons ---------- */
.dbz-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease);
  user-select: none;
}

.dbz-btn--primary{
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
  color: #F8FAFC;
  box-shadow: 0 14px 30px rgba(10,37,64,0.30);
}
.dbz-btn--primary:hover{
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(0,196,180,0.95), rgba(0,160,150,0.95));
  box-shadow: 0 18px 38px rgba(0,196,180,0.22);
}

.dbz-btn--ghost{
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
  border-color: var(--border);
}
.dbz-btn--ghost:hover{
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.06);
}

/* ---------- Nav ---------- */
.dbz-nav{
  position: sticky;
  top: 0;
  z-index: 60;
  height: 76px;
  display: flex;
  align-items: center;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.dbz-nav__container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dbz-logo{
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
}

.dbz-nav__desktop{ display:block; }

.dbz-nav__links{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 22px;
}

.dbz-nav__links a{
  color: var(--text-dim);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  padding: 10px;
  border-radius: 12px;
  transition: background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}

.dbz-nav__links a:hover{
  color: var(--text-main);
  background: rgba(255,255,255,0.05);
}

.dbz-nav__cta{ margin-left: 8px; }

/* Mobile menu button */
.dbz-menu-btn{
  display:none;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 800;
}

/* ---------- Mobile menu overlay ---------- */
.dbz-menu{
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: stretch;
  justify-content: flex-end;
  pointer-events: none; /* closed: does not block page */
}
.dbz-menu.is-open{
  display: flex;
  pointer-events: auto; /* open: captures taps */
}

.dbz-menu__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.55);
  border: none;
  padding: 0;
  z-index: 0;
  pointer-events: auto;
}

.dbz-menu__panel{
  position: relative;
  width: min(420px, 92vw);
  height: 100%;
  background: var(--surface-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-left: 1px solid var(--border);
  box-shadow: 0 30px 90px rgba(0,0,0,0.35);
  padding: 16px;
  opacity: 0;
  transform: translateX(14px);
  transition: transform 220ms var(--ease), opacity 220ms var(--ease);
  z-index: 1;
  pointer-events: auto;
}
.dbz-menu.is-open .dbz-menu__panel{
  opacity: 1;
  transform: translateX(0);
}

.dbz-menu__top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 6px 4px 10px;
  border-bottom: 1px solid var(--border);
}

.dbz-menu__brand{
  font-weight: 900;
  letter-spacing: 0.18em;
  font-size: 13px;
  color: var(--accent);
}

.dbz-menu__close{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
  width: 44px;
  height: 40px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
}

.dbz-menu__group{
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
}

.dbz-menu__label{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.dbz-menu__link{
  display:block;
  text-decoration: none;
  padding: 12px;
  border-radius: 14px;
  color: var(--text-main);
  font-weight: 800;
  border: 1px solid transparent;
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
.dbz-menu__link:hover{
  background: rgba(255,255,255,0.06);
  border-color: var(--border);
}

.dbz-menu__ctaWrap{ padding: 14px 4px 6px; }
.dbz-menu__cta{ width: 100%; justify-content: center; }

.dbz-menu__note{
  margin: 10px 6px 0;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- Hero ---------- */
.dbz-hero{ padding: 64px 0 38px; }

.dbz-hero__grid{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 34px;
  align-items: center;
}

.dbz-hero__subtitle{ margin-top: 10px; }

.dbz-hero__subtitleSecondary{
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 16px;
}

.dbz-hero__actions{
  margin-top: 18px;
  max-width: 78ch;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}
.dbz-hero__actions .dbz-btn{ width: 100%; }

.dbz-hero__proof{
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  max-width: 78ch;
}
.dbz-hero__proof strong{ color: var(--text-main); }

/* ---------- Cards ---------- */
.card-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

#method .card-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#exit .dbz-hero__actions{
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.card{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  min-width: 0;
}

.hero-panel{ align-self: center; }
.hero-panel h3{ margin-bottom: 6px; }
.hero-panel p{ margin-top: 8px; }

.card-micro{
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 14px;
}

.card-note{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Fit boundary ---------- */
.dbz-fit__boundary{
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  max-width: 78ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-muted);
}
.dbz-fit__boundary strong{ color: var(--text-main); }

/* ---------- Form ---------- */
.dbz-form{
  margin-top: 22px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 18px;
}

.dbz-form input,
.dbz-form select,
.dbz-form textarea{
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-main);
  padding: 14px;
  margin-bottom: 12px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}

.dbz-form input::placeholder,
.dbz-form textarea::placeholder{ color: var(--input-placeholder); }

.dbz-form input:focus,
.dbz-form select:focus,
.dbz-form textarea:focus{
  background: var(--input-bg-focus);
  border-color: rgba(0,196,180,0.55);
  box-shadow: 0 0 0 4px rgba(0,196,180,0.14);
}

.dbz-form textarea{
  resize: vertical;
  min-height: 140px;
}

.fit-confirm{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  margin: 6px 0 14px;
  line-height: 1.45;
}

.fit-confirm input[type="checkbox"]{
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex: 0 0 18px;
  accent-color: var(--accent);
}

.fit-confirm strong{ color: var(--text-main); }

details{
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  overflow: hidden;
  margin-bottom: 12px;
}

summary{
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 900;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,0.03);
}
summary::-webkit-details-marker{ display:none; }
summary::after{
  content: "▾";
  color: var(--text-dim);
  font-weight: 900;
  transform: translateY(-1px);
}
details[open] summary::after{ content: "▴"; }

details[open] summary{ border-bottom: 1px solid var(--border); }
.dbz-details__inner{ padding: 14px; }

.dbz-form__submit{
  width: 100%;
  margin-top: 2px;
}

.dbz-contact__email{
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
}

.dbz-contact__emailValue{
  color: var(--accent);
  font-weight: 800;
}

/* ---------- Contact header alignment ---------- */
#contact > .dbz-container > h2,
#contact > .dbz-container > p{
  text-align: center;
}
#contact > .dbz-container > p{
  margin-left: auto;
  margin-right: auto;
  max-width: 78ch;
}

/* ---------- Footer ---------- */
.dbz-footer{
  padding: 28px 0;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  text-align: center;
}
.dbz-footer .dbz-container{
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dbz-footer p{
  margin: 0 0 6px;
  color: var(--text-muted);
}
.dbz-footer p:last-child{ margin-bottom: 0; }
.dbz-footer strong{ color: var(--text-main); }

.dbz-footer__legal{
  margin-top: 10px;
  max-width: 78ch;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
}
.dbz-footer__legal a{
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.dbz-footer__legal a:hover{
  color: var(--text-muted);
  border-bottom-color: var(--border-strong);
}

/* ---------- Back to top ---------- */
#backToTop{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--text-main);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.35);
  transition: transform 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease);
  z-index: 55;
}
#backToTop:hover{
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

/* ---------- Modal (Thank you) ---------- */
.dbz-modal{
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  pointer-events: none; /* closed: ignore */
  padding: 24px;        /* ensures space on small screens */
}
.dbz-modal.is-open{
  display: flex;                /* FIX: true centering */
  align-items: center;          /* FIX: vertical center */
  justify-content: center;      /* FIX: horizontal center */
  pointer-events: auto;         /* open: capture */
}

.dbz-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.60);
}

.dbz-modal__panel{
  position: relative;
  width: min(520px, 92vw);
  margin: 0;                    /* FIX: remove 12vh offset */
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 90px rgba(0,0,0,0.45);
  padding: 18px;
  text-align: center;           /* FIX: calm executive alignment */
  z-index: 1;                   /* sits above backdrop */
}

.dbz-modal__panel h3{ margin-bottom: 6px; }
.dbz-modal__panel p{ margin-top: 6px; }

/* Button feels intentional, not random */
.dbz-modal__panel .dbz-btn{ min-width: 120px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .dbz-hero__grid{ grid-template-columns: 1fr; }
  .card-grid{ grid-template-columns: 1fr; }
  .dbz-nav__desktop{ display:none; }
  .dbz-nav__cta{ display:none; }
  .dbz-menu-btn{ display:inline-flex; }
}

@media (max-width: 520px){
  .dbz-hero__actions{ grid-template-columns: 1fr; }
}

.dbz-nav, .dbz-form, .card, .hero-panel{ min-width: 0; }

/* ---------- Reduced motion accessibility ---------- */
@media (prefers-reduced-motion: reduce){
  *{
    transition: none !important;
    scroll-behavior: auto !important;
  }
}