/* Terrae Caravelli — Season Engine. Time passes through one continuous material. */

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(ellipse at 47% 46%, #111510 0%, #0c100d 53%, #080907 100%);
}

body {
  overflow: hidden;
  color: var(--tc-craie, #e8e3d8);
  font-family: var(--cv-typo-current-ff, var(--tc-font-ui, Arial, sans-serif));
  font-synthesis: var(--cv-typo-synthesis, none);
}

.terrae-season,
.terrae-season * {
  box-sizing: border-box;
}

.terrae-season {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 420px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 47% 46%, #111510 0%, #0c100d 53%, #080907 100%);
}

.terrae-season__canvas,
.terrae-season__fallback,
.terrae-season__light-memory,
.terrae-season__vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.terrae-season__canvas {
  z-index: 1;
  display: block;
  opacity: 0;
  transition: opacity 1200ms var(--tc-ease, cubic-bezier(.2, .65, .2, 1));
}

.terrae-season--webgl .terrae-season__canvas {
  opacity: 1;
}

.terrae-season__fallback {
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  background: #0c100d;
}

.terrae-season__fallback-material {
  position: absolute;
  inset: -4%;
  background-color: var(--tc-terra-ombra, #2b211a);
  background-image:
    linear-gradient(116deg, rgba(8, 9, 7, .68) 4%, rgba(43, 33, 26, .46) 45%, rgba(142, 116, 88, .09) 59%, rgba(8, 9, 7, .78) 94%),
    url("/assets/prologue-caravelli/terrae/03_PATTERNS/TC_Texture_Brume_1800.jpg"),
    url("/assets/prologue-caravelli/terrae/03_PATTERNS/TC_Texture_Terre_1800.jpg");
  background-position: center;
  background-size: cover;
  background-blend-mode: multiply, soft-light, normal;
  filter: contrast(1.12) saturate(.54) brightness(.54);
  transform: scale(1.035);
}

.terrae-season__fallback-topography {
  position: absolute;
  inset: -9% -7%;
  width: 114%;
  height: 118%;
  object-fit: cover;
  opacity: .2;
  filter: brightness(.72) saturate(.68);
  mix-blend-mode: screen;
}

.terrae-season__fallback-roots {
  position: absolute;
  top: 46%;
  right: -8%;
  bottom: -18%;
  left: -8%;
  overflow: hidden;
  opacity: .32;
  mask-image: linear-gradient(180deg, transparent, #000 17%, #000);
}

.terrae-season__fallback-roots img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 112vh;
  height: 150vw;
  max-width: none;
  object-fit: cover;
  filter: brightness(.67) saturate(.72);
  mix-blend-mode: screen;
  transform: translate(-50%, -50%) rotate(90deg) scale(.78, 1.12);
}

.terrae-season__fallback-cycle {
  position: absolute;
  inset: 0;
  opacity: .72;
  background: rgba(113, 128, 108, .08);
  mix-blend-mode: color;
}

.no-js .terrae-season__fallback,
.terrae-season--fallback .terrae-season__fallback {
  opacity: 1;
}

.no-js .terrae-season__fallback-material,
.terrae-season--fallback.terrae-season--running .terrae-season__fallback-material {
  animation: terraeSeasonMatter 12s var(--tc-ease, cubic-bezier(.2, .65, .2, 1)) both;
}

.no-js .terrae-season__fallback-cycle,
.terrae-season--fallback.terrae-season--running .terrae-season__fallback-cycle {
  animation: terraeSeasonFallbackCycle 32s linear 3s infinite;
}

.no-js .terrae-season__fallback-roots,
.terrae-season--fallback.terrae-season--running .terrae-season__fallback-roots {
  animation: terraeSeasonRootBreathing 16s var(--tc-ease, cubic-bezier(.2, .65, .2, 1)) 3s infinite alternate;
}

.terrae-season__light-memory {
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(111deg,
      transparent 15%,
      rgba(232, 227, 216, .015) 31%,
      rgba(142, 116, 88, .12) 49%,
      rgba(232, 227, 216, .038) 58%,
      transparent 76%);
  mix-blend-mode: screen;
  transform: translate3d(-24%, 0, 0);
}

.terrae-season--running .terrae-season__light-memory,
.no-js .terrae-season__light-memory {
  animation: terraeSeasonLightMemory 32s var(--tc-ease, cubic-bezier(.2, .65, .2, 1)) 3s infinite;
}

.terrae-season__vignette {
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 48%, transparent 18%, rgba(8, 9, 7, .12) 59%, rgba(8, 9, 7, .8) 100%),
    linear-gradient(180deg, rgba(8, 9, 7, .43), transparent 23%, transparent 72%, rgba(8, 9, 7, .69));
}

.terrae-season__header {
  position: absolute;
  z-index: 7;
  top: max(28px, env(safe-area-inset-top));
  right: max(30px, env(safe-area-inset-right));
  left: max(30px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(232, 227, 216, .15);
  opacity: 0;
  transform: translateY(-6px);
}

.terrae-season--running .terrae-season__header,
.no-js .terrae-season__header {
  animation: terraeSeasonInterface 1200ms var(--tc-ease, cubic-bezier(.2, .65, .2, 1)) 500ms both;
}

.terrae-season__kicker,
.terrae-season__index {
  margin: 0;
  color: rgba(232, 227, 216, .7);
  font-size: var(--cv-typo-current-fs, 10px);
  font-weight: var(--cv-typo-current-fw, 500);
  line-height: var(--cv-typo-current-lh, 1);
  letter-spacing: var(--cv-typo-current-ls, .31em);
  text-transform: var(--cv-typo-current-tt, uppercase);
}

.terrae-season__index {
  color: rgba(142, 116, 88, .84);
  font-size: var(--cv-typo-current-fs, 9px);
  letter-spacing: var(--cv-typo-current-ls, .25em);
}

.terrae-season__chapter {
  position: absolute;
  z-index: 7;
  top: 50%;
  right: max(30px, env(safe-area-inset-right));
  width: 130px;
  height: 20px;
  color: rgba(232, 227, 216, .52);
  font-family: var(--cv-typo-current-ff, "Bodoni Moda", var(--tc-font-display, Didot, serif));
  font-size: var(--cv-typo-current-fs, 10px);
  font-weight: var(--cv-typo-current-fw, 500);
  letter-spacing: var(--cv-typo-current-ls, .31em);
  text-align: right;
  transform: translateY(-50%);
}

.terrae-season__chapter span {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1800ms var(--tc-ease, cubic-bezier(.2, .65, .2, 1));
}

body[data-season="spring"] [data-season-id="spring"],
body[data-season="summer"] [data-season-id="summer"],
body[data-season="autumn"] [data-season-id="autumn"],
body[data-season="winter"] [data-season-id="winter"] {
  opacity: 1;
}

.no-js [data-season-id] {
  animation: terraeSeasonChapter 32s var(--tc-ease, cubic-bezier(.2, .65, .2, 1)) 3s infinite;
}

.no-js [data-season-id="summer"] { animation-delay: 11s; }
.no-js [data-season-id="autumn"] { animation-delay: 19s; }
.no-js [data-season-id="winter"] { animation-delay: 27s; }

.terrae-season__seal {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  pointer-events: none;
}

.terrae-season__monogram {
  width: clamp(132px, 15vw, 220px);
  height: auto;
  opacity: 0;
  filter:
    saturate(.76)
    drop-shadow(0 1px 0 rgba(232, 227, 216, .08))
    drop-shadow(0 18px 44px rgba(8, 9, 7, .57));
  transform: scale(.985);
}

.terrae-season--running .terrae-season__monogram,
.no-js .terrae-season__monogram {
  animation: terraeSeasonSeal 5800ms var(--tc-ease, cubic-bezier(.2, .65, .2, 1)) 11200ms both;
}

.terrae-season__caption {
  position: absolute;
  right: max(30px, env(safe-area-inset-right));
  bottom: max(42px, calc(env(safe-area-inset-bottom) + 26px));
  left: max(30px, env(safe-area-inset-left));
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
}

.terrae-season--running .terrae-season__caption,
.no-js .terrae-season__caption {
  animation: terraeSeasonCaption 1800ms var(--tc-ease, cubic-bezier(.2, .65, .2, 1)) 14300ms both;
}

.terrae-season__caption h1 {
  margin: 0;
  color: rgba(232, 227, 216, .84);
  font-family: var(--cv-typo-current-ff, "Cormorant Garamond", var(--tc-font-editorial, Georgia, serif));
  font-size: var(--cv-typo-current-fs, clamp(19px, 2vw, 29px));
  font-style: var(--cv-typo-current-fst, normal);
  font-weight: var(--cv-typo-current-fw, 400);
  line-height: var(--cv-typo-current-lh, 1.24);
  letter-spacing: var(--cv-typo-current-ls, .025em);
  text-shadow: 0 1px 0 rgba(43, 33, 26, .5), 0 8px 28px rgba(8, 9, 7, .65);
}

.terrae-season__caption p {
  margin: 11px 0 0;
  color: rgba(142, 116, 88, .84);
  font-size: var(--cv-typo-current-fs, 9px);
  font-weight: var(--cv-typo-current-fw, 500);
  line-height: var(--cv-typo-current-lh, 1.4);
  letter-spacing: var(--cv-typo-current-ls, .33em);
  text-transform: var(--cv-typo-current-tt, uppercase);
}

.terrae-season__cycle {
  position: absolute;
  z-index: 7;
  bottom: max(35px, calc(env(safe-area-inset-bottom) + 21px));
  left: max(30px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(232, 227, 216, .4);
  font-size: var(--cv-typo-current-fs, 7px);
  letter-spacing: var(--cv-typo-current-ls, .23em);
  opacity: 0;
}

.terrae-season__cycle i {
  width: 36px;
  height: 1px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(142, 116, 88, .2), rgba(142, 116, 88, .65), rgba(142, 116, 88, .2));
}

.terrae-season--running .terrae-season__cycle,
.no-js .terrae-season__cycle {
  animation: terraeSeasonInterface 1400ms var(--tc-ease, cubic-bezier(.2, .65, .2, 1)) 3600ms both;
}

@keyframes terraeSeasonMatter {
  from { opacity: .16; filter: contrast(1.15) saturate(.44) brightness(.2); transform: scale(1.035); }
  to { opacity: 1; filter: contrast(1.12) saturate(.54) brightness(.54); transform: scale(1); }
}

@keyframes terraeSeasonFallbackCycle {
  0%, 100% { background: rgba(113, 128, 108, .1); }
  25% { background: rgba(142, 116, 88, .13); }
  50% { background: rgba(58, 23, 34, .18); }
  75% { background: rgba(232, 227, 216, .07); }
}

@keyframes terraeSeasonRootBreathing {
  from { opacity: .18; transform: scale(.995); }
  to { opacity: .4; transform: scale(1.006); }
}

@keyframes terraeSeasonLightMemory {
  0% { opacity: .18; transform: translate3d(-24%, 4%, 0); }
  25% { opacity: .5; transform: translate3d(10%, -2%, 0); }
  50% { opacity: .38; transform: translate3d(23%, 2%, 0); }
  75% { opacity: .14; transform: translate3d(-8%, 5%, 0); }
  100% { opacity: .18; transform: translate3d(-24%, 4%, 0); }
}

@keyframes terraeSeasonInterface {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes terraeSeasonChapter {
  0%, 2% { opacity: 0; }
  8%, 18% { opacity: 1; }
  24%, 100% { opacity: 0; }
}

@keyframes terraeSeasonSeal {
  0% { opacity: 0; transform: scale(.985); }
  66% { opacity: .52; }
  100% { opacity: .68; transform: scale(1); }
}

@keyframes terraeSeasonCaption {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
  .terrae-season__header {
    top: max(22px, env(safe-area-inset-top));
    right: max(20px, env(safe-area-inset-right));
    left: max(20px, env(safe-area-inset-left));
    padding-bottom: 12px;
  }

  .terrae-season__kicker {
    font-size: var(--cv-typo-current-fs, 9px);
    letter-spacing: var(--cv-typo-current-ls, .27em);
  }

  .terrae-season__index {
    max-width: 142px;
    font-size: var(--cv-typo-current-fs, 8px);
    line-height: var(--cv-typo-current-lh, 1.35);
    text-align: right;
  }

  .terrae-season__chapter {
    top: 22%;
    right: max(20px, env(safe-area-inset-right));
    font-size: var(--cv-typo-current-fs, 9px);
  }

  .terrae-season__monogram {
    width: min(38vw, 168px);
  }

  .terrae-season__caption {
    right: max(20px, env(safe-area-inset-right));
    bottom: max(77px, calc(env(safe-area-inset-bottom) + 61px));
    left: max(20px, env(safe-area-inset-left));
  }

  .terrae-season__caption h1 {
    max-width: 330px;
    margin-inline: auto;
    font-size: var(--cv-typo-current-fs, clamp(19px, 5.7vw, 24px));
  }

  .terrae-season__cycle {
    right: max(20px, env(safe-area-inset-right));
    bottom: max(26px, calc(env(safe-area-inset-bottom) + 13px));
    left: max(20px, env(safe-area-inset-left));
    justify-content: center;
    font-size: var(--cv-typo-current-fs, 6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .terrae-season *,
  .terrae-season *::before,
  .terrae-season *::after {
    animation-duration: 200ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 200ms !important;
    scroll-behavior: auto !important;
  }

  .terrae-season__fallback,
  .terrae-season__fallback-material,
  .terrae-season__fallback-topography,
  .terrae-season__fallback-roots,
  .terrae-season__header,
  .terrae-season__monogram,
  .terrae-season__caption,
  .terrae-season__cycle,
  body[data-season="autumn"] [data-season-id="autumn"] {
    opacity: 1;
  }

  .terrae-season__header,
  .terrae-season__monogram,
  .terrae-season__caption {
    transform: none;
  }

  .terrae-season__fallback-cycle {
    background: rgba(58, 23, 34, .16);
  }

  .terrae-season__light-memory {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════════
   ÉLÉVATION DU 19/09/2026 — « Le temps » : le même lieu, une année.
   Le tableau est rendu par le moteur commun (terrae-matiere.js) : le même terrain que « La terre », réellement éclairé.
   La page lui laisse la place : les lumières peintes en CSS ne doublent plus celle du moteur ; le grand monogramme
   est réservé à la finale du récit ; la phrase, que le récit coupait avant son apparition, arrive à temps,
   dans la fonte réellement chargée par Terrae, posée à gauche dans la réserve calme du cadre.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════ */

.terrae-season--webgl .terrae-season__light-memory,
.terrae-season--webgl .terrae-luxury9-light--seasons { display: none; }

.terrae-season--webgl .terrae-season__monogram,
.terrae-season--webgl .terrae-season__seal::before,
.terrae-season--webgl .terrae-season__seal::after { display: none; }

.terrae-season--webgl .terrae-season__vignette {
  background: radial-gradient(ellipse 62% 40% at 12% 12%, rgba(8, 9, 7, .50), transparent 70%), linear-gradient(180deg, rgba(8, 9, 7, .40), transparent 17%, transparent 80%, rgba(8, 9, 7, .58));
}

.terrae-season--webgl .terrae-season__caption {
  top: clamp(84px, 11.5vh, 132px);
  bottom: auto;
  right: auto;
  left: max(30px, env(safe-area-inset-left));
  width: min(680px, 46vw);
  text-align: left;
}

.terrae-season--webgl .terrae-season__caption { --terrae-phrase: 5000ms; }
/* Dans le récit : la matière d'abord, la phrase ensuite, tenue jusqu'au raccord. */
.terrae-season--webgl.terrae-season--story .terrae-season__caption { --terrae-phrase: 2000ms; }
.terrae-season--webgl.terrae-season--running .terrae-season__caption { animation-delay: var(--terrae-phrase); animation-duration: 900ms; }
.terrae-season--story.terrae-season--running .terrae-season__header { animation-delay: 300ms; }

.terrae-season--webgl .terrae-season__caption h1 {
  font-family: var(--cv-typo-current-ff, "Cormorant Garamond", var(--tc-font-editorial, Georgia, serif));
  font-size: var(--cv-typo-current-fs, clamp(30px, 3.5vw, 56px));
  line-height: var(--cv-typo-current-lh, 1.1);
  letter-spacing: var(--cv-typo-current-ls, .012em);
  color: rgba(244, 240, 232, .94);
  text-shadow: 0 10px 38px rgba(8, 9, 7, .62);
  word-break: normal;
  overflow-wrap: normal;
  -webkit-hyphens: none;
  hyphens: none;
  text-wrap: balance;
}

.terrae-season--webgl .terrae-season__caption p {
  display: inline-block;
  margin-top: clamp(16px, 2.2vh, 26px);
  padding-top: clamp(14px, 1.9vh, 22px);
  color: rgba(200, 178, 146, .92);
  letter-spacing: var(--cv-typo-current-ls, .34em);
  word-break: normal;
  overflow-wrap: normal;
  -webkit-hyphens: none;
  hyphens: none;
}

/* Les saisons se nomment à droite, dans la fonte de titre de Terrae ; plus présentes, toujours sans décalage (boîte fixe). */
.terrae-season--webgl .terrae-season__chapter { width: 190px; height: 26px; font-size: var(--cv-typo-current-fs, 13px); letter-spacing: var(--cv-typo-current-ls, .42em); color: rgba(232, 227, 216, .92); text-shadow: 0 6px 24px rgba(8, 9, 7, .7); }
.terrae-season--webgl .terrae-season__cycle { opacity: 0; }

@media (max-width: 700px) {
  .terrae-season--webgl .terrae-season__chapter { top: 31%; width: 170px; font-size: var(--cv-typo-current-fs, 12px); }   /* sous la phrase, jamais sur sa ligne */
}

/* La phrase se révèle comme un titre de film : les lettres se mettent au point, le filet d'or se trace, la ligne basse suit. */
.terrae-season--webgl.terrae-season--running .terrae-season__caption h1 { animation: terraeSeasonTitre 2600ms cubic-bezier(.16, .7, .2, 1) var(--terrae-phrase, 0ms) both; }
.terrae-season--webgl .terrae-season__caption p { position: relative; border-top: 0; }
.terrae-season--webgl .terrae-season__caption p::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: linear-gradient(90deg, rgba(200, 178, 146, .85), rgba(142, 116, 88, .35)); transform-origin: 0 50%; }
.terrae-season--webgl.terrae-season--running .terrae-season__caption p::before { animation: terraeSeasonFilet 1800ms cubic-bezier(.3, .6, .2, 1) calc(var(--terrae-phrase, 0ms) + 700ms) both; }
.terrae-season--webgl.terrae-season--running .terrae-season__caption p { animation: terraeSeasonBasse 1600ms ease-out calc(var(--terrae-phrase, 0ms) + 1300ms) both; }

@keyframes terraeSeasonTitre {
  from { opacity: 0; filter: blur(9px); transform: translateY(6px); }
  55% { opacity: 1; }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }   /* ni interlettrage ni largeur animés : la phrase ne se recompose jamais */
}
@keyframes terraeSeasonFilet { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes terraeSeasonBasse { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .terrae-season--webgl.terrae-season--running .terrae-season__caption h1,
  .terrae-season--webgl.terrae-season--running .terrae-season__caption p,
  .terrae-season--webgl.terrae-season--running .terrae-season__caption p::before { animation: none; }
}

@media (max-width: 700px) {
  .terrae-season--webgl .terrae-season__caption {
    top: clamp(84px, 13vh, 132px);
    bottom: auto;
    left: max(20px, env(safe-area-inset-left));
    width: min(76vw, 320px);
  }

  .terrae-season--webgl .terrae-season__caption h1 { max-width: none; margin-inline: 0; font-size: var(--cv-typo-current-fs, clamp(25px, 7.1vw, 34px)); line-height: var(--cv-typo-current-lh, 1.12); }
  .terrae-season--webgl .terrae-season__caption p { letter-spacing: var(--cv-typo-current-ls, .26em); }
}

@media (max-height: 520px) {
  .terrae-season--webgl .terrae-season__caption { width: min(56vw, 440px); }
  .terrae-season--webgl .terrae-season__caption h1 { font-size: var(--cv-typo-current-fs, clamp(21px, 3.3vw, 30px)); }
}

/* Téléphone couché (arbitrage du 19/09) : dans le récit, le plancher de 420 px de la scène coupait le bas de la matière sous un écran de 390 px ; il est levé. */
@media (max-height: 480px) and (min-aspect-ratio: 1/1) {
  body[data-terrae-production] .terrae-season { min-height: 0; }
}

/* Le secours CSS ne charge ses textures que s'il sert : sans script, sans WebGL2, ou contexte perdu (le moteur a ses propres cartes). */
.terrae-season__fallback-material { background-image: none; }

.terrae-season--fallback .terrae-season__fallback-material { background-image: linear-gradient(116deg, rgba(8, 9, 7, .68) 4%, rgba(43, 33, 26, .46) 45%, rgba(142, 116, 88, .09) 59%, rgba(8, 9, 7, .78) 94%), url("/assets/prologue-caravelli/terrae/03_PATTERNS/TC_Texture_Brume_1800.jpg"), url("/assets/prologue-caravelli/terrae/03_PATTERNS/TC_Texture_Terre_1800.jpg"); }

@media (scripting: none) {
  .terrae-season__fallback-material { background-image: linear-gradient(116deg, rgba(8, 9, 7, .68) 4%, rgba(43, 33, 26, .46) 45%, rgba(142, 116, 88, .09) 59%, rgba(8, 9, 7, .78) 94%), url("/assets/prologue-caravelli/terrae/03_PATTERNS/TC_Texture_Brume_1800.jpg"), url("/assets/prologue-caravelli/terrae/03_PATTERNS/TC_Texture_Terre_1800.jpg"); }
}
