/* ==========================================================
   OSKAVO STUDIOS — socle commun
   Concept : le logo est une éclipse. Le site aussi.
   ========================================================== */

@property --r {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

:root {
  --void: #000000;
  --corona: #F2C879;
  --ember: #B8833A;
  --ivory: #F3EBDA;
  --ash: #8A8173;
  --umbra: #15110B;
  --rule: rgba(243, 235, 218, .14);

  --sans: "Jost", "Futura", "Century Gothic", sans-serif;
  --serif: "EB Garamond", "Garamond", Georgia, serif;

  /* échelle typographique (quarte) */
  --t-small: 15px;
  --t-body: 19px;
  --t-lead: clamp(22px, 2.2vw, 27px);
  --t-h3: 24px;
  --t-h2: clamp(32px, 4vw, 46px);
  --t-h1: clamp(52px, 9vw, 128px);

  --gutter: clamp(16px, 5vw, 72px);
  --measure: 34em;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ivory);
  font: 400 var(--t-body)/1.62 var(--serif);
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--corona); color: #000; }
:focus-visible { outline: 1.5px solid var(--corona); outline-offset: 4px; border-radius: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- ciel ---------- */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.page { position: relative; z-index: 1; }

/* ---------- logotype : masque du vrai wordmark ---------- */
.wordmark {
  display: block;
  background: linear-gradient(180deg, var(--ivory) 10%, #EFD6A4 55%, var(--corona) 100%);
  -webkit-mask: url("../assets/img/wordmark.webp") center / contain no-repeat;
          mask: url("../assets/img/wordmark.webp") center / contain no-repeat;
  aspect-ratio: 987 / 219;
}
.wordmark--short {
  -webkit-mask-image: url("../assets/img/wordmark-oskavo.webp");
          mask-image: url("../assets/img/wordmark-oskavo.webp");
  aspect-ratio: 987 / 133;
}

/* ---------- en-tête ---------- */
.masthead {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  pointer-events: none;
}
.masthead > * { pointer-events: auto; }
.masthead::before {
  content: ""; position: absolute; inset: 0 0 -30px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, #000 0%, rgba(0,0,0,.85) 45%, rgba(0,0,0,0) 100%);
}
.masthead::before { transition: opacity .4s; }
body[data-page="accueil"]:not(.past-scene) .masthead::before { opacity: 0; }
.masthead__home { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.masthead__home img { width: 34px; height: 34px; }
.masthead__home .wordmark { width: 96px; }

.menu-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: none; border: 0; padding: 8px 0; cursor: pointer;
  font: 400 16px/1 var(--sans); letter-spacing: .04em; color: var(--ivory);
}
/* petite éclipse : le disque glisse devant la lumière à l'ouverture */
.menu-btn__eclipse {
  position: relative; width: 22px; height: 22px; border-radius: 50%;
  background: var(--corona);
  box-shadow: 0 0 12px rgba(242, 200, 121, .55);
  overflow: hidden;
}
.menu-btn__eclipse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: #000;
  transform: translateX(72%);
  transition: transform .6s var(--ease);
}
.menu-btn:hover .menu-btn__eclipse::after { transform: translateX(45%); }
.is-menu-open .menu-btn__eclipse::after { transform: translateX(0) scale(.92); }

/* ---------- menu : le système solaire ----------
   Le soleil (l'emblème) mène à l'accueil, chaque planète est une page. */
.system {
  position: fixed; inset: 0; z-index: 35;
  background: radial-gradient(ellipse at 50% 55%, #0d0a06 0%, #000 60%);
  visibility: hidden; opacity: 0;
  transition: opacity .5s var(--ease), visibility 0s linear .5s;
}
.is-menu-open .system { visibility: visible; opacity: 1; transition: opacity .5s var(--ease); }
.is-menu-open { overflow: hidden; }
.system__space { position: absolute; inset: 120px 0 70px; }
.system__orbits { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.system__orbits ellipse { fill: none; stroke: rgba(243, 235, 218, .13); stroke-width: 1; transition: stroke .35s; }
.system__orbits ellipse.is-lit { stroke: rgba(242, 200, 121, .65); }

.system__sun, .planet {
  position: absolute; left: 0; top: 0;
  display: block; text-decoration: none; color: var(--ivory);
  will-change: transform;
}
.system__sun { z-index: 2; }
.system__sun img {
  width: var(--sun, 150px); height: var(--sun, 150px);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 28px rgba(240, 170, 80, .45));
  transition: filter .35s;
}
.system__sun:hover img, .system__sun:focus-visible img { filter: drop-shadow(0 0 46px rgba(255, 200, 120, .8)); }
.system__sun:focus-visible { outline: none; }

.planet { z-index: 3; }
.planet.is-behind { z-index: 1; }
.planet:focus-visible { outline: none; }
.planet__body {
  position: absolute; left: 0; top: 0;
  width: var(--d); height: var(--d); margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2);
  border-radius: 50%;
  transition: box-shadow .35s;
}
/* zone cliquable confortable autour de la planète */
.planet::before { content: ""; position: absolute; width: 56px; height: 56px; left: -28px; top: -28px; border-radius: 50%; }
/* ombre : face éclairée tournée vers le soleil */
.planet__body::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at var(--lx, 30%) var(--ly, 35%), transparent 30%, rgba(0, 0, 0, .78) 78%);
}
.planet:hover .planet__body, .planet:focus-visible .planet__body, .planet.is-active .planet__body {
  box-shadow: 0 0 0 1.5px rgba(255, 231, 184, .9), 0 0 26px 4px rgba(242, 200, 121, .55);
}

