/* main.css — Talk Debt To Me
   Shared stylesheet for the site
*/

/* ========== Theme tokens ========== */
:root {
  --radius: 18px;
  --border:#e7e7e7;
  --bg:#FFFFFF;
  --ink:#0f0f10;
  --muted:#4a4a4f;
  --card:#ffffff;
  --shadow: 0 18px 40px rgba(0,0,0,.08);
  --shadow2: 0 10px 22px rgba(0,0,0,.06);

  /* Pastel blue system */
  --blue-100:#eaf2ff;
  --blue-200:#d7e6ff;
  --blue-300:#c3d9ff;
  --blue-500:#7fa7ff;
  --blue-700:#3f6fe6;
}

/* ========== Base ========== */
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

/* Headings use a warmer, more human font */
h1, h2, h3 {
  font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

section { padding:40px 0; }

h2 {
  font-size:30px;
  margin:0 0 18px;
  letter-spacing:-.3px;
  font-weight:800;
}

/* ========== Background pattern wrapper ========== */
.pattern {
  background:
    radial-gradient(1200px 700px at 10% 0%, rgba(26,115,232,.10), transparent 55%),
    radial-gradient(900px 700px at 90% 10%, rgba(16,185,129,.10), transparent 60%),
    radial-gradient(900px 700px at 60% 110%, rgba(168,85,247,.10), transparent 60%),
    linear-gradient(180deg, #fbfbfb, #ffffff 45%, #fbfbfb);
  position: relative;
  overflow: hidden;
}

/* ensure the texture layer is BEHIND all content */
.pattern:before {
  content:"";
  position:absolute;
  inset:-2px;
  opacity:.55;
  pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='none' stroke='%23000000' stroke-opacity='.08' stroke-width='1.2'%3E%3Cpath d='M-10 52c38-20 88-18 128 2s82 20 132-2'/%3E%3Cpath d='M-10 92c42-18 92-14 132 6s80 24 128-6'/%3E%3Cpath d='M-10 132c44-16 96-10 136 10s78 26 124-10'/%3E%3Cpath d='M-10 172c46-14 98-6 140 14s76 28 120-14'/%3E%3Cpath d='M-10 212c50-12 102-2 144 18s74 30 116-18'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 520px 520px;
  filter: blur(.2px);
  z-index: 0;
}

/* lift all direct children above the pattern overlay */
.pattern > * {
  position: relative;
  z-index: 1;
}

/* ========== Helpers ========== */
.helper-text {
  margin-top:16px;
  color:var(--muted);
  font-size:13px;
  max-width:720px;
}

.section-intro {
  max-width:760px;
  color:var(--muted);
  margin:0 0 18px;
}

.section-intro-tight {
  max-width:760px;
  color:var(--muted);
  margin:0 0 16px;
}

.block-spacer-16 { margin-top:16px; }

.list-muted {
  margin:10px 0 0 18px;
  color:var(--muted);
}

.footer-note {
  font-size:13px;
  color:#666;
}

/* ========== Header / nav ========== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  background:
    linear-gradient(135deg,
      rgba(234,242,255,.88),
      rgba(215,230,255,.78)
    );

  border-bottom: 1px solid rgba(63,111,230,.22);
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
}

.wrap { max-width:1100px; margin:0 auto; padding:20px; }

nav { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.brand { display:flex; align-items:center; gap:10px; }

/* Logo sizing */
.brand .logo{
  height:96px;
  width:auto;
  display:block;
}

/* Links */
nav a { text-decoration:none; color:var(--ink); font-weight:650; opacity:.9; }
nav a:hover { opacity:1; }

/* "Touch-friendly" pills */
.menu > a,
.navLinks > a {
  padding: 8px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .12s ease, transform .12s ease, opacity .12s ease;
}
.menu > a:hover,
.navLinks > a:hover {
  background: rgba(127,167,255,.22);
}

/* caret */
.menu > a:after { content:"▾"; font-size: 12px; opacity:.75; }

/* Desktop links row */
.navLinks{
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap:nowrap;
  justify-content:flex-end;
  white-space:nowrap;
}
@media (max-width: 900px){
  .navLinks{
    flex-wrap:wrap;
    white-space:normal;
  }
}

.menu { position: relative; }

/* Hover bridge for dropdowns (desktop) */
.menu::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:100%;
  height:12px;
  background:transparent;
}

/* Dropdown panel (desktop) */
.dropdown {
  position:absolute;
  top:100%;
  margin-top:12px;
  right: 0;
  min-width: 240px;
  border:1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow2);
  padding: 10px;
  display:none;
  z-index: 1000;
}

