/*
Theme Name: DaoDeUS
Theme URI: https://daodeus.local
Author: DaoDeUS
Description: Dark floating-panel theme over a painted Chinese landscape, modeled on the Dao De forum aesthetic. Built for the DaoDeUS school site.
Version: 1.0.0
Requires PHP: 8.0
Text Domain: daodeus
*/

/* ---------- Base ---------- */
:root {
  --panel: #1d1e20;
  --panel-2: #26272a;
  --panel-3: #2f3034;
  --ink: #dcdee1;
  --ink-dim: #9ba0a6;
  --gold: #d4b678;
  --gold-soft: #ecdcb4;
  --blue: #5aa1d9;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --header-h: 88px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  background-color: #14181a;
}

/* Painted landscape backdrop, fixed, slightly dimmed */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background: url("assets/img/bg-forum.webp") center / cover no-repeat;
}
/* The same backdrop, alive: sits over the painted still, under the dim. */
.dd-bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  display: block;
  width: 100%;
  height: 100%;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(10, 12, 14, 0.18);
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: #7fbce8; }

h1, h2, h3, h4 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  color: #f0eee9;
  line-height: 1.25;
  margin: 1.6em 0 0.55em;
}
h1 { font-size: 2.55rem; margin-top: 0.4em; }
h2 { font-size: 1.7rem; color: var(--gold-soft); }
h3 { font-size: 1.2rem; }

