/* ============================================================
   jeanlucbenazet.com — shared stylesheet
   One file, no build step. Edit colours and fonts in :root only.
   Palette and type from the Strategic Audit (June 2026).
   ============================================================ */

:root {
  /* Backgrounds and text (warm-neutral system, all WCAG AA) */
  --bg:        #faf8f4;   /* page background */
  --bg-alt:    #f3efe6;   /* alternating section background */
  --ink:       #1a1814;   /* primary text + dark sections */
  --muted:     #5a5550;   /* secondary text */
  --border:    #e5dfd2;   /* decorative hairlines */
  --border-ui: #c9c2b3;   /* dividers on interactive components */

  /* Three accents — one job each, never decoration */
  --sienna:    #8B5E3C;   /* photography + primary buttons (text always --bg) */
  --blue:      #2E5D87;   /* links on light backgrounds only */
  --blue-lt:   #5E8FB8;   /* links/affordances on dark sections */
  --sage:      #3A6355;   /* consulting accent: headings, tags, lines */

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Rhythm */
  --maxw: 1080px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --radius: 10px;
}

/* ---- Optional self-hosted fonts ----------------------------
   Drop Fraunces + Inter .woff2 files in /assets/fonts/ and the
   site uses them. If absent, the Georgia/Inter fallback applies
   with no layout shift. (See the implementation guide.)
------------------------------------------------------------- */
@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/Fraunces.woff2') format('woff2-variations');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter.woff2') format('woff2-variations');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--sienna); }

/* ---- Headings ---------------------------------------------- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; font-weight: 600; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 1.3rem + 3.4vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.9vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.4rem); }
p  { margin: 0 0 1rem; max-width: 65ch; }

.eyebrow {
  font-family: var(--font-body); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.78rem; color: var(--sienna); margin: 0 0 1rem;
}
.eyebrow--sage { color: var(--sage); }

/* ---- Layout ------------------------------------------------ */
.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--ink); color: var(--bg); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--bg); }
.section--dark a { color: var(--blue-lt); }
.lead { font-size: 1.2rem; color: var(--muted); }
.center { text-align: center; }
.center p { margin-inline: auto; }

/* ---- Header / nav ------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; }
.brand { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--muted); font-family: var(--font-body); font-weight: 400; font-size: 0.8rem; display: block; letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.6rem); list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav-links a:not(.btn):hover { color: var(--blue); }
.nav-links a.btn--primary { color: var(--bg); }
.nav-links a.btn--primary:hover { color: var(--bg); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--ink); cursor: pointer; line-height: 1; padding: .25rem .5rem; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: .5rem 1.25rem 1.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: .6rem 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-links .btn { margin-top: .75rem; }
}

/* ---- Buttons ----------------------------------------------- */
.btn {
  display: inline-block; font-weight: 600; font-size: 0.98rem;
  padding: 0.7rem 1.3rem; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: var(--bg); }
.btn--primary:hover { background: #244a6d; color: var(--bg); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border-ui); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.section--dark .btn--ghost { color: var(--bg); border-color: rgba(250,248,244,.45); }
.section--dark .btn--ghost:hover { border-color: var(--bg); color: var(--bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.center .btn-row { justify-content: center; }

/* ---- Hero -------------------------------------------------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero .lead { max-width: 60ch; }
.hero-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: stretch; }
.hero-split > div:first-child { align-self: center; }
.hero-media { display: flex; }
.hero-media img { border-radius: var(--radius); width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; min-height: 460px; }
@media (max-width: 820px) { .hero-split { grid-template-columns: 1fr; align-items: stretch; } .hero-media { order: -1; } .hero-media img { aspect-ratio: 4/5; min-height: 0; max-height: 70vh; } }

/* ---- Client / trust strip ---------------------------------- */
.trust { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 1.1rem 0; }
.trust p { margin: 0; max-width: none; text-align: center; color: var(--muted); font-size: 0.92rem; }
.trust strong { color: var(--ink); }

/* ---- Cards / grids ----------------------------------------- */
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem; height: 100%;
}
.section--alt .card { background: var(--bg); }
.card h3 { margin-bottom: .4rem; }
.card .price { font-family: var(--font-display); font-size: 1.5rem; color: var(--sienna); margin: .2rem 0 .6rem; }
.card--consulting { border-top: 3px solid var(--sage); }
.card--photo { border-top: 3px solid var(--sienna); }
.card p:last-child { margin-bottom: 0; }
.card .more { display: inline-block; margin-top: .8rem; font-weight: 600; text-decoration: none; }

.tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sage); border: 1px solid var(--border-ui); border-radius: 999px; padding: .2rem .7rem; }
.tag--photo { color: var(--sienna); }

/* ---- Steps / process --------------------------------------- */
.steps { counter-reset: step; }
.steps .card { position: relative; }
.step-num { font-family: var(--font-display); font-size: 1.1rem; color: var(--sienna); font-weight: 600; }

/* ---- Stat / evidence band ---------------------------------- */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--gap); text-align: center; }
@media (max-width: 700px){ .stats { grid-template-columns: 1fr; } }
.stat b { font-family: var(--font-display); font-size: 2.4rem; display: block; line-height: 1; color: var(--bg); }
.stat span { color: rgba(250,248,244,.8); font-size: .95rem; }