.dropdown a{
  display:block;
  padding: 10px 10px;
  border-radius: 12px;
  font-weight: 700;
  opacity: .95;
  white-space: nowrap;
}
.dropdown a:hover{ background: rgba(127,167,255,.18); }

.menu:hover .dropdown,
.menu:focus-within .dropdown { display:block; }

.dropdown .sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
  opacity: 1;
  margin-top: -6px;
  padding: 0 10px 10px;
}

@media (max-width: 900px){
  .dropdown { left: 0; right: auto; }
}

/* ✅ Mobile hamburger button (fixed: vertical bars) */
.navToggle{
  display:none;               /* hidden on desktop */
  border:1px solid var(--border);
  background:#ffffff;
  border-radius:999px;
  padding:10px 12px;
  box-shadow: var(--shadow2);
  cursor:pointer;

  /* stack the bars */
  flex-direction: column;
  gap: 5px;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
}

.navToggle .bar{
  display:block;
  width:18px;
  height:2px;
  background: var(--ink);
  border-radius: 999px;
}

/* ========== Rates text cleanup ========== */
.rate-price {
  font-weight:800;
  font-size:18px;
  margin:4px 0 10px;
}

.rate-note {
  color:var(--muted);
  font-size:14px;
}

.rate-note-spaced {
  margin-top:10px;
  color:var(--muted);
  font-size:14px;
}

/* ========== Hero ========== */
.hero {
  padding: 64px 0 26px;
  display: grid;
  grid-template-columns: 1.2fr .9fr;
  gap: 28px;
  align-items: center;
}
@media (max-width: 900px){ .hero { grid-template-columns: 1fr; } }

.badgeRow { display:flex; gap:10px; flex-wrap:wrap; margin-bottom: 12px; }
.badge {
  font-size:12px; font-weight:800; letter-spacing:.2px;
  border:1px solid var(--border);
  background: #ffffff;
  padding:8px 10px;
  border-radius:999px;
  display:inline-flex; align-items:center; gap:8px;
  box-shadow: var(--shadow2);
}
.dot { width:8px; height:8px; border-radius:999px; background:#111; opacity:.9; }

.hero h1 { font-size:44px; line-height:1.05; margin:0 0 14px; letter-spacing:-.6px; }
.hero p { font-size:18px; color:var(--muted); max-width:720px; margin:0; }

.cta { margin-top:22px; display:flex; gap:12px; flex-wrap:wrap; }

.btn {
  padding:14px 18px;
  border-radius:999px;
  border:1px solid var(--blue-700);
  background: linear-gradient(180deg, var(--blue-500), var(--blue-700));
  color:#ffffff;
  text-decoration:none;
  font-weight:800;
  box-shadow: 0 14px 30px rgba(63,111,230,.28);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(63,111,230,.35);
  filter: brightness(1.05);
}
.btn.secondary {
  background: var(--blue-200);
  color: var(--ink);
  border-color: var(--blue-300);
  box-shadow: var(--shadow2);
}
.btn.secondary:hover { filter: brightness(1.02); }

/* Hero aside */
.heroAside {
  border:1px solid var(--border);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 16px;
  position: relative;
  overflow: hidden;
  min-height: 280px;
}
.heroAside:before{
  content:"";
  position:absolute;
  inset:-40px;
  background:
    radial-gradient(circle at 20% 20%, rgba(26,115,232,.18), transparent 55%),
    radial-gradient(circle at 80% 30%, rgba(16,185,129,.18), transparent 55%),
    radial-gradient(circle at 55% 90%, rgba(168,85,247,.14), transparent 60%);
  filter: blur(2px);
}

/* Hero illustration (PNG) */
.hero-visual{
  position: relative;
  z-index: 1;
  height: 260px;
  display: grid;
  place-items: center;
}
.hero-asset{
  width: min(520px, 100%);
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.12));
  transform: translateY(6px);
}

