/* ============================================================
   Dreamfinder Solutions — shared layout + dream chrome.
   One dream is chosen per page load (html[data-theme]); the
   logo, business name, and copy are identical in all of them.
   Per-dream skins live in dreams/dream_<name>/dream.css.
   ============================================================ */

:root {
  --df-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

/* The page is locked in place: no scrolling, no overscroll bounce, no
   zoom gestures. Every dream owns the full viewport and the content
   block is auto-scaled by the engine to fit whatever screen loads it. */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  /* every dream is click-drag interactive: dragging must drive the
     dream, never highlight the logo or copy */
  user-select: none;
  -webkit-user-select: none;
  font-family: 'Manrope', sans-serif;
  color: var(--cream-50, #FBFAF6);
  background: radial-gradient(120% 90% at 50% 0%, #1F2D52 0%, #131E3D 45%, #0B1326 100%) #0B1326;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; }

a { color: var(--gold-500, #C9A24B); text-decoration: none; }
a:hover { color: var(--gold-400, #D9BC6E); }

#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

#content {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 12px 58px;
  overflow: hidden;
}

/* single scalable unit: the engine measures this block and shrinks it
   (transform: scale) until it fits the viewport, so the logo and copy
   stay centered with no scrolling on any screen */
#content-scale {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform-origin: 50% 50%;
  will-change: transform;
}

#df-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 22px 24px;
  pointer-events: none;
}

/* ---- shared content styling (reverie's look is the default) ---- */

.df-logo { position: relative; display: inline-block; line-height: 0; will-change: transform; }
.df-logo img {
  width: clamp(150px, 22vw, 230px);
  height: auto;
  display: block;
  filter: drop-shadow(0 0 44px rgba(201,162,75,0.35)) drop-shadow(0 0 90px rgba(52,87,166,0.30));
}

.df-name {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 5.5vw, 4.6rem);
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 40px 0 0;
  color: var(--cream-50, #FBFAF6);
  animation: df-fade-up 0.8s ease-out both;
  text-wrap: balance;
}

.df-sub {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  animation: df-fade-up 0.8s 0.1s ease-out both;
}
.df-rule { display: block; width: 34px; height: 1px; background: rgba(201,162,75,0.6); }
.df-sub-text {
  font-weight: 700;
  font-size: clamp(0.8rem, 1.4vw, 1rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--gold-500, #C9A24B);
  text-transform: uppercase;
}

.df-tagline {
  max-width: 34em;
  margin: 28px auto 0;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.6;
  color: rgba(251,250,246,0.78);
  animation: df-fade-up 0.8s 0.2s ease-out both;
  text-wrap: pretty;
}

.df-soon {
  margin: 44px 0 0;
  font-weight: 700;
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: var(--gold-500, #C9A24B);
  animation: df-fade-up 0.8s 0.3s ease-out both;
}

/* site variants (worker.js) may swap the coming-soon notice for a
   booking link. It wears .df-soon so every dream skins it like the
   notice; this only layers the link affordance on top, in whatever
   color the active dream gave it. A bottom border, not
   text-decoration: dreams that split the label into inline-block
   char spans (binary, havoc, color) would suppress an underline,
   while a border survives any inner markup. */
a.df-book {
  cursor: pointer;
  padding-bottom: 0.3em;
  border-bottom: 1px solid currentColor;
  border-bottom-color: color-mix(in srgb, currentColor 55%, transparent);
  transition: border-color 0.25s;
}
a.df-book:hover { border-bottom-color: currentColor; }

.df-copyright {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: rgba(251,250,246,0.45);
}

@keyframes df-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes df-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---- shared dream chrome: nameplate + change-dream button ---- */

#df-dream-label {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  z-index: 3;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: lowercase;
  color: rgba(251,250,246,0.38);
  pointer-events: none;
  animation: df-fade-in 1.2s 0.4s ease-out both;
}

#df-change-dream {
  margin-top: 30px;
  padding: 10px 26px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: lowercase;
  color: rgba(251,250,246,0.66);
  background: rgba(11,19,38,0.35);
  border: 1px solid rgba(201,162,75,0.35);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, box-shadow 0.25s;
  animation: df-fade-up 0.8s 0.4s ease-out both;
}
#df-change-dream:hover {
  border-color: rgba(201,162,75,0.85);
  color: var(--gold-200, #F1E3C2);
  box-shadow: 0 0 18px rgba(201,162,75,0.25);
}
#df-change-dream:active { transform: scale(0.97); }

/* per-character spans produced by the engine's splitChars();
   .df-word keeps each word atomic so lines only break at spaces */
.df-char { display: inline-block; position: relative; white-space: pre; }
.df-word { display: inline-block; white-space: nowrap; }

/* ---- accessibility ---- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
