/*
Theme Name: Good Allure
Theme URI: https://goodallure.com
Author: Wemoove
Description: Site editorial Good Allure — art de vivre mediterraneen, le running comme pretexte. Crafted, pas premium. DA : carnet de vacances d'un mec cultive qui court le matin et lit l'apres-midi a l'ombre d'un citronnier. Motion GSAP + Lenis.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
Text Domain: goodallure
*/

/* ============================================================
   GOOD ALLURE — design system
   ============================================================ */
:root {
  /* palette — pellicule mediterraneenne delavee */
  --paper:    #E9E0CC;
  --paper-2:  #F2EBDA;
  --paper-3:  #E0D5BC;
  --ink:      #1B1812;
  --ink-2:    #2E2A20;
  --ink-soft: #4A4536;
  --lemon:    #D8A521;
  --lemon-2:  #E6BB3F;
  --terra:    #A8482A;
  --sea:      #4F7682;
  --olive:    #6E6A4A;
  --rule:     #C9BFA6;
  --night:    #14120C;

  /* type */
  --display: "Fraunces", Georgia, serif;
  --body:    "Newsreader", Georgia, serif;
  --stamp:   "Courier Prime", "Courier New", monospace;

  /* fluid scale */
  --step--1: clamp(0.83rem, 0.2vw + 0.78rem, 0.95rem);
  --step-0:  clamp(1.05rem, 0.5vw + 0.92rem, 1.25rem);
  --step-1:  clamp(1.3rem, 1vw + 1rem, 1.75rem);
  --step-2:  clamp(1.7rem, 2.2vw + 1rem, 2.75rem);
  --step-3:  clamp(2.2rem, 4vw + 1rem, 4.25rem);
  --step-4:  clamp(2.9rem, 7vw + 1rem, 6.5rem);
  --step-5:  clamp(3.4rem, 11vw + 1rem, 11rem);

  /* space */
  --gutter:  clamp(20px, 5vw, 90px);
  --section: clamp(80px, 12vw, 220px);
  --maxw:    1440px;

  --ease:    cubic-bezier(.22, .61, .36, 1);
  --ease-io: cubic-bezier(.65, .05, .36, 1);
}

/* ============================================================
   reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  cursor: none;
}
@media (hover: none) { body { cursor: auto; } }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--lemon); color: var(--ink); }

/* ============================================================
   typography helpers
   ============================================================ */
.display { font-family: var(--display); font-optical-sizing: auto; font-weight: 320; line-height: .98; letter-spacing: -0.02em; }
.display em { font-style: italic; font-weight: 320; }
.serif { font-family: var(--body); }
.stamp {
  font-family: var(--stamp); text-transform: uppercase;
  letter-spacing: .16em; font-size: var(--step--1); color: var(--ink-soft);
}
.stamp--lemon { color: var(--terra); }
.eyebrow { display: inline-flex; align-items: center; gap: .8em; }
.eyebrow::before { content: ""; width: 36px; height: 1px; background: currentColor; opacity: .6; }
.lead { font-size: var(--step-1); line-height: 1.45; color: var(--ink-soft); max-width: 46ch; }

/* ============================================================
   layout
   ============================================================ */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); position: relative; }
.section { padding-block: var(--section); position: relative; }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2.4vw, 40px); }
.measure { max-width: 60ch; }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(6, 1fr); } }

/* ============================================================
   buttons / links
   ============================================================ */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  display: inline-flex; align-items: center; gap: .9em;
  font-family: var(--stamp); text-transform: uppercase; letter-spacing: .12em; font-size: var(--step--1);
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--ink); border-radius: 1px;
  padding: 16px 28px; cursor: none; overflow: hidden; position: relative;
  transition: color .4s var(--ease);
}
.btn::after { content: ""; position: absolute; inset: 0; background: var(--lemon); transform: translateY(101%); transition: transform .45s var(--ease); z-index: 0; }
.btn > * { position: relative; z-index: 1; }
.btn:hover { color: var(--ink); }
.btn:hover::after { transform: translateY(0); }
.btn--ghost { --bg: transparent; --fg: var(--ink); }
.btn--light { --bg: var(--paper); --fg: var(--ink); border-color: var(--paper); }

