/* =====================================================================
   STYLES — Enzo Monnier
   All colours, fonts and shared sizes come from tokens.css (var(--…)).
   Sections:
     1. Base / reset
     2. Background layers (radial depth + grain)
     3. Hero layout
     4. Hero text (name, tagline, body)
     5. Buttons
     6. Hero visual (avatar + gold shape)
     7. Entrance animations
     8. Hero responsive (stacked layout)
     9. Sections (services, approche, contact, footer)
    10. Scroll reveal
    11. Reduced motion
   ===================================================================== */

/* ---- 1. Base / reset ------------------------------------------------ */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden; /* no horizontal scroll */
}

body {
  min-height: 100dvh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* ---- 2. Background layers ------------------------------------------ */
/* Subtle radial depth on the base background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 90% at 78% 60%, rgb(var(--gold-rgb) / 0.06) 0%, transparent 55%),
    radial-gradient(100% 80% at 12% 18%, rgb(var(--white-rgb) / 0.035) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Grain texture overlay via inline SVG noise */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- 3. Hero layout ----------------------------------------------- */
.hero {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw-hero);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) var(--space-gutter) 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  min-height: 100dvh;
}

/* ---- 4. Hero text -------------------------------------------------- */
.intro { max-width: 36ch; }

.name {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.5px;
  font-size: clamp(3.6rem, 11vw, 7.2rem);
  margin: 0 0 0.5rem;
  color: var(--color-text);
  text-transform: uppercase;
}
.name .accent-rule {
  display: block;
  width: 64px;
  height: 4px;
  background: var(--color-accent);
  margin: 0.65rem 0 0.9rem;
  border-radius: 2px;
}

.tagline {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: var(--color-accent);
  margin: 0 0 1.4rem;
}

.body-text {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.6;
  color: var(--color-text);
  margin: 0 0 2.1rem;
  max-width: 34ch;
}

/* ---- 5. Buttons ---------------------------------------------------- */
.cta-group {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 320px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.4rem;
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.btn svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  stroke: currentColor;
}
.btn:hover,
.btn:focus-visible {
  background: var(--color-accent);
  color: var(--color-on-accent);
  transform: translateY(-2px);
}
.btn:focus-visible {
  outline: 2px solid var(--color-accent-strong);
  outline-offset: 3px;
}
.btn:active { transform: translateY(0); }

/* Solid variant (contact CTA) */
.btn--solid {
  background: var(--color-accent);
  color: var(--color-on-accent);
}
.btn--solid:hover,
.btn--solid:focus-visible {
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
}

/* ---- 6. Hero visual (avatar + gold shape) -------------------------- */
.visual {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 100dvh;
}

/* Abstract gold geometric shape behind avatar (low opacity) */
.shape {
  position: absolute;
  z-index: 0;
  width: clamp(280px, 34vw, 460px);
  aspect-ratio: 1;
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  border: 2px solid rgb(var(--gold-rgb) / 0.28);
  border-radius: 28px;
  background: radial-gradient(circle at 50% 50%, rgb(var(--gold-rgb) / 0.10) 0%, rgb(var(--gold-rgb) / 0) 68%);
  pointer-events: none;
}

.avatar {
  position: relative;
  z-index: 1;
  height: calc(100% + 40px); /* overflow hero bottom by ~40px on desktop */
  max-height: 96vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  margin-bottom: -40px;
  filter: drop-shadow(0 30px 50px rgb(var(--black-rgb) / 0.45));
}

