/* MICA Collectif — page styles */

:root {
  /* Brand palette */
  --c-brown: #331714;
  --c-maroon: #4D231E;
  --c-maroon-light: #5E2E27;
  --c-orange: #FF4E2A;
  --c-sand: #F1EEEC;
  --c-stone: #BDB6B0;
  --c-white: #FFFFFF;

  /* Type */
  --f-sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-serif: 'Playfair Display', Georgia, serif;

  /* Spacing */
  --gutter: clamp(24px, 6vw, 96px);
  --section-y: clamp(64px, 9vw, 136px);
  --gap-lg: clamp(40px, 6vw, 96px);
  --max-w: 1240px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--c-brown);
  background: var(--c-sand);
}

p, h1, h2, h3, ul { margin: 0; }

a { color: var(--c-orange); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--c-orange); outline-offset: 3px; }

/* ---------- Layout ---------- */

.container { max-width: var(--max-w); margin: 0 auto; }

.section { padding: var(--section-y) var(--gutter); }
.section--dark  { background: var(--c-brown); color: var(--c-sand); }
.section--white { background: var(--c-white); }
.section--stone { background: var(--c-stone); }

.split { display: flex; flex-wrap: wrap; gap: var(--gap-lg); }
.split > * { min-width: 0; }
.split--end { align-items: flex-end; }
.split--center { align-items: center; }
.split__wide   { flex: 1 1 460px; }
.split__narrow { flex: 1 1 420px; }

/* ---------- Typography ---------- */

.accent { color: var(--c-orange); }
.text-maroon { color: var(--c-maroon); }
.measure { max-width: 30em; }

/* Condensed uppercase display type (Archivo width axis) */
.display {
  font-stretch: 68%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: .92;
}
.display--md  { font-stretch: 70%; font-size: clamp(24px, 2.2vw, 34px); line-height: 1; }
.display--lg  { font-size: clamp(38px, 4.2vw, 66px); }
.display--xl  { font-size: clamp(42px, 5.4vw, 86px); }
.display--xxl { font-size: clamp(44px, 6.2vw, 96px); line-height: .9; }

.serif-h2 {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1.1;
  margin-bottom: 20px;
}
.serif-lead { font-family: var(--f-serif); font-size: clamp(26px, 2.9vw, 42px); line-height: 1.25; }
.serif-body { font-family: var(--f-serif); font-size: clamp(21px, 1.9vw, 26px); line-height: 1.5; }
.eyebrow { margin-bottom: 24px; font-weight: 700; color: var(--c-maroon); }

/* ---------- Buttons ---------- */

.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  text-decoration: none;
  font-family: inherit;
  font-size: 18px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--primary { background: var(--c-orange); color: var(--c-brown); font-weight: 700; padding: 14px 26px; }
.btn--primary:hover { color: var(--c-sand); }
.btn--ghost { border: 2px solid var(--c-stone); color: var(--c-sand); font-weight: 600; padding: 12px 24px; }
.btn--ghost:hover { border-color: var(--c-sand); background: rgba(241, 238, 236, .08); }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--c-maroon);
  background: var(--c-brown);
  color: var(--c-sand);
  padding: 14px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px clamp(24px, 4vw, 64px);
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--c-sand); text-decoration: none; }
.brand__name { font-weight: 600; letter-spacing: .18em; font-size: 15px; }
.brand__sub  { font-weight: 300; letter-spacing: .04em; }

/* Menu: equal-width buttons filling all the header width next to the logo (no fill until hover) */
.site-nav {
  flex: 1 1 420px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.site-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--c-sand);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  font-stretch: 75%;
  text-transform: uppercase;
  letter-spacing: .1em;
  white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.site-nav__num {
  font-size: 12px;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: .04em;
  color: var(--c-orange);
  transition: color .2s ease;
}
/* Orange appears on hover, and stays on the current section */
.site-nav a:hover,
.site-nav a[aria-current="true"] { background: var(--c-orange); color: var(--c-brown); }
.site-nav a:hover .site-nav__num,
.site-nav a[aria-current="true"] .site-nav__num { color: var(--c-brown); }

/* Phones: menu becomes a full-width row of buttons under the logo */
@media (max-width: 560px) {
  .site-nav { flex-basis: 100%; gap: 8px; }
  .site-nav a { gap: 6px; padding: 10px 6px; font-size: 13px; letter-spacing: .05em; }
  .site-nav__num { font-size: 11px; }
}

/* Wider screens: logo and menu on one row, buttons fill the full header height */
@media (min-width: 561px) {
  .site-header { padding-top: 0; padding-bottom: 0; align-items: stretch; }
  .brand { align-self: center; padding: 14px 0; }
  .site-nav a { min-height: 76px; }
}

/* Tablet and up: header stays visible while scrolling */
@media (min-width: 768px) {
  html { scroll-padding-top: 96px; } /* keep anchors clear of the sticky header */
  .site-header { position: sticky; top: 0; z-index: 10; }
}

/* ---------- Hero ---------- */