::selection { background: rgba(217, 177, 90, 0.35); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: rgba(6, 7, 8, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.brand:hover { color: #fff; }
/* The mark is the identity; at 58px it was reading as a favicon. */
.brand .logo-img {
  height: 76px;
  width: auto;
  display: block;
}
.brand .latin {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand .latin b {
  font-family: Georgia, serif;
  font-size: 19px;
  letter-spacing: 1px;
  font-weight: 600;
}
.brand .latin span {
  font-size: 11.5px;
  color: var(--ink-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 10px 15px;
  border-radius: 8px;
  color: #cfd3d7;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  background: rgba(217, 177, 90, 0.14);
  color: var(--gold-soft);
}
.site-nav .nav-cta > a {
  background: rgba(217, 177, 90, 0.16);
  border: 1px solid rgba(217, 177, 90, 0.45);
  color: var(--gold-soft);
}
.site-nav .nav-cta > a:hover { background: rgba(217, 177, 90, 0.28); color: #fff; }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
    margin-left: auto;
    background: none;
    border: 0;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    padding: 6px 10px;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(24, 25, 27, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 10px 18px 16px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
}

/* ---------- Layout panel ---------- */
.site-main {
  max-width: 980px;
  margin: 44px auto 90px;
  padding: 0 18px;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 58px 60px;
}
@media (max-width: 700px) { .panel { padding: 28px 22px 36px; } }

/* ---------- Full-viewport hero ---------- */
.hero-full {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 40px 22px 90px;
  text-align: center;
}
.hero-full .hero-logo {
  height: clamp(130px, 24vh, 200px);
  width: auto;
  filter: drop-shadow(0 6px 28px rgba(0, 0, 0, 0.65));
}
.hero-full .hero-tag {
  margin: 0;
  max-width: 36em;
  font-family: Georgia, serif;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.7;
  color: #f2efe6;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
}
.btn-lg {
  padding: 16px 40px;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ---------- Cinematic scroll film ---------- */
.dd-film-chapter { display: none; }
.dd-film-on .dd-film-chapter { display: block; }
.dd-film-on .hero-full { display: none; }
.dd-film-viewport {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: #0c0e10;
}
.dd-film-viewport canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* film.js writes the grade + focus-pull blur here every beat. */
  will-change: filter;
}
/* Vignette. Pulls the eye off the edges of the frame and gives the flat
   painted art some depth. */
.dd-film-viewport::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse 78% 72% at 50% 48%,
    rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.20) 74%, rgba(0, 0, 0, 0.52) 100%);
}
/* Grain. Sells "film", and more practically it dithers the huge smooth sky
   gradients in this artwork, which is exactly where 8-bit WebP bands. */
.dd-film-viewport::after {
  content: "";
  position: absolute;
  inset: -60px;              /* overscan so the drift never exposes an edge */
  z-index: 4;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("assets/img/grain.png");
  background-repeat: repeat;
  animation: dd-grain 0.72s steps(1) infinite;
}
@keyframes dd-grain {
  0%   { transform: translate3d(0, 0, 0); }
  20%  { transform: translate3d(-31px, 17px, 0); }
  40%  { transform: translate3d(23px, -29px, 0); }
  60%  { transform: translate3d(-13px, -21px, 0); }
  80%  { transform: translate3d(29px, 11px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
/* The beat settle. Sits directly on the picture, under everything else. */
.dd-film-dim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: #05070a;
  opacity: 0;
  will-change: opacity;
}
.dd-film-endcard { z-index: 2; }
.dd-film-overlay,
.dd-film-hint,
.dd-film-skip,
.dd-film-sound { z-index: 5; }

/* Ambient sound, off until asked for. Browsers block unrequested audio and so
   do people, so this never starts on its own. */
.dd-film-sound {
  position: absolute;
  bottom: 26px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.25s ease;
}
.dd-film-sound:hover { color: #fff; }
.dd-sound-bars { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.dd-sound-bars i {
  width: 2px;
  height: 3px;
  background: currentColor;
  transition: height 0.25s ease;
}
.dd-film-sound[aria-pressed="true"] { color: var(--gold-soft); }
.dd-film-sound[aria-pressed="true"] .dd-sound-bars i {
  animation: dd-eq 1s ease-in-out infinite;
}
.dd-film-sound[aria-pressed="true"] .dd-sound-bars i:nth-child(2) { animation-delay: 0.18s; }
.dd-film-sound[aria-pressed="true"] .dd-sound-bars i:nth-child(3) { animation-delay: 0.36s; }
@keyframes dd-eq { 50% { height: 12px; } }

/* A film starts by fading up, not by appearing. This also covers the moment
   before the first frames have arrived, so a slow connection sees an intended
   black rather than an empty canvas. */
.dd-film-boot {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: #06070a;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 1.15s ease;
}
.dd-film-boot img {
  width: clamp(84px, 11vh, 128px);
  height: auto;
  opacity: 0.34;
  animation: dd-breathe 2.6s ease-in-out infinite;
}
@keyframes dd-breathe { 50% { opacity: 0.78; } }
.dd-film-booted .dd-film-boot { opacity: 0; pointer-events: none; }
.dd-film-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  text-align: center;
  opacity: 0;
  /* Hidden, not merely transparent: a transparent link is still reachable by
     Tab, and film.js restores visibility as each beat comes up. */
  visibility: hidden;
  pointer-events: none;
}
.dd-film-overlay a { pointer-events: auto; }
.dd-film-overlay .hero-logo {
  height: clamp(130px, 24vh, 200px);
  width: auto;
  filter: drop-shadow(0 6px 28px rgba(0, 0, 0, 0.65));
}
.dd-film-overlay .hero-tag {
  margin: 0;
  max-width: 36em;
  font-family: Georgia, serif;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.7;
  color: #f2efe6;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
}
/* Lifted well clear of the bottom edge and enlarged: this is the only thing
   telling a first-time visitor the page moves at all, so it cannot sit in the
   sliver of screen people skip past. */
.dd-film-hint {
  position: absolute;
  bottom: 11vh;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85), 0 2px 18px rgba(0, 0, 0, 0.7);
  text-align: center;
}
/* A real chevron. The hairline version read as unfinished — an arrow is the
   one shape everybody already knows means "down". Drawn from two borders on a
   rotated box so it stays crisp at any size, and translated diagonally in its
   own rotated space, which is straight down on screen. */
.dd-film-hint i {
  display: block;
  width: 15px;
  height: 15px;
  margin: 20px auto 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: dd-bob 1.9s ease-in-out infinite;
}
@keyframes dd-bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.72; }
  50%      { transform: rotate(45deg) translate(5px, 5px); opacity: 1; }
}
/* Bottom-left, mirroring the sound control. It used to sit top-right, which
   only worked because the opaque header hid it; with the header transparent it
   collided with the nav. */
.dd-film-skip {
  position: absolute;
  top: auto;
  bottom: 26px;
  left: 24px;
  right: auto;
  padding: 8px 12px;
  font-family: "Inter", sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}
.dd-film-skip:hover { color: #fff; }

/* Film chapter text overlays */
.dd-film-overlay.ov-quote {
  border: 0;
  margin: 0;
  font-style: italic;
}
.dd-film-overlay.ov-quote p {
  margin: 0;
  max-width: 26em;
  font-family: Georgia, serif;
  font-size: clamp(1.4rem, 2.4vw, 1.95rem);
  line-height: 1.55;
  color: #f6f2e6;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 0, 0, 0.5);
}
.dd-film-overlay.ov-quote .attr {
  display: block;
  margin-top: 20px;
  font-family: "Inter", sans-serif;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-soft);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}
.dd-film-overlay.ov-line p {
  margin: 0;
  max-width: 24em;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.7rem, 2.85vw, 2.5rem);
  line-height: 1.6;
  color: #f6f2e6;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 0, 0, 0.5);
}
/* The payoff beat sits on the blown-out golden bloom of the gates opening,
   so white type needs to carry its own separation: a tight dark shadow to
   cut the edge, plus a warm-dark halo wide enough to hold the glow back off
   the letterforms without laying a scrim over the light itself. */
.dd-film-overlay.ov-gate2 p {
  color: #fff;
  font-size: clamp(1.95rem, 3.3vw, 2.9rem);
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 2px 14px rgba(0, 0, 0, 0.8),
    0 0 38px rgba(58, 34, 4, 0.85), 0 0 90px rgba(40, 22, 0, 0.7);
}

/* Section overlays: the film IS the card artwork, so no boxes and no borders.
   Anchored to the left third — this footage keeps a fog bank there and the
   mountain mass on the right, so text sits in the negative space. */
/* Anchored to the DRAWN IMAGE, not the window. The canvas is aspect-fill, so
   the artwork is cropped differently at every viewport ratio — positioning in
   vw/vh let the text drift off the fog and onto the mountain on wide or short
   screens. film.js publishes the drawn rect as --ix/--iy/--iw/--ih, so these
   fractions now mean "this part of the painting" on any display. */
.dd-film-overlay.ov-section {
  display: block;
  inset: auto;
  left: clamp(40px, calc(var(--ix, 0px) + var(--iw, 100vw) * 0.055), calc(100vw - 600px));
  top: calc(var(--iy, 0px) + var(--ih, 100vh) * 0.55);
  width: min(32em, 40vw);
  text-align: left;
  text-decoration: none;
  gap: 0;
}
/* A soft falloff, not a rectangle: legible over moving cloud without
   announcing itself as a panel. */
.dd-film-overlay.ov-section::before {
  content: "";
  position: absolute;
  inset: -14% -22% -22% -18%;
  z-index: -1;
  background: radial-gradient(60% 60% at 34% 50%, rgba(8, 10, 12, 0.72), rgba(8, 10, 12, 0) 72%);
}
/* Right-anchored variant: used where the chapter's subject occupies the left
   of frame, so the text takes the open side instead of sitting on the figures. */
.dd-film-overlay.ov-section.ov-right {
  left: auto;
  right: 40px;
}
.dd-film-overlay.ov-section.ov-right::before {
  background: radial-gradient(60% 60% at 56% 50%, rgba(8, 10, 12, 0.72), rgba(8, 10, 12, 0) 72%);
}
.ov-section .ov-label {
  display: block;
  position: relative;
  font-family: "Inter", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 3.4px;
  text-transform: uppercase;
  color: var(--gold-soft);
  padding-bottom: 14px;
  margin-bottom: 18px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
}
/* A short rule, not a full-width border: a line running the whole block reads
   as a table divider, a 2.4em one reads as a mark. */
.ov-section .ov-label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.4em;
  height: 1px;
  background: rgba(212, 182, 120, 0.6);
}
.ov-section .ov-head {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.72rem, 2.75vw, 2.5rem);
  font-weight: 500;
  line-height: 1.26;
  letter-spacing: 0.4px;
  color: #f8f5ec;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9), 0 0 46px rgba(0, 0, 0, 0.6);
}
.ov-section .ov-sub {
  display: block;
  margin-top: 14px;
  font-size: 0.97rem;
  line-height: 1.62;
  color: rgba(238, 234, 224, 0.86);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.9);
}
.ov-section .ov-cue {
  display: inline-block;
  margin-top: 22px;
  font-family: "Inter", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: #e2c98d;
  /* Sits over bright stone and mist in several chapters, so it needs a
     tighter shadow than the body copy to stay readable. */
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 2px 16px rgba(0, 0, 0, 0.85);
}
.ov-section .ov-cue::after {
  content: " \2192";
  display: inline-block;
  transition: transform 0.25s ease;
}
.ov-section:hover .ov-cue::after { transform: translateX(5px); }
.ov-section:hover .ov-head { color: #fff; }

.dd-endcard-overlay .ec-line {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  letter-spacing: 0.4px;
  color: rgba(246, 242, 230, 0.92);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}

/* Keyboard users need to see where they are; the film is otherwise a wall of
   imagery with no visible focus. */
.ov-section:focus-visible,
.dd-film-skip:focus-visible,
.dd-endcard-overlay .btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 7px;
  border-radius: 2px;
}

/* The header was an opaque slab across every frame of the film — the single
   element saying "website with a video in it" rather than "film". Over the
   film it becomes a soft top-scrim instead: enough to hold the nav legible,
   nothing to cut the picture. Inner pages keep the solid bar. */
.dd-film-on .site-header {
  /* FIXED, not sticky. Sticky occupies 68px of flow, which pushed the film
     down by exactly that much — so at scroll 0 a 68px strip of the body's
     painted backdrop (a different painting entirely) showed through the now
     transparent header, until the pin engaged and the canvas covered it. */
  position: fixed;
  left: 0;
  right: 0;
  background: linear-gradient(rgba(4, 5, 7, 0.66), rgba(4, 5, 7, 0.26) 58%, rgba(4, 5, 7, 0));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 0;
}
/* Belt and braces: with the panel, bands and footer all retired, the film IS
   the desktop front page, so the body backdrop has nothing left to do. Gone,
   it can never show through a gap again. Mobile never gets .dd-film-on, so it
   keeps its backdrop. */
.dd-film-on body::before,
.dd-film-on body::after { display: none; }
.dd-film-on .site-nav a { color: rgba(255, 255, 255, 0.86); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
.dd-film-on .site-nav a:hover { background: none; color: #fff; }
/* The outlined gold box is the same problem in miniature. Over the film the
   CTA is just type, distinguished by colour and weight. */
.dd-film-on .site-nav .nav-cta > a,
.dd-film-on .site-nav .current_page_item > a {
  background: none;
  border: 0;
  color: var(--gold-soft);
}
.dd-film-on .site-nav .nav-cta > a { font-weight: 600; }
.dd-film-on .site-nav .nav-cta > a:hover { background: none; color: #fff; }

/* When the film runs, the static hero and the quote bands retire. */
.dd-film-on .band-quote { display: none; }
/* The backdrop is never actually seen while the film runs — the canvas covers
   the viewport, and everything between the film and the footer is hidden. It
   would burn a WebGL context and ~570 KB of textures to render a sliver behind
   the footer, so it stands down and body::before paints the same world. */
.dd-film-on .dd-bg-canvas { display: none; }
/* No footer under the film. The end-card IS the ending — logo, one line, one
   CTA — and people scroll to the bottom reflexively, so anything after it
   becomes the last thing they see instead. Nothing is lost: the header is
   sticky, and the footer's only two links already live in it. The document
   now ends where the pin releases, so the end-card is the final frame.
   Every other page keeps its footer. */
.dd-film-on .site-footer { display: none; }
/* The panel's content now lives in the film itself. Hidden, never removed:
   it stays in the DOM for search, for reduced-motion, and for the no-JS
   path — and it stays VISIBLE on small screens, where film.js bails out and
   never adds .dd-film-on, so phones keep a readable page. */
.dd-film-on .site-main { display: block; }

/* And the page behind the content panel lives in the film's ending world:
   the cloud sea seen from the summit, softly dimmed for readability. */
.dd-film-on body::before { background-image: url("assets/img/bg-clouds.jpg"); }
.dd-film-on body::after { background: rgba(10, 12, 14, 0.32); }

/* End-card layer: fades in over the film canvas at the end of the scrub. */
.dd-film-endcard {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden; /* keeps the CTA out of the tab order until it arrives */
  pointer-events: none;
  background-size: cover;
  background-position: center;
}
.dd-film-endcard video,
.dd-film-endcard .dd-ec-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The idle player waits on its first frame until the hand-over. */
.dd-film-endcard .dd-ec-b { opacity: 0; }
.dd-endcard-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  /* No vignette — the view stays clean; the logo carries its own shadow. */
}
.dd-endcard-overlay .hero-logo {
  height: clamp(120px, 22vh, 180px);
  width: auto;
  filter: drop-shadow(0 6px 28px rgba(0, 0, 0, 0.7));
}

/* ---------- Full-width interlude bands ---------- */
.band {
  padding: 88px 24px;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}
.band > * { position: relative; }
.band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(13, 14, 16, 0.68);
}
.band-sage { background-image: url("assets/img/banner-home.jpg"); }
.band-gate { background-image: url("assets/img/banner-whyjoin.jpg"); }
.band-quote blockquote {
  border: 0;
  margin: 0 auto;
  padding: 0;
  max-width: 28em;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.5;
  color: #f3efe3;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
}
.band-quote .attr {
  display: block;
  margin-top: 22px;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.band .band-cta-row { margin: 40px 0 0; }
@media (max-width: 700px) { .band { padding: 60px 20px; background-attachment: scroll; } }

.page-banner {
  display: block;
  width: 100%;
  aspect-ratio: 2048 / 688;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 14px;
}

.entry-content > p:first-of-type { color: #e6e4de; }

.entry-content img { max-width: 100%; border-radius: 10px; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.2em 0;
}

blockquote {
  margin: 1.4em 0;
  padding: 4px 22px;
  border-left: 3px solid var(--gold);
  color: #cfcabd;
  font-style: italic;
}

/* ---------- Buttons ---------- */
.btn, button.btn, input[type="submit"].btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 9px;
  border: 1px solid rgba(217, 177, 90, 0.55);
  background: rgba(217, 177, 90, 0.15);
  color: var(--gold-soft);
  font-size: 15.5px;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: rgba(217, 177, 90, 0.32); color: #fff; }
.btn-solid, button.btn.btn-solid, input[type="submit"].btn-solid {
  background: var(--gold);
  color: #1d1a12;
  border-color: var(--gold);
  font-weight: 600;
}
.btn-solid:hover, button.btn.btn-solid:hover, input[type="submit"].btn-solid:hover { background: var(--gold-soft); color: #1d1a12; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Home cards ---------- */
.home-hero { position: relative; margin-bottom: 26px; }
.home-hero .page-banner { margin-bottom: 0; }
.home-hero-caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  padding: 0 6%;
  background: linear-gradient(270deg, rgba(12, 12, 12, 0.55) 0%, rgba(12, 12, 12, 0) 55%);
  border-radius: 10px;
}
.home-hero-caption h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 4vw, 2.7rem);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}
.home-hero-caption p {
  margin: 0;
  max-width: 24em;
  color: #e9e6dd;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin: 30px 0 10px;
}
.card {
  display: block;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  color: var(--ink);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(217, 177, 90, 0.5); color: var(--ink); }
.card img { width: 100%; aspect-ratio: 3 / 1.15; object-fit: cover; display: block; }
.card .card-body { padding: 16px 18px 20px; }
.card h3 { margin: 0 0 6px; color: var(--gold-soft); }
.card p { margin: 0; font-size: 14.5px; color: var(--ink-dim); }

.cta-band {
  margin-top: 34px;
  padding: 26px 30px;
  background: linear-gradient(120deg, rgba(217, 177, 90, 0.12), rgba(90, 161, 217, 0.08));
  border: 1px solid rgba(217, 177, 90, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.cta-band p { margin: 0; flex: 1 1 20em; }

/* ---------- Forms ---------- */
.dd-form label {
  display: block;
  margin: 18px 0 6px;
  font-size: 14px;
  letter-spacing: 0.4px;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.dd-form input[type="text"],
.dd-form input[type="email"],
.dd-form input[type="password"],
.dd-form select,
.dd-form textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  color: var(--ink);
  font: inherit;
}
.dd-form input:focus, .dd-form select:focus, .dd-form textarea:focus {
  outline: none;
  border-color: rgba(217, 177, 90, 0.6);
}

.dd-notice {
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: 9px;
  border: 1px solid rgba(90, 161, 217, 0.4);
  background: rgba(90, 161, 217, 0.1);
}
.dd-notice.ok { border-color: rgba(120, 190, 120, 0.5); background: rgba(120, 190, 120, 0.1); }
.dd-notice.err { border-color: rgba(220, 110, 110, 0.5); background: rgba(220, 110, 110, 0.1); }

/* ---------- Booking widget ---------- */
.dd-book-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 26px; margin-top: 10px; }
@media (max-width: 760px) { .dd-book-grid { grid-template-columns: 1fr; } }

.dd-days { display: flex; flex-direction: column; gap: 8px; max-height: 430px; overflow-y: auto; padding-right: 6px; }
.dd-day {
  text-align: left;
  padding: 11px 15px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.dd-day:hover { border-color: rgba(217, 177, 90, 0.5); }
.dd-day.sel { border-color: var(--gold); background: rgba(217, 177, 90, 0.13); color: var(--gold-soft); }
.dd-day small { display: block; color: var(--ink-dim); font-size: 12.5px; }

.dd-slots { display: flex; flex-wrap: wrap; gap: 9px; align-content: flex-start; }
.dd-slot {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-width: 128px;
  text-align: center;
}
.dd-slot small { display: block; color: var(--ink-dim); font-size: 11.5px; }
.dd-slot:hover { border-color: rgba(217, 177, 90, 0.5); }
.dd-slot.sel { border-color: var(--gold); background: rgba(217, 177, 90, 0.15); color: var(--gold-soft); }
.dd-slot.sel small { color: var(--gold-soft); }

.dd-tz-note { font-size: 13.5px; color: var(--ink-dim); margin-top: 10px; }

/* ---------- Members / payment ---------- */
.dd-pay-box {
  margin-top: 24px;
  padding: 26px 30px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.dd-price-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0 20px; }
.dd-price {
  flex: 1 1 140px;
  padding: 14px 16px;
  text-align: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  cursor: pointer;
}
.dd-price b { display: block; font-size: 22px; color: var(--gold-soft); }
.dd-price span { font-size: 13px; color: var(--ink-dim); }
.dd-price.sel { border-color: var(--gold); background: rgba(217, 177, 90, 0.13); }

table.dd-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14.5px; }
table.dd-table th, table.dd-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.dd-table th { color: var(--ink-dim); font-weight: 500; text-transform: uppercase; font-size: 12px; letter-spacing: 0.6px; }

/* ---------- Lineage chain ---------- */
.dd-lineage-box {
  margin: 1.6em 0;
  padding: 34px 24px 30px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(217, 177, 90, 0.07), transparent 60%),
    var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.dd-lineage {
  margin: 0 auto;
  padding: 0;
  list-style: none;
  max-width: 460px;
  text-align: center;
}
.dd-lineage li { padding: 2px 0; }
.dd-lineage li:not(.gap):not(:first-child)::before {
  content: "";
  display: block;
  width: 1px;
  height: 20px;
  margin: 4px auto 8px;
  background: linear-gradient(rgba(217, 177, 90, 0.15), rgba(217, 177, 90, 0.65));
}
.dd-lineage .gap + li::before { display: none !important; }
.dd-lineage .name {
  display: block;
  font-family: Georgia, serif;
  font-size: 17px;
  color: #e8e4da;
  letter-spacing: 0.5px;
}
.dd-lineage .hanzi {
  display: block;
  margin-top: 1px;
  font-family: "Noto Serif SC", "Noto Serif CJK SC", serif;
  font-size: 13px;
  letter-spacing: 5px;
  color: var(--ink-dim);
}
.dd-lineage .gap {
  padding: 8px 0 6px;
  color: rgba(217, 177, 90, 0.5);
  font-size: 15px;
  line-height: 0.85;
}
.dd-lineage .founder .name {
  font-size: 20px;
  font-weight: 600;
  color: var(--gold-soft);
}
.dd-lineage .founder .hanzi { color: rgba(232, 205, 143, 0.75); }
.dd-lineage .now .name { color: var(--gold); font-size: 18px; }
.dd-lineage .role {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ---------- Footer: full-width black bar ---------- */
.site-footer {
  width: 100%;
  margin: 0;
  padding: 30px 24px;
  background: #08090a;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.site-footer .inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--ink-dim);
  font-size: 14px;
}
.site-footer .logo-img { height: 30px; width: auto; opacity: 0.9; }
.site-footer nav { margin-left: auto; display: flex; gap: 16px; }
.site-footer nav a {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #aab0b6;
}
.site-footer nav a:hover { color: #fff; }

/* Readable layouts and clear actions around the original film. */
[hidden] { display: none !important; }
:root { scroll-padding-top: 108px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold-soft); outline-offset: 4px;
}
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; transform: translateY(-180%); padding: 10px 18px; background: var(--gold); color: #171612; }
.skip-link:focus { transform: none; }
.eyebrow { margin: 0 0 14px; font-family: Inter, sans-serif; text-transform: uppercase; font-size: 11px; letter-spacing: 2px; font-weight: 600; color: var(--gold-soft); }
.mobile-book { display: none; }
.dd-film-on .site-nav .nav-cta > a { border: 1px solid rgba(236,220,180,.7); background: rgba(14,17,17,.6); }
.dd-film-on .site-header.past-film { background: rgba(6,7,8,.97); }
.dd-film-intro { position: absolute; left: clamp(32px, 6vw, 110px); top: 28%; width: min(540px, 54vw); z-index: 5; color: #f6f2e8; text-shadow: 0 2px 10px #111; }
.dd-film-intro::before { content: ''; position: absolute; inset: -55px -70px; z-index: -1; background: radial-gradient(ellipse, rgba(5,12,13,.83), rgba(5,12,13,.38) 54%, transparent 73%); pointer-events: none; }
.dd-film-intro h1 { margin: 0 0 18px; font-size: clamp(42px, 4.4vw, 66px); line-height: 1.06; font-weight: 500; }
.dd-film-intro > p:not(.eyebrow) { max-width: 30em; font-size: 17px; line-height: 1.6; margin-bottom: 24px; }
.dd-film-intro .btn { text-shadow: none; }
.dd-intro-note { display: block; margin-top: 14px; max-width: 30em; font-size: 13px; line-height: 1.6; }
.dd-film-overlay.ov-section::before { inset: -28px -34px; background: radial-gradient(ellipse at center, rgba(5,10,12,.76), rgba(5,10,12,.25) 62%, transparent 77%); }
.dd-film-overlay.ov-section.ov-right::before { background: radial-gradient(ellipse at center, rgba(5,10,12,.76), rgba(5,10,12,.25) 62%, transparent 77%); }
.dd-film-overlay.ov-line p, .dd-film-overlay .hero-tag, .dd-endcard-overlay .ec-line { text-shadow: 0 2px 4px #060b0d, 0 3px 20px #060b0d, 0 0 42px rgba(6,11,13,.9); }
.dd-film-skip { color: #eee9dc; font-size: 12px; letter-spacing: 1px; background: rgba(7,12,15,.48); border-radius: 4px; }
.hero-full { gap: 22px; }
.hero-full .hero-logo { height: clamp(110px, 17vh, 155px); }
.hero-full h1 { margin: 0; max-width: 11em; font-size: clamp(36px, 5vw, 62px); line-height: 1.1; text-shadow: 0 2px 18px #111; }
.hero-full .btn-lg { text-transform: none; letter-spacing: .2px; }
.joining-panel { margin-bottom: 28px; scroll-margin-top: 110px; }
.joining-panel h2 { margin-top: 0; font-size: clamp(30px, 3vw, 42px); }
.joining-steps { list-style: none; counter-reset: join; padding: 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin: 32px 0; }
.joining-steps li { counter-increment: join; }
.joining-steps li::before { content: '0' counter(join); color: var(--gold); display: block; font-size: 14px; margin-bottom: 10px; }
.joining-steps strong { display: block; color: #f1ede3; margin-bottom: 8px; }
.joining-steps span { display: block; font-size: 14px; line-height: 1.7; color: #bcc0c4; }
.dd-faq { margin-top: 32px; }
.dd-faq details { padding: 16px 0; border-top: 1px solid var(--line); }
.dd-faq summary { cursor: pointer; color: var(--gold-soft); font-weight: 500; }
.dd-faq details p { margin-bottom: 0; }
.dd-page-invitation { border-top: 1px solid var(--line); margin-top: 38px; padding-top: 12px; }
.dd-class-facts { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; padding: 22px 0; margin: 24px 0; border-block: 1px solid var(--line); }
.dd-class-facts p { margin: 0; font-size: 14px; color: var(--ink-dim); }
.dd-class-facts strong { display: block; color: var(--gold-soft); font-size: 17px; }
.dd-action-page .site-main { max-width: 960px; margin-top: 28px; }
.dd-action-page .page-banner { max-height: 130px; aspect-ratio: auto; object-fit: cover; }
.dd-action-page h1 { font-size: clamp(32px, 4vw, 46px); margin-top: 20px; }
.dd-action-page .panel { padding: 30px 42px 40px; }
.dd-action-page .entry-content > p { max-width: 42em; }
#loginform .login-submit input { appearance: none; background: var(--gold); border: 1px solid var(--gold); color: #1d1a12; border-radius: 8px; padding: 13px 28px; font: inherit; font-weight: 600; cursor: pointer; min-height: 48px; }
#loginform .login-submit input:hover { background: var(--gold-soft); }
.dd-form input:focus-visible, .dd-form select:focus-visible, .dd-form textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.dd-tz-control { max-width: 390px; margin-bottom: 20px; }
.dd-date-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 20px; }
.dd-date-nav button { padding: 8px 14px; font-size: 13px; }
.dd-date-nav span { color: var(--ink-dim); font-size: 12px; }
.dd-days { max-height: none; overflow: visible; padding-right: 0; }
.dd-day { min-height: 56px; }
.dd-slot { min-width: 100px; min-height: 46px; }
.dd-book-grid { grid-template-columns: 1fr 1fr; }
.dd-selection { background: rgba(212,182,120,.08); border-left: 2px solid var(--gold); padding: 16px 20px; margin: 22px 0; color: var(--gold-soft); }
.dd-selection p { margin: 0 0 8px; }
.dd-selection button { padding: 0; border: 0; background: none; color: var(--gold-soft); text-decoration: underline; font: inherit; cursor: pointer; }
.dd-help { font-size: 13px; color: #bcc0c4; line-height: 1.6; }
.dd-book-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.dd-book-actions .btn { font-size: 14px; }
.dd-form .dd-price input { display: inline-block; width: auto; accent-color: var(--gold); margin-right: 6px; }
.dd-price:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; }
.dd-table-wrap { overflow-x: auto; }
@media (max-aspect-ratio: 4/3) and (min-width: 768px) {
  .dd-film-overlay.ov-section, .dd-film-overlay.ov-section.ov-right { left: 7vw; right: auto; top: 52%; width: min(600px, 82vw); }
  .dd-film-intro { width: 80vw; left: 7vw; }
  .dd-film-overlay.ov-line { padding: 0 7vw; }
}
@media (max-height: 700px) and (min-width: 768px) {
  .dd-film-intro { top: 24%; }
  .dd-film-intro h1 { font-size: 42px; }
  .dd-film-overlay.ov-section { top: 35%; }
  .ov-section .ov-head { font-size: 30px; }
  .ov-section .ov-label { margin-bottom: 12px; padding-bottom: 10px; }
}
@media (max-width: 900px) {
  .mobile-book { display: inline-block; margin-left: auto; font-size: 13px; padding: 9px 13px; }
  .nav-toggle { margin-left: 10px; }
  .site-header { padding: 0 18px; }
  .site-nav a { min-height: 44px; }
}
@media (max-width: 700px) {
  .joining-steps { grid-template-columns: 1fr; gap: 22px; }
  .dd-action-page .panel { padding: 22px 20px 30px; }
  .dd-action-page .page-banner { max-height: 85px; }
  .dd-book-grid { grid-template-columns: 1fr; gap: 0; }
  .dd-days { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .dd-day { font-size: 14px; padding: 9px 11px; }
  .dd-class-facts { gap: 18px 12px; }
  .dd-pay-box { padding: 22px 18px; }
  .hero-full { padding: 36px 22px 60px; }
  .hero-full .btn { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .dd-bg-canvas { display: none; }
  .dd-film-viewport::after, .dd-film-hint i, .dd-film-boot img { animation: none; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}

/* The film ends on its cloud view; class information lives on Start here. */
.home #main-content { margin: 0; padding: 0; }
@media (min-width: 901px) and (max-width: 1200px) {
  .site-nav ul { gap: 8px; }
  .site-nav a { font-size: 11px; letter-spacing: 1px; padding-inline: 8px; }
}
