/* Three rooms: Philosophy (the human), Private sessions (the encounter), Mentorship (the becoming).
   One near-black house. The photographs bring the colour; they are never filtered, tinted or laid over.
   Everything here is scoped to body.trio. */

body.trio {
  --deep: #080706; --navfill: #080706; --panel: #080706; --shadow: #000;
  --gold: #e9bd4e; --gold-hot: #ffdf8a;                 /* the Tarot Room's gold, used sparingly */
  --ink: #eee5d1; --ink-soft: #b7ac96;
  --line: rgba(233, 189, 78, 0.65); --hair: rgba(238, 229, 209, 0.16);
  --serif-h: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --caps: "Josefin Sans", "Futura", "Century Gothic", sans-serif;
  --side: clamp(20px, 6vw, 96px);
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--deep); color: var(--ink);
}
html:has(body.trio) { background: #080706; }
body.trio::after { content: none; }                     /* no pattern behind the photographs */
body.trio main { flex: 1; }
body.trio section { padding-block: 0; }
body.trio footer { background: var(--deep); }
body.trio .topbar { position: static; background: var(--deep); }   /* the header takes its own room; nothing slides beneath it */
body.trio [hidden] { display: none !important; }

/* ---------- type: ivory serif for what is said, small gold capitals for where you are ---------- */
:root body.trio :is(h1, h2) {
  margin: 0; font-family: var(--serif-h); font-weight: 500; text-transform: none; letter-spacing: -0.004em; line-height: 1.1;
  color: var(--ink); background: none; -webkit-text-fill-color: currentColor; -webkit-text-stroke: 0; filter: none; text-shadow: none; text-wrap: balance;
}
:root body.trio h2::after { content: none; }
:root body.trio .r-kicker, :root body.trio .r-label {
  margin: 0; font-family: var(--caps); font-weight: 600; font-size: 0.72rem; line-height: 1.8; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold);
}
.trio p { margin: 0; text-wrap: pretty; }

/* a quiet action: small capitals over a single thread */
.r-act {
  display: inline-block; min-height: 44px; padding: 12px 2px 10px; cursor: pointer; text-decoration: none;
  font-family: var(--caps); font-weight: 600; font-size: 0.74rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold); background: none; border: 0; border-bottom: 1px solid rgba(233, 189, 78, 0.5); border-radius: 0;
  transition: color 0.25s, border-color 0.25s;
}
.r-act:hover { color: var(--gold-hot); border-bottom-color: var(--gold-hot); }
.r-act:focus-visible { outline: 2px solid var(--gold-hot); outline-offset: 6px; }
.r-quiet { color: var(--ink-soft); border-bottom-color: var(--hair); }
.r-status { font-family: var(--serif-h); font-size: 1.05rem; color: var(--ink-soft); }

/* the photographs hang as they are */
.r-photo { margin: 0; }
.r-photo img { display: block; width: 100%; height: auto; background: #151311; }

/* ---------- the opening of each room: on a phone, the words, the photograph, the rest ---------- */
.r-hero { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 34px; width: 100%; max-width: 1360px; margin: 0 auto; padding: 34px 16px 0; }
.r-head { text-align: left; }
.r-body { display: grid; gap: 0.9em; align-content: start; font-size: clamp(1.24rem, 1.05rem + 0.6vw, 1.55rem); line-height: 1.5; color: var(--ink); }

/* ---- 1. the human: words on the left, the portrait large on the right ---- */
:root body.room-human h1 { margin-top: 18px; font-size: clamp(2.7rem, 1.3rem + 4.6vw, 5.2rem); line-height: 1.02; }
@media (min-width: 900px) {
  .room-human .r-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 43%); grid-template-rows: 1fr 1fr; grid-template-areas: "head photo" "body photo"; column-gap: clamp(40px, 7vw, 120px); row-gap: 40px; padding: clamp(28px, 4vw, 56px) var(--side) 0; }
  .room-human .r-head { grid-area: head; align-self: end; }
  .room-human .r-photo { grid-area: photo; }
  .room-human .r-body { grid-area: body; align-self: start; max-width: 30ch; padding-left: clamp(0px, 4vw, 64px); }
}

/* the fragments: one thought, given the whole room */
.fragments { max-width: 1360px; width: 100%; margin: clamp(96px, 14vw, 190px) auto 0; padding-inline: var(--side) !important; }
.fragments .r-label { display: flex; align-items: center; gap: 22px; }
:root body.trio .fragments h2.r-label::after { content: ""; display: block; flex: 1; height: 1px; width: auto; margin: 0; background: var(--hair); -webkit-mask: none; mask: none; }
.fr-stage { display: grid; margin: clamp(40px, 6vw, 80px) 0 clamp(36px, 5vw, 60px); }
.fr-text { grid-area: 1 / 1; align-self: center; max-width: 22ch; margin-left: clamp(0px, 8vw, 150px) !important; font-family: var(--serif-h); font-weight: 500; font-size: clamp(2.25rem, 1.1rem + 4.4vw, 4.6rem); line-height: 1.13; letter-spacing: -0.006em; transition: opacity 0.65s ease, translate 0.65s ease; }
.fr-ghost { visibility: hidden; pointer-events: none; }
.fr-text.leaving { opacity: 0; translate: 0 -8px; }
.fragments .r-act { margin-left: clamp(0px, 8vw, 150px); }

