/* PlotLove landing — mobile-first, romantic dark + rose/coral */
:root {
  --bg: #0f0a12;
  --bg-elev: #1a121f;
  --bg-card: #221828;
  --border: rgba(255, 182, 193, 0.14);
  --text: #f7eef3;
  --text-muted: #b9a3b0;
  --accent: #f0728a;
  --accent-2: #ff8f7a;
  --accent-soft: rgba(240, 114, 138, 0.16);
  --success: #6bcf9a;
  --danger: #ff6b81;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI",
    system-ui, -apple-system, sans-serif;
  --max: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(15, 10, 18, 0.82);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(240, 114, 138, 0.45);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a0b12;
  box-shadow: 0 8px 24px rgba(240, 114, 138, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 10px 28px rgba(240, 114, 138, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--accent-soft);
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.9rem;
}

/* Hero */
.hero {
  position: relative;
  padding: 2.5rem 0 3rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(240, 114, 138, 0.22), transparent 55%),
    radial-gradient(ellipse at 80% 10%, rgba(139, 108, 193, 0.18), transparent 50%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 1.5rem;
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge-ai {
  color: #ffd0da;
  border-color: rgba(240, 114, 138, 0.35);
  background: var(--accent-soft);
}

.badge-age {
  color: #ffc9a8;
}

/* Sections */
.section {
  padding: 2.75rem 0;
}

.section-head {
  margin-bottom: 1.5rem;
  max-width: 40rem;
}

.section-head h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.4rem, 4vw, 1.85rem);
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
}

/* Characters */
.char-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.char-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
}

.char-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.92);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.char-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), transparent 45%);
  pointer-events: none;
}

.char-avatar svg {
  width: 42px;
  height: 42px;
  opacity: 0.9;
}

.char-body h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.char-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.char-line {
  margin: 0;
  font-size: 0.92rem;
  color: #ebd7e2;
  font-style: italic;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.feature-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 0.7rem;
  background: var(--accent-soft);
  color: var(--accent);
}

/* Waitlist */
.waitlist {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(240, 114, 138, 0.14), transparent 60%),
    var(--bg);
}

.waitlist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  max-width: 520px;
  margin-inline: auto;
}

.form-row {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.form-row label {
  font-size: 0.9rem;
  font-weight: 600;
}

.form-row input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0.85rem 0.95rem;
  font: inherit;
  outline: none;
}

.form-row input:focus {
  border-color: rgba(240, 114, 138, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-row input[aria-invalid="true"] {
  border-color: var(--danger);
}

.form-error {
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 1.2em;
}

.form-note {
  margin: 0.85rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.form-success {
  display: none;
  text-align: center;
  padding: 0.5rem 0.25rem 0.25rem;
}

.form-success.is-visible {
  display: block;
}

.form-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: rgba(107, 207, 154, 0.15);
  color: var(--success);
  display: grid;
  place-items: center;
}

.form-success h3 {
  margin: 0 0 0.4rem;
  color: var(--success);
}

.form-success p {
  margin: 0;
  color: var(--text-muted);
}

#waitlist-form.is-hidden {
  display: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-top {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-disclaimer {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.85;
}

/* Desktop */
@media (min-width: 720px) {
  .char-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding: 4rem 0 4.5rem;
  }

  .footer-top {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .char-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .char-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .char-avatar {
    width: 88px;
    height: 88px;
    border-radius: 22px;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}

/* Extra — hero hint, character blurb / art note */
.hero-hint {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 32rem;
}

.char-blurb {
  margin: 0 0 0.4rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.char-art-note {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: rgba(185, 163, 176, 0.75);
}

.char-avatar {
  position: relative;
}

.char-initial {
  position: absolute;
  z-index: 1;
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.char-silhouette {
  width: 70%;
  height: 70%;
  opacity: 0.55;
}

@media (min-width: 1024px) {
  .char-card .char-avatar {
    margin-bottom: 0.25rem;
  }
}


/* Portrait images (3:4 upper-body placeholders) */
.char-avatar.has-portrait {
  width: 96px;
  height: 128px;
  border-radius: 16px;
  background: #2a2430 !important;
}

.char-avatar.has-portrait .char-initial,
.char-avatar.has-portrait .char-silhouette {
  display: none;
}

.char-avatar.has-portrait::after {
  background: linear-gradient(180deg, transparent 55%, rgba(20, 14, 24, 0.28));
}

.char-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

@media (min-width: 720px) {
  .char-avatar.has-portrait {
    width: 112px;
    height: 149px;
  }
}