/* ---- 7. Entrance animations (CSS only, staggered) ----------------- */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-44px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(48px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shapeIn {
  from { opacity: 0; transform: translateX(-50%) rotate(45deg) scale(0.82); }
  to   { opacity: 1; transform: translateX(-50%) rotate(45deg) scale(1); }
}

.anim-name    { animation: slideInLeft 0.8s var(--ease-out) both; animation-delay: 0.05s; }
.anim-tagline { animation: slideInLeft 0.8s var(--ease-out) both; animation-delay: 0.20s; }
.anim-body    { animation: slideInLeft 0.8s var(--ease-out) both; animation-delay: 0.32s; }
.anim-cta     { animation: slideInLeft 0.8s var(--ease-out) both; animation-delay: 0.44s; }
.anim-shape   { animation: shapeIn 1.1s var(--ease-out) both; animation-delay: 0.35s; }
.anim-avatar  { animation: fadeUp 1.1s var(--ease-out) both; animation-delay: 0.30s; }

/* ---- 8. Hero responsive (stacked layout) -------------------------- */
/* Stack on phones/standard tablets, and on tall portrait tablets up to
   1100px (e.g. iPad Pro portrait) — keeps wide landscape screens in two columns. */
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    text-align: left;
    gap: 0;
    padding-bottom: 2.5rem;
    min-height: 100dvh;
    align-content: center;
  }
  /* Avatar stacks ABOVE the text.
     NO overflow:hidden — the avatar is not enclosed in a clipped box. The
     lower body is faded out by a mask on the image itself, so there is no
     rectangular edge, and the gold glow behind is never cut. */
  .visual {
    order: -1;
    position: relative;
    min-height: unset;
    height: clamp(290px, 40vh, 440px);
    margin-bottom: 1.6rem;
    overflow: visible;
  }
  /* Soft gold glow behind the avatar — fully visible, nothing to clip. */
  .anim-shape { animation: none; }
  .shape {
    width: clamp(320px, 84vw, 480px);
    height: clamp(320px, 84vw, 480px);
    top: 50%;
    left: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    border: none;
    border-radius: var(--radius-pill);
    background: radial-gradient(circle,
      rgb(var(--gold-rgb) / 0.17) 0%,
      rgb(var(--gold-rgb) / 0.06) 42%,
      rgb(var(--gold-rgb) / 0) 70%);
  }
  .avatar {
    /* Absolutely placed so the taller figure doesn't push the text down.
       Shown at natural width (no sideways crop) and faded to transparent over
       the lower body with a mask — no container, no box, no hard edge. */
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: auto;
    max-width: clamp(280px, 42vw, 380px);
    height: auto;
    max-height: none;
    margin-bottom: 0;
    pointer-events: none;
    filter: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 34%, transparent 48%);
            mask-image: linear-gradient(to bottom, #000 34%, transparent 48%);
  }
  .intro { max-width: 100%; }
  .cta-group { max-width: 100%; }
}

@media (max-width: 420px) {
  .cta-group { max-width: 100%; }
  .btn { font-size: 1.08rem; }
}

/* =====================================================================
   9. SECTIONS (scrolling page below the hero)
   ===================================================================== */

/* Scroll cue at the bottom of the hero */
.scroll-cue {
  position: absolute;
  left: var(--space-gutter);
  bottom: 1.6rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.82rem;
  text-decoration: none;
  animation: fadeUp 0.8s var(--ease-out) both;
  animation-delay: 0.7s;
}
.scroll-cue svg { width: 16px; height: 16px; stroke: var(--color-accent); }
.scroll-cue .chev { animation: bob 1.8s ease-in-out infinite; }
.scroll-cue:hover { color: var(--color-text); }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.section {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: clamp(4rem, 9vw, 7rem) var(--space-gutter);
}
.section--alt { background: var(--color-bg-alt); }
.section__inner { max-width: var(--maxw-section); margin: 0 auto; }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 0.92rem;
  color: var(--color-accent);
  margin: 0 0 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--color-accent);
  display: inline-block;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.0;
  letter-spacing: -0.3px;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin: 0 0 2.6rem;
  max-width: 18ch;
  color: var(--color-text);
}

/* ---- Services (editorial rows) ---- */
.svc-list {
  margin-top: 0.5rem;
  border-top: 1px solid rgb(var(--gold-rgb) / 0.22);
}
.svc-row {
  display: grid;
  grid-template-columns: 92px minmax(170px, 0.85fr) 1.5fr;
  gap: clamp(0.8rem, 3vw, 2.6rem);
  align-items: center;
  padding: clamp(1.7rem, 3.6vw, 2.7rem) clamp(0.2rem, 1vw, 1rem);
  border-bottom: 1px solid rgb(var(--gold-rgb) / 0.22);
  transition: background-color var(--dur-med) var(--ease-out);
}
.svc-row:hover { background: rgb(var(--gold-rgb) / 0.045); }
.svc-row__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  line-height: 1;
  color: var(--color-accent);
  letter-spacing: 1px;
}
.svc-row__name {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  line-height: 0.98;
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 0;
  color: var(--color-text);
  transition: transform var(--dur-med) var(--ease-out);
}
.svc-row:hover .svc-row__name { transform: translateX(8px); }
.svc-row__text {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.6;
  font-size: 1.04rem;
  max-width: 52ch;
}

