/* Velora Stories — assets/css/style.css
   Dark luxury romance / premium publishing house aesthetic
   Mobile-first, smooth onboarding screens, no frameworks
*/

:root{
  --bg: #0F0F14;
  --bg2: #1A1A24;
  --crimson: #B11226;
  --gold: #D4AF37;
  --text: #F5F5F5;
  --muted: #A0A0B0;

  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;

  --shadow: 0 18px 50px rgba(0,0,0,.55);
  --shadow-soft: 0 10px 30px rgba(0,0,0,.35);

  --serif-title: "Playfair Display", serif;
  --serif-body: "Source Serif 4", serif;

  --maxw: 520px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: var(--serif-body);
  background: radial-gradient(1200px 800px at 30% -10%, rgba(212,175,55,.12), transparent 55%),
              radial-gradient(800px 600px at 95% 25%, rgba(177,18,38,.10), transparent 60%),
              linear-gradient(180deg, #0C0C10 0%, var(--bg) 70%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden; /* single-screen experience */
}

/* Shell layout */
.vs-shell{
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.vs-topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 10px;
}

.vs-topbar__brand{
  display: flex;
  align-items: center;
  gap: 10px;
}

.vs-mark{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), rgba(212,175,55,.25));
  box-shadow: 0 0 0 3px rgba(212,175,55,.12);
}

.vs-brandname{
  font-family: var(--serif-title);
  letter-spacing: .08em;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(245,245,245,.9);
}

.vs-topbar__status{
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(160,160,176,.9);
}

/* Viewport / slider */
.vs-viewport{
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 12px 18px 18px;
  overflow: hidden;
}

.vs-slider{
  width: 100%;
  max-width: var(--maxw);
  height: 100%;
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(26,26,36,.92), rgba(26,26,36,.68));
  box-shadow: var(--shadow);
  border: 1px solid rgba(212,175,55,.12);
  overflow: hidden;
}

.vs-screen{
  position: absolute;
  inset: 0;
  padding: 26px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(110%);
  opacity: 0;
  transition: transform .6s cubic-bezier(.2,.9,.18,1), opacity .45s ease;
  will-change: transform, opacity;
}

.vs-screen.is-active{
  transform: translateY(0%);
  opacity: 1;
}

.vs-screen.is-prev{
  transform: translateY(-110%);
  opacity: 0;
}

.vs-screen__content{
  width: 100%;
}

/* Hero */
.vs-hero{
  text-align: center;
  padding: 8px 6px 0;
}

.vs-hero__badge{
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(245,245,245,.92);
  background: rgba(177,18,38,.16);
  border: 1px solid rgba(177,18,38,.35);
  margin-bottom: 18px;
}

.vs-title{
  font-family: var(--serif-title);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.08;
}

.vs-subtitle{
  margin: 0 auto 18px;
  max-width: 36ch;
  color: rgba(160,160,176,.95);
  line-height: 1.55;
  font-size: 15px;
}

.vs-bullets{
  list-style: none;
  padding: 0;
  margin: 0 auto 18px;
  max-width: 34ch;
  text-align: left;
  border-top: 1px solid rgba(212,175,55,.10);
  border-bottom: 1px solid rgba(212,175,55,.10);
}
.vs-bullets li{
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,.06);
  color: rgba(245,245,245,.92);
  font-size: 14px;
}
.vs-bullets li:first-child{ border-top: none; }

/* Typography */
.vs-h2{
  font-family: var(--serif-title);
  font-weight: 650;
  letter-spacing: .04em;
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
}

.vs-help{
  margin: 0 0 18px;
  color: rgba(160,160,176,.95);
  font-size: 14px;
  line-height: 1.55;
}

.vs-label{
  display: block;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(212,175,55,.95);
  margin: 0 0 8px;
}

.vs-input, .vs-textarea{
  width: 100%;
  background: rgba(15,15,20,.55);
  border: 1px solid rgba(212,175,55,.14);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 14px 14px;
  outline: none;
  font-size: 16px;
  line-height: 1.35;
  box-shadow: var(--shadow-soft);
  transition: border-color .18s ease, transform .18s ease;
}

.vs-input:focus, .vs-textarea:focus{
  border-color: rgba(212,175,55,.42);
  transform: translateY(-1px);
}

.vs-textarea{
  resize: none;
  min-height: 120px;
}

/* Buttons */
.vs-btn{
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 16px;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .14s ease, filter .14s ease, opacity .14s ease;
  user-select: none;
}

.vs-btn:active{ transform: translateY(1px) scale(.99); }
.vs-btn[disabled]{ opacity: .55; cursor: not-allowed; }

.vs-btn--primary{
  background: linear-gradient(135deg, var(--gold), rgba(212,175,55,.70));
  color: #1a1206;
  font-weight: 700;
}