.link-u { position: relative; display: inline-block; }
.link-u::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.link-u:hover::after { transform: scaleX(1); transform-origin: left; }

/* ============================================================
   atmosphere : grain + paper texture
   ============================================================ */
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 9998; opacity: .055; mix-blend-mode: multiply; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 15% 10%, rgba(216,165,33,.06), transparent 45%),
    radial-gradient(120% 90% at 85% 90%, rgba(168,72,42,.05), transparent 50%);
}
main, header, footer { position: relative; z-index: 1; }

/* ============================================================
   custom cursor
   ============================================================ */
.cursor { position: fixed; top: 0; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); pointer-events: none; z-index: 10000; transform: translate(-50%, -50%); mix-blend-mode: difference; }
.cursor-ring { position: fixed; top: 0; left: 0; width: 40px; height: 40px; border: 1px solid var(--ink-soft); border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); transition: width .35s var(--ease), height .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease), opacity .35s var(--ease); }
.cursor-ring.is-hover { width: 64px; height: 64px; background: rgba(216,165,33,.14); border-color: var(--lemon); }
.cursor-ring.is-hide { opacity: 0; }
@media (hover: none) { .cursor, .cursor-ring { display: none; } }

/* ============================================================
   image frames + treatment (unifie les placeholders vers la DA)
   ============================================================ */
.media { position: relative; overflow: hidden; background: var(--paper-3); }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; will-change: transform; }
.media--grade img { filter: saturate(.86) contrast(1.04) sepia(.08) brightness(1.02); }
.media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(27,24,18,.18)); pointer-events: none; }
.media__cap { position: absolute; left: 14px; bottom: 12px; z-index: 2; color: var(--paper); }
.ratio-4-5 { aspect-ratio: 4/5; }
.ratio-3-2 { aspect-ratio: 3/2; }
.ratio-3-4 { aspect-ratio: 3/4; }
.ratio-16-9 { aspect-ratio: 16/9; }

/* parallax wrapper : l'image deborde, GSAP la translate */
.parallax { overflow: hidden; }
.parallax img { scale: 1.18; }

/* ============================================================
   reveal primitives (fallback no-JS = visible)
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal-img .media img { transform: scale(1.12); }
.js [data-split] { visibility: hidden; }

/* line mask for split text */
.line-mask { display: block; overflow: hidden; }

/* ============================================================
   marquee
   ============================================================ */
.marquee { overflow: hidden; white-space: nowrap; border-block: 1px solid var(--rule); padding-block: clamp(14px, 2vw, 26px); }
.marquee__track { display: inline-flex; gap: 0; will-change: transform; }
.marquee__item { font-family: var(--display); font-weight: 330; font-size: var(--step-2); letter-spacing: -.01em; padding-inline: .5em; display: inline-flex; align-items: center; gap: .6em; }
.marquee__star { color: var(--lemon); font-size: .5em; }

/* ============================================================
   site header / nav
   ============================================================ */
.site-head { position: fixed; top: 0; left: 0; width: 100%; z-index: 50; padding: 18px 0; mix-blend-mode: difference; color: var(--paper); }
.site-head__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; }
.ga-logo { display: block; fill: currentColor; width: auto; }
.brand__logo { height: 21px; }
@media (max-width: 560px) { .brand__logo { height: 18px; } }
.nav { display: flex; gap: clamp(18px, 2.4vw, 40px); }
.nav a { font-family: var(--stamp); text-transform: uppercase; letter-spacing: .12em; font-size: var(--step--1); }
.nav__cta { display: none; }
.burger { display: none; }
@media (max-width: 860px) {
  .nav { position: fixed; inset: 0; background: var(--night); color: var(--paper); flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px; padding: var(--gutter); transform: translateY(-100%); transition: transform .6s var(--ease); mix-blend-mode: normal; z-index: 60; }
  .nav.open { transform: translateY(0); }
  .nav a { font-family: var(--display); text-transform: none; font-size: var(--step-3); letter-spacing: -.01em; }
  .burger { display: block; z-index: 70; font-family: var(--stamp); text-transform: uppercase; letter-spacing: .12em; font-size: var(--step--1); background: none; border: 0; color: inherit; cursor: pointer; padding: 12px 6px; margin: -12px -6px; min-height: 44px; }
}

