/* ============================================================
   PhonL Consulting — main.css
   Design tokens (:root) FIRST — other stylesheets reuse these.
   Rebrand here, never hardcode colours elsewhere.
   ============================================================ */

:root {
  /* Brand — sampled from logo-transparent.png */
  --accent: #1EAEF8;          /* "Consulting" blue */
  --accent-strong: #0E88C9;   /* hover / active */
  --accent-soft: rgba(30, 174, 248, 0.12);
  --bold: #1F5FA8;            /* bold text in copy — deeper, subtler true blue (less cyan) */
  --ink: #5A5850;             /* "PhonL" warm grey */

  /* Surfaces */
  --bg: #FFFFFF;
  --bg-alt: #F5F4F0;          /* warm off-white to match the taupe brand grey */
  --card: #FFFFFF;
  --border: #E7E5DE;

  /* Text */
  --text: #2C2B27;
  --muted: #6B6960;

  /* WhatsApp brand */
  --whatsapp: #25D366;
  --whatsapp-strong: #1DA851;

  /* Feedback — form errors. Warm red, tuned to sit beside the brand blue without clashing. */
  --danger: #C0392B;
  --danger-soft: rgba(192, 57, 43, 0.10);
  --danger-border: rgba(192, 57, 43, 0.32);

  /* Scale */
  --maxw: 1120px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(30, 33, 40, 0.06), 0 4px 12px rgba(30, 33, 40, 0.05);
  --shadow-md: 0 10px 30px rgba(30, 33, 40, 0.09);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

/* scroll-padding-top keeps every anchor target clear of the sticky header - it applies to the
   scroll container, so it covers any #id on the page, now and in future. --header-h is kept in
   sync with the header's real measured height by content.js; the value here is the fallback. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h, 68px) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* no horizontal scroll on mobile */
}

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

a { color: var(--accent-strong); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3 { line-height: 1.15; color: var(--text); margin: 0 0 .5em; letter-spacing: -0.02em; }

/* Bold in rendered markdown content uses the deeper brand blue (--bold).
   Single source of truth — adjust --bold in :root to tune it everywhere. */
strong, b { color: var(--bold); }

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

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 .9rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font: inherit;
  font-weight: 600;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(30,174,248,.28); }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand-logo { height: 32px; width: auto; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 1.75rem; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); font-weight: 500; }
.nav-links a:hover { color: var(--accent-strong); }
.nav-cta {
  background: var(--accent); color: #fff !important;
  padding: .5rem 1.1rem; border-radius: 999px;
}
.nav-cta:hover { background: var(--accent-strong); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ============================================================
   Sections & bands (alternate --bg / --bg-alt top→bottom)
   ============================================================ */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; background: var(--bg); }
.section--alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin: 0 auto clamp(2rem, 5vw, 3rem); text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: .5rem 0 0; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(3.5rem, 8vw, 6rem);
  background:
    radial-gradient(1200px 500px at 80% -10%, var(--accent-soft), transparent 60%),
    linear-gradient(180deg, #FBFCFE 0%, var(--bg) 100%);
}
/* Copy left, logo in its own column right - the logo can never overlap or reflow the text. */
.hero-inner {
  max-width: 980px;
  display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem);
}
.hero-copy { min-width: 0; flex: 1; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; }
.hero h1 .accent { color: var(--accent); }
.hero .lede { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--muted); margin: 1.2rem 0 2rem; max-width: 62ch; }
/* Source asset is only 272px wide - past ~200px it starts to soften on retina.
   A higher-res or SVG logo would let this go bigger. */
.hero-logo {
  flex: none;
  width: clamp(120px, 16vw, 200px); height: auto;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 2.4rem; }
.hero-badge {
  font-size: .85rem; font-weight: 600; color: var(--ink);
  background: var(--card); border: 1px solid var(--border);
  padding: .45rem .9rem; border-radius: 999px; box-shadow: var(--shadow-sm);
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.about-copy p { color: var(--muted); font-size: 1.05rem; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.3rem; box-shadow: var(--shadow-sm);
}
.stat .num { font-size: 1.9rem; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.stat .label { font-size: .9rem; color: var(--muted); }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; }
.service-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.service-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong); margin-bottom: 1rem; font-size: 1.4rem;
}
.service-card h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.service-card p { color: var(--muted); font-size: .98rem; margin: 0; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 2.2rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-logo { height: 26px; opacity: .9; }
.footer-copy { color: var(--muted); font-size: .9rem; margin: 0; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 820px) {
  /* Too narrow for two columns - logo stacks above the copy rather than trailing under it. */
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .hero-logo { order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: .5rem var(--gutter) 1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: .75rem 0; }
  .nav-cta { text-align: center; margin-top: .4rem; }
}


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