/* Application Layering, built by the AJALabs team. Everything is scoped to .al-section.
   Ported from the team's stand-alone page: heights now leave room for the site's frozen top bar. */
/* lets the navigation column animate from 0 to its full width */
@property --al-side-w {
  syntax: "<length>";
  inherits: true;
  initial-value: 300px;
}

/* width of the navigation itself: a slim rail, or 300px while the cursor is on it */
@property --al-nav-w {
  syntax: "<length>";
  inherits: true;
  initial-value: 72px;
}

.al-section {
  --al-bg: #000000;
  --al-ink: #f5f3ee;
  --al-muted: rgba(245, 243, 238, 0.55);
  --al-line: rgba(255, 255, 255, 0.12);
  --al-rail: 72px;                        /* collapsed navigation: a slim rail of dots */
  --al-side-w: var(--al-rail);            /* column the navigation reserves in the layout */
  --al-nav-w: var(--al-rail);             /* the navigation itself (300px while expanded) */
  --al-detail-w: clamp(260px, 24vw, 340px);
  --al-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --al-slide: 0.8s;                       /* speed of the navigation bar sliding in / out */
  --al-cw: clamp(300px, 30vw, 600px);     /* full page width (the orbit shrinks pages from this) */
  --al-ratio: 0.89;                       /* page height / width: below 1 = landscape (0.64 is 16:10), 1.25 = the old portrait */

  position: relative;
  display: grid;
  grid-template-columns: var(--al-side-w) minmax(0, 1fr);
  min-height: calc(100vh - var(--top-h, 0px));
  min-height: calc(100svh - var(--top-h, 0px));
  background: var(--al-bg);
  color: var(--al-ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  transition: --al-side-w var(--al-slide) var(--al-ease), --al-nav-w 0.45s var(--al-ease);
}
/* start page: no navigation bar, exactly one screen tall */
.al-section.is-intro {
  --al-side-w: 0px;
  --al-nav-w: 0px;
  height: calc(100vh - var(--top-h, 0px));
  height: calc(100svh - var(--top-h, 0px));
  grid-template-rows: minmax(0, 1fr);
}

/* ---------- Left navigation ---------- */
.al-side {
  position: sticky;
  top: var(--top-h, 0px);
  align-self: start;
  z-index: 300;
  justify-self: start;
  width: var(--al-nav-w);
  height: calc(100vh - var(--top-h, 0px));
  overflow: hidden;
  box-sizing: border-box;
  background: var(--al-bg);
  border-right: 1px solid var(--al-line);
  transition: border-color 0.4s ease;
}
.al-section.is-intro .al-side { border-right-color: transparent; }

.al-side-in {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 280px;                        /* keeps its shape while the column grows */
  height: 100%;
  padding: 30px 20px 16px 28px;
  box-sizing: border-box;
}
.al-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  background: none;
  color: inherit;
  font: 700 16px/1.2 "Plus Jakarta Sans", system-ui, sans-serif;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
}
.al-brand svg { color: #d9c7a7; }

.al-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.al-menu::-webkit-scrollbar { display: none; }

.al-menu-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--al-muted);
  font: 500 14px/1.25 "Plus Jakarta Sans", system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background 0.3s var(--al-ease), color 0.3s var(--al-ease);
}
.al-menu-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: var(--c, #d9c7a7);
  opacity: 0.8;
  transition: opacity 0.3s ease, background 0.3s ease;
}
.al-menu-icon svg,
.al-menu-icon img { display: block; width: 20px; height: 20px; object-fit: contain; }
/* icons you add as files keep their own colours; for single-colour black icons on this dark page add:
   .al-menu-icon img { filter: brightness(0) invert(0.9); } */