/* ========== Layout blocks ========== */
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px; }

.card {
  border:1px solid var(--blue-300);
  border-radius:var(--radius);
  padding:20px;
  background: linear-gradient(180deg, var(--blue-100), var(--blue-200));
  box-shadow: var(--shadow2);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  text-decoration:none;
  color:inherit;
  display:block;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  filter: brightness(1.04);
  text-decoration:none;
}

.split {
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px){ .split { grid-template-columns: 1fr; } }

.callout {
  border:1px solid var(--blue-300);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, var(--blue-100), var(--blue-200));
  box-shadow: var(--shadow2);
}
.callout h3 { margin:0 0 8px; }
.callout p { margin:0; color:var(--muted); }

/* ========== Footer ========== */
footer { border-top:1px solid var(--border); background:#fafafa; }

/* =========================
   MOBILE OVERRIDES
   ========================= */
@media (max-width: 768px) {

  html, body { overflow-x: hidden; }

  /* ✅ Mobile side gutters (prevents hero from touching screen edge) */
  .wrap{
    padding-left: 20px;
    padding-right: 20px;
  }

  /* ✅ Anchor the overlay menu to the header container */
  header .wrap { position: relative; }

  /* Header + nav (hamburger) */
  .brand .logo { height: 56px; }

  nav{
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  /* Keep header short */
  .brand { min-width: 0; }

  /* Show tagline under logo on mobile */
  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .brand > div {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.2;
    margin-left: 2px;
  }

  .navToggle{ display:inline-flex; } /* show hamburger */

  /* ✅ Option A: overlay dropdown panel (doesn't push header / avoids shifting) */
  .navLinks{
    display:none;

    position: absolute;
    left: 20px;
    right: 20px;
    top: calc(100% + 10px);

    margin-top: 0;
    padding: 12px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--shadow2);

    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    white-space: normal;
    z-index: 2000;
  }
  header.menu-open .navLinks{ display:flex; }

  /* Full-width link pills */
  .menu > a,
  .navLinks > a{
    width: 100%;
    justify-content: space-between;
  }

  /* Dropdowns inside hamburger: show the sub-links as a simple block list */
  .menu::after{ display:none; }

  /* show dropdowns in-flow on mobile */
  .dropdown{
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    margin-top: 6px;
    min-width: unset;

    display:block;
    border: 1px solid rgba(0,0,0,.08);
    padding: 8px;
  }

  /* Hero */
  .hero {
    padding: 40px 0 20px;
    gap: 18px;
  }
  .hero h1 {
    font-size: 32px;
    line-height: 1.1;
  }
  .hero p { font-size: 16px; }

  /* Hero illustration sizing on mobile */
  .hero-visual{ height: 220px; }
  .hero-asset{
    width: min(420px, 100%);
    transform: translateY(2px);
  }

  /* CTA buttons */
  .cta{ flex-direction: column; }
  .btn{ width: 100%; justify-content: center; }

  /* Cards + sections */
  section{ padding: 28px 0; }

  .card,
  .callout,
  .heroAside{ padding: 16px; }

  .grid{ grid-template-columns: 1fr; }
  .split{ grid-template-columns: 1fr; }
}
