/* THAI-SOPHENI.STREAM — Two-Tier Erotic Realism & Nightlife Chronicle Portal
 * Inspired by Prae Casefiles (https://prae-casefiles.rip/#season) & Retriever Studio
 * Palette: Velvet Obsidian, Neon Rose/Magenta (#e83e6d), VIP Champagne Gold (#e5b75c), Midnight Orchid (#a855f7)
 */

:root {
  --bg-void: #080509;
  --bg-main: #0e0810;
  --bg-elev: #170e1b;
  --bg-card: #1d1122;
  --bg-card-alt: #140d19;
  --border-dim: #3b2038;
  --border-mid: #682a53;
  --border-bright: #e83e6d;
  --rose: #e83e6d;
  --rose-hover: #ff5785;
  --rose-soft: #ff9ebb;
  --gold: #e5b75c;
  --orchid: #a855f7;
  --emerald: #10b981;
  --cyan: #06b6d4;
  --bone: #f7f1f4;
  --text-body: #d6c8d1;
  --text-muted: #9e8a97;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.sopheni-portal {
  background:
    radial-gradient(ellipse at 15% 12%, rgba(232, 62, 109, 0.22) 0%, transparent 48%),
    radial-gradient(ellipse at 85% 65%, rgba(168, 85, 247, 0.18) 0%, transparent 52%),
    var(--bg-main);
  color: var(--bone);
  margin: 0;
  font: 16px/1.7 Tahoma, "Leelawadee UI", "Noto Sans Thai", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Sticky Top Warning & Navigation */
.health-legal-bar {
  background: linear-gradient(90deg, #1b0a14, #2b1021, #1b0a14);
  border-bottom: 1px solid var(--border-dim);
  color: var(--gold);
  font-size: 12.5px;
  text-align: center;
  padding: 7px 16px;
  letter-spacing: 0.02em;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 76px;
  padding: 0 clamp(20px, 4.5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(14, 8, 16, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-dim);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  letter-spacing: 0.06em;
}

.brand .mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--gold));
  box-shadow: 0 0 14px var(--rose);
}

.brand b span {
  color: var(--rose);
  margin-left: 4px;
}

.portal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 28px);
  flex: 1;
}

.portal-nav a {
  font-size: 14px;
  color: var(--text-body);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.portal-nav a:hover,
.portal-nav a[aria-current="page"] {
  color: var(--bone);
  border-bottom-color: var(--rose);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-resume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--rose), #be185d);
  color: #fff;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(232, 62, 109, 0.35);
  transition: transform 0.18s ease, background 0.18s ease;
}

.header-resume:hover {
  background: var(--rose-hover);
  transform: translateY(-1px);
}

/* Containers & Eyebrows */
.portal-wrap {
  width: min(1420px, 92%);
  margin: 0 auto;
}

.portal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 11px/1.5 "Courier New", Consolas, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose-soft);
  margin: 0 0 10px;
}

.portal-eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 10px var(--rose);
  display: inline-block;
}

/* HERO SECTION */
.portal-hero {
  position: relative;
  isolation: isolate;
  min-height: 640px;
  height: clamp(640px, 80vh, 820px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #070408;
  border-bottom: 1px solid var(--border-dim);
}

.portal-hero .portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  z-index: -2;
  filter: contrast(1.06) saturate(1.1);
}

.portal-hero .shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 5, 9, 0.94) 0%, rgba(14, 8, 16, 0.82) 48%, rgba(14, 8, 16, 0.28) 100%),
    linear-gradient(180deg, rgba(8, 5, 9, 0.35) 0%, transparent 40%, rgba(14, 8, 16, 0.96) 100%);
}

.portal-hero .rec {
  position: absolute;
  top: 24px;
  right: clamp(20px, 4.5vw, 72px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(20, 10, 22, 0.78);
  border: 1px solid var(--border-mid);
  font: 700 11px/1 monospace;
  color: var(--gold);
  letter-spacing: 0.12em;
}

.portal-hero .rec i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 10px var(--rose);
}

.hero-copy {
  width: min(1420px, 92%);
  margin: 0 auto;
}

.hero-copy-inner {
  max-width: 720px;
}