.al-menu-label { min-width: 0; }
.al-menu-item:hover { background: rgba(255, 255, 255, 0.07); color: var(--al-ink); }
.al-menu-item:hover .al-menu-icon { opacity: 1; }
.al-menu-item.is-active,
.al-menu-item.is-active:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 700;
}
.al-menu-item.is-active .al-menu-icon {
  opacity: 1;
  background: color-mix(in srgb, var(--c, #d9c7a7) 24%, transparent);
}

.al-cta {
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--al-ink);
  color: #000;
  font: 700 14px/1 "Plus Jakarta Sans", system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.25s var(--al-ease), background 0.25s ease;
}
.al-cta:hover { background: #fff; transform: translateY(-1px); }
.al-cta:active { transform: scale(0.98); }

/* desktop: the navigation collapses to a slim rail of dots and expands over the page while the cursor is on it
   (the page layout does not move, so the pages never jump) */
@media (min-width: 861px) {
  .al-section.is-nav-open { --al-nav-w: 300px; }
  .al-side { transition: border-color 0.4s ease, box-shadow 0.45s ease; }
  .al-section.is-nav-open .al-side { box-shadow: 28px 0 60px -24px rgba(0, 0, 0, 0.85); }
  .al-cta { transition: transform 0.25s var(--al-ease), background 0.25s ease, opacity 0.3s ease; }
  .al-section:not(.is-nav-open) .al-cta { opacity: 0; pointer-events: none; }
  .al-section:not(.is-nav-open) .al-menu-item { background: transparent; }
}

.al-brand:focus-visible,
.al-menu-item:focus-visible,
.al-cta:focus-visible,
.al-more:focus-visible,
.al-card:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- Main area ---------- */
.al-main {
  position: relative;
  min-width: 0;
  padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 56px) clamp(40px, 5vw, 72px);
}
.al-section.is-intro .al-main { overflow: hidden; }

/* ---------- Start page: centred text ---------- */
.al-hero {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 24px;
  text-align: center;
  pointer-events: none;                /* only the button is clickable, so the pages behind stay reachable */
  transition: opacity 0.6s ease 0.2s, transform 0.8s var(--al-ease) 0.2s, visibility 0s;
}
.al-section:not(.is-intro) .al-hero {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  transition: opacity 0.4s ease, transform 0.8s var(--al-ease), visibility 0s linear 0.4s;
}
.al-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--al-muted);
}
.al-hero-title {
  margin: 0;
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(36px, 4.4vw, 76px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--al-ink);
}
.al-hero-sub {
  margin: 0;
  max-width: 380px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--al-muted);
}
.al-more {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--al-ink);
  color: #000;
  font: 700 14px/1 "Plus Jakarta Sans", system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.25s var(--al-ease), background 0.25s ease;
}
.al-more svg { transition: transform 0.25s var(--al-ease); }
.al-more:hover { background: #fff; transform: translateY(-1px); }
.al-more:hover svg { transform: translateX(3px); }
.al-more:active { transform: scale(0.98); }

/* ---------- Title + details (visible after "See more") ---------- */
.al-head { transition: opacity 0.6s ease 0.25s; }
.al-section.is-intro .al-head { opacity: 0; pointer-events: none; }

.al-head {
  position: relative;
  z-index: 1;                      /* the title sits behind the pages */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.al-title {
  margin: 0;
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(32px, 5.5vw, 120px);
  font-weight: 350;
  line-height: 1;
  letter-spacing: -0.035em;
  text-align: center;
  white-space: nowrap;
  color: var(--al-ink);
}
.al-sub {
  align-self: flex-end;
  margin: 0;
  max-width: 260px;
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
  color: var(--al-muted);
}

/* ---------- Where the row / fan sits (empty, only measured by script.js) ---------- */
.al-stage-wrap {
  position: relative;
  height: clamp(420px, 62vh, 700px);
  /* gap between the heading and the pages (negative = pages overlap the heading's lower edge);
     the right margin lets the row run off the right edge of the screen */
  margin: clamp(-64px, -3.4vw, -16px) calc(-1 * clamp(20px, 4vw, 56px)) 0 0;
  pointer-events: none;
}

/* ---------- The pages: one full-size layer; script.js moves every page, every frame ---------- */
.al-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  perspective: 1800px;                 /* perspective-origin + clip-path are set by script.js */
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}


.al-card {
  --c: #d9c7a7;
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  width: var(--al-cw);
  height: calc(var(--al-cw) * var(--al-ratio));
  margin: calc(var(--al-cw) * var(--al-ratio) * -0.5) 0 0 calc(var(--al-cw) / -2);   /* the card's centre is its position */
  padding: 32px 9px 9px;           /* top strip = the file tab with the layer name */
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--c);
  box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transform-origin: 50% 50%;
  opacity: 0;                      /* faded in by script.js */
  pointer-events: auto;
  will-change: transform, opacity;
  filter: brightness(0.92);
  transition: filter 0.4s ease;    /* position/tilt/size/fade are NOT css-transitioned: script.js eases them together */
}
.al-card:hover,
.al-card.is-active { filter: brightness(1.05); }

/* a sideways swipe turns the category circle (script.js), so only up / down is left to the browser */
.al-main { touch-action: pan-y; }

/* start page: blur + dimming by depth is set every frame by script.js, so no css transition on it */
.al-section.is-intro .al-card { transition: none; }
.al-section.is-intro { touch-action: pan-y; }
.al-section.is-intro .al-main { cursor: grab; }
.al-section.is-dragging .al-main,
.al-section.is-dragging .al-card { cursor: grabbing; }

.al-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 3;
  margin: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--al-muted);
  pointer-events: none;
  transition: opacity 0.5s ease 0.3s;
}
.al-section:not(.is-intro) .al-hint {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

/* a soft sheen so the narrow slices read as thick, glossy slabs */
.al-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

/* layers without a screenshot yet */
.al-card.is-empty::before {
  content: attr(data-title);
  position: absolute;
  inset: 32px 9px 9px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.88);
  font: 700 16px/1.2 "Plus Jakarta Sans", system-ui, sans-serif;
  text-align: center;
}

.al-card img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  object-position: top left;
  background: rgba(0, 0, 0, 0.25);
  pointer-events: none;
  -webkit-user-drag: none;
}
.al-card.is-empty img { visibility: hidden; }

