/* ============================================================================
   Sceap, public site (www.sceap.co)
   Editorial system: ivory chapters, one spine, a celebrated focus ring,
   dark pine finale. Inter at extremes. Tuned for Safari/WebKit.
   ========================================================================== */

/* Inter (self-hosted variable) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/_site/inter.woff2') format('woff2');
}
/* No italic face: emphasis is expressed with weight and color, never slant. */

/* ── Tokens ───────────────────────────────────────────────────────────────── */
:root {
  --ivory:      #F6F4EE;
  --parchment:  #ECE9E0;
  --pine:       #0F2418;
  --pine-2:     #16301F;
  --fir:        #245132;
  --leaf:       #2D7A4F;
  --honey:      #C6893A;

  --ink:        var(--pine);
  --ink-2:      #43524A;
  --muted:      #6C7A70;
  --line:       #DCD8CB;
  --line-soft:  #E7E4DA;

  /* on dark */
  --d-ink:      #F2F1EA;
  --d-ink-2:    #C0CEC4;
  --d-muted:    #93A698;
  --d-line:     rgba(242, 241, 234, .14);

  /* type scale */
  --t-xs:   0.6875rem;                                   /* 11px labels */
  --t-sm:   clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --t-body: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --t-lg:   clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);
  --t-xl:   clamp(1.5rem, 1.3rem + 1vw, 2.25rem);
  --t-2xl:  clamp(1.875rem, 1.5rem + 1.9vw, 3.25rem);
  --t-hero: clamp(2.375rem, 1.4rem + 4.6vw, 6rem);

  --nav-h: 64px;
  --container: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --r-sm: 8px;
  --r: 12px;
  --pill: 999px;

  --ease: cubic-bezier(.23,.7,.16,1);
  --ring: 0 0 0 3px rgba(45,122,79,.35);
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--t-body);
  line-height: 1.62;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  font-optical-sizing: auto;
  font-feature-settings: 'liga' 1, 'calt' 1, 'cv05' 1, 'ss03' 1;
  overflow-x: hidden;
}

h1, h2, h3 { color: var(--ink); text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--fir); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; -webkit-appearance: none; appearance: none; }
::selection { background: rgba(45,122,79,.22); }

:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 6px; }
.finale :focus-visible, .site-footer :focus-visible { outline-color: var(--honey); }