.vs-btn--cta{
  background: linear-gradient(135deg, var(--crimson), rgba(177,18,38,.72));
  color: var(--text);
  font-weight: 800;
  padding: 16px 16px;
  box-shadow: 0 18px 60px rgba(177,18,38,.24);
}

.vs-btn--ghost{
  background: transparent;
  color: rgba(245,245,245,.9);
  border: 1px solid rgba(255,255,255,.12);
}

.vs-btn--download{
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Nav row */
.vs-nav{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

/* Cards */
.vs-cards{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.vs-card{
  text-align: left;
  border-radius: var(--radius-lg);
  padding: 16px 16px;
  background: rgba(15,15,20,.48);
  border: 1px solid rgba(212,175,55,.10);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
  color: var(--text);
}

.vs-card:active{ transform: translateY(1px); }
.vs-card:hover{ border-color: rgba(212,175,55,.22); }

.vs-card__title{
  font-family: var(--serif-title);
  font-size: 18px;
  letter-spacing: .04em;
  margin-bottom: 4px;
}

.vs-card__meta{
  color: rgba(160,160,176,.95);
  font-size: 13px;
  line-height: 1.5;
}

.vs-card.is-selected{
  border-color: rgba(177,18,38,.55);
  background: linear-gradient(180deg, rgba(177,18,38,.14), rgba(15,15,20,.45));
}

/* Range slider */
.vs-sliderblock{
  padding: 14px 14px;
  border-radius: var(--radius-lg);
  background: rgba(15,15,20,.40);
  border: 1px solid rgba(212,175,55,.10);
  box-shadow: var(--shadow-soft);
}

.vs-sliderblock__labels{
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: .06em;
}

.vs-range{
  width: 100%;
  margin: 8px 0 10px;
  accent-color: var(--gold);
}

.vs-rangevalue{
  font-size: 14px;
  color: rgba(245,245,245,.92);
}

.vs-spicelegend{
  margin-top: 10px;
  font-size: 12px;
  color: rgba(160,160,176,.95);
  line-height: 1.55;
}

/* Summary */
.vs-summary{
  margin: 16px 0 18px;
  padding: 14px 14px;
  border-radius: var(--radius-lg);
  background: rgba(15,15,20,.40);
  border: 1px solid rgba(212,175,55,.10);
  box-shadow: var(--shadow-soft);
}

.vs-summary__row{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.vs-summary__row:first-child{ border-top: none; }

.vs-summary__val{
  text-align: right;
  color: rgba(245,245,245,.92);
  font-size: 14px;
}

/* Progress / Result */
.vs-progress{
  margin: 14px 0 0;
  padding: 14px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212,175,55,.10);
  background: rgba(15,15,20,.35);
}

.vs-progress__bar{
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}

.vs-progress__fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), rgba(212,175,55,.45));
  transition: width .35s ease;
}

.vs-progress__text{
  margin-top: 10px;
  font-size: 13px;
  color: rgba(160,160,176,.95);
  letter-spacing: .04em;
}

.vs-result{
  margin-top: 16px;
  padding: 14px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(177,18,38,.24);
  background: rgba(177,18,38,.10);
}

.vs-result__title{
  font-family: var(--serif-title);
  font-size: 18px;
  margin-bottom: 12px;
  letter-spacing: .04em;
}

.vs-error{
  margin-top: 14px;
  padding: 14px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(177,18,38,.55);
  background: rgba(177,18,38,.12);
  color: rgba(245,245,245,.95);
  font-size: 14px;
  line-height: 1.55;
}

/* Footer */
.vs-footer{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px 16px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(160,160,176,.85);
  overflow: hidden;
  white-space: nowrap;
}

.vs-dot{
  opacity: .6;
}

.vs-muted{ color: rgba(160,160,176,.95); }

/* Larger screens */
@media (min-width: 720px){
  .vs-topbar{ padding: 22px 24px 12px; }
  .vs-viewport{ padding: 14px 24px 22px; }
  .vs-screen{ padding: 34px 28px; }
  .vs-title{ font-size: 44px; }
  .vs-h2{ font-size: 24px; }
  .vs-cards{ grid-template-columns: 1fr 1fr; }
  .vs-nav{ grid-template-columns: 1fr 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .vs-screen{ transition: none !important; }
  .vs-btn{ transition: none !important; }
  .vs-progress__fill{ transition: none !important; }
}

/* ---------------------------------------------------
   Print base styles for PDF (Dompdf)
   (Actual book layout CSS lives in templates/book_template.php
    but these are safe shared defaults.)
--------------------------------------------------- */
@media print{
  body{ background: #fff !important; color: #000 !important; overflow: visible !important; }
  .vs-shell, .vs-topbar, .vs-footer, .vs-viewport{ display: none !important; }
}
