:root {
  --bg:        #121212;
  --fg:        #EBEBEB;
  --accent:    #D4AF37;
  --muted:     #999999;
  --light:     #1E1E1E;
  --border:    #2A2A2A;
  --radius:    6px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Typography ---- */
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
h2 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  color: var(--accent);
  display: inline-block;
  margin-bottom: 1.75rem;
}
h2::after {
  content: '';
  display: block;
  width: 3.5rem;
  height: 4px;
  background: var(--accent);
  margin-top: 0.35rem;
  border-radius: 2px;
}
h3 { font-size: 1.15rem; }

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

.text-muted { color: var(--muted); font-size: 0.94rem; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5rem 0; }
section + section { border-top: 1px solid var(--border); }

/* ---- Section illustration (centered, in-flow, like Yohann's) ---- */
.section-illus {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 2rem;
  opacity: 0.88;
}
/* Different widths per context */
.illus-sm  { max-width: 240px; }
.illus-md  { max-width: 320px; }
.illus-lg  { max-width: 420px; }

/* ---- Nav ---- */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(18,18,18,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px);
}
nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 3.5rem;
}
.nav-brand {
  font-weight: 700; font-size: 1.2rem; color: var(--accent);
  letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 0.5rem;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand .brand-mark { width: 2.2rem; height: 2.2rem; flex-shrink: 0; }

.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { color: var(--fg); font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

/* ---- Hamburger ---- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 110;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Mobile drawer ---- */
.drawer-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.25s;
}
.drawer-backdrop.visible { display: block; opacity: 1; }

.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 160;
  width: 280px; max-width: 80vw;
  background: var(--bg);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}
.mobile-drawer.open { transform: translateX(0); }

.drawer-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 0;
}

.drawer-nav { list-style: none; margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.drawer-nav a {
  display: block;
  padding: 0.75rem 0;
  color: var(--fg);
  font-size: 1.05rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.drawer-nav a:hover { color: var(--accent); text-decoration: none; }

/* ---- Hero ---- */
.hero {
  padding: 3rem 0 5rem;
  text-align: center;
}
.hero .container { overflow: hidden; }
.hero-illus {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto 1.75rem;
}
.hero h1 { margin-bottom: 1rem; }
.hero .tagline {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 2.5rem;
}
/* ---- Shared CTA button ---- */
.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  padding: 0.85rem 2.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  transition: box-shadow 0.3s, opacity 0.3s;
  white-space: nowrap;
}
.cta:hover {
  opacity: 0.92;
  text-decoration: none;
  box-shadow: 0 0 28px rgba(212,175,55,0.30);
}
/* ---- Services ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.service-card {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}
.service-card h3 { margin-bottom: 0.6rem; }
.card-illus { width: 100%; max-width: 200px; height: auto; margin-bottom: 0.75rem; display: block; }
.card-cta {
  display: inline-block;
  margin-top: auto;
  padding-top: 0.75rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent);
  border-top: 1px solid var(--border);
  white-space: nowrap;
}
.card-cta:hover { text-decoration: underline; }

/* ---- Section-level CTA ---- */
.section-cta {
  text-align: center;
  margin-top: 2rem;
}
.service-card ul { list-style: none; margin-top: 0.75rem; }
.service-card li {
  padding: 0.3em 0;
  font-size: 0.94rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.service-card li:last-child { border-bottom: none; }

/* ---- Person ---- */
.person-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.person-illus {
  flex-shrink: 0;
  width: 200px;
  height: auto;
  opacity: 0.88;
}

@media (min-width: 640px) {
  .person-section {
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
  }
  .person-illus {
    width: 240px;
  }
}
.person-text p { margin-bottom: 0.75rem; }
.person-text p:last-child { margin-bottom: 0; }
.person-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.person-highlights .highlight {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
}

/* ---- Case Studies ---- */
.case-study {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.case-study h3 { margin-bottom: 0.35rem; }
.case-study .client { color: var(--accent); font-weight: 600; font-size: 0.92rem; margin-bottom: 1rem; }
.case-study .results {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.case-study .badge {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
}

.receipts-note {
  max-width: 650px;
  margin: 1.5rem auto 0;
  text-align: center;
}

/* ---- Case studies wrapper ---- */
.case-studies {
  /* Groups case-study cards — individual cards handle their own spacing */
}

/* ---- Contact ---- */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 500;
}
/* ---- Footer ---- */
footer {
  text-align: center;
  padding: 2.5rem 0;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--border);
}

/* ---- Responsive: mobile nav ---- */
@media (max-width: 767px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  nav .container { position: relative; }
  .brand-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }
}

/* ---- Decorative pieces (ambient, anchored to sections) ---- */
#services,
#work,
#contact {
  position: relative;
  overflow: visible;
}

.deco-piece {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  width: auto;
  height: auto;
  user-select: none;
}
.deco-robot {
  top: 12%;
  left: -55px;
  width: 220px;
  opacity: 0.06;
  transform: rotate(4deg);
}
.deco-floppy {
  top: 55%;
  right: 8px;
  width: 140px;
  opacity: 0.09;
  transform: rotate(8deg);
}
.deco-teleport {
  top: 50%;
  right: -70px;
  width: 280px;
  opacity: 0.06;
  transform: translateY(-50%) rotate(-6deg);
}

@media (max-width: 767px) {
  .deco-piece { display: none; }
}

/* ---- Focus visible ---- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mobile-drawer { transition: none; }
  .drawer-backdrop { transition: none; }
  .hamburger span { transition: none; }
}