.hero-copy h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.12;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.hero-copy h1 span {
  color: var(--gold);
  display: block;
  font-size: 0.62em;
  font-weight: 600;
  margin-bottom: 4px;
}

.hero-copy h1 strong {
  background: linear-gradient(90deg, #ffffff, var(--rose-soft), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-quote {
  font-size: clamp(18px, 2vw, 23px);
  color: var(--gold);
  font-weight: 700;
  margin: 0 0 14px;
}

.hero-lead {
  font-size: 16.5px;
  color: var(--text-body);
  margin: 0 0 26px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.btn-crimson {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--rose), #be185d);
  color: #fff;
  padding: 13px 24px;
  border-radius: 5px;
  font-weight: 700;
  box-shadow: 0 8px 26px rgba(232, 62, 109, 0.38);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-crimson:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(232, 62, 109, 0.55);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 5px;
  border: 1px solid var(--border-mid);
  background: rgba(29, 17, 34, 0.72);
  color: var(--bone);
  font-weight: 600;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.btn-outline:hover {
  border-color: var(--gold);
  background: rgba(45, 24, 52, 0.9);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.hero-stats b {
  color: var(--rose-soft);
}

/* SECTIONS */
.portal-section {
  padding: clamp(56px, 7vw, 96px) 0;
  border-bottom: 1px solid var(--border-dim);
}

.section-head-split {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
}

.section-head-split h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.2;
  margin: 0;
}

.section-head-split h2 span {
  color: var(--rose-soft);
}

.section-head-note {
  max-width: 480px;
  color: var(--text-muted);
  margin: 0;
}

/* CASEFILE / SEASON GRID (Prae Casefiles #season Style) */
.casefile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}

.casefile-card {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-alt) 100%);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.casefile-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55), 0 0 24px rgba(232, 62, 109, 0.18);
}

.casefile-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0a060c;
}

.casefile-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.casefile-card:hover .casefile-poster img {
  transform: scale(1.03);
}

.casefile-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.casefile-eyebrow-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
}

.casefile-tag {
  color: var(--gold);
  letter-spacing: 0.1em;
}

.casefile-status {
  color: var(--rose-soft);
  background: rgba(232, 62, 109, 0.14);
  border: 1px solid rgba(232, 62, 109, 0.35);
  padding: 3px 10px;
  border-radius: 999px;
}

.casefile-body h3 {
  font-size: 22px;
  margin: 0 0 10px;
  color: var(--bone);
}

.casefile-desc {
  color: var(--text-body);
  font-size: 15px;
  margin: 0 0 18px;
  flex: 1;
}

.casefile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  padding-top: 14px;
  border-top: 1px solid var(--border-dim);
  margin-bottom: 16px;
}

.casefile-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.casefile-enter {
  font-weight: 700;
  font-size: 14px;
  color: var(--gold);
}

.casefile-pill {
  background: rgba(232, 62, 109, 0.18);
  border: 1px solid var(--border-mid);
  color: var(--bone);
  padding: 7px 14px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
}

.casefile-pill:hover {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
}

/* 5 CHARACTERS DNA GRID (#cast) */
.dna-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.dna-mode-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  color: var(--text-body);
  padding: 10px 20px;
  border-radius: 6px;
  font: 700 14px/1.4 Tahoma, sans-serif;
  cursor: pointer;
  transition: all 0.18s ease;
}

.dna-mode-btn.active,
.dna-mode-btn:hover {
  background: linear-gradient(135deg, var(--rose), #9d174d);
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 0 20px rgba(232, 62, 109, 0.35);
}

.cast-dna-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 22px;
}

.dna-card {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-void) 100%);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dna-card-media {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #09050b;
  overflow: hidden;
}

.dna-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease, transform 0.35s ease;
}

.dna-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(10, 6, 12, 0.85);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 4px 10px;
  border-radius: 4px;
  font: 700 11px/1.2 monospace;
}

.dna-age-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(232, 62, 109, 0.88);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.dna-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dna-card-body h3 {
  margin: 0 0 4px;
  font-size: 21px;
  color: var(--bone);
}

.dna-role {
  font-size: 13px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 12px;
}

