:root {
  --bg: #0b0b0d; /* deep charcoal */
  --card: #141418;
  --text: #f7f7fb;
  --muted: #bdbdd1;
  --accent: #e9a6d1; /* soft pink */
  --accent-2: #9aa7ff; /* lavender blue */
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { 
  box-sizing: border-box; 
}

html, body { 
  height: 100%; 
}

body { 
  margin: 0; 
  font-family: ui-sans-serif, -apple-system, Segoe UI, Roboto, Inter, system-ui, sans-serif; 
  background: radial-gradient(1200px 600px at 10% -10%, rgba(233,166,209,.18), transparent), 
              radial-gradient(1200px 600px at 110% -20%, rgba(154,167,255,.18), transparent), 
              var(--bg); 
  background-attachment: fixed;
  color: var(--text); 
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
header {
  position: sticky; 
  top: 0; 
  z-index: 20;
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  background: rgba(11,11,13,.55);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.wrap { 
  max-width: 1100px; 
  margin: 0 auto; 
  padding: 16px; 
}

.nav { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 16px; 
}

.brand { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  font-weight: 700; 
  letter-spacing: .3px; 
  text-decoration: none;
  color: var(--text);
}

.brand .logo { 
  width: 28px; 
  height: 28px; 
  border-radius: 8px; 
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); 
  box-shadow: 0 8px 20px rgba(233,166,209,.3); 
}

.links { 
  display: flex; 
  gap: 18px; 
}

.links a { 
  text-decoration: none; 
  color: var(--text); 
  opacity: .85; 
  font-weight: 600; 
  transition: opacity 0.2s;
}

.links a:hover { 
  opacity: 1; 
}

/* Hero Section */
.hero { 
  padding: 64px 16px 36px; 
  text-align: center; 
}

.hero h1 { 
  font-size: clamp(28px, 4vw, 48px); 
  margin: 0 0 12px; 
  line-height: 1.1; 
}

.hero p { 
  color: var(--muted); 
  margin: 0 auto 22px; 
  max-width: 650px; 
}

.cta { 
  display: inline-block; 
  padding: 12px 18px; 
  border-radius: 999px; 
  border: 1px solid rgba(255,255,255,.15); 
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); 
  color: var(--text); 
  text-decoration: none; 
  font-weight: 700; 
  box-shadow: var(--shadow); 
  transition: transform 0.2s;
}

.cta:hover { 
  transform: translateY(-1px); 
}

/* General Sections & Typography */
section { 
  padding: 36px 16px; 
}

h1, h2, h3 {
  line-height: 1.2;
}

h2.section-title { 
  margin: 0 0 24px; 
  font-size: clamp(22px, 3vw, 28px); 
}

p {
  line-height: 1.6;
}

.section-footer-link { 
  text-align: center; 
  margin-top: 24px;
}

/* Grid Layout */
.grid { 
  display: grid; 
  grid-template-columns: repeat(12, 1fr); 
  gap: 16px; 
}

/* Story Cards */
.card { 
  grid-column: span 12; 
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)); 
  border: 1px solid rgba(255,255,255,.08); 
  border-radius: var(--radius); 
  overflow: hidden; 
  box-shadow: var(--shadow); 
  display: grid; 
  grid-template-columns: 140px 1fr; 
}

@media (min-width: 768px) {
  .card-featured {
     grid-column: span 6;
  }
  .card-library {
    grid-column: span 6;
  }
}

@media (min-width: 1024px) {
  .card-library {
    grid-column: span 4;
  }
}


@media (max-width: 640px){ 
  .card { 
    grid-template-columns: 1fr; 
  } 
}

.thumb { 
  background: radial-gradient(600px 200px at 0% -10%, rgba(233,166,209,.25), transparent), 
              radial-gradient(600px 200px at 100% 0%, rgba(154,167,255,.25), transparent), 
              #0f0f12; 
  height: 100%; 
  min-height: 120px; 
}

.thumb img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block; 
}

.content { 
  padding: 14px 16px 16px; 
}

.title { 
  font-weight: 800; 
  margin: 0 0 6px; 
  font-size: 18px; 
}

.desc { 
  color: var(--muted); 
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.5;
}

.btn-row { 
  display: flex; 
  gap: 10px; 
  flex-wrap: wrap; 
}

.btn { 
  text-decoration: none; 
  font-weight: 700; 
  padding: 10px 14px; 
  border-radius: 10px; 
  border: 1px solid rgba(255,255,255,.14); 
  color: var(--text); 
  background: rgba(255,255,255,.04); 
  transition: background 0.2s, transform 0.2s;
  -webkit-tap-highlight-color: transparent; /* Removes flash on mobile tap */
}

.btn:hover { 
  background: rgba(255,255,255,.08); 
  transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}


/* Two-column Layout for About/Contact */
.two { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 16px; 
}

@media (max-width: 900px){ 
  .two { 
    grid-template-columns: 1fr; 
  } 
}

.panel { 
  background: var(--card); 
  border: 1px solid rgba(255,255,255,.08); 
  border-radius: var(--radius); 
  padding: 24px; 
  box-shadow: var(--shadow); 
}

/* Form Styles */
label { 
  display: block; 
  margin: 10px 0 6px; 
  color: var(--muted); 
  font-size: 14px; 
}

input, textarea { 
  width: 100%; 
  padding: 10px 12px; 
  border-radius: 10px; 
  border: 1px solid rgba(255,255,255,.14); 
  background: rgba(255,255,255,.04); 
  color: var(--text); 
  font-family: inherit;
  font-size: 16px;
}

textarea { 
  min-height: 120px; 
  resize: vertical; 
}

button { 
  cursor: pointer; 
}

/* Story Play Page Styles */
.story-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px 0 16px;
}

.font-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.font-controls .btn {
  padding: 8px 12px;
  font-size: 18px;
  line-height: 1;
}

.story-embed-container {
  position: relative;
  width: 100%;
  height: 85vh; 
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--card); 
}

.story-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Footer */
footer { 
  padding: 36px 16px 60px; 
  color: var(--muted); 
  text-align: center; 
  border-top: 1px solid rgba(255,255,255,.06);
  margin-top: 36px;
}

