:root {
  --night: #040e13;
  --blue: #123f52;
  --red: #a83222;
  --red-bright: #d05237;
  --gold: #d8b96f;
  --gold-soft: #f1dc9f;
  --ivory: #f3ead6;
  --muted: #98a8aa;
  --line: rgba(216,185,111,.25);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100svh;
  margin: 0;
  color: var(--ivory);
  background:
    radial-gradient(circle at 50% 48%, rgba(216,185,111,.08), transparent 20rem),
    radial-gradient(circle at 12% 45%, rgba(18,63,82,.3), transparent 34rem),
    radial-gradient(circle at 88% 45%, rgba(168,50,34,.22), transparent 34rem),
    var(--night);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 1s ease;
}
body[data-realm="services"] { background-color: #061923; }
body[data-realm="accompagnements"] { background-color: #25100c; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgba(216,185,111,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216,185,111,.08) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(circle at center, black, transparent 76%);
}
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 5px; }
.shell { width: min(1240px, calc(100% - 36px)); margin-inline: auto; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; color: var(--night); background: var(--gold-soft); border-radius: 999px; }
.skip-link:focus { top: 1rem; }

.portal-header { position: relative; z-index: 10; padding: 1.4rem 0 0; }
.portal-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { color: var(--gold-soft); font-size: .8rem; font-weight: 800; letter-spacing: .25em; text-decoration: none; }
.wordmark span { color: var(--ivory); }
.contact-link { color: var(--muted); font-size: .82rem; text-decoration: none; }
.contact-link:hover { color: var(--ivory); }

.portal-stage { position: relative; min-height: calc(100svh - 66px); display: grid; place-items: center; padding: 2rem 0 3rem; }
.portal-copy { position: absolute; z-index: 5; top: 3%; left: 50%; width: min(660px, 90%); transform: translateX(-50%); text-align: center; pointer-events: none; }
.eyebrow { margin: 0 0 .65rem; color: var(--gold); font-size: .72rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; text-wrap: balance; }
h1 { margin-bottom: .55rem; font-size: clamp(2.2rem, 4.6vw, 4.5rem); line-height: 1; letter-spacing: -.04em; }
.portal-copy p:last-child { margin: 0; color: var(--muted); font-size: .88rem; }

.portal-world { position: relative; width: min(1180px, 96vw); height: min(720px, 78svh); min-height: 570px; isolation: isolate; }
.axis { position: absolute; z-index: -2; top: 50%; left: 9%; right: 9%; height: 1px; background: linear-gradient(90deg, transparent, var(--line) 15%, var(--gold) 50%, var(--line) 85%, transparent); }
.axis::before, .axis::after { content: ""; position: absolute; top: 50%; width: 7px; aspect-ratio: 1; border: 1px solid var(--gold); border-radius: 50%; transform: translateY(-50%); }
.axis::before { left: 15%; }
.axis::after { right: 15%; }

.core { position: absolute; z-index: 5; left: 50%; top: 51%; width: clamp(220px, 24vw, 318px); aspect-ratio: 1; transform: translate(-50%,-50%); border-radius: 50%; }
.core-shell { position: relative; width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; }
.core-shell::before, .core-shell::after { content: ""; position: absolute; inset: -9%; border: 1px solid rgba(216,185,111,.35); border-radius: 50%; animation: orbit 28s linear infinite; }
.core-shell::after { inset: -18%; border-style: dashed; border-color: rgba(216,185,111,.18); animation-duration: 50s; animation-direction: reverse; }
.core img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 35px 55px rgba(0,0,0,.52)); transition: filter .5s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.core:hover img, .core:focus-visible img { transform: scale(1.06); filter: drop-shadow(0 0 35px rgba(216,185,111,.28)) drop-shadow(0 35px 55px rgba(0,0,0,.52)); }
.core-label { position: absolute; left: 50%; bottom: -3.6rem; transform: translateX(-50%); width: max-content; color: var(--muted); font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; }

