/* ═══════════════════════════════════════════════════════════════════════
   AG Bureau — homepage stylesheet
   One file, mobile-first, no framework.
   Palette extracted from logo.png: deep wine red (AG) + medium grey (bureau).
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Wine-red lifted off the logo enough to read on a dark background;
     hover stays close so the press-state isn't jarring */
  --primary:        #C0334A;
  --primary-hover:  #D14157;
  --primary-soft:   rgba(192, 51, 74, 0.14);

  --secondary:      #9CA0AB;
  --secondary-soft: rgba(156, 160, 171, 0.10);

  --text:           #E8ECF2;
  --text-muted:     #9CA3AF;
  --text-faded:     #6B7280;

  --bg:             #0A0B10;       /* page background — deep dark */
  --bg-alt:         #14161E;       /* alternating section */
  --bg-elev:        #1B1E27;       /* cards / dropdowns lift above bg */

  --border:         rgba(255, 255, 255, 0.08);
  --border-strong:  rgba(255, 255, 255, 0.16);

  --max-width:      1120px;
  --gutter:         clamp(16px, 5vw, 64px);

  --radius:         6px;
  --radius-lg:      10px;

  --shadow-sm:      0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow:         0 6px 24px rgba(0, 0, 0, 0.45);

  --transition:     150ms ease-out;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 600;
}
h1 { font-size: clamp(34px, 5.5vw, 56px); letter-spacing: -0.025em; }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: clamp(18px, 2vw, 22px); }

p { margin: 0 0 1em; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-hover); }

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

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

/* ─── Layout ─────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section {
  padding: clamp(64px, 8vw, 112px) 0;
}
.section-alt { background: var(--bg-alt); }

/* ─── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 11, 16, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.site-header .brand img {
  height: 28px;
  width: auto;
  max-width: min(220px, 60vw);
  object-fit: contain;
  object-position: left center;
}

.site-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.site-nav a {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Burger toggle — hidden on desktop, shown on phones */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;     /* visually align with container edge */
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.nav-toggle:hover { background: var(--secondary-soft); }
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 600px) {
  .site-header .brand img { height: 24px; max-width: min(180px, 50vw); }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: var(--gutter);
    left: var(--gutter);
    background: rgba(20, 22, 30, 0.96);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 6px;
    gap: 0;
    flex-direction: column;
    margin-top: 8px;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: 14px 18px;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }
  .site-nav a:last-child { border-bottom: none; }
  .site-nav a:hover {
    background: var(--primary-soft);
    border-bottom-color: var(--border);
    color: var(--primary);
  }
}

/* ─── Hero ───────────────────────────────────────────────────────────── */
.hero {
  padding: clamp(120px, 16vw, 180px) 0 clamp(72px, 10vw, 120px);
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* Subtle geometric accent — diagonal red wash on dark (desktop only) */
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 55%;
  background:
    radial-gradient(ellipse at 100% 30%, rgba(192, 51, 74, 0.18) 0%, transparent 65%),
    linear-gradient(135deg, transparent 40%, rgba(192, 51, 74, 0.06) 100%);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  max-width: 880px;
  margin-bottom: 24px;
}
.hero .lead {
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 40px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
/* On phones: drop the diagonal gradient (visual noise on narrow screens),
   widen CTAs so they're easy to thumb, push hero padding down a bit. */
@media (max-width: 600px) {
  .hero { padding-top: 100px; }
  .hero::before { display: none; }
  .hero h1 br { display: none; }
  .hero-cta { gap: 10px; }
  .hero-cta .btn { flex: 1 1 auto; min-width: 0; }
}

/* ─── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.btn:active { transform: translateY(1px); }

/* ─── Services ───────────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.service-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.service-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.service-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.service-icon svg { width: 22px; height: 22px; }
.service-card h3 { margin-bottom: 12px; }
.service-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ─── About ──────────────────────────────────────────────────────────── */
.about-intro {
  max-width: 740px;
  font-size: clamp(16px, 1.55vw, 18px);
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 48px;
}
.about-intro p:last-of-type { margin-bottom: 0; }
.about-intro strong { color: var(--text); font-weight: 600; }

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 48px;
}
.about-point h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.about-point h4::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
}
.about-point p {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0;
}

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ─── Contact form ───────────────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-intro p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 28px;
}
.contact-alt {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}
.contact-alt-item {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: center;
}
.contact-alt-item:last-child { margin-bottom: 0; }
.contact-alt-item svg {
  width: 16px; height: 16px; color: var(--secondary);
  flex-shrink: 0;
}
.contact-alt-item a {
  color: var(--text);
  border-bottom: 1px solid transparent;
}
.contact-alt-item a:hover { color: var(--primary); border-bottom-color: var(--primary); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-faded); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.contact-form textarea {
  min-height: 140px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.55;
}
.contact-form .btn { margin-top: 6px; align-self: flex-start; }

.form-status {
  font-size: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  display: none;
}
.form-status.ok {
  display: block;
  background: rgba(34, 197, 94, 0.10);
  color: #6ee7a7;
  border: 1px solid rgba(34, 197, 94, 0.30);
}
.form-status.err {
  display: block;
  background: rgba(220, 38, 38, 0.10);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.30);
}

@media (max-width: 820px) {
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
}

/* ─── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg);
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer .brand img { height: 22px; opacity: 0.85; }
.footer-legal .copyright { color: var(--text); }
.footer-legal {
  font-size: 13px;
  line-height: 1.6;
}
.footer-legal p { margin: 0 0 4px; }
.footer-legal .copyright { color: var(--text); font-weight: 500; }
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
  border-bottom: 1px solid transparent;
}
.footer-links a:hover { color: var(--primary); border-bottom-color: var(--primary); }

@media (max-width: 640px) {
  .footer-row { flex-direction: column; gap: 24px; }
}

/* ─── Phone-only fine-tuning across the rest of the page ──────────────── */
@media (max-width: 600px) {
  section { padding: 56px 0; }
  h2 { font-size: 24px; }
  .service-card { padding: 24px 22px; }
  .about-intro { font-size: 16px; line-height: 1.65; margin-bottom: 32px; }
  .contact-form input,
  .contact-form textarea {
    font-size: 16px;          /* iOS won't auto-zoom on focus when ≥16px */
    padding: 12px 14px;
  }
  .contact-form .btn { width: 100%; }
  .footer-row { gap: 20px; }
  .footer-legal,
  .footer-legal p { font-size: 13px; }
  .footer-links { gap: 14px; }
}

/* ─── Section headings shared ─────────────────────────────────────────── */
.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-heading { max-width: 720px; margin-bottom: 16px; }
.section-lead {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 0;
}

/* ─── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
