/* ==========================================================================
   ALMOST — THE EDITORIAL DESIGN SYSTEM
   Field Guide to Relationships That Don't Land
   Obsidian Literary Editorial Palette
   ========================================================================== */

:root {
  --almost-bg: #030504;
  --almost-bg-alt: #070908;
  --almost-card-bg: rgba(14, 16, 15, 0.75);
  --almost-card-bg-hover: rgba(22, 25, 23, 0.9);
  --almost-panel-line: rgba(240, 232, 201, 0.08);
  --almost-panel-line-hover: rgba(240, 232, 201, 0.22);
  --almost-accent: #FD0009;
  --almost-accent-hover: #D60008;
  --almost-accent-rgb: 253, 0, 9;
  --almost-accent-line: rgba(253, 0, 9, 0.4);
  --almost-cream: #F0E8C9;
  --almost-cream-90: rgba(240, 232, 201, 0.9);
  --almost-cream-70: rgba(240, 232, 201, 0.7);
  --almost-cream-55: rgba(240, 232, 201, 0.55);
  --almost-cream-30: rgba(240, 232, 201, 0.3);
  --almost-telemetry-green: #2AA87E;

  --almost-font-display: 'Playfair Display', Georgia, serif;
  --almost-font-body: 'Inter', system-ui, sans-serif;
  --almost-font-mono: 'Space Mono', monospace;

  --almost-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Base resets & layout */
body.almost-editorial {
  background-color: var(--almost-bg);
  color: var(--almost-cream);
  font-family: var(--almost-font-body);
  line-height: 1.65;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.almost-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

/* Atmospheric Gradients */
.almost-glow-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100vw, 1200px);
  height: 600px;
  background: radial-gradient(circle at 50% 0%, rgba(253, 0, 9, 0.08) 0%, rgba(3, 5, 4, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Telemetry & Micro-Stamps */
.almost-telemetry {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--almost-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--almost-cream-55);
  margin-bottom: 14px;
}

.almost-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--almost-accent);
  box-shadow: 0 0 10px var(--almost-accent);
  display: inline-block;
  animation: almostPulse 2.4s infinite;
}

.almost-live-dot.is-green {
  background: var(--almost-telemetry-green);
  box-shadow: 0 0 10px var(--almost-telemetry-green);
}

@keyframes almostPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Section Headings */
.almost-section {
  position: relative;
  z-index: 1;
  padding: clamp(60px, 8vw, 100px) 0;
  border-bottom: 1px solid var(--almost-panel-line);
}

.almost-section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(40px, 6vw, 64px);
}

.almost-section-head__title {
  font-family: var(--almost-font-display);
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 500;
  color: var(--almost-cream);
  margin: 12px 0 16px;
  line-height: 1.1;
}

.almost-section-head__title em {
  font-style: italic;
  color: var(--almost-accent);
}

.almost-section-head__dek {
  font-size: 16px;
  line-height: 1.7;
  color: var(--almost-cream-70);
  margin: 0 auto;
}

/* ==========================================================================
   HERO: MONOLITH BOOK BEZEL & INTAKE CHAMBER
   ========================================================================== */

.almost-hero {
  position: relative;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  padding: clamp(100px, 12vw, 130px) 0 clamp(60px, 8vw, 90px);
  border-bottom: 1px solid var(--almost-panel-line);
}

.almost-hero__grid {
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

/* Left: Book Chassis */
.almost-book-bezel {
  position: relative;
  background: var(--almost-card-bg);
  border: 1px solid var(--almost-panel-line);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.9), 0 0 50px rgba(0, 0, 0, 0.6);
  transition: border-color 0.4s var(--almost-ease);
}

.almost-book-bezel:hover {
  border-color: var(--almost-panel-line-hover);
}

/* Precision Corner Reticles */
.almost-reticle {
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
}
.almost-reticle--tl { top: -1px; left: -1px; border-top: 2px solid var(--almost-cream); border-left: 2px solid var(--almost-cream); }
.almost-reticle--tr { top: -1px; right: -1px; border-top: 2px solid var(--almost-cream); border-right: 2px solid var(--almost-cream); }
.almost-reticle--bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--almost-cream); border-left: 2px solid var(--almost-cream); }
.almost-reticle--br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--almost-cream); border-right: 2px solid var(--almost-cream); }