.hero { padding: clamp(56px, 8vw, 120px) var(--gutter) clamp(64px, 9vw, 140px); }
.hero__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap-lg); }
.hero__copy   { flex: 1 1 460px; min-width: 0; }
.hero__visual { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.hero__title {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(38px, 4.8vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}
.hero__symbol { width: 100%; height: auto; display: block; overflow: visible; }
.hero__tagline { text-align: right; }

.rise { transform-box: fill-box; animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.r1 { animation-delay: .15s; }
.r2 { animation-delay: .35s; }
.r3 { animation-delay: .55s; }
.r4 { animation-delay: .9s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(60px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Statement ---------- */

.statement__title { flex: 1.5 1 520px; }
.statement__title > span { display: block; text-wrap: balance; }
.statement__body {
  flex: 1 1 340px;
  border-top: 3px solid var(--c-orange);
  padding-top: 24px;
}
.statement__text {
  font-family: var(--f-serif);
  font-size: clamp(21px, 1.9vw, 26px);
  line-height: 1.5;
  max-width: 24em;
}
/* Orange text on sand fails contrast at body size: emphasise with an orange underline instead */
.statement__text strong {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--c-orange);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

/* ---------- Mentalité ---------- */

.intro { max-width: 980px; margin: 0 auto var(--section-y); }
.video { margin: 0 0 clamp(64px, 8vw, 120px); }
.video__frame {
  position: relative;
  aspect-ratio: 1920 / 860; /* source is 16:9 with baked-in letterbox; crop the black bars */
  background: var(--c-brown);
  border-bottom: 6px solid var(--c-orange);
}
.video__frame video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.video__caption { margin-top: 14px; font-size: 15px; color: var(--c-maroon); }

.mentalite__head { gap: clamp(32px, 5vw, 80px); margin-bottom: clamp(48px, 6vw, 88px); }
.mentalite__head > h2 { flex: 1 1 380px; }
.mentalite__head > p  { flex: 1 1 460px; }

/* 1 col on phones, 2×2 on tablets, 4 in a row on desktop (no orphan pillar) */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 clamp(32px, 4vw, 56px);
}
@media (min-width: 640px)  { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .pillars { grid-template-columns: repeat(4, 1fr); } }
.pillar { position: relative; border-top: 3px solid var(--c-brown); padding: 24px 0 40px; }
/* Orange bar sweeps in over the brown rule on hover */
.pillar::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--c-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.pillar:hover::before { transform: scaleX(1); }
.pillar h3 { margin-bottom: 12px; font-size: 22px; font-weight: 700; line-height: 1.25; }

/* ---------- Symbole ---------- */

#symbole .display { margin-bottom: 16px; }
.symbole__lede { margin-bottom: clamp(40px, 5vw, 72px); color: var(--c-stone); max-width: 36em; font-size: 19px; }
.symbole__svg { width: 100%; height: auto; display: block; }
.part { transition: fill .45s ease; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.chip {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  min-height: 48px;
  padding: 10px 20px;
  border: 2px solid var(--c-stone);
  background: transparent;
  color: var(--c-sand);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.chip:hover { border-color: var(--c-sand); }
.chip[aria-pressed="true"] {
  font-weight: 700;
  border-color: var(--c-orange);
  background: var(--c-orange);
  color: var(--c-brown);
}

.symbole__title {
  margin-bottom: 16px;
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.1;
}
.symbole__text { font-size: 19px; max-width: 30em; }

/* ---------- Couleurs ---------- */

.colors { display: flex; flex-wrap: wrap; }
.color-panel { flex: 1 1 420px; min-width: 0; padding: clamp(56px, 7vw, 104px) var(--gutter); }
.color-panel > p:last-child { max-width: 28em; }
.color-panel__label { margin-bottom: 8px; font-size: 15px; }
.color-panel--brown  { background: var(--c-brown); color: var(--c-sand); border-top: 1px solid var(--c-maroon); }
.color-panel--brown .color-panel__label { color: var(--c-stone); }
.color-panel--orange { background: var(--c-orange); color: var(--c-brown); }
.color-panel--orange .color-panel__label { font-weight: 600; }

/* ---------- Valeurs ---------- */

.valeurs__title { font-size: clamp(30px, 3vw, 44px); margin-bottom: clamp(36px, 4vw, 56px); }
.values { list-style: none; padding: 0; }
.values li {
  position: relative;
  border-top: 2px solid var(--c-brown);
  padding: 18px 0;
  transition: padding-left .35s cubic-bezier(.2, .7, .2, 1);
  font-stretch: 68%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(30px, 3.7vw, 56px);
  line-height: 1;
}
.values li:last-child { border-bottom: 2px solid var(--c-brown); }
/* The symbol's diamond slides in on hover */
.values li::before {
  content: "";
  position: absolute;
  left: .08em;
  top: 50%;
  width: .36em;
  height: .36em;
  background: var(--c-orange);
  transform: translateY(-50%) rotate(45deg) scale(0);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.values li:hover { padding-left: .8em; }
.values li:hover::before { transform: translateY(-50%) rotate(45deg) scale(1); }

/* ---------- Scroll reveal (only when JS is running) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Footer ---------- */

.site-footer { background: var(--c-orange); color: var(--c-brown); padding: clamp(64px, 8vw, 120px) var(--gutter) 40px; }
.site-footer__motto { margin-bottom: clamp(48px, 6vw, 88px); }
.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  border-top: 2px solid var(--c-brown);
  padding-top: 28px;
}
.site-footer__sign { display: flex; align-items: center; gap: 16px; font-size: 17px; line-height: 1.3; }
.site-footer__legal { font-size: 15px; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; }
  .part, .chip, .btn, .pillar::before, .site-nav a,
  .values li, .values li::before { transition: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