/* ---- 2. the encounter: one narrow, quiet column ---- */
.room-encounter .r-hero { justify-items: center; text-align: center; max-width: 760px; row-gap: clamp(34px, 5vw, 52px); padding-top: clamp(40px, 7vw, 88px); }
.room-encounter .r-head { text-align: center; }
:root body.room-encounter h1 { margin: 18px auto 0; max-width: 17ch; font-size: clamp(2.1rem, 1.35rem + 2.4vw, 3.4rem); line-height: 1.14; }
.room-encounter .r-photo { width: min(100% - 16px, 440px); }
.room-encounter .r-body { justify-items: center; gap: 1.1em; }

.question { width: min(100%, 700px); margin: clamp(100px, 13vw, 170px) auto 0; padding-inline: 20px !important; text-align: center; }
.question::before { content: ""; display: block; width: 1px; height: 64px; margin: 0 auto 40px; background: linear-gradient(transparent, var(--gold)); }
:root body.trio .question h2 { margin: 22px auto 0; max-width: 18ch; font-size: clamp(2rem, 1.35rem + 2.2vw, 3.1rem); line-height: 1.16; }
.q-write, .q-heard { transition: opacity 0.65s ease; }
.q-write { margin-top: 36px; }
.leaving, .arriving { opacity: 0; }
.fr-text.arriving { opacity: 0; }
.q-write textarea {
  display: block; width: 100%; min-height: 210px; margin-bottom: 28px; padding: 22px 4px; resize: vertical;
  font: 500 clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem)/1.6 var(--serif-h); color: var(--ink); text-align: center;
  background: transparent; border: 0; border-top: 1px solid rgba(238, 229, 209, 0.24); border-bottom: 1px solid rgba(233, 189, 78, 0.45); border-radius: 0;
}
.q-write textarea::placeholder { color: var(--ink-soft); font-style: italic; opacity: 0.85; }
.q-write textarea:focus { outline: 0; border-bottom-color: var(--gold-hot); }
.q-write textarea:focus-visible { outline: 1px solid var(--gold); outline-offset: 8px; }
.q-hint { min-height: 1.6em; margin-top: 12px !important; font-size: 1rem; color: var(--ink-soft); }
.q-heard { margin-top: 56px; padding-block: 16px; }
.q-heard:focus { outline: 0; }
.q-heard:focus-visible { outline: 1px solid var(--hair); outline-offset: 10px; }
.q-first { max-width: 20ch; margin-inline: auto !important; font-family: var(--serif-h); font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem); line-height: 1.22; }
.q-love { margin-top: 28px !important; font-family: var(--serif-h); font-style: italic; font-size: 1.35rem; color: var(--gold); }
.q-heard .r-act { margin-top: 48px; }
.q-privacy { max-width: 46ch; margin: 30px auto 0 !important; font-size: 0.98rem; line-height: 1.55; color: var(--ink-soft); }

.voices-quiet { margin-top: clamp(100px, 12vw, 160px); padding-inline: 20px !important; text-align: center; }
:root body.trio .voices-quiet h2.r-label { font-family: var(--caps); font-weight: 600; text-transform: uppercase; letter-spacing: 0.34em; font-size: 0.72rem; color: var(--gold); }
.v-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; margin-top: 30px; }
:root body.trio .voices-quiet .voice { flex: 0 0 min(260px, 100%); width: auto; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
:root body.trio .voices-quiet .voice video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 0; background: #000; }

/* ---- 3. the becoming: the gates stand tall on the left, the letter beside them ---- */
:root body.room-becoming h1 { margin-top: 18px; font-size: clamp(2.5rem, 1.3rem + 3.4vw, 4.2rem); line-height: 1.06; }
.r-second { margin-top: 24px !important; font-family: var(--serif-h); font-size: clamp(1.55rem, 1.2rem + 1.3vw, 2.2rem); line-height: 1.28; color: var(--ink-soft); text-wrap: balance; }
.r-letter { gap: 1.15em; }
.r-letter::before { content: ""; display: block; width: 56px; height: 1px; margin-bottom: 14px; background: var(--gold); }
@media (min-width: 900px) {
  .room-becoming .r-hero { grid-template-columns: minmax(0, 46%) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "photo head" "photo body"; column-gap: clamp(48px, 8vw, 136px); row-gap: 56px; padding: clamp(28px, 4vw, 56px) var(--side) 0; }
  .room-becoming .r-photo { grid-area: photo; max-width: 600px; width: 100%; justify-self: end; }
  .room-becoming .r-head { grid-area: head; align-self: end; padding-top: clamp(40px, 11vw, 170px); max-width: 600px; }
  .room-becoming .r-body { grid-area: body; max-width: 31ch; }
}
.permission { margin-top: clamp(110px, 15vw, 210px); padding-inline: var(--side) !important; text-align: center; }
:root body.trio .permission h2 { max-width: 15ch; margin: 0 auto; font-size: clamp(2.7rem, 1.2rem + 5.6vw, 6.2rem); line-height: 1.06; }
.p-door { margin-top: clamp(40px, 5vw, 64px) !important; font-family: var(--caps); font-weight: 600; font-size: 0.74rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold); }
.permission .r-status { margin-top: 14px !important; }