.dna-pain-box {
  background: rgba(232, 62, 109, 0.08);
  border-left: 3px solid var(--rose);
  padding: 10px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 13.5px;
  color: var(--text-body);
  margin-bottom: 14px;
  flex: 1;
}

.dna-specs {
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-dim);
  padding-top: 10px;
}

/* INSIDE REALITY & SOCIAL MISSION CARDS (#truth) */
.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.eco-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  overflow: hidden;
}

.eco-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.eco-card-body {
  padding: 20px;
}

.eco-card-body small {
  color: var(--gold);
  font: 700 11px/1.4 monospace;
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 6px;
}

.eco-card-body h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.eco-card-body p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-body);
}

/* CLOSING MISSION & EMPIRE LINKS */
.closing-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .closing-grid {
    grid-template-columns: 1fr;
  }
  .portal-nav {
    display: none;
  }
}

.forensic-code,
.visit-box {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 32px;
}

.forensic-pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.forensic-pillars span {
  background: rgba(229, 183, 92, 0.12);
  border: 1px solid rgba(229, 183, 92, 0.35);
  color: var(--gold);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.portal-footer {
  padding: 36px clamp(20px, 4.5vw, 72px);
  background: #070408;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a:hover {
  color: var(--rose-soft);
}

/* MULTI-SEASON STORY GUIDE & EPISODE ROADMAP (2026 UPGRADE) */
.story-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}

.story-pillar-card {
  background: linear-gradient(180deg, rgba(29, 17, 34, 0.96) 0%, rgba(18, 10, 22, 0.96) 100%);
  border: 1px solid var(--border-mid);
  border-top: 3px solid var(--gold);
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

.pillar-num {
  display: inline-block;
  font: 700 11.5px/1.3 "Courier New", Consolas, monospace;
  color: var(--gold);
  background: rgba(229, 183, 92, 0.14);
  border: 1px solid rgba(229, 183, 92, 0.35);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  letter-spacing: 0.08em;
}

.story-pillar-card h3 {
  font-size: 20px;
  margin: 0 0 10px;
  color: var(--bone);
}

.story-pillar-card p {
  margin: 0;
  font-size: 14.8px;
  color: var(--text-body);
}

.season-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.season-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  color: var(--text-body);
  padding: 9px 16px;
  border-radius: 999px;
  font: 700 13.5px/1.3 Tahoma, sans-serif;
  cursor: pointer;
  transition: all 0.18s ease;
}

.season-tab-btn.active,
.season-tab-btn:hover {
  background: linear-gradient(135deg, var(--rose), #9d174d);
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 0 16px rgba(232, 62, 109, 0.38);
}

.season-spotlight-box {
  background: linear-gradient(180deg, rgba(35, 18, 41, 0.94) 0%, rgba(19, 11, 24, 0.96) 100%);
  border: 1px solid rgba(229, 183, 92, 0.42);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 36px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.season-spotlight-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-dim);
}

.season-spotlight-head h3 {
  font-size: clamp(22px, 2.5vw, 30px);
  margin: 6px 0 10px;
  color: var(--bone);
}

.season-spotlight-head p {
  margin: 0;
  max-width: 820px;
  color: var(--text-body);
  font-size: 15.5px;
}

.spotlight-cta-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ep-roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 14px;
}

.ep-slot-card {
  background: rgba(14, 8, 16, 0.85);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.ep-slot-card.live {
  border-color: var(--rose);
  background: linear-gradient(180deg, rgba(232, 62, 109, 0.14) 0%, rgba(14, 8, 16, 0.92) 100%);
}

.ep-slot-card.live:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}

.ep-slot-card.next {
  border-color: rgba(229, 183, 92, 0.55);
}

.ep-slot-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ep-num {
  font: 700 13px/1.2 monospace;
  color: var(--gold);
}

.ep-badge-live {
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: var(--rose);
  padding: 2px 8px;
  border-radius: 999px;
}

.ep-badge-next {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(229, 183, 92, 0.16);
  border: 1px solid rgba(229, 183, 92, 0.4);
  padding: 2px 8px;
  border-radius: 999px;
}

.ep-badge-up {
  font-size: 11.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 999px;
}

.ep-slot-card h4 {
  margin: 2px 0;
  font-size: 16.5px;
  color: var(--bone);
}

.ep-slot-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.48;
}
