:root {
   --font-brand: "Faculty Glyphic", serif;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ink: #07101a;
  --ink-soft: #0d1a26;
  --blue: #123d5a;
  --blue-bright: #2b789b;
  --ivory: #f4efe4;
  --ivory-soft: rgba(244, 239, 228, .68);
  --gold: #c8a35d;
  --gold-bright: #e4c77d;
  --brown: #4a3427;
  --red: #a52c26;
  --line: rgba(228, 199, 125, .23);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--ivory);
}

button,
a,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.main-menu {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(1rem, 2.4vw, 2rem) clamp(1rem, 3vw, 3.5rem);
}

/* ---------------------------------------------------------
   BACKDROP
   CSS-only for now.
   Later: replace with a clean panoramic AKROPOREIA artwork.
   --------------------------------------------------------- */

.world-backdrop,
.world-backdrop::before,
.world-backdrop::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.world-backdrop {
  z-index: -3;
  overflow: hidden;

  background:
    linear-gradient(
      90deg,
      rgba(4, 12, 20, 0.90) 0%,
      rgba(4, 12, 20, 0.74) 24%,
      rgba(4, 12, 20, 0.18) 50%,
      rgba(4, 12, 20, 0.08) 70%,
      rgba(4, 12, 20, 0.48) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.02) 0%,
      rgba(0, 0, 0, 0.10) 55%,
      rgba(0, 0, 0, 0.42) 100%
    ),
    url("../../assets/images/backgrounds/main-menu-heldlarath.png");

  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.world-backdrop::before {
  content: "";
  z-index: 4;
  background:
    linear-gradient(90deg, rgba(3, 12, 20, .94) 0%, rgba(3, 12, 20, .78) 24%, rgba(3, 12, 20, .25) 50%, rgba(3, 12, 20, .08) 70%, rgba(3, 12, 20, .56) 100%),
    linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.34));
}

.world-backdrop::after {
  content: "";
  z-index: 5;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */

.main-menu__header {
  position: relative;
  z-index: 2;
  width: min(540px, 46vw);
  min-width: 330px;
  text-align: center;
  padding-left: clamp(0rem, 1vw, 1rem);
}

.main-logo {
  display: block;
  width: min(100%, 520px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,.48));
}

.main-tagline {
  margin: -.35rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  text-transform: uppercase;
  letter-spacing: .25em;
  font-size: clamp(.62rem, .9vw, .82rem);
  color: rgba(244, 239, 228, .72);
}

.main-tagline span {
  color: var(--gold-bright);
  margin-inline: .45em;
}

/* ---------------------------------------------------------
   MENU
   --------------------------------------------------------- */

.menu-shell {
  position: relative;
  z-index: 2;
  align-self: center;
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(260px, 370px);
  justify-content: space-between;
  gap: clamp(2rem, 8vw, 9rem);
  width: 100%;
  padding: 1.2rem 0 1.8rem;
}

.primary-menu {
  width: 100%;
  align-self: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(8, 22, 34, .88), rgba(8, 22, 34, .64) 70%, transparent);
  backdrop-filter: blur(8px);
}

.menu-entry {
  position: relative;
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 46px 1fr 24px;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1rem;
  border: 0;
  border-bottom: 1px solid rgba(244,239,228,.11);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition:
    background .18s ease,
    transform .18s ease,
    border-color .18s ease;
}

.menu-entry:last-child {
  border-bottom: 0;
}

.menu-entry:hover,
.menu-entry:focus-visible {
  outline: none;
  background: linear-gradient(90deg, rgba(200,163,93,.12), rgba(200,163,93,.035));
  transform: translateX(6px);
}

.menu-entry--primary {
  margin-block: -1px;
  border: 1px solid rgba(228,199,125,.58);
  box-shadow:
    inset 0 0 0 1px rgba(228,199,125,.11),
    0 0 26px rgba(200,163,93,.08);
  background:
    linear-gradient(90deg, rgba(99,70,35,.38), rgba(19,52,72,.5));
}

.menu-entry--primary::before,
.menu-entry--primary::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 1px solid var(--gold-bright);
  transform: translateY(-50%) rotate(45deg);
  background: var(--ink);
}

.menu-entry--primary::before { left: -6px; }
.menu-entry--primary::after { right: -6px; }

.menu-entry__glyph {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-family: Georgia, serif;
  font-size: 1.4rem;
  color: var(--gold-bright);
}

.menu-entry__body {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.menu-entry__body strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.04rem;
  text-transform: uppercase;
  letter-spacing: .055em;
  font-weight: 600;
}

.menu-entry__body small {
  font-family: Georgia, "Times New Roman", serif;
  font-size: .87rem;
  color: rgba(244,239,228,.58);
}