.almost-bezel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--almost-font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--almost-accent);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--almost-panel-line);
}

.almost-bezel__header span:last-child {
  color: var(--almost-cream-55);
}

.almost-bezel__screen {
  position: relative;
  aspect-ratio: 800 / 1277;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(240, 232, 201, 0.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

.almost-bezel__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--almost-ease);
}

.almost-book-bezel:hover .almost-bezel__screen img {
  transform: scale(1.02);
}

.almost-bezel__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--almost-font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--almost-cream-55);
  padding-top: 10px;
  margin-top: 14px;
  border-top: 1px solid var(--almost-panel-line);
}

.almost-bezel__footer span:last-child {
  color: var(--almost-telemetry-green);
}

/* Quote pill below cover */
.almost-cover-acclaim {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(240, 232, 201, 0.03);
  border: 1px solid var(--almost-panel-line);
  font-size: 13px;
  line-height: 1.5;
  color: var(--almost-cream-70);
  font-style: italic;
  text-align: center;
}

.almost-cover-acclaim cite {
  display: block;
  margin-top: 4px;
  font-family: var(--almost-font-mono);
  font-size: 9.5px;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--almost-cream-55);
}

/* Right: Hero Content & Intake Chamber */
.almost-hero__content {
  display: flex;
  flex-direction: column;
}

.almost-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--almost-font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--almost-accent);
  margin-bottom: 12px;
}

.almost-hero__eyebrow .dash {
  width: 24px;
  height: 1px;
  background: var(--almost-accent);
}

.almost-hero__title {
  font-family: var(--almost-font-display);
  font-size: clamp(2.4rem, 4.4vw, 3.8rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--almost-cream);
  margin: 0 0 16px 0;
  letter-spacing: -0.01em;
}

.almost-hero__title em {
  display: block;
  font-style: italic;
  font-size: 0.6em;
  font-weight: 400;
  color: var(--almost-accent);
  letter-spacing: normal;
  margin-top: 6px;
  line-height: 1.25;
}

.almost-hero__dek {
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.7;
  color: var(--almost-cream-70);
  margin: 0 0 24px 0;
  max-width: 58ch;
}

/* Vitals Badges */
.almost-hero__vitals {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 14px;
  margin-bottom: 28px;
  justify-content: start;
}