/* ---------- the other two rooms, found at the end of each ---------- */
.adjacent { width: min(100% - 2 * var(--side), 900px); margin: clamp(110px, 14vw, 180px) auto 24px; border-top: 1px solid var(--hair); }
.adjacent ul { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 0; list-style: none; }
.adjacent li + li { border-left: 1px solid var(--hair); text-align: right; }
.adjacent a { display: block; height: 100%; padding: 30px 4px 18px; text-decoration: none; }
.adjacent li + li a { padding-left: 18px; }
.adjacent li:first-child a { padding-right: 18px; }
.r-name { display: block; font-family: var(--caps); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.3em; line-height: 1.7; text-transform: uppercase; color: var(--gold); transition: color 0.25s; }
.r-sub { display: block; margin-top: 8px; font-family: var(--serif-h); font-size: clamp(1.15rem, 1rem + 0.7vw, 1.55rem); line-height: 1.3; color: var(--ink-soft); transition: color 0.25s; }
.adjacent a:hover .r-name { color: var(--gold-hot); }
.adjacent a:hover .r-sub, .adjacent a:focus-visible .r-sub { color: var(--ink); }
.adjacent a:focus-visible { outline: 2px solid var(--gold-hot); outline-offset: -2px; }
@media (max-width: 899px) {
  .fragments, .permission { padding-inline: 20px !important; }
  .adjacent { width: calc(100% - 40px); }
  .room-human .r-hero, .room-becoming .r-hero { max-width: 640px; }
}

@media (prefers-reduced-motion: reduce) {
  .fr-text, .q-write, .q-heard, .r-act, .r-name, .r-sub { transition: none; }
}

/* ---------- Philosophy ("What is this place?"): the arch in the desert stands behind the whole page.
   It stays still while the page moves over it. The shade on top of it is only there so that the words can be read:
   make the numbers smaller for a brighter desert, larger for a darker one. The portrait is not shaded. ---------- */
body.room-human { background: transparent; --veil-top: 0.18; --veil: 0.48; }
body.room-human::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100lvh; z-index: -1; pointer-events: none;
  background-color: #080706;
  background-image: linear-gradient(180deg, rgba(8, 7, 6, var(--veil-top)) 0%, rgba(8, 7, 6, var(--veil)) 38%, rgba(8, 7, 6, var(--veil)) 100%), url("assets/rooms/desert-arch.webp");
  background-repeat: no-repeat;
  background-size: 100% 100%, var(--arch) var(--arch);
  background-position: 0 0, calc(50% + var(--arch) * 0.0151) 0;
}
/* the middle of the dark doorway is at 48.49% of the picture's width: that point is held at the middle of the screen.
   The square picture is a little wider than the screen, so that no edge is left bare when it is moved across */
body.room-human { --arch: max(104vw, 100vh); }
@supports (height: 100lvh) { body.room-human { --arch: max(104vw, 100lvh); } }
body.room-human .topbar, body.room-human footer { background: transparent; }
.room-human main { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.85), 0 0 3px rgba(0, 0, 0, 0.6); }
:root body.room-human { --ink-soft: #d9cfba; }
/* the top of the arch rises behind the menu: a soft dusk there keeps the menu readable */
body.room-human .topbar { background: linear-gradient(rgba(8, 7, 6, 0.9) 0%, rgba(8, 7, 6, 0.82) 70%, rgba(8, 7, 6, 0)); }

/* ---------- Mentorship: the film in place of the photograph. The whole frame is shown, never larger than it was made ---------- */
.r-film video { display: block; width: 100%; height: auto; aspect-ratio: 544 / 720; object-fit: contain; background: #151311; cursor: pointer; }
.r-film video::-webkit-media-controls, .r-film video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
.r-film video:focus-visible { outline: 2px solid var(--gold-hot); outline-offset: 4px; }
.r-film { width: 100%; max-width: 544px; justify-self: center; }
@media (min-width: 900px) { .room-becoming .r-photo.r-film { max-width: 544px; justify-self: end; align-self: start; } }

/* ---------- Private sessions: its name stands as a title, close under the menu ---------- */
:root body.room-encounter .r-hero .r-kicker {
  font-family: var(--display, "Poiret One", "Josefin Sans", sans-serif); font-weight: 400; font-size: clamp(1.7rem, 1.1rem + 2.6vw, 3.1rem); line-height: 1.15;
  letter-spacing: 0.14em; padding-left: 0.14em; text-transform: uppercase; color: var(--gold); -webkit-text-stroke: 0.8px var(--gold);
}
body.trio.room-encounter .r-hero { padding-top: 12px; }
:root body.room-encounter .r-hero h1 { margin-top: 16px; }

/* a heading that is read by screen readers and search engines, and not shown */
body.trio .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
