/* ─────────────────────────────────────────────────────────────────────────
   Doctura — atmosphere & shared utilities
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* CSS custom properties — mirror theme.json palette */
  --ink:       #050505;
  --char:      #0d0e0a;
  --char-2:    #14150f;
  --graph:     #1a1b14;
  --line:      #2a2c22;
  --line-soft: #3a3d2e;
  --bone:      #e8e0cf;
  --bone-2:    #c9c1ad;
  --bone-dim:  #8e8978;
  --mute:      #6f6b5d;
  --green:     #39FF14;
  --green-glow:#6cff4d;
  --green-mute:#1FAE3A;
  --olive:     #6f7a3a;
  --crimson:   #7a1118;
  --violet:    #2a1733;
  --gold:      #A58A47;
  --gold-deep: #5e4e28;

  --accent: var(--green);

  --display: "Pirata One", "Cinzel", serif;
  --ritual:  "Cinzel", "Trajan Pro", serif;
  --serif:   "Cormorant Garamond", "EB Garamond", serif;
  --body:    "Inter", -apple-system, "Helvetica Neue", sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  --mand-speed: 120s;

  /* Texture URLs */
  --tex-mandala: url("../textures/mandala.svg");
  --tex-eye:     url("../textures/eye.svg");
  --tex-scales:  url("../textures/scales.svg");
  --tex-grain:   url("../textures/grain.svg");
  --tex-paper:   url("../textures/paper.svg");
}

/* Body atmosphere */
body {
  background:
    radial-gradient(900px 700px at 8% 22%, rgba(42,23,51,0.35), transparent 60%),
    radial-gradient(800px 600px at 95% 40%, rgba(122,17,24,0.18), transparent 60%),
    radial-gradient(1200px 900px at 50% 0%, rgba(31,174,58,0.16), transparent 65%),
    var(--ink);
}
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
body::before {
  background-image: var(--tex-paper);
  background-size: 600px;
  opacity: 0.45;
  mix-blend-mode: overlay;
}
body::after {
  background-image: var(--tex-grain);
  background-size: 240px;
  opacity: 0.4;
  mix-blend-mode: overlay;
}

/* Texture utility classes */
.dct-scales,
.dct-scales-edge,
.dct-scales-dense,
.dct-scales-sparse {
  position: absolute;
  inset: 0;
  background-image: var(--tex-scales);
  background-size: 240px;
  opacity: 0.28;
  mix-blend-mode: screen;
  pointer-events: none;
}
.dct-scales-edge {
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 30%, #000 80%);
          mask-image: radial-gradient(ellipse at center, transparent 30%, #000 80%);
  opacity: 0.5;
}
.dct-scales-dense  { background-size: 160px; opacity: 0.36; }
.dct-scales-sparse { background-size: 340px; opacity: 0.18; }

.dct-grain {
  position: absolute; inset: 0;
  background-image: var(--tex-grain);
  background-size: 240px;
  opacity: 0.5;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.dct-paper {
  position: absolute; inset: 0;
  background-image: var(--tex-paper);
  background-size: 600px;
  opacity: 0.5;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.dct-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.55) 75%, rgba(0,0,0,0.85) 100%);
  pointer-events: none;
}

/* Mandala */
.dct-mandala {
  position: absolute;
  background-image: var(--tex-mandala);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.35;
  filter: drop-shadow(0 0 30px rgba(57,255,20,0.25));
  animation: dct-mandala-rot var(--mand-speed) linear infinite;
}
.dct-mandala--reverse { animation-direction: reverse; }
@keyframes dct-mandala-rot {
  to { transform: rotate(360deg); }
}

/* Eye motif */
.dct-eye {
  width: 120px; height: 80px;
  background-image: var(--tex-eye);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 0 12px rgba(57,255,20,0.45));
  animation: dct-eye-pulse 4.5s ease-in-out infinite;
}
@keyframes dct-eye-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.06); }
}

/* Gold divider */
.dct-edge {
  position: absolute; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold-deep) 25%, var(--gold) 50%, var(--gold-deep) 75%, transparent 100%);
  opacity: 0.45;
  pointer-events: none;
}
.dct-edge--top { top: 0; }
.dct-edge--bot { bottom: 0; }

/* ─── Headings ─────────────────────────────────────────────────────────── */
.dct-wordmark {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 0.85;
  color: var(--green);
  filter:
    drop-shadow(0 0 12px rgba(57,255,20,0.7))
    drop-shadow(0 0 32px rgba(57,255,20,0.35))
    drop-shadow(0 0 64px rgba(57,255,20,0.18));
}
.dct-wordmark--subtle  { filter: drop-shadow(0 0 8px rgba(57,255,20,0.4)); }
.dct-wordmark--intense {
  filter:
    drop-shadow(0 0 20px rgba(57,255,20,0.85))
    drop-shadow(0 0 50px rgba(57,255,20,0.5))
    drop-shadow(0 0 100px rgba(57,255,20,0.3));
}

