/* =============================================================
   stories.css — Naked Introspection
   Page-specific styles for stories.php only.
   All global styles live in styles.css.
   This file extends styles.css — never duplicates it.
   ============================================================= */


/* -------------------------------------------------------------
   STORIES HERO
   Mirrors .episodes-hero from styles.css with same dark
   gradient pattern and Playfair Display title treatment.
   ------------------------------------------------------------- */

.stories-hero {
  background: var(--black);
  color: var(--white);
  padding: 90px 0 60px;
  position: relative;
  overflow: hidden;
}

.stories-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 650px at 18% 22%, rgba(214,179,94,.16), transparent 55%),
    linear-gradient(to bottom, rgba(0,0,0,.10), rgba(0,0,0,.72));
  pointer-events: none;
}

.stories-hero-inner {
  position: relative;
  z-index: 1;
}

.stories-hero-title {
  margin: 10px 0 10px;
  font-family: "Playfair Display", serif;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.05;
}

.stories-hero-title span {
  color: var(--gold);
}

.stories-hero-sub {
  margin: 0 0 18px;
  color: rgba(255,255,255,.82);
  max-width: 52ch;
  font-size: 15px;
}


/* -------------------------------------------------------------
   FORM CARD
   White card container matching .about-card / .contact-item
   sizing pattern from styles.css.
   ------------------------------------------------------------- */

.stories-form-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border: var(--border-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 40px;
}


/* -------------------------------------------------------------
   MODE TOGGLE
   Two-button pill toggle — type vs voice.
   Shares visual language with .chip from styles.css.
   ------------------------------------------------------------- */

.ni-toggle {
  display: flex;
  border: 1px solid rgba(10,10,10,.10);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}

.ni-toggle-btn {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}

.ni-toggle-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #151515;
  border-radius: 999px;
}


/* -------------------------------------------------------------
   CATEGORY PILLS
   Mirrors .chip from styles.css exactly.
   ------------------------------------------------------------- */

.ni-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.ni-cat {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(10,10,10,.10);
  background: rgba(0,0,0,.02);
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}

.ni-cat:hover { background: rgba(214,179,94,.10); }

.ni-cat.active {
  border-color: rgba(214,179,94,.55);
  background: rgba(214,179,94,.18);
  color: #151515;
}


/* -------------------------------------------------------------
   TEXTAREA
   Matches .input / .textarea pattern from styles.css.
   ------------------------------------------------------------- */

.ni-textarea {
  width: 100%;
  background: var(--off);
  border: 1px solid rgba(10,10,10,.10);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 16px;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
  min-height: 190px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.ni-textarea:focus {
  border-color: rgba(214,179,94,.55);
  box-shadow: 0 0 0 4px rgba(214,179,94,.12);
}

.ni-textarea::placeholder { color: var(--muted); }

.ni-char {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  margin: 6px 0 22px;
}


/* -------------------------------------------------------------
   SECTION VISIBILITY TOGGLE
   Used by JS to show/hide text vs voice sections.
   ------------------------------------------------------------- */

.ni-section         { display: none; }
.ni-section.visible { display: block; }


/* -------------------------------------------------------------
   VOICE RECORDER
   Dark card matching the hero section background.
   ------------------------------------------------------------- */

.ni-recorder {
  background: var(--black);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  margin-bottom: 18px;
  color: var(--white);
}

.ni-rec-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: none;
  background: #c0392b;
  font-size: 1.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s;
}

.ni-rec-btn:hover { transform: scale(1.06); }

.ni-rec-btn.recording {
  background: #e74c3c;
  animation: ni-pulse 1s infinite;
}

@keyframes ni-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(231,76,60,.45); }
  50%      { box-shadow: 0 0 0 14px rgba(231,76,60,0); }
}

.ni-rec-timer {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin: 10px 0 4px;
  color: var(--white);
}

.ni-rec-status {
  font-size: 13px;
  color: rgba(255,255,255,.6);
}

.ni-rec-limit {
  font-size: 11px;
  color: rgba(255,255,255,.35);
  margin-top: 6px;
  letter-spacing: .08em;
  text-transform: uppercase;
}


/* -------------------------------------------------------------
   PLAYBACK / VOICE PREVIEW PANEL
   Light card shown after recording completes.
   ------------------------------------------------------------- */

.ni-playback {
  display: none;
  background: var(--off);
  border: var(--border-dark);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.ni-playback.visible { display: block; }

.ni-voice-lbl {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Voice effect pills — same pattern as .ni-cat */
.ni-voices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ni-voice {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(10,10,10,.10);
  background: rgba(0,0,0,.02);
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}

.ni-voice:hover { background: rgba(214,179,94,.10); }

.ni-voice.active {
  border-color: rgba(214,179,94,.55);
  background: rgba(214,179,94,.18);
  color: #151515;
}

/* Playback controls row */
.ni-pb-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.ni-play-btn {
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(10,10,10,.12);
  background: var(--white);
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  transition: all .2s;
}

.ni-play-btn:disabled { opacity: .5; cursor: not-allowed; }

.ni-discard-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(192,57,43,.4);
  background: transparent;
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #c0392b;
  cursor: pointer;
  transition: all .2s;
}

.ni-converting {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  display: none;
}

/* Native audio player */
audio {
  width: 100%;
  margin-top: 10px;
  border-radius: 8px;
}


/* -------------------------------------------------------------
   ANONYMOUS DISCLAIMER
   Mirrors .notice from styles.css — gold left border accent.
   ------------------------------------------------------------- */

.ni-anon {
  background: rgba(214,179,94,.07);
  border-left: 3px solid rgba(214,179,94,.45);
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
  line-height: 1.6;
}


/* -------------------------------------------------------------
   MATH CAPTCHA
   Simple human-verification widget.
   ------------------------------------------------------------- */

.ni-captcha {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--off);
  border: var(--border-dark);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.ni-captcha-q {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.ni-captcha-input {
  width: 80px;
  background: var(--white);
  border: 1px solid rgba(10,10,10,.13);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
  text-align: center;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.ni-captcha-input:focus {
  border-color: rgba(214,179,94,.55);
  box-shadow: 0 0 0 3px rgba(214,179,94,.12);
}

.ni-captcha-err {
  font-size: 12px;
  color: #c0392b;
  width: 100%;
  display: none;
}


/* -------------------------------------------------------------
   HONEYPOT
   Visually hidden — real users never see or interact with it.
   Bots fill it in automatically and get silently rejected.
   ------------------------------------------------------------- */

.ni-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}


/* -------------------------------------------------------------
   SUCCESS STATE
   Shown after a successful submission replaces the form.
   ------------------------------------------------------------- */

.ni-success         { display: none; text-align: center; padding: 48px 20px; }
.ni-success.visible { display: block; }

.ni-success-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.ni-success h2 {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
}

.ni-success p {
  color: var(--muted);
  font-size: 15px;
  max-width: 40ch;
  margin: 0 auto;
  line-height: 1.65;
}


/* -------------------------------------------------------------
   RESPONSIVE
   Matches breakpoints used in styles.css.
   ------------------------------------------------------------- */

@media (max-width: 980px) {
  .stories-form-card { padding: 28px 24px; }
}

@media (max-width: 640px) {
  .stories-form-card { padding: 22px 16px; }
  .ni-recorder       { padding: 24px 14px; }
  .ni-toggle-btn     { font-size: 11px; padding: 10px 8px; }
}