.al-tag {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 9px 12px 0;
  color: rgba(0, 0, 0, 0.78);
  font: 700 14px/1.2 "Plus Jakarta Sans", system-ui, sans-serif;
  letter-spacing: 0.01em;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

/* ---------- Details panel: stays on the right of the page (the fan shifts left to make room) ---------- */
.al-detail {
  position: absolute;
  top: 160px;                             /* script.js moves this level with the top of the pages */
  right: clamp(16px, 2vw, 32px);
  z-index: 4;
  width: var(--al-detail-w);
  box-sizing: border-box;
  padding: 22px 22px 24px;
  border: 1px solid var(--al-line);
  border-radius: 18px;
  background: rgba(14, 14, 14, 0.84);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: opacity 0.6s ease 0.25s, visibility 0s;
}
.al-section.is-intro .al-detail {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.al-detail.has-flow { width: clamp(300px, 46vw, 580px); }
.al-detail .al-info-title { font-size: clamp(26px, 2.4vw, 36px); }
.al-info { max-width: 520px; }
.al-kicker { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--al-muted); }
.al-info-title {
  margin: 0 0 8px;
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--al-ink);
}
.al-info-desc { margin: 0; font-size: 15px; line-height: 1.6; color: var(--al-muted); }

/* ---------- Timeline (only shown when a layer has events in FLOWS) ---------- */
.al-flow {
  margin-top: 28px;
  padding-bottom: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.al-flow[hidden] { display: none; }
.al-tl {
  position: relative;
  height: 340px;
  min-width: max(520px, calc((var(--n, 8) - 1) * 66px + 170px));
}
.al-tl-axis {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.35);
  transform-origin: 0 50%;
}
.al-tl-axis::after {
  content: "";
  position: absolute;
  right: 1px; top: 50%;
  width: 9px; height: 9px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.35);
  border-right: 1.5px solid rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) rotate(45deg);
}
.al-tl-track { position: absolute; left: 24px; right: 140px; top: 0; bottom: 0; }

.al-ev {
  --dot: #d9c7a7;
  --pill: #d9c7a7;
  --pill-ink: #000;
  position: absolute;
  left: var(--x);
  width: 0;
}
.al-ev.is-top { bottom: 50%; height: var(--len); }
.al-ev.is-bottom { top: 50%; height: var(--len); }
.al-ev::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -1px;
  border-left: 1.5px dotted rgba(255, 255, 255, 0.4);
}
.al-ev-dot {
  position: absolute;
  left: -5px;
  z-index: 1;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--dot);
}
.al-ev.is-top .al-ev-dot { top: -5px; }
.al-ev.is-bottom .al-ev-dot { bottom: -5px; }

.al-ev-body { position: absolute; left: 12px; width: 124px; }
.al-ev.is-top .al-ev-body { top: -8px; }
.al-ev.is-bottom .al-ev-body { top: calc(100% - 8px); }

.al-ev-when { margin-bottom: 6px; font-size: 11px; font-weight: 600; line-height: 1.3; color: var(--al-ink); }
.al-ev-pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--pill);
  color: var(--pill-ink);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: pre-line;
  transition: transform 0.35s var(--al-ease);
}
.al-ev:hover .al-ev-pill { transform: translateY(-2px); }

.tone-1 { --dot: #d9c7a7; --pill: #d9c7a7; }
.tone-2 { --dot: #6f9bb8; --pill: #6f9bb8; }
.tone-3 { --dot: #9aa88c; --pill: #9aa88c; }
.tone-4 { --dot: #e0a58f; --pill: #e0a58f; }

.al-ev-date { margin-bottom: 3px; font-size: 11.5px; font-weight: 700; line-height: 1.3; color: var(--al-ink); }
.al-ev-text { font-size: 11.5px; line-height: 1.5; color: var(--al-muted); white-space: pre-line; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .al-section,
  .al-section.is-intro { grid-template-columns: minmax(0, 1fr); --al-cw: 180px; }
  .al-side {
    position: static;
    width: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--al-line);
  }
  .al-section.is-intro .al-side { display: none; }
  .al-side-in {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: auto;
    height: auto;
    padding: 12px 14px;
  }
  .al-brand span { display: none; }
  .al-menu { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .al-menu-item { width: auto; padding: 10px 12px; white-space: nowrap; }
  .al-cta { padding: 11px 16px; }
  .al-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .al-title { white-space: normal; }
  /* small screens: the details sit under the pages */
  .al-detail { position: static; width: auto; margin-top: 16px; }
  .al-detail.has-flow { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .al-section, .al-side, .al-hero, .al-head, .al-detail,
  .al-menu-item, .al-cta, .al-more, .al-ev-pill { transition: none; }
}
/* ---------- Added for the site ---------- */
.al-section { text-align: start; }
.al-section h1, .al-section h2, .al-section h3 { letter-spacing: normal; }
.al-info-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  font-size: 13px; font-weight: 600; color: var(--al-ink); text-decoration: none;
  border-bottom: 1px solid var(--al-line); padding-bottom: 2px;
}
.al-info-link:hover { border-bottom-color: var(--al-ink); }
.al-info-link[hidden] { display: none; }