.realm { position: absolute; z-index: 2; top: 51%; width: clamp(240px, 27vw, 340px); aspect-ratio: 1; display: grid; place-items: center; padding: 3.1rem; border: 1px solid rgba(216,185,111,.32); border-radius: 50%; color: var(--ivory); text-decoration: none; text-align: center; overflow: hidden; opacity: .82; transform: translateY(-50%) scale(.88); transition: transform .75s cubic-bezier(.16,1,.3,1), opacity .5s ease, box-shadow .6s ease, border-color .5s ease; }
.realm::before, .realm::after { content: ""; position: absolute; inset: 8%; z-index: -1; border: 1px solid rgba(216,185,111,.2); border-radius: 50%; animation: orbit 24s linear infinite; }
.realm::after { inset: 17%; border-style: dashed; animation-direction: reverse; animation-duration: 35s; }
.realm--services { left: 0; background: radial-gradient(circle at 35% 28%, rgba(59,132,157,.55), transparent 36%), radial-gradient(circle at center, #103b4a, #06161f 72%); }
.realm--accompagnements { right: 0; padding-inline: 1.5rem; background: radial-gradient(circle at 35% 28%, rgba(216,97,66,.5), transparent 35%), radial-gradient(circle at center, #64261b, #1b0d0a 72%); }
.realm-content { transition: transform .6s cubic-bezier(.16,1,.3,1); }
.realm--accompagnements .realm-content { width: 100%; display: grid; justify-items: center; text-align: center; }
.realm-index { display: block; margin-bottom: 1.1rem; color: var(--gold-soft); font-size: .69rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.realm h2 { margin-bottom: .65rem; font-size: clamp(2rem, 3vw, 3rem); line-height: 1; }
.realm--accompagnements h2 { width: 100%; font-size: clamp(1.4rem, 2vw, 1.85rem); letter-spacing: -.025em; text-align: center; white-space: nowrap; }
.realm p { margin: 0; color: #c0cac7; font-size: .86rem; }

.portal-world:has(.core:hover) .realm, .portal-world:has(.core:focus-visible) .realm { opacity: 1; }
.portal-world:has(.core:hover) .realm--services, .portal-world:has(.core:focus-visible) .realm--services { transform: translate(-22px,-50%) scale(1); }
.portal-world:has(.core:hover) .realm--accompagnements, .portal-world:has(.core:focus-visible) .realm--accompagnements { transform: translate(22px,-50%) scale(1); }
.realm:hover, .realm:focus-visible { z-index: 8; opacity: 1; transform: translateY(-50%) scale(1.13); border-color: rgba(241,220,159,.72); box-shadow: 0 0 0 32px rgba(216,185,111,.035), 0 45px 100px rgba(0,0,0,.45); }
.realm:hover .realm-content, .realm:focus-visible .realm-content { transform: scale(.93); }

.portal-footnote { position: absolute; left: 50%; bottom: .2rem; width: min(740px, 90%); transform: translateX(-50%); color: var(--muted); font-size: .78rem; text-align: center; }
@keyframes orbit { to { transform: rotate(360deg); } }

@media (max-width: 850px) {
  .portal-stage { padding-top: 5rem; }
  .portal-copy { position: relative; top: auto; left: auto; transform: none; margin: 0 auto 2.5rem; }
  .portal-world { height: auto; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: center; }
  .axis { display: none; }
  .core { position: relative; left: auto; top: auto; grid-column: 1 / -1; width: min(62vw, 280px); margin: 0 auto 3rem; transform: none; }
  .realm { position: relative; inset: auto; width: min(43vw, 300px); justify-self: center; padding: 2.2rem; transform: none; opacity: 1; }
  .realm:hover, .realm:focus-visible, .portal-world:has(.core:hover) .realm--services, .portal-world:has(.core:hover) .realm--accompagnements { transform: scale(1.04); }
  .portal-footnote { position: relative; left: auto; bottom: auto; grid-column: 1 / -1; transform: none; width: 100%; margin-top: 1.5rem; }
}
@media (max-width: 590px) {
  .contact-link { font-size: 0; }
  .contact-link::after { content: "Contact"; font-size: .8rem; }
  .portal-stage { padding-top: 3rem; }
  .portal-world { grid-template-columns: 1fr; width: 100%; }
  .core { grid-column: 1; width: min(70vw, 275px); }
  .realm { width: min(82vw, 330px); grid-column: 1; }
  .portal-footnote { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
