/* ==========================================================================
   Benoît Bernardin — hub
   Design system: marine profond + or (lumière, pas aplat), éditorial x tech.
   ========================================================================== */

/* Polices hébergées dans le hub (SIL OFL) : aucun appel à Google, le hub reste autonome */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("assets/fonts/fraunces-opsz.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("assets/fonts/fraunces-opsz-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("assets/fonts/inter-tight.woff2") format("woff2"); }

:root {
  --navy-950: #070b14;
  --navy-900: #0b1220;
  --navy-800: #121b2e;
  --navy-700: #1a2538;
  --ink: #f4efe6;
  --ink-soft: #c7d0de;
  --ink-muted: #8fa0b8;
  --gold: #cdaf60;
  --gold-light: #e8d4a0;
  --gold-rgb: 205, 175, 96;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1180px;
  --radius-lg: 26px;
  --radius-md: 18px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.2, .9, .25, 1.2);

  --dur-fast: .22s;
  --dur-med: .5s;
  --dur-slow: 1.1s;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--navy-900);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Ambient background: deep navy + breathing gold halo ---------- */

body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(640px 520px at 18% 6%, rgba(var(--gold-rgb), .16), transparent 60%),
    radial-gradient(560px 480px at 86% 30%, rgba(232, 93, 44, .10), transparent 60%),
    radial-gradient(620px 560px at 30% 92%, rgba(63, 163, 94, .09), transparent 60%),
    radial-gradient(1200px 900px at 50% 0%, var(--navy-800), var(--navy-950) 70%);
  animation: breathe 16s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .85; transform: scale(1.04); }
}

#grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: .05;
  mix-blend-mode: overlay;
  pointer-events: none;
}

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

.page {
  position: relative;
  z-index: 3;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 8vh, 72px) 20px clamp(56px, 10vh, 96px);
}

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding-bottom: clamp(44px, 9vh, 80px);
}

.hero-ring {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.hero-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 1.5px;
  background: conic-gradient(from var(--spin, 0deg), var(--gold) 0deg, transparent 90deg, transparent 270deg, var(--gold) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ring-spin 6s linear infinite;
}
.hero-ring::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--gold-rgb), .35), transparent 70%);
  filter: blur(6px);
  animation: ring-pulse 3.4s ease-in-out infinite;
}
@keyframes ring-spin { to { --spin: 360deg; } }
@keyframes ring-pulse {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}
.hero-ring__icon {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
}

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  margin: 0;
}
.eyebrow--hero { opacity: .85; }

.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(34px, 7vw, 50px);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 2px 0 0;
}

.hero-tagline {
  margin: 0;
  max-width: 380px;
  font-size: clamp(15px, 2.4vw, 17px);
  line-height: 1.6;
  color: var(--ink-soft);
  font-weight: 500;
}

.scroll-cue {
  margin-top: 10px;
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, rgba(var(--gold-rgb), .6), transparent);
  position: relative;
}
.scroll-cue span {
  position: absolute;
  top: 0; left: 50%;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--gold);
  animation: cue-drop 2.2s ease-in-out infinite;
}
@keyframes cue-drop {
  0% { top: 0; opacity: 0; }
  30% { opacity: 1; }
  90% { opacity: 0; }
  100% { top: 32px; opacity: 0; }
}

/* ---------- Links / Cards ---------- */

.links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.card {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 2px;
  isolation: isolate;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform .35s var(--ease-out);
}

