/* The four doors and the four rooms behind them.
   Colors come from the product's interface: black top bar, red buttons,
   white canvas, grey side panels. Type is Figtree, the closest free
   match to Alfabet, the typeface the app itself uses. */

:root {
  --ink: var(--v-ink);
  --red: var(--v-red);
  --paper: var(--v-paper);
  --grey: var(--v-grey);
  --display: var(--v-type);
  --text: var(--v-type);
  --gut: clamp(18px, 4vw, 56px);
  --ease: var(--v-ease);
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.5 var(--text); color: var(--ink); background: var(--ink); -webkit-font-smoothing: antialiased; }
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
::selection { background: var(--ink); color: #fff; }

/* ── The four doors (home) ───────────────────────────────────────────── */
.doors {
  --c1: 1fr; --c2: 1fr; --r1: 1fr; --r2: 1fr;
  height: 100vh; height: 100svh; display: grid;
  grid-template-columns: var(--c1) var(--c2);
  grid-template-rows: var(--r1) var(--r2);
  transition: grid-template-columns .55s var(--ease), grid-template-rows .55s var(--ease);
  position: relative;
}
.doors:has(.d1:hover) { --c1: 1.35fr; --r1: 1.25fr; }
.doors:has(.d2:hover) { --c2: 1.35fr; --r1: 1.25fr; }
.doors:has(.d3:hover) { --c1: 1.35fr; --r2: 1.25fr; }
.doors:has(.d4:hover) { --c2: 1.35fr; --r2: 1.25fr; }
.door {
  position: relative; overflow: hidden;
  background: var(--bg); color: var(--fg); text-decoration: none;
  padding: clamp(22px, 3.4vw, 52px);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.door-word { font: 760 clamp(3.6rem, 10.5vw, 10rem)/.82 var(--display); letter-spacing: -.045em; position: relative; z-index: 1; }
.door-sub { font: 500 clamp(1.1rem, 1.9vw, 1.7rem)/1.2 var(--display); letter-spacing: -.01em; margin-top: .45em; position: relative; z-index: 1; }
.door-hint { margin-top: 1.1em; color: var(--soft); max-width: 30ch; position: relative; z-index: 1; opacity: 0; transform: translateY(6px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.door:hover .door-hint, .door:focus-visible .door-hint { opacity: 1; transform: none; }
.door::after { content: "→"; position: absolute; top: clamp(22px, 3.4vw, 52px); right: clamp(22px, 3.4vw, 52px); font: 500 clamp(1.4rem, 2.4vw, 2.2rem)/1 var(--display); transition: transform .3s var(--ease); }
.door:hover::after { transform: translateX(6px); }
.door:focus-visible { outline-offset: -8px; }
.door-peek {
  position: absolute; right: -14%; top: 9%; width: 64%; max-width: none;
  border-radius: 10px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35), 0 0 0 1px rgba(13, 13, 12, .08);
  transform: rotate(-3deg); transition: transform .6s var(--ease);
}
.door:hover .door-peek { transform: rotate(-1deg) translateY(-6px); }
.doors-logo { position: absolute; z-index: 5; top: clamp(18px, 2.6vw, 34px); left: clamp(22px, 3.4vw, 52px); display: inline-flex; align-items: center; gap: 10px; color: #FFFFFF; text-decoration: none; font: 700 1.25rem/1 var(--display); letter-spacing: -.02em; }
@media (max-width: 760px), (max-height: 520px) {
  .doors { height: auto; min-height: 100svh; grid-template-columns: 1fr; grid-template-rows: repeat(4, minmax(25svh, auto)); }
  .doors:has(.door:hover) { --c1: 1fr; --c2: 1fr; --r1: 1fr; --r2: 1fr; }
  .door { padding-top: 72px; }
  .door-hint { opacity: 1; transform: none; }
  .door-peek { width: 70%; top: 18%; right: -18%; }
}

/* ── Rooms (the four inner pages) ─────────────────────────────────────── */
.room { background: var(--bg); color: var(--fg); min-height: calc(100vh - 96px); min-height: calc(100svh - 96px); }
.room-inner { max-width: 1100px; margin: 0 auto; padding: clamp(48px, 9vw, 120px) var(--gut) clamp(40px, 6vw, 80px); }
.room-wide { max-width: 1500px; }
.big { font: 760 clamp(2.8rem, 7.4vw, 6.6rem)/.92 var(--display); letter-spacing: -.045em; margin: 0 0 .5em; text-wrap: balance; max-width: 14ch; }
.big-sm { font-size: clamp(2.4rem, 5.4vw, 4.6rem); max-width: none; }
.say { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--soft); max-width: 46ch; margin: 1.4em 0 0; }
.say a { color: var(--fg); font-weight: 600; }

.cta { display: inline-flex; align-items: center; gap: .5em; margin-top: .4em; padding: .7em 1.1em; border-radius: 14px; background: var(--red); color: #fff; text-decoration: none; font: 720 clamp(1.5rem, 3vw, 2.4rem)/1 var(--display); letter-spacing: -.02em; box-shadow: 0 20px 40px -20px rgba(222, 27, 51, .6); transition: transform .2s var(--ease); }
/* While the room is still red, the button is white; it turns red as the room settles. */
.from-doors .tone-cream .cta { animation: cta-settle 1.1s .45s var(--ease) backwards; }
@keyframes cta-settle { from { background: #fff; color: var(--red); } }
.cta:hover { transform: translateY(-2px); }

/* The fan-out: a sentence with a small +. Click and it says a little more. */
.lines { margin-top: clamp(28px, 4vw, 48px); border-top: 1px solid var(--line); }
.lines .more { border-bottom: 1px solid var(--line); }
.lines .more > summary { font: 600 clamp(1.3rem, 2.4vw, 2rem)/1.2 var(--display); letter-spacing: -.02em; padding: clamp(16px, 2vw, 22px) 0; }
.more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; }
.more > summary::-webkit-details-marker { display: none; }
.more[open] > summary .plus { transform: rotate(180deg); }
.more[open] > summary .plus::after { opacity: 0; }
.more > summary:hover .plus { background: var(--line); }
.more-body { padding: 0 0 clamp(18px, 2vw, 24px); max-width: 60ch; color: var(--soft); animation: open .35s var(--ease); }
.more-body p { margin: 0 0 .7em; font-size: 1.08rem; }
@keyframes open { from { opacity: 0; transform: translateY(-4px); } }
.more-photo { width: 100%; max-width: 640px; border-radius: 10px; margin: 2px 0 14px; }
.deeper { display: inline-block; margin-right: 18px; color: var(--fg); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: .2em; }

.quiet { margin-top: clamp(36px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 4px 28px; }
.quiet .more { flex: 1 1 260px; }
.quiet .more > summary { font-size: 1rem; color: var(--soft); padding: 6px 0; }
.quiet .more > summary .plus { order: -1; margin-left: 0; width: 18px; height: 18px; }
.quiet .more[open] { flex-basis: 100%; }
.yt-wrap { max-width: 720px; margin-top: 6px; }

.next { display: inline-flex; gap: .4em; margin-top: clamp(56px, 8vw, 110px); font: 700 clamp(1.8rem, 4vw, 3.4rem)/1 var(--display); letter-spacing: -.035em; color: var(--fg); text-decoration: none; }
.next span { transition: transform .3s var(--ease); }
.next:hover span { transform: translateX(8px); }

/* ── See: the gallery ─────────────────────────────────────────────────── */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: min(1200px, 86%); gap: clamp(16px, 2vw, 28px); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gut); padding-bottom: 18px; margin: 0 calc(-1 * var(--gut)); padding-inline: var(--gut); scrollbar-width: thin; }
.gallery:focus-visible { outline-offset: -2px; }
.slide { margin: 0; scroll-snap-align: start; display: grid; gap: 12px; align-content: start; }
.slide-media { padding: 0; border: 0; background: #f2f2f0; border-radius: 12px; overflow: hidden; cursor: zoom-in; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -36px rgba(0, 0, 0, .45); }
.slide-media img, .slide-media video { width: 100%; height: auto; }
.slide-media video { object-fit: cover; background: #111; }
.slide figcaption { display: flex; gap: 14px; align-items: baseline; font: 560 1.05rem/1.3 var(--text); }
.count { font: 600 .9rem/1 var(--display); color: var(--soft); font-variant-numeric: tabular-nums; }
.gallery-nav { display: flex; gap: 8px; margin-top: 10px; }
.gallery-nav button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 1.2rem; cursor: pointer; }
.gallery-nav button:hover { background: var(--red); }

/* ── Learn: lesson covers ─────────────────────────────────────────────── */
.lessons2 { list-style: none; margin: clamp(20px, 3vw, 36px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: clamp(14px, 2vw, 26px); }
.lesson { display: grid; gap: 8px; text-decoration: none; }
.lesson img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); transition: transform .3s var(--ease); }
a.lesson:hover img { transform: translateY(-3px); }
.lesson-t { font: 650 1.12rem/1.2 var(--display); letter-spacing: -.01em; }
.lesson-d { font-size: .92rem; color: var(--soft); }

/* YouTube facade (shared markup from version 1) */
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #111; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-play { position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; text-align: left; padding: 20px; display: grid; align-content: end; gap: 6px; color: #F4F1EC; background: radial-gradient(120% 90% at 85% 10%, #2A2926 0%, #111 60%); }
.yt-title { font: 700 1.3rem/1.2 var(--display); }
.yt-meta { font-size: .9rem; color: #9C9A93; }
.yt-btn { position: absolute; top: 20px; right: 20px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-content: center; background: var(--red); color: #fff; }

/* ── Lightbox ─────────────────────────────────────────────────────────── */
dialog.lightbox { width: min(1600px, 95vw); max-width: none; max-height: none; padding: 0; border: 0; background: transparent; color: #F4F1EC; overflow: visible; }
dialog.lightbox::backdrop { background: rgba(8, 8, 8, .9); }
dialog.lightbox img, dialog.lightbox video { width: 100%; max-height: 86vh; object-fit: contain; border-radius: 10px; background: #000; }
.lightbox-bar { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding-top: 12px; }
.lightbox-bar p { margin: 0; font-weight: 560; }
.lightbox-bar button { border: 0; border-radius: 9px; padding: 8px 14px; background: rgba(244, 241, 236, .14); cursor: pointer; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