/* ---- Quotes ------------------------------------------------ */
blockquote { margin: 0; padding: 1.4rem 1.5rem; background: var(--bg); border-left: 3px solid var(--sienna); border-radius: 0 var(--radius) var(--radius) 0; }
blockquote p { font-size: 1.08rem; }
blockquote cite { color: var(--muted); font-style: normal; font-size: .9rem; }

/* ---- FAQ (accessible accordion) ---------------------------- */
.faq details { border-bottom: 1px solid var(--border-ui); padding: .4rem 0; }
.faq summary {
  cursor: pointer; list-style: none; font-family: var(--font-display); font-size: 1.12rem;
  padding: .85rem 2rem .85rem 0; position: relative; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .2rem; top: .75rem; font-size: 1.4rem; color: var(--sienna); transition: transform .15s; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding: 0 0 1rem; }
.faq p { margin-bottom: .5rem; }

/* ---- Footer ------------------------------------------------ */
.site-footer { background: var(--ink); color: var(--bg); padding: 3rem 0 2rem; }
.site-footer a { color: var(--blue-lt); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 700px){ .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-family: var(--font-body); text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; color: rgba(250,248,244,.7); margin: 0 0 .8rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .4rem; }
.footer-fine { border-top: 1px solid rgba(250,248,244,.18); margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; color: rgba(250,248,244,.7); }

/* ---- Forms (contact / Web3Forms) --------------------------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .7rem .85rem; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--border-ui); border-radius: var(--radius);
}
.field textarea { min-height: 140px; resize: vertical; }

/* ---- Accessibility ----------------------------------------- */
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .6rem 1rem; z-index: 100; border-radius: 0 0 var(--radius) 0; }
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.section--dark :focus-visible, .site-footer :focus-visible { outline-color: var(--bg); }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

/* ---- Blog -------------------------------------------------- */
.post-list { display: grid; gap: 1.25rem; }
.post-list .card { display: block; }
.post-list a.card { text-decoration: none; color: inherit; transition: border-color .12s; }
.post-list a.card:hover { border-color: var(--border-ui); }
.post-meta { font-size: .82rem; color: var(--muted); margin: 0 0 .4rem; }
.post-meta .tag { vertical-align: middle; margin-right: .5rem; }

/* Article body: comfortable reading measure + rhythm */
.article { max-width: 720px; margin-inline: auto; }
.article > p, .article > ul, .article > ol, .article > h2, .article > h3,
.article > blockquote, .article > figure, .article > .callout { max-width: 68ch; }
.article h2 { margin-top: 2.4rem; }
.article h3 { margin-top: 1.8rem; }
.article ul, .article ol { padding-left: 1.2rem; margin: 0 0 1rem; }
.article li { margin-bottom: .4rem; }
.article .lead { margin-bottom: 1.6rem; }
.article .callout { background: var(--bg-alt); border-left: 3px solid var(--sage); border-radius: 0 var(--radius) var(--radius) 0; padding: 1.1rem 1.3rem; margin: 1.6rem 0; }
.article .callout p:last-child { margin-bottom: 0; }
.article .post-foot { border-top: 1px solid var(--border-ui); margin-top: 2.5rem; padding-top: 1.5rem; }
.byline { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .92rem; }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }

/* ---- Photo gallery ----------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.gallery.gallery--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px){ .gallery, .gallery.gallery--2 { grid-template-columns: 1fr; } }
.gallery img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius); display: block; }
.gallery figure { margin: 0; }
.post-list a.card { padding: 0; overflow: hidden; border-top-width: 1px; }
.post-list a.card .post-thumb { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; margin: 0; border-radius: 0; }
.post-list a.card .post-body { padding: 1.4rem 1.6rem 1.6rem; }
.post-list a.card h3 { margin-top: 0; }

/* Lightbox-enabled thumbnails show a subtle zoom affordance */
.gallery button.lb-open {
  border: 0; padding: 0; margin: 0; background: none; cursor: zoom-in;
  display: block; width: 100%; border-radius: var(--radius); overflow: hidden;
}
.gallery button.lb-open img { transition: transform .25s ease; }
.gallery button.lb-open:hover img { transform: scale(1.04); }

/* ---- Lightbox --------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: rgba(26,24,20,.92); padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.lightbox img { max-width: 100%; max-height: 82vh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox figcaption { color: rgba(250,248,244,.85); font-size: .9rem; margin-top: .9rem; max-width: 60ch; margin-inline: auto; }
.lb-btn {
  position: absolute; background: rgba(250,248,244,.12); color: var(--bg);
  border: 1px solid rgba(250,248,244,.3); border-radius: 50%;
  width: 48px; height: 48px; font-size: 1.5rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.lb-btn:hover { background: rgba(250,248,244,.25); }
.lb-close { top: clamp(.75rem,3vw,1.5rem); right: clamp(.75rem,3vw,1.5rem); }
.lb-prev { left: clamp(.5rem,2vw,1.5rem); top: 50%; transform: translateY(-50%); }
.lb-next { right: clamp(.5rem,2vw,1.5rem); top: 50%; transform: translateY(-50%); }
@media (max-width: 600px){ .lb-prev { left: .5rem; } .lb-next { right: .5rem; } .lb-btn { width: 40px; height: 40px; } }