.almost-vital-item {
  padding: 10px 16px;
  background: rgba(240, 232, 201, 0.03);
  border: 1px solid var(--almost-panel-line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.almost-vital-item__val {
  font-family: var(--almost-font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--almost-cream);
  letter-spacing: 0.06em;
}

.almost-vital-item__label {
  font-family: var(--almost-font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--almost-cream-55);
}

/* Intake Card Form Chamber */
.almost-intake-card {
  background: rgba(14, 16, 15, 0.85);
  border: 1px solid var(--almost-panel-line);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
  max-width: 560px;
}

.almost-intake-card__title {
  font-family: var(--almost-font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--almost-accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.almost-form-row {
  display: flex;
  gap: 8px;
}

.almost-input {
  flex: 1;
  background: #010300;
  border: 1px solid var(--almost-panel-line);
  color: var(--almost-cream);
  font-family: var(--almost-font-body);
  font-size: 14px;
  padding: 13px 16px;
  border-radius: 2px;
  outline: none;
  transition: all 0.25s var(--almost-ease);
}

.almost-input:focus {
  border-color: var(--almost-accent);
  box-shadow: 0 0 15px rgba(var(--almost-accent-rgb), 0.25);
}

.almost-input::placeholder {
  color: var(--almost-cream-30);
}

.almost-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  background: var(--almost-accent);
  color: #FFF;
  border: 1px solid var(--almost-accent);
  border-radius: 2px;
  font-family: var(--almost-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s var(--almost-ease);
}

.almost-submit-btn:hover {
  background: var(--almost-accent-hover);
  border-color: var(--almost-accent-hover);
  box-shadow: 0 0 25px rgba(var(--almost-accent-rgb), 0.45);
  transform: translateY(-1px);
}

.almost-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.almost-intake-note {
  font-size: 11.5px;
  color: var(--almost-cream-55);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.almost-form-status {
  margin-top: 12px;
  font-size: 13px;
  display: none;
}

.almost-form-status.visible {
  display: block;
}

.almost-form-status.error {
  color: #FF5A5F;
  font-family: var(--almost-font-mono);
  font-size: 11px;
}

.almost-form-status.success {
  color: var(--almost-telemetry-green);
  background: rgba(42, 168, 126, 0.1);
  border: 1px solid rgba(42, 168, 126, 0.3);
  padding: 14px 18px;
}

.almost-form-status.success p {
  margin: 0;
  font-weight: 500;
}

/* ==========================================================================
   TAXONOMY: THE 3-PART RELATIONAL ARCHITECTURE
   ========================================================================== */

.almost-taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.almost-phase-card {
  position: relative;
  background: var(--almost-card-bg);
  border: 1px solid var(--almost-panel-line);
  padding: clamp(24px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  transition: all 0.3s var(--almost-ease);
}

.almost-phase-card:hover {
  border-color: var(--almost-panel-line-hover);
  background: var(--almost-card-bg-hover);
  transform: translateY(-2px);
}

.almost-phase-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--almost-panel-line);
}

.almost-phase-tag {
  font-family: var(--almost-font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--almost-accent);
  font-weight: 700;
}

.almost-phase-count {
  font-family: var(--almost-font-mono);
  font-size: 9.5px;
  color: var(--almost-cream-55);
}

.almost-phase-title {
  font-family: var(--almost-font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--almost-cream);
  margin: 0 0 10px;
}

.almost-phase-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--almost-cream-70);
  margin: 0 0 20px;
  min-height: 66px;
}

.almost-phase-chapters {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--almost-panel-line);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.almost-phase-chapters li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  color: var(--almost-cream-90);
}

.almost-phase-chapters .ch-num {
  font-family: var(--almost-font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--almost-cream-55);
  flex-shrink: 0;
}

/* ==========================================================================
   FORENSIC EXCERPT CHAMBER
   ========================================================================== */

.almost-excerpt-wrap {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  background: radial-gradient(ellipse at 50% 50%, rgba(20, 22, 20, 0.6) 0%, rgba(3, 5, 4, 0.9) 100%);
  border: 1px solid var(--almost-panel-line);
  padding: clamp(32px, 5vw, 60px);
}

.almost-quote-mark {
  font-family: var(--almost-font-display);
  font-size: 80px;
  line-height: 1;
  color: var(--almost-accent);
  opacity: 0.35;
  margin-bottom: -30px;
}

.almost-excerpt-body {
  font-family: var(--almost-font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-style: italic;
  line-height: 1.55;
  color: var(--almost-cream);
  margin: 0 0 24px 0;
}

.almost-excerpt-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--almost-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--almost-cream-55);
  border-top: 1px solid var(--almost-panel-line);
  padding-top: 14px;
}

.almost-excerpt-foot cite {
  font-style: normal;
  color: var(--almost-accent);
}

/* ==========================================================================
   AUDIO COMPANION BRIDGE: THE PODCAST CONNECTION
   ========================================================================== */

.almost-podcast-bridge {
  background: rgba(10, 12, 11, 0.6);
  border: 1px solid var(--almost-panel-line);
  padding: clamp(30px, 4vw, 44px);
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(24px, 4vw, 40px);
  align-items: center;
}

.almost-pod-art {
  width: 96px;
  height: 96px;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--almost-accent-line);
  flex-shrink: 0;
}

.almost-pod-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.almost-pod-info h3 {
  font-family: var(--almost-font-display);
  font-size: 22px;
  color: var(--almost-cream);
  margin: 0 0 6px;
}

.almost-pod-info p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--almost-cream-70);
  margin: 0 0 14px;
  max-width: 55ch;
}

.almost-pod-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.almost-pod-wave {
  width: 3px;
  background: rgba(240, 232, 201, 0.25);
  height: 40%;
  animation: almostWave 1.4s infinite ease-in-out alternate;
}