/* ---- Approche / steps ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.step { position: relative; padding-top: 0.6rem; }
.step__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--color-accent);
  opacity: 0.9;
  display: block;
  margin-bottom: 0.7rem;
}
.step::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 40px; height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}
.step__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 1.3rem;
  margin: 0 0 0.4rem;
  color: var(--color-text);
}
.step__text { margin: 0; line-height: 1.55; color: var(--color-text-muted); font-size: 0.98rem; }

/* ---- Contact ---- */
.contact { text-align: center; }
.contact__inner { max-width: 720px; }
.contact .section__title { margin-left: auto; margin-right: auto; max-width: 20ch; margin-bottom: 1rem; }
.contact .eyebrow { justify-content: center; }
.contact__sub {
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.6;
  color: var(--color-text);
  margin: 0 auto 2.2rem;
  max-width: 46ch;
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.8rem;
}
.contact__meta {
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-success);
  box-shadow: 0 0 0 4px rgb(var(--success-rgb) / 0.18);
}

/* ---- Footer sign-off ---- */
.sign {
  position: relative;
  z-index: 2;
  padding: 2rem 1.5rem 2.4rem;
  border-top: 1px solid rgb(var(--white-rgb) / 0.06);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.sign p { margin: 0; }
.sign__brand { color: var(--color-text-muted); font-size: 0.86rem; }
.sign__brand b { color: var(--color-text); font-weight: 700; }
.sign__link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.86rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color var(--dur-fast) var(--ease-out);
}
.sign__link svg {
  width: 15px; height: 15px;
  stroke: currentColor;
  transition: transform var(--dur-fast) var(--ease-out);
}
.sign__link:hover,
.sign__link:focus-visible { color: var(--color-accent-strong); }
.sign__link:hover svg,
.sign__link:focus-visible svg { transform: translateX(3px); }
.sign__copy {
  color: var(--color-text-muted);
  opacity: 0.6;
  font-size: 0.76rem;
  letter-spacing: 1.4px;
}
.sign__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.1rem 1.6rem;
}
.sign__icon {
  color: var(--color-text-muted);
  display: inline-flex;
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.sign__icon svg { width: 20px; height: 20px; fill: currentColor; }
.sign__icon:hover,
.sign__icon:focus-visible { color: var(--color-accent); transform: translateY(-2px); }

/* ---- Legal / content page ---- */
.legal {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--space-gutter) clamp(3rem, 6vw, 5rem);
}
.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 2.4rem;
  transition: color var(--dur-fast) var(--ease-out);
}
.legal__back svg { width: 15px; height: 15px; stroke: currentColor; transition: transform var(--dur-fast) var(--ease-out); }
.legal__back:hover { color: var(--color-accent-strong); }
.legal__back:hover svg { transform: translateX(-3px); }
.legal h1 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.3px;
  line-height: 1;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin: 0 0 0.4rem;
  color: var(--color-text);
}
.legal__updated { color: var(--color-text-muted); font-size: 0.9rem; margin: 0 0 2.6rem; }
.legal h2 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 1.5rem;
  color: var(--color-accent);
  margin: 2.4rem 0 0.7rem;
}
.legal p, .legal address {
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: 1.02rem;
  margin: 0 0 0.9rem;
  font-style: normal;
}
.legal a { color: var(--color-accent); text-decoration: none; border-bottom: 1px solid rgb(var(--gold-rgb) / 0.4); }
.legal a:hover { color: var(--color-accent-strong); border-bottom-color: var(--color-accent-strong); }
.legal b { color: var(--color-text); font-weight: 600; }

/* ---- 10. Scroll reveal (only when JS is active) ------------------- */
.js .reveal { opacity: 0; transform: translateY(26px); }
.reveal {
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---- Section responsive ---- */
@media (max-width: 860px) {
  .svc-row {
    grid-template-columns: 54px 1fr;
    column-gap: 1rem;
    row-gap: 0.7rem;
    align-items: baseline;
  }
  .svc-row__text { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
/* placed after the base .scroll-cue rule so it wins the cascade */
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  .scroll-cue { display: none; } /* hero is stacked here; cue would overlap the CTAs */
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .contact__actions .btn { width: 100%; justify-content: center; }
}

/* ---- 11. Reduced motion ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .anim-name, .anim-tagline, .anim-body,
  .anim-cta, .anim-shape, .anim-avatar {
    animation: none;
  }
  .btn { transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease; }
  .btn:hover, .btn:focus-visible { transform: none; }

  .js .reveal { opacity: 1; transform: none; }
  .reveal { transition: none; }
  .scroll-cue, .scroll-cue .chev { animation: none; }
  .btn--solid:hover { transform: none; }
  .svc-row:hover .svc-row__name { transform: none; }
  .sign__link:hover svg, .sign__link:focus-visible svg { transform: none; }
  .sign__icon:hover, .sign__icon:focus-visible { transform: none; }
  .legal__back:hover svg { transform: none; }
}