/* ============================================================
   page-load + transition overlay
   ============================================================ */
.curtain { position: fixed; inset: 0; z-index: 9000; background: var(--night); display: grid; place-items: center; }
.curtain__mark { color: var(--paper); overflow: hidden; display: block; }
.curtain__logo { height: clamp(32px, 6.5vw, 74px); }
.curtain.is-done { pointer-events: none; }

/* ============================================================
   footer
   ============================================================ */
.site-foot { background: var(--night); color: var(--paper); padding-block: clamp(60px, 9vw, 130px) clamp(28px, 4vw, 44px); }
.site-foot a { color: var(--paper); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-mark { line-height: .9; color: var(--paper); }
.foot-mark__logo { height: clamp(30px, 4.5vw, 50px); }
.foot-col h4 { font-family: var(--stamp); text-transform: uppercase; letter-spacing: .14em; font-size: var(--step--1); color: var(--lemon); margin-bottom: 1.4em; font-weight: 400; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7em; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(48px, 8vw, 100px); padding-top: 22px; border-top: 1px solid rgba(233,224,204,.18); }
.foot-bottom .stamp { color: rgba(233,224,204,.6); }

/* ============================================================
   newsletter (early access) — bande
   ============================================================ */
.signup { background: var(--ink); color: var(--paper); }
.signup .display { color: var(--paper); }
.form, .ga-form { display: flex; gap: 12px; max-width: 560px; flex-wrap: wrap; margin-top: clamp(24px,4vw,40px); }
.form__field { flex: 1 1 260px; position: relative; }
/* base : fond clair (page Contact) — texte encre, filet sobre */
.form input[type=email], .ga-form input[type=email] { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--rule); color: var(--ink); font-family: var(--body); font-size: var(--step-1); padding: 12px 2px; outline: none; transition: border-color .3s var(--ease); }
.form input[type=email]::placeholder, .ga-form input[type=email]::placeholder { color: var(--ink-soft); }
.form input[type=email]:focus, .ga-form input[type=email]:focus { border-color: var(--lemon); }
/* override : fond sombre (signup footer) — texte crème */
.signup .form input[type=email], .signup .ga-form input[type=email] { color: var(--paper); border-bottom-color: rgba(233,224,204,.4); }
.signup .form input[type=email]::placeholder, .signup .ga-form input[type=email]::placeholder { color: rgba(233,224,204,.45); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__msg { font-family: var(--stamp); font-size: var(--step--1); letter-spacing: .06em; min-height: 1.2em; color: var(--lemon); margin-top: 14px; }

/* ============================================================
   misc
   ============================================================ */
/* focus clavier visible (le curseur custom masque l'etat par defaut) */
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--lemon);
  outline-offset: 3px;
  border-radius: 1px;
}
.signup a:focus-visible, .signup button:focus-visible, .signup input:focus-visible,
.site-foot a:focus-visible, .contact-panel input:focus-visible { outline-color: var(--lemon); }

.split-num { font-family: var(--stamp); color: var(--lemon); font-size: var(--step-1); }
.kicker-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 64px); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal-img .media img, .js [data-split] { opacity: 1 !important; transform: none !important; visibility: visible !important; }
  .parallax img { scale: 1; }
  html { scroll-behavior: auto; }
}