.card__border {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(165deg, rgba(var(--accent-rgb), .5), rgba(255, 255, 255, .06) 40%, rgba(var(--accent-rgb), .18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: background .4s ease;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from 0deg, transparent 0%, rgba(var(--accent-rgb), .9) 12%, transparent 24%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s ease;
  animation: border-spin 3.2s linear infinite paused;
  pointer-events: none;
}

@keyframes border-spin { to { transform: rotate(360deg); } }

@media (hover: hover) and (pointer: fine) {
  .card:hover::after { opacity: 1; animation-play-state: running; }
  .card:hover { box-shadow: 0 24px 60px -24px rgba(var(--accent-rgb), .45); }
}

.card:active { transform: scale(.985); }

.card__index {
  position: absolute;
  top: -8px;
  right: 2px;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(90px, 13vw, 128px);
  line-height: 1;
  color: var(--accent);
  opacity: .08;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

.card__body {
  position: relative;
  z-index: 1;
  padding: 30px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-radius: calc(var(--radius-lg) - 2px);
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 2px 0 0;
}

.card__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(25px, 4vw, 30px);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -.01em;
}
.card__title--gold { color: var(--gold-light); }
.card__title em { font-style: italic; color: var(--accent); }

.card__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.card__desc em { color: var(--ink-muted); font-style: italic; }

.card__brand {
  width: 112px;
  height: auto;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: .96;
}
.card__brand--wide {
  width: 104px;
}

/* ---------- Link hierarchy: primary / secondary / tertiary ---------- */

.link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  font-family: var(--sans);
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast) ease, filter var(--dur-fast) ease, background var(--dur-fast) ease;
}
.link:active { transform: scale(.97); }

.link__arrow {
  width: 17px; height: 17px;
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease-out);
}
.link__arrow--sm { width: 13px; height: 13px; }

@media (hover: hover) and (pointer: fine) {
  .link:hover .link__arrow { transform: translateX(4px); }
}

.link--primary {
  margin-top: 6px;
  padding: 16px 20px;
  font-weight: 800;
  font-size: 15px;
  color: #19100a;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 60%, white), var(--accent));
  box-shadow: 0 10px 28px -10px rgba(var(--accent-rgb), .6);
}
@media (hover: hover) and (pointer: fine) {
  .link--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -10px rgba(var(--accent-rgb), .75); filter: brightness(1.04); }
}
.link--primary.link--gold { color: #1c1406; }

.link--secondary {
  padding: 13px 18px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  border: 1.5px solid rgba(var(--accent-rgb), .45);
  background: rgba(var(--accent-rgb), .05);
}
@media (hover: hover) and (pointer: fine) {
  .link--secondary:hover { border-color: rgba(var(--accent-rgb), .8); background: rgba(var(--accent-rgb), .1); transform: translateY(-2px); }
}

.link--tertiary {
  min-height: 40px;
  padding: 4px 6px;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--ink-muted);
  letter-spacing: .01em;
}
@media (hover: hover) and (pointer: fine) {
  .link--tertiary:hover { color: var(--ink-soft); }
}

/* ---------- Closing moment ---------- */

.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  margin-top: clamp(50px, 9vh, 90px);
}

.closing__line {
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.closing__socials {
  display: flex;
  gap: 14px;
}

.social {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .04);
  transition: transform var(--dur-fast) var(--ease-spring), border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, background var(--dur-fast) ease;
}
.social svg { width: 19px; height: 19px; }
@media (hover: hover) and (pointer: fine) {
  .social:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    background: rgba(var(--gold-rgb), .1);
    box-shadow: 0 10px 24px -10px rgba(var(--gold-rgb), .5);
  }
}

/* ---------- Reveal / stagger entrance ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger within hero (fires on load) */
.hero[data-reveal-group] [data-reveal]:nth-child(1) { transition-delay: .05s; }
.hero[data-reveal-group] [data-reveal]:nth-child(2) { transition-delay: .15s; }
.hero[data-reveal-group] [data-reveal]:nth-child(3) { transition-delay: .25s; }
.hero[data-reveal-group] [data-reveal]:nth-child(4) { transition-delay: .35s; }
.hero[data-reveal-group] [data-reveal]:nth-child(5) { transition-delay: .45s; }

/* stagger within each card group (fires on scroll-into-view) */
.links .card:nth-of-type(1) { transition-delay: 0s; }
.links .card:nth-of-type(2) { transition-delay: .08s; }
.links .card:nth-of-type(3) { transition-delay: .16s; }