.container {
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link {
  position: fixed; top: 0; left: 50%; transform: translate(-50%, -120%);
  z-index: 200; background: var(--fir); color: #fff; padding: .7rem 1.2rem;
  border-radius: 0 0 var(--r-sm) var(--r-sm); font-weight: 600; text-decoration: none;
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ── Utility label (small caps rail) ─────────────────────────────────────── */
.label {
  font-size: var(--t-xs); font-weight: 650; letter-spacing: .14em; text-transform: uppercase;
  color: var(--leaf); font-feature-settings: 'tnum' 1;
}

/* ── Buttons & links ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: var(--t-sm); line-height: 1; letter-spacing: -0.005em;
  text-decoration: none; color: #fff; background: var(--fir);
  padding: .78rem 1.25rem; min-height: 44px; border-radius: var(--pill);
  transition: background .2s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--pine-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-light { background: var(--ivory); color: var(--pine); }
.btn-light:hover { background: #fff; }

.link-quiet {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 600; font-size: var(--t-sm); color: var(--fir); text-decoration: none;
  border-bottom: 2px solid transparent; padding-bottom: 2px;
  transition: border-color .2s var(--ease);
}
.link-quiet:hover { border-bottom-color: var(--honey); }
.link-quiet .arrow { transition: transform .25s var(--ease); }
.link-quiet:hover .arrow { transform: translateY(2px); }

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.site-header.scrolled { background: rgba(246,244,238,.92); border-bottom-color: var(--line-soft); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header.scrolled {
    background: rgba(246,244,238,.7);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
  }
}
.nav { display: flex; align-items: center; gap: 1rem; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); }
.brand img { width: 26px; height: 26px; }
.brand span { font-size: 1.14rem; font-weight: 700; letter-spacing: -0.03em; }
.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-links a {
  color: var(--ink-2); text-decoration: none; font-weight: 520; font-size: var(--t-sm);
  padding: .45rem .7rem; border-radius: var(--pill);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: var(--pine); background: rgba(45,122,79,.08); }
/* auto margin lives here (not on .nav-links) so actions stay right-pinned on mobile
   where the links are hidden; on desktop the links cluster just left of the actions */
.nav-actions { display: flex; align-items: center; gap: .55rem; margin-left: auto; }
.nav-links { margin-left: 1.1rem; }
.nav-actions .btn { padding: .55rem 1rem; min-height: 38px; }

.lang-btn {
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .12em;
  color: var(--ink-2); padding: .5rem .55rem; border-radius: var(--r-sm);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.lang-btn:hover { color: var(--pine); background: rgba(45,122,79,.08); }

.menu-btn { display: none; width: 42px; height: 42px; border-radius: var(--r-sm); align-items: center; justify-content: center; color: var(--ink); }
.menu-btn svg { width: 22px; height: 22px; }

.mobile-menu { display: none; }

/* ── Chapters ─────────────────────────────────────────────────────────────── */
.chapter { position: relative; }
.chapter-head { max-width: 30ch; }
.chapter-head h2 { font-size: var(--t-2xl); font-weight: 780; letter-spacing: -0.03em; line-height: 1.04; margin-top: .8rem; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero { padding-block: clamp(4rem, 2.5rem + 8vw, 8.5rem) clamp(3.5rem, 2rem + 5vw, 6rem); }
.hero h1 {
  font-size: var(--t-hero); font-weight: 850; letter-spacing: -0.045em; line-height: 1.0;
  max-width: 16ch;
}
.hero h1 .line { display: block; }
.hero h1 .line-2 { font-weight: 460; font-size: .92em; letter-spacing: -0.03em; color: var(--fir); margin-top: .14em; }

/* the signature: a celebrated focus ring around one word. Border (not outline)
   so it takes real inline space and never collides with neighbouring words. */
.ring {
  display: inline-block; border: 2.5px solid var(--leaf); border-radius: .5em;
  padding: 0 .14em; margin: 0 .02em 0 .04em;
}

.hero .lead { margin-top: 1.6rem; max-width: 44ch; font-size: var(--t-lg); line-height: 1.5; color: var(--ink-2); }
.hero-cta { margin-top: 2.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; }

.fact-rail { margin-top: clamp(2.6rem, 2rem + 3vw, 4.2rem); border-top: 1px solid var(--line); padding-top: 1.1rem; display: flex; flex-wrap: wrap; gap: .5rem 2.4rem; }
.fact-rail span { display: inline-flex; align-items: center; gap: .55rem; font-size: var(--t-sm); font-weight: 540; color: var(--ink-2); }
.fact-rail span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); flex: none; }

/* hero load sequence */
.js .hero .rise { opacity: 0; transform: translateY(14px); }
.js body.loaded .hero .rise, .js .loaded .hero .rise { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .hero .rise { transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
  .js .hero .ring { border-color: transparent; transition: border-color .5s var(--ease) .6s; }
  .js .loaded .hero .ring { border-color: var(--leaf); }
}
@media (prefers-reduced-motion: reduce) {
  .js .hero .rise { opacity: 1; transform: none; }
}

/* ── Stance (parchment band, staircase) ───────────────────────────────────── */
.stance { background: var(--parchment); border-block: 1px solid var(--line-soft); padding-block: clamp(4rem, 3rem + 5vw, 7.5rem); }
.stance .statement {
  font-size: clamp(1.55rem, 1.15rem + 2.1vw, 3rem);
  font-weight: 760; letter-spacing: -0.03em; line-height: 1.12;
  max-width: 24ch;
}
.stance .statement .soft { font-weight: 460; color: var(--fir); }
.stance-body { margin-top: 2.2rem; margin-left: clamp(0rem, 12vw, 11rem); max-width: 52ch; }
.stance-body p { color: var(--ink-2); font-size: var(--t-lg); line-height: 1.55; }
.stance-body p + p { margin-top: 1.1rem; }

/* ── Places (one split panel, unequal) ────────────────────────────────────── */
.places { padding-block: clamp(4rem, 3rem + 5vw, 7.5rem); }
.split {
  margin-top: clamp(2rem, 1.5rem + 2vw, 3rem);
  display: grid; grid-template-columns: 55fr 45fr;
  border: 1px solid var(--line); border-radius: var(--r);
  background: rgba(255,255,255,.5);
}
.split > div { padding: clamp(1.6rem, 1.2rem + 2vw, 2.8rem); min-width: 0; }
.split > div + div { border-left: 1px solid var(--line); }
.split h3 { font-size: var(--t-xl); font-weight: 760; letter-spacing: -0.025em; }
.split .label { display: block; margin-bottom: .9rem; }
.split p { margin-top: .9rem; color: var(--ink-2); line-height: 1.6; }
.split ul { list-style: none; margin-top: 1.2rem; padding: 0; }
.split li { display: flex; gap: .6rem; align-items: baseline; padding-block: .5rem; border-top: 1px solid var(--line-soft); font-size: var(--t-sm); font-weight: 540; color: var(--ink-2); }
.split li::before { content: "✓"; color: var(--leaf); font-weight: 700; flex: none; }

/* ── Principles (staggered stack, no boxes) ───────────────────────────────── */
.principles { padding-block: clamp(4rem, 3rem + 5vw, 7.5rem); }
.prin-grid { margin-top: clamp(2.2rem, 1.5rem + 2.5vw, 3.4rem); display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem clamp(2.4rem, 2rem + 4vw, 6rem); }
.prin-col-2 { margin-top: 3.2rem; }
.prin { max-width: 42ch; }
.prin + .prin { margin-top: 2.6rem; }
.prin .mark { width: 12px; height: 12px; background: var(--leaf); border-radius: 3px; margin-bottom: .95rem; }
.prin:nth-child(even) .mark { background: var(--honey); }
.prin h3 { font-size: var(--t-lg); font-weight: 730; letter-spacing: -0.02em; }
.prin p { margin-top: .5rem; color: var(--ink-2); line-height: 1.6; }

/* ── Finale (dark pine: note + contact + footer) ─────────────────────────── */
.finale { background: var(--pine); color: var(--d-ink-2); padding-block: clamp(4rem, 3rem + 5vw, 7rem) clamp(3.5rem, 3rem + 3vw, 5.5rem); }
.finale .label { color: var(--honey); }
.finale h2 { color: var(--d-ink); }
.finale-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2.4rem, 2rem + 3vw, 4.5rem); }
.finale-note { margin-top: 1.4rem; max-width: 40ch; font-size: var(--t-lg); line-height: 1.55; color: var(--d-ink-2); }
.finale-mail { margin-top: 1.8rem; display: inline-flex; align-items: center; gap: .6rem; font-weight: 650; font-size: var(--t-lg); color: var(--d-ink); text-decoration: none; border-bottom: 2px solid var(--honey); padding-bottom: 3px; }
.finale-mail:hover { color: #fff; }
.finale-mail svg { width: 20px; height: 20px; color: var(--honey); }

/* form on pine */
.field { margin-bottom: 1.05rem; }
.field.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.05rem; margin-bottom: 0; }
.field label { display: block; font-size: var(--t-xs); font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--d-muted); margin-bottom: .5rem; }
.field .opt { text-transform: none; letter-spacing: 0; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: max(16px, var(--t-body)); color: var(--pine);
  background: var(--ivory); border: 1.5px solid transparent; border-radius: var(--r-sm);
  padding: .78rem .9rem; min-height: 48px;
  -webkit-appearance: none; appearance: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236C7A70' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 16px; padding-right: 2.5rem;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--honey); box-shadow: 0 0 0 3px rgba(198,137,58,.28); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #E4A08D; }
.field .err { display: none; color: #F0B7A6; font-size: .82rem; margin-top: .4rem; font-weight: 500; }
.field.invalid .err { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 1rem; margin-top: 1.3rem; flex-wrap: wrap; }
.form-foot .btn { background: var(--ivory); color: var(--pine); }
.form-foot .btn:hover { background: #fff; }
.form-status { font-size: var(--t-sm); font-weight: 550; }
.form-status.ok { color: #A8D8B4; }
.form-status.bad { color: #F0B7A6; }
.form-note { margin-top: 1rem; font-size: .8rem; color: var(--d-muted); line-height: 1.5; }
.form-note a { color: var(--d-ink-2); }

.btn[disabled] { opacity: .6; pointer-events: none; }
.spinner { width: 15px; height: 15px; border: 2px solid rgba(15,36,24,.3); border-top-color: var(--pine); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* footer, continuous with the finale (both pine, no seam) */
.site-footer { background: var(--pine); color: var(--d-muted); overflow: hidden; }
/* the closing moment: an oversized stroked wordmark, quiet but unmistakably ours */
.footer-word {
  font-size: clamp(4.5rem, 19vw, 15rem); font-weight: 850; letter-spacing: -0.05em;
  line-height: .78; text-align: center; color: transparent;
  -webkit-text-stroke: 1.5px rgba(242,241,234,.2);
  user-select: none; pointer-events: none;
  margin-bottom: -0.08em;
}
@supports not (-webkit-text-stroke: 1px black) {
  .footer-word { color: rgba(242,241,234,.08); }
}
.footer-rule { border-top: 1px solid var(--d-line); }
.footer-row {
  display: flex; align-items: center; gap: 1rem 1.8rem; flex-wrap: wrap;
  padding-block: 1.6rem calc(1.6rem + env(safe-area-inset-bottom));
  font-size: var(--t-sm);
}
.footer-brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--d-ink); text-decoration: none; font-weight: 650; }
.footer-brand img { width: 22px; height: 22px; }
.footer-tag { color: var(--d-muted); }
.footer-row nav { display: flex; gap: 1.2rem; margin-left: auto; }
.footer-row nav a { color: var(--d-ink-2); text-decoration: none; }
.footer-row nav a:hover { color: #fff; }
.footer-row .lang-btn { color: var(--d-ink-2); }
.footer-row .lang-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.copyright { width: 100%; color: var(--d-muted); font-size: .8rem; }

/* ── Scroll reveal (section heads only; hidden states only when JS is up) ── */
.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { transition: opacity .55s var(--ease), transform .55s var(--ease); }
}
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ── Legal pages ──────────────────────────────────────────────────────────── */
.legal { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.legal-wrap { max-width: 700px; }
.legal h1 { font-size: var(--t-2xl); font-weight: 780; letter-spacing: -0.03em; }
.legal .updated { color: var(--muted); margin-top: .7rem; font-size: var(--t-sm); }
.legal h2 { font-size: var(--t-xl); font-weight: 740; letter-spacing: -0.02em; margin-top: 2.4rem; }
.legal p, .legal li { color: var(--ink-2); margin-top: .9rem; line-height: 1.65; }
.legal ul { margin-top: .6rem; padding-left: 1.3rem; }
.legal li { margin-top: .5rem; }
.back-link { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1.6rem; color: var(--fir); text-decoration: none; font-weight: 600; font-size: var(--t-sm); }
.back-link:hover { gap: .65rem; }

/* legal pages: dark footer sits directly after light content, add breathing room above */
body.legal-page .site-footer { margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stance-body { margin-left: clamp(0rem, 8vw, 5rem); }
  .finale-grid { grid-template-columns: 1fr; }
  .prin-grid { gap: 2.2rem 2.4rem; }
}
@media (max-width: 760px) {
  :root { --nav-h: 58px; }
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  .menu-btn { display: inline-flex; }

  .mobile-menu {
    display: block; position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 99;
    background: rgba(246,244,238,.98); border-bottom: 1px solid var(--line);
    padding: .6rem max(var(--gutter), env(safe-area-inset-left)) 1.4rem;
    transform: translateY(-130%); transition: transform .32s var(--ease);
  }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .mobile-menu { background: rgba(246,244,238,.86); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
  }
  .mobile-menu.open { transform: translateY(0); }
  .mobile-menu a { display: block; padding: .9rem .2rem; font-size: 1.05rem; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-soft); }
  .mobile-menu a:last-of-type { border-bottom: 0; }
  .mobile-menu .btn { display: inline-flex; width: 100%; justify-content: center; margin-top: .8rem; }

  .split { grid-template-columns: 1fr; }
  .split > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .prin-grid { grid-template-columns: 1fr; }
  .prin-col-2 { margin-top: 0; }
  .prin + .prin, .prin-col-2 .prin:first-child { margin-top: 2.2rem; }
  .field.row { grid-template-columns: 1fr; gap: 0; }
  .form-foot .btn { width: 100%; justify-content: center; }
  .fact-rail { flex-direction: column; gap: .7rem; }
  .footer-row nav { margin-left: 0; }
}
@media (min-width: 761px) { .mobile-menu { transform: none !important; } }

/* language visibility, JS sets html[data-lang] */
[data-lang="en"] .l-fr, [data-lang="fr"] .l-en { display: none; }