.planet--studio .planet__body { background: radial-gradient(circle at 35% 35%, #FFF1CF, #E9B868 55%, #8A5A22); }
.planet--studio .planet__body::before {
  content: ""; position: absolute; left: -45%; right: -45%; top: 42%; height: 16%; z-index: 1;
  border: 1.5px solid rgba(246, 214, 150, .85); border-radius: 50%; transform: rotate(-18deg);
}
.planet--jeux .planet__body {
  background:
    repeating-linear-gradient(-16deg, rgba(0,0,0,0) 0 7%, rgba(60, 35, 12, .55) 7% 11%, rgba(0,0,0,0) 11% 17%, rgba(255, 225, 170, .25) 17% 20%),
    radial-gradient(circle at 35% 35%, #F6D59A, #C98B3E 55%, #5A3714);
}
.planet--journal .planet__body {
  background:
    radial-gradient(circle at 62% 30%, rgba(90, 80, 66, .55) 0 9%, transparent 10%),
    radial-gradient(circle at 34% 62%, rgba(90, 80, 66, .5) 0 12%, transparent 13%),
    radial-gradient(circle at 70% 70%, rgba(90, 80, 66, .4) 0 6%, transparent 7%),
    radial-gradient(circle at 35% 35%, #FBF6EA, #D9CFBC 60%, #7d7466);
}
.planet--contact .planet__body { background: radial-gradient(circle at 35% 35%, #F7D2B0, #C0703C 55%, #4E2410); }
/* contact : la planète émet, des ondes partent d'elle */
.planet--contact .planet__wave {
  position: absolute; left: 0; top: 0; width: var(--d); height: var(--d);
  margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2); border-radius: 50%;
  border: 1px solid rgba(242, 200, 121, .6);
  animation: wave 3.2s ease-out infinite; pointer-events: none;
}
.planet--contact .planet__wave + .planet__wave { animation-delay: 1.6s; }
@keyframes wave { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }

/* noms des planètes : calque à part, toujours au-dessus du soleil */
.system__tags { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.system__tag, .system__label {
  position: absolute; left: 0; top: 0;
  white-space: nowrap; cursor: pointer;
  font: 300 clamp(22px, 2.3vw, 32px)/1.05 var(--sans); letter-spacing: -.005em;
  color: rgba(243, 235, 218, .62); transition: color .3s;
}
.system__tag { pointer-events: auto; will-change: transform; }
.system__tag small, .system__label small {
  display: block; margin-top: 4px; font: italic 400 16px/1.2 var(--serif); color: var(--ash);
  opacity: 0; transition: opacity .3s;
}
.system__tag.is-flip { text-align: right; }
.system__tag.is-under { text-align: center; font-size: 19px; }
.system__tag.is-under::before { font-size: 13px; }
.system__tag.is-active { color: var(--ivory); }
.system__tag.is-active small { opacity: 1; }
.system__tag.is-here::before, .system__sun.is-here .system__label::before {
  content: "Vous êtes ici"; display: block; margin-bottom: 4px;
  font: italic 400 15px var(--serif); color: var(--corona);
}
.system__sun .system__label {
  left: 50%; top: calc(var(--sun, 150px) / -2 - 10px); transform: translate(-50%, -100%);
  text-align: center; font-size: 24px; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.system__sun:hover .system__label, .system__sun:focus-visible .system__label, .system__sun.is-here .system__label { opacity: 1; color: var(--ivory); }
.system__sun:hover .system__label small, .system__sun:focus-visible .system__label small { opacity: 1; }

.system__foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 26px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font: italic 400 17px var(--serif); color: var(--ash);
}
.system__foot a { color: var(--ivory); text-decoration-color: var(--ember); text-underline-offset: 4px; }

/* ---------- transition : éclipse ---------- */
.wipe {
  position: fixed; z-index: 100; pointer-events: none;
  width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 1.5px var(--corona), 0 0 26px 6px rgba(242, 200, 121, .55);
  transform: scale(0);
  transition: transform .75s cubic-bezier(.7, 0, .3, 1);
}
.wipe.is-on { transform: scale(var(--s, 200)); }
.dawn {
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  --r: 0px;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%),
    transparent var(--r),
    rgba(255, 236, 190, .95) calc(var(--r) + 1px),
    rgba(242, 200, 121, .35) calc(var(--r) + 10px),
    #000 calc(var(--r) + 46px));
  animation: dawn 1s cubic-bezier(.5, 0, .2, 1) .05s forwards;
}
@keyframes dawn { to { --r: 160vmax; } }

/* ---------- typographie partagée ---------- */
h1, h2, h3 { font-family: var(--sans); font-weight: 300; margin: 0; }
.h1 { font-size: var(--t-h1); line-height: .95; letter-spacing: -.025em; }
.h2 { font-size: var(--t-h2); line-height: 1.08; letter-spacing: -.01em; }
.h3 { font-size: var(--t-h3); font-weight: 400; line-height: 1.25; }
.lead { font-size: var(--t-lead); line-height: 1.5; max-width: 30em; }
.muted { color: var(--ash); }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1em; }

.wrap { padding-left: var(--gutter); padding-right: var(--gutter); max-width: 1440px; margin: 0 auto; }

/* lien texte, souligné à la couleur braise */
.link {
  color: var(--ivory); text-decoration: underline; text-decoration-color: var(--ember);
  text-decoration-thickness: 1px; text-underline-offset: 5px;
  transition: text-decoration-color .3s, color .3s;
}
.link:hover { color: var(--corona); text-decoration-color: var(--corona); }

/* ouverture de page (pages intérieures) */
.opening { padding: clamp(150px, 22vh, 230px) 0 clamp(60px, 10vh, 110px); }
.opening .h1 { max-width: 11ch; }
.opening .lead { margin-top: 36px; color: rgba(243, 235, 218, .82); }

/* ---------- pied de page ---------- */
.colophon {
  position: relative; z-index: 1;
  padding: 90px 0 36px;
  border-top: 1px solid var(--rule);
  margin-top: 60px;
}
.colophon__grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; align-items: start;
}
.colophon__sign { display: flex; align-items: center; gap: 18px; }
.colophon__sign img { width: 64px; height: 64px; }
.colophon__sign .wordmark { width: 150px; }
.colophon__motto { font: italic 400 22px/1.3 var(--serif); margin: 22px 0 0; color: var(--ivory); }
.colophon ul { list-style: none; margin: 0; padding: 0; font: 400 16px/2 var(--sans); }
.colophon ul a { text-decoration: none; color: var(--ash); transition: color .2s; }
.colophon ul a:hover { color: var(--ivory); }
.colophon__base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: 70px; font: 400 14px var(--sans); color: var(--ash);
}


/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .system__space { inset: 130px 0 64px; }
  .system__tag { font-size: 21px; }
  .colophon__grid { grid-template-columns: 1fr 1fr; }
  .colophon__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .masthead { padding-top: 16px; }
  .masthead__home .wordmark { width: 82px; }
  :root { --t-body: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  .dawn { display: none; }
}