/* ---------- Desktop: asymmetric bento, not a stretched phone ---------- */

@media (min-width: 900px) {
  .page { padding-top: clamp(64px, 10vh, 100px); }

  .hero { padding-bottom: clamp(70px, 10vh, 110px); }

  .links {
    grid-template-columns: 1.05fr .95fr;
    grid-template-rows: auto auto;
    gap: 26px;
  }
  .card--01 { grid-row: 1 / 3; }
  .card--02 { grid-row: 1 / 2; }
  .card--03 { grid-row: 2 / 3; }

  .card__body { padding: 38px 34px 34px; height: 100%; }
  .card--01 .card__body { justify-content: center; }
}

@media (min-width: 1200px) {
  .hero-title { font-size: 56px; }
}

/* ---------- Reduced motion: calm, no disorientation ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  .hero-ring::before, .hero-ring::after, .scroll-cue span, .card::after { animation: none !important; }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .card, .link, .social { transition: none !important; }
}

/* Icônes décoratives */
.eyebrow--icon { display: inline-flex; align-items: center; gap: 9px; }
.eyebrow__icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--accent, var(--gold)); }
.link__icon { width: 18px; height: 18px; flex-shrink: 0; }
.link--tertiary .link__icon { opacity: .75; }

/* ---------- Portrait en arche (entre le hero et les cartes) ---------- */

.portrait {
  display: flex;
  justify-content: center;
  padding: clamp(20px, 4vh, 36px) 0 clamp(48px, 8vh, 80px);
}
.portrait__cadre {
  position: relative;
  margin: 0;
  width: min(calc(100% - 20px), 340px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.portrait__scene {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 6;
}
/* l'arche : fond marine, bordure or, halo or derriere la personne */
.portrait__arche {
  position: absolute;
  inset: 0;
  border-radius: 999px 999px 0 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(205, 175, 96, .35), transparent 62%),
    #13243B;
  border: 1.5px solid rgba(205, 175, 96, .6);
  box-shadow: 0 30px 70px -30px rgba(var(--gold-rgb), .45);
}
/* la personne, posee en bas ; la tete depasse du haut de l'arche (~4 %) */
.portrait__sujet {
  position: absolute;
  inset: 0;
  clip-path: inset(-30% 0 0 0);
  pointer-events: none;
}
.portrait__sujet img {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 111.7%;
  width: auto;
  max-width: none;
  transform: translateX(-50%);
  object-fit: contain;
  object-position: bottom center;
}
.portrait__puces {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  white-space: nowrap;
}
.puce {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink);
  background: rgba(11, 18, 32, .72);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.puce svg { width: 14px; height: 14px; color: var(--gold); }
.puce--or { color: var(--navy-900); background: var(--gold); border-color: transparent; }
@media (max-width: 380px) {
  .puce { padding: 7px 11px; font-size: 11px; }
}

/* Carte BONAPPART : le logo fait exactement la hauteur visible du titre
   (haut des capitales de la 1re ligne -> ligne de base de la 2e). */
.card--01 .card__head { gap: 16px; font-family: var(--serif); font-size: clamp(25px, 4vw, 30px); }
.card--01 .card__title {
  font-size: 1em;
  line-height: 1.05;
  text-box: trim-both cap alphabetic;
}
.card--01 .card__brand {
  display: block;
  flex-shrink: 0;
  width: auto;
  margin-top: 0;
  height: calc(1.05em + 1cap);
}
@supports not (text-box: trim-both cap alphabetic) {
  .card--01 .card__title { padding-top: 0; }
  .card--01 .card__brand { height: 2.1em; }
}

/* Mentions du pied */
.closing__legal { margin: 18px 0 0; text-align: center; font-size: 12px; color: var(--ink-muted); }
.closing__legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.closing__legal a:hover { color: var(--gold); }