.menu-entry__arrow {
  justify-self: end;
  font-family: Georgia, serif;
  font-size: 1.7rem;
  color: var(--gold-bright);
  opacity: .76;
}

/* ---------------------------------------------------------
   WORLD STATUS
   --------------------------------------------------------- */

.world-status {
  align-self: start;
  margin-top: 1rem;
  padding: 1.3rem 1.45rem;
  border-left: 1px solid rgba(228,199,125,.44);
  background:
    linear-gradient(90deg, rgba(7,16,26,.58), rgba(7,16,26,.13));
  text-shadow: 0 1px 8px rgba(0,0,0,.8);
}

.world-status__eyebrow {
  margin: 0 0 .45rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--gold-bright);
}

.world-status h2 {
  margin: 0 0 1.3rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 500;
}

.world-status__items {
  display: grid;
  gap: .7rem;
  color: rgba(244,239,228,.77);
  font-family: Georgia, "Times New Roman", serif;
}

.world-status__items p {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0;
}

.world-status__items b {
  color: var(--ivory);
}

.status-mark {
  flex: 0 0 auto;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}

.status-mark--blue { background: #58a9d0; color: #58a9d0; }
.status-mark--red { background: #d34a35; color: #d34a35; }
.status-mark--gold { background: #e4c77d; color: #e4c77d; }

.world-status__link {
  margin-top: 1.2rem;
  padding: .55rem 0;
  border: 0;
  border-bottom: 1px solid rgba(228,199,125,.32);
  background: transparent;
  color: var(--ivory);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
}

.world-status__link span {
  color: var(--gold-bright);
  margin-left: .5rem;
}

/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */

.main-menu__footer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 1rem;
  padding-top: 1rem;
}

.footer-actions {
  display: flex;
  gap: .6rem;
}

.footer-button {
  padding: .55rem .8rem;
  border: 1px solid rgba(244,239,228,.13);
  border-radius: 7px;
  background: rgba(7,16,26,.54);
  color: rgba(244,239,228,.7);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .7rem;
}

.footer-button:hover {
  border-color: rgba(228,199,125,.38);
  color: var(--ivory);
}

.footer-quote {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  color: rgba(244,239,228,.68);
}

.footer-build {
  justify-self: end;
  margin: 0;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: rgba(244,239,228,.34);
}

/* ---------------------------------------------------------
   TOAST
   --------------------------------------------------------- */

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 4.5rem;
  transform: translate(-50%, 18px);
  max-width: min(90vw, 560px);
  padding: .8rem 1rem;
  border: 1px solid rgba(228,199,125,.25);
  border-radius: 9px;
  background: rgba(6,14,22,.92);
  color: rgba(244,239,228,.78);
  box-shadow: 0 16px 48px rgba(0,0,0,.36);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 980px) {
  .main-menu {
    min-height: 100svh;
    padding: 1rem;
  }

  .main-menu__header {
    width: min(520px, 80vw);
    min-width: 0;
    margin: 0 auto;
  }

  .menu-shell {
    grid-template-columns: 1fr;
    width: min(680px, 100%);
    margin: 0 auto;
    gap: 1rem;
  }

  .world-status {
    margin-top: 0;
    border-left: 0;
    border-top: 1px solid rgba(228,199,125,.32);
  }

  .world-backdrop::before {
    background:
      linear-gradient(180deg, rgba(3,12,20,.16), rgba(3,12,20,.7) 42%, rgba(3,12,20,.92) 100%);
  }

  .world-backdrop__sun {
    left: 64%;
    width: 60vw;
  }

  .world-backdrop__mountain--front {
    width: 55vw;
    height: 55vw;
    top: 18%;
  }
}

@media (max-width: 640px) {
  .main-menu {
    grid-template-rows: auto auto auto;
    overflow-y: auto;
  }

  .main-tagline {
    letter-spacing: .16em;
    line-height: 1.5;
  }

  .menu-entry {
    min-height: 66px;
    grid-template-columns: 38px 1fr 18px;
    padding-inline: .7rem;
  }

  .menu-entry__glyph {
    width: 34px;
    height: 34px;
  }

  .menu-entry__body strong {
    font-size: .92rem;
  }

  .menu-entry__body small {
    font-size: .76rem;
  }

  .main-menu__footer {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .footer-build {
    justify-self: center;
  }
}

/* =========================================================
   AMBIANCE DU MAIN MENU
   ========================================================= */

.world-backdrop {
  animation: world-breathing 55s ease-in-out infinite alternate;
  transform-origin: 55% 45%;
  will-change: transform;
}

@keyframes world-breathing {
  0% {
    transform:
      scale(1.02)
      translate3d(0, 0, 0);
  }

  50% {
    transform:
      scale(1.055)
      translate3d(-0.6%, -0.25%, 0);
  }

  100% {
    transform:
      scale(1.085)
      translate3d(0.4%, -0.5%, 0);
  }
}

.ambient-layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* -------------------------
   OISEAUX
   ------------------------- */

.bird {
  position: absolute;
  left: -10vw;

  font-family: Georgia, serif;
  color: rgba(20, 24, 28, 0.72);

  transform: rotate(-8deg);
  filter: blur(0.2px);

  animation-name: bird-flight;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.bird--1 {
  top: 23%;
  font-size: 1.4rem;
  animation-duration: 31s;
  animation-delay: -5s;
}

.bird--2 {
  top: 31%;
  font-size: 0.9rem;
  opacity: 0.62;
  animation-duration: 39s;
  animation-delay: -18s;
}

.bird--3 {
  top: 18%;
  font-size: 0.7rem;
  opacity: 0.45;
  animation-duration: 47s;
  animation-delay: -29s;
}

@keyframes bird-flight {
  0% {
    left: -10vw;
    transform: translateY(0) rotate(-8deg) scaleX(1);
  }

  25% {
    transform: translateY(-9px) rotate(-4deg) scaleX(1);
  }

  50% {
    transform: translateY(5px) rotate(2deg) scaleX(1);
  }

  75% {
    transform: translateY(-6px) rotate(-3deg) scaleX(1);
  }

  100% {
    left: 110vw;
    transform: translateY(2px) rotate(-8deg) scaleX(1);
  }
}

/* -------------------------
   PÉTALES UKIYO-E
   ------------------------- */

.petal {
  position: absolute;
  top: -5vh;

  width: 9px;
  height: 5px;

  border-radius: 70% 20% 70% 20%;

  background:
  linear-gradient(
    135deg,
    rgba(255, 214, 224, 0.98),
    rgba(239, 157, 181, 0.95)
  );

box-shadow:
  0 0 8px rgba(255, 190, 210, 0.25);

  animation-name: petal-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.petal--1 {
  left: 9%;
  animation-duration: 19s;
  animation-delay: -4s;
}

.petal--2 {
  left: 22%;
  width: 7px;
  height: 4px;
  opacity: 0.75;
  animation-duration: 24s;
  animation-delay: -13s;
}

.petal--3 {
  left: 63%;
  animation-duration: 27s;
  animation-delay: -7s;
}

.petal--4 {
  left: 78%;
  width: 6px;
  height: 4px;
  opacity: 0.65;
  animation-duration: 21s;
  animation-delay: -15s;
}

.petal--5 {
  left: 92%;
  width: 10px;
  height: 6px;
  animation-duration: 30s;
  animation-delay: -22s;
}

@keyframes petal-fall {
  0% {
    top: -6vh;
    transform:
      translateX(0)
      rotate(0deg);
  }

  25% {
    transform:
      translateX(45px)
      rotate(120deg);
  }

  50% {
    transform:
      translateX(-20px)
      rotate(230deg);
  }

  75% {
    transform:
      translateX(55px)
      rotate(320deg);
  }

  100% {
    top: 108vh;
    transform:
      translateX(10px)
      rotate(480deg);
  }
}

/* -------------------------
   ACCESSIBILITÉ
   ------------------------- */

@media (prefers-reduced-motion: reduce) {
  .world-backdrop,
  .bird,
  .petal {
    animation: none !important;
  }
}

/* =========================================================
   TYPOGRAPHIE DE MARQUE — AKROPOREIA
   ========================================================= */

.main-tagline,
.world-status h2,
.primary-menu__eyebrow,
.footer-build {
  font-family: var(--font-brand);
}
.primary-menu button,
.primary-menu a {
  font-family: var(--font-brand);
}

.primary-menu button *,
.primary-menu a * {
  font-family: inherit;
}
.primary-menu small,
.primary-menu .menu-description,
.primary-menu .menu-subtitle {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Consistent sizing and keyboard access across public pages. */
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 5px; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: var(--ivory); padding: 16px; }
.skip-link:focus { top: 16px; }
.primary-menu { width: 100%; }
.menu-entry { text-decoration: none; }
.menu-entry__body { min-width: 0; }
.menu-entry__body strong { font-family: var(--font-brand); line-height: 1.4; }
.menu-entry__body small { color: #c0c8ce; line-height: 1.5; }
.footer-button, .world-status__link { min-height: 44px; }
.footer-build { color: #b4bdc3; }
.world-backdrop::before { background: linear-gradient(0deg, #030c1444, transparent 60%); }
@media (max-width: 640px) { .menu-entry { gap: 8px; } .menu-entry:hover { transform: none; } .world-status { background: #07101abf; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