.dct-ritual {
  font-family: var(--ritual);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dct-mono { font-family: var(--mono); }

.dct-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--bone-dim);
  display: inline-flex; align-items: center; gap: 12px;
}
.dct-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: dct-pulse 2.6s ease-in-out infinite;
}
@keyframes dct-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.85); }
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.wp-block-button .wp-block-button__link.dct-btn-ghost {
  background: transparent !important;
  color: var(--bone) !important;
  border: 1px solid var(--line-soft) !important;
}
.wp-block-button .wp-block-button__link.dct-btn-ghost:hover {
  border-color: var(--green) !important;
  color: var(--green) !important;
  box-shadow: inset 0 0 0 1px var(--green), 0 0 22px rgba(57,255,20,0.25);
}
.wp-block-button .wp-block-button__link.dct-btn-gold {
  background: transparent !important;
  color: var(--gold) !important;
  border: 1px solid var(--gold-deep) !important;
}
.wp-block-button .wp-block-button__link.dct-btn-gold:hover {
  border-color: var(--gold) !important;
  color: var(--bone) !important;
  background: rgba(165,138,71,0.08) !important;
}
.wp-block-button .wp-block-button__link {
  border-radius: 0 !important;
  transition: all 220ms ease;
}
.wp-block-button .wp-block-button__link:hover {
  box-shadow: 0 0 28px rgba(57,255,20,0.55);
  transform: translateY(-1px);
}

/* ─── Marquee ──────────────────────────────────────────────────────────── */
@keyframes dct-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.dct-marquee {
  display: flex; gap: 32px; white-space: nowrap;
  animation: dct-marquee 60s linear infinite;
  font-family: var(--ritual);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--bone-dim);
}

/* ─── Reveal-on-scroll ──────────────────────────────────────────────────── */
.dct-reveal { opacity: 1; transform: none; }
body.dct-reveal-armed .dct-reveal {
  opacity: 0;
  transform: translateY(28px);
}
body.dct-reveal-armed .dct-reveal.is-in {
  animation: dct-reveal-in 800ms cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes dct-reveal-in { to { opacity: 1; transform: translateY(0); } }

/* ─── Nav ───────────────────────────────────────────────────────────────── */
.dct-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  transition: background 300ms ease, backdrop-filter 300ms ease;
}

/* Push nav below WP admin bar when logged in */
.admin-bar .dct-nav { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .dct-nav { top: 46px; }
}

/* Hide nav logo until background appears (is-solid) */
.dct-nav .wp-block-site-logo {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 350ms ease, transform 350ms ease;
  pointer-events: none;
}
.dct-nav.is-solid .wp-block-site-logo {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dct-nav.is-solid {
  background: rgba(5,5,5,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.dct-nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0; padding: 0;
}
.dct-nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bone-dim);
  text-decoration: none;
  transition: color 200ms ease;
}
.dct-nav-links a:hover { color: var(--green); }
.dct-nav-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line-soft);
  color: var(--bone);
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
@media (max-width: 768px) {
  .dct-nav-links { display: none; }
  .dct-nav-menu-btn { display: block; }
}

/* ─── Mobile menu overlay ───────────────────────────────────────────────── */
.dct-mob-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5,5,5,0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.dct-mob-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}
.dct-mob-menu a {
  font-family: var(--ritual);
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone);
  text-decoration: none;
  transition: color 200ms ease;
}
.dct-mob-menu a:hover { color: var(--green); }
.dct-mob-close {
  position: absolute;
  top: 24px; right: clamp(20px, 4vw, 56px);
  background: none;
  border: none;
  color: var(--bone-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ─── Flyer modal ───────────────────────────────────────────────────────── */
.dct-flyer-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.dct-flyer-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.dct-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,5,5,0.88);
}
.dct-modal-inner {
  position: relative;
  z-index: 1;
  max-width: 520px;
  width: 90%;
}
.dct-modal-close {
  position: absolute;
  top: -36px; right: 0;
  background: none;
  border: none;
  color: var(--bone-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ─── Audio player rows ─────────────────────────────────────────────────── */
.dct-track-row {
  display: grid;
  grid-template-columns: 2rem 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.dct-track-row:last-child { border-bottom: none; }
.dct-track-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--bone-dim);
  letter-spacing: 0.2em;
}
.dct-track-title {
  font-family: var(--ritual);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone);
}
.dct-track-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--green-mute);
  text-transform: uppercase;
}
.dct-track-len {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--bone-dim);
}
audio {
  width: 100%;
  margin-top: 6px;
  accent-color: var(--green);
}

/* ─── Gallery / Visual Specimens ────────────────────────────────────────── */
.dct-gallery-wrap { position: relative; }
.dct-filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.dct-filter-btn {
  background: transparent;
  border: 1px solid var(--line-soft);
  color: var(--bone-dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 200ms ease;
}
.dct-filter-btn:hover,
.dct-filter-btn.is-active {
  border-color: var(--green);
  color: var(--green);
}

/* ─── Section common ────────────────────────────────────────────────────── */
.dct-section {
  position: relative;
  padding: clamp(80px, 10vw, 140px) clamp(20px, 4vw, 56px);
}

/* ─── Mobile hero: stack photo above content ──────────────────────────── */
@media (max-width: 768px) {
  .dct-hero {
    min-height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    padding-top: 0 !important;
  }

  .dct-hero > .wp-block-cover__image-background {
    position: relative !important;
    height: auto !important;
    width: 100% !important;
    object-fit: contain !important;
  }

  .dct-hero > .wp-block-cover__inner-container {
    padding-top: 20px;
    margin-top: -80px;
  }
}

/* ─── Reduced motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .dct-mandala,
  .dct-eye,
  .dct-marquee,
  body.dct-reveal-armed .dct-reveal { animation: none !important; }
  body.dct-reveal-armed .dct-reveal { opacity: 1 !important; transform: none !important; }
}

/* ─── Focus ─────────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* ─── Selection ─────────────────────────────────────────────────────────── */
::selection { background: rgba(57,255,20,0.4); color: var(--ink); }