.almost-pod-wave.is-accent { background: var(--almost-accent); }
.almost-pod-wave:nth-child(2n) { animation-delay: 0.2s; }
.almost-pod-wave:nth-child(3n) { animation-delay: 0.4s; }

@keyframes almostWave {
  0% { height: 20%; }
  50% { height: 90%; }
  100% { height: 30%; }
}

.almost-pod-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.almost-pod-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--almost-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--almost-cream);
  background: rgba(240, 232, 201, 0.04);
  border: 1px solid var(--almost-panel-line);
  text-decoration: none;
  transition: all 0.25s var(--almost-ease);
}

.almost-pod-btn:hover {
  background: var(--almost-accent);
  border-color: var(--almost-accent);
  color: #FFF;
}

.almost-pod-btn--primary {
  background: var(--almost-accent);
  border-color: var(--almost-accent);
  color: #FFF;
}

/* ==========================================================================
   READER ACCLAIM DOSSIER
   ========================================================================== */

.almost-acclaim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1040px;
  margin: 0 auto;
}

.almost-acclaim-card {
  position: relative;
  background: var(--almost-card-bg);
  border: 1px solid var(--almost-panel-line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.almost-acclaim-card p {
  font-family: var(--almost-font-display);
  font-size: 17px;
  line-height: 1.55;
  color: var(--almost-cream-90);
  font-style: italic;
  margin: 0 0 16px;
}

.almost-acclaim-card cite {
  font-family: var(--almost-font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--almost-cream-55);
  font-style: normal;
}

/* ==========================================================================
   AUTHOR DOSSIER
   ========================================================================== */

.almost-author-deck {
  max-width: 840px;
  margin: 0 auto;
  background: rgba(10, 11, 13, 0.7);
  border: 1px solid var(--almost-panel-line);
  padding: clamp(24px, 4vw, 40px);
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: clamp(20px, 3vw, 36px);
  align-items: center;
}

.almost-author-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--almost-accent-line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.almost-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.almost-author-info h3 {
  font-family: var(--almost-font-display);
  font-size: 24px;
  color: var(--almost-cream);
  margin: 0 0 4px;
}

.almost-author-info .role {
  font-family: var(--almost-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--almost-accent);
  margin-bottom: 10px;
}

.almost-author-info p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--almost-cream-70);
  margin: 0 0 14px;
}

.almost-author-link {
  font-family: var(--almost-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--almost-cream);
  text-decoration: underline;
}

.almost-author-link:hover {
  color: var(--almost-accent);
}

/* ==========================================================================
   CLOSING INTAKE MONOLITH
   ========================================================================== */

.almost-closing-deck {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.almost-closing-deck .almost-hero__title {
  margin-bottom: 12px;
}

.almost-closing-deck .almost-intake-card {
  margin: 28px auto 0;
}

/* ==========================================================================
   RESPONSIVE RULES
   ========================================================================== */

@media (max-width: 960px) {
  .almost-hero__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .almost-book-bezel {
    max-width: 340px;
    margin: 0 auto;
  }

  .almost-hero__content {
    text-align: center;
    align-items: center;
  }

  .almost-hero__vitals {
    justify-content: center;
  }

  .almost-intake-card {
    margin: 0 auto;
    width: 100%;
  }

  .almost-taxonomy-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .almost-phase-desc {
    min-height: auto;
  }

  .almost-podcast-bridge {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .almost-pod-art {
    margin: 0 auto;
  }

  .almost-pod-waveform {
    justify-content: center;
  }

  .almost-pod-actions {
    flex-direction: row;
    justify-content: center;
    width: 100%;
  }

  .almost-acclaim-grid {
    grid-template-columns: 1fr;
  }

  .almost-author-deck {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .almost-author-avatar {
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .almost-container {
    padding: 0 16px;
  }

  .almost-form-row {
    flex-direction: column;
    gap: 10px;
  }

  .almost-submit-btn {
    width: 100%;
  }

  .almost-hero__vitals {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }

  .almost-pod-actions {
    flex-direction: column;
  }
}
