/*
Theme Name:   Hypno Archival School Theme
Theme URI:    https://skool.in-sanity.org/
Author:       Hypnosis School Platform
Description:  Minimal, app-first archival WordPress theme designed exclusively for private Skool community members. Removes all marketing sections, hero fluff, and testimonials—routing guests straight to member login and approved members straight into the Script Compendium & 5-Stage Session Studio.
Version:      1.1.0
Requires at least: 6.4
Requires PHP: 8.1
License:      GPLv2 or later
Text Domain:  hypno-archival
*/

:root {
  --hypno-bg: #FAF8F3;
  --hypno-card: #FFFFFF;
  --hypno-border: #E5DFD3;
  --hypno-accent-bg: #F3EEE3;
  --hypno-text: #2C2A29;
  --hypno-muted: #66615C;
  --hypno-accent: #7A2021;
  --hypno-brass: #9A7B3E;

  /* Sync directly with Studio plugin custom properties */
  --hcs-bg: #FAF8F3;
  --hcs-card: #FFFFFF;
  --hcs-border: #E5DFD3;
  --hcs-accent-bg: #F3EEE3;
  --hcs-text: #2C2A29;
  --hcs-muted: #66615C;
  --hcs-accent: #7A2021;
  --hcs-brass: #9A7B3E;
}

html.hypno-dim {
  --hypno-bg: #121110;
  --hypno-card: #1A1816;
  --hypno-border: #2E2B27;
  --hypno-accent-bg: #24211D;
  --hypno-text: #EAE4D7;
  --hypno-muted: #A0978A;
  --hypno-accent: #C85A53;
  --hypno-brass: #C5A467;

  --hcs-bg: #121110;
  --hcs-card: #1A1816;
  --hcs-border: #2E2B27;
  --hcs-accent-bg: #24211D;
  --hcs-text: #EAE4D7;
  --hcs-muted: #A0978A;
  --hcs-accent: #C85A53;
  --hcs-brass: #C5A467;
}

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

/* Custom Archival Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d0c7b7; border-radius: 4px; }
html.hypno-dim ::-webkit-scrollbar-thumb { background: #3e3a34; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--hypno-bg);
  color: var(--hypno-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a { color: var(--hypno-accent); }

/* ==================== SLIM MEMBER UTILITY BAR ==================== */
.hat-topbar {
  background: var(--hypno-card);
  border-bottom: 1px solid var(--hypno-border);
  position: sticky;
  top: 0;
  z-index: 120;
}

.hat-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.45rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.hat-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--hypno-text);
}

.hat-monogram-sm {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: var(--hypno-accent);
  color: #FFFFFF;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.hat-brand-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--hypno-accent);
  letter-spacing: -0.01em;
}

.hat-private-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.14rem 0.5rem;
  border-radius: 4px;
  background: var(--hypno-accent-bg);
  color: var(--hypno-brass);
  border: 1px solid var(--hypno-border);
}

.hat-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.hat-nav a,
.hat-dim-btn {
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.32rem 0.65rem;
  border-radius: 6px;
  color: var(--hypno-muted);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.hat-nav a:hover,
.hat-dim-btn:hover {
  background: var(--hypno-accent-bg);
  color: var(--hypno-text);
}

.hat-nav a.hat-nav-active {
  color: var(--hypno-accent);
  background: var(--hypno-accent-bg);
  border-color: var(--hypno-border);
}

.hat-dim-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  border-color: var(--hypno-border);
  color: var(--hypno-brass);
}

/* ==================== MAIN WORKSPACE & AUTH PORTAL ==================== */
.hat-main {
  flex: 1;
  width: 100%;
}

.hat-app-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1rem 3rem 1rem;
}

.hat-portal-center {
  min-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.hat-portal-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.hat-portal-monogram {
  width: 54px;
  height: 54px;
  border-radius: 9999px;
  background: var(--hypno-accent);
  color: #FFFFFF;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  box-shadow: 0 6px 18px rgba(122, 32, 33, 0.22);
}

.hat-portal-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 0.2rem 0;
  color: var(--hypno-accent);
}

.hat-portal-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--hypno-muted);
  margin: 0;
}

.hat-portal-center .hmg-card {
  width: 100%;
  margin-top: 1.25rem;
}

.hat-page-wrap {
  max-width: 880px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

.hat-page-card {
  background: var(--hypno-card);
  border: 1px solid var(--hypno-border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.hat-page-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--hypno-accent);
}

/* ==================== COMPENDIUM STUDIO VISUAL POLISH ==================== */
/* Matches the exact archival reference app styling cleanly */
#hcs-studio-app.hcs-app {
  max-width: 1280px;
  padding: 0;
}

#hcs-studio-app .hcs-header {
  border-radius: 12px;
  padding: 0.9rem 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

#hcs-studio-app .hcs-monogram {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  font-size: 1.7rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
}

#hcs-studio-app .hcs-title {
  color: var(--hypno-accent);
  font-size: 1.55rem;
  letter-spacing: -0.01em;
}

#hcs-studio-app .hcs-pill {
  color: var(--hypno-brass);
  border-radius: 5px;
  font-weight: 600;
}

#hcs-studio-app .hcs-lineage {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
}

#hcs-studio-app .hcs-tabs {
  background: var(--hypno-card);
  border: 1px solid var(--hypno-border);
  border-radius: 10px;
  padding: 0 0.75rem;
  margin: 0.9rem 0 1.25rem 0;
}

#hcs-studio-app .hcs-tab {
  padding: 0.7rem 0.95rem;
  font-size: 0.84rem;
}

#hcs-studio-app .hcs-card {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

#hcs-studio-app .hcs-card:hover {
  border-color: var(--hypno-brass);
}

#hcs-studio-app .hcs-cue {
  border-radius: 4px;
}

#hcs-studio-app .cue-highlighted .hcs-cue {
  background: rgba(154, 123, 62, 0.15);
  color: #7A2021;
  border: 1px solid rgba(154, 123, 62, 0.3);
}

html.hypno-dim #hcs-studio-app .cue-highlighted .hcs-cue {
  background: rgba(197, 164, 103, 0.18);
  color: #EAE4D7;
  border-color: rgba(197, 164, 103, 0.35);
}

#hcs-studio-app .hcs-emphasis {
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.015em;
  text-decoration: underline;
  text-decoration-color: rgba(122, 32, 33, 0.45);
  text-underline-offset: 3px;
  color: inherit;
}

html.hypno-dim #hcs-studio-app .hcs-emphasis {
  text-decoration-color: rgba(200, 90, 83, 0.55);
}

/* Hide duplicate Dim Room button inside studio header since top bar has it */
#hcs-studio-app #hcs-dim-btn {
  display: none;
}

/* ==================== MINIMAL FOOTER ==================== */
.hat-footer {
  border-top: 1px solid var(--hypno-border);
  background: var(--hypno-card);
  padding: 0.85rem 1.25rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--hypno-muted);
  font-family: 'JetBrains Mono', monospace;
}

@media print {
  .hat-topbar, .hat-footer { display: none !important; }
}
