/**
 * Flockline Flock DNA - Brand Stylesheet
 * Integrates natively with Flockline V1 brand system (lp.css tokens).
 * Strict style rule: No em dashes (\u2014) in copy or comments.
 */

:root {
  --burnt: #D96B3B;
  --burnt-deep: #BD5A2E;
  --burnt-hover: #BD5A2E;
  --yolk: #E8B04B;
  --eggshell: #FFF6EC;
  --roost: #4B2F28;
  --roost-dark: #2F1C17;
  --sage: #A7B96E;
  --sage-deep: #7E944A;
  --cream: #F4EBDD;
  --white: #FFFFFF;
  --border: rgba(75, 47, 40, 0.10);
  --border-strong: rgba(75, 47, 40, 0.18);
  --muted: rgba(75, 47, 40, 0.65);
  --muted-soft: rgba(75, 47, 40, 0.48);
  --shadow-soft: 0 12px 36px rgba(75, 47, 40, 0.08);
  --shadow-card: 0 6px 24px rgba(75, 47, 40, 0.06);
  --radius-pill: 999px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-sm: 10px;
  --font-display: "Satoshi", system-ui, -apple-system, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --max-w: 680px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: 0;
}

body {
  background: var(--eggshell);
  color: var(--roost);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.58;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Official Site Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 246, 236, 0.95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--roost);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand img {
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Primary Button Tokens from lp.css */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s var(--ease);
}

.btn-primary {
  background: var(--burnt);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(217, 107, 59, 0.28);
}
.btn-primary:hover { background: var(--burnt-hover); transform: translateY(-1px); }

.btn-sm {
  min-height: 36px;
  padding: 0.38rem 0.95rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* Page Content Container */
.dna-container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 16px 80px;
}

/* Hero Section */
.hero-banner {
  text-align: center;
  margin-bottom: 28px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1px solid var(--border-strong);
  color: var(--burnt);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--roost);
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 1.02rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}

/* Form Styles */
.dna-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
}

.card-step-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--burnt);
  margin-bottom: 4px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--roost);
  margin-bottom: 4px;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.input-group {
  margin-bottom: 14px;
}

.input-group:last-child {
  margin-bottom: 0;
}

.input-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--roost);
  margin-bottom: 6px;
}

.text-field {
  width: 100%;
  background: var(--eggshell);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--roost);
  outline: none;
  transition: all 0.2s ease;
}

.text-field:focus {
  border-color: var(--burnt);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(217, 107, 59, 0.15);
}

/* Multi-Choice Option Cards */
.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.pill-option {
  position: relative;
  cursor: pointer;
}

.pill-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-box {
  background: var(--eggshell);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
  transition: all 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pill-option input:checked + .pill-box {
  background: var(--cream);
  border-color: var(--burnt);
  box-shadow: 0 2px 10px rgba(217, 107, 59, 0.15);
}

.pill-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--roost);
  margin-bottom: 2px;
}

.pill-sub {
  font-size: 0.76rem;
  color: var(--muted);
}

/* Photo Dropzone */
.photo-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: center;
  cursor: pointer;
  background: var(--eggshell);
  transition: all 0.2s ease;
}

.photo-dropzone:hover {
  border-color: var(--burnt);
  background: var(--cream);
}

.photo-preview {
  display: none;
  max-width: 130px;
  max-height: 130px;
  border-radius: 50%;
  margin: 0 auto 10px;
  object-fit: cover;
  border: 3px solid var(--yolk);
}

/* Generate Button */
.btn-generate {
  width: 100%;
  background: var(--burnt);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 16px 22px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(217, 107, 59, 0.3);
  transition: all 0.2s var(--ease);
}

.btn-generate:hover {
  background: var(--burnt-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(217, 107, 59, 0.38);
}

/* ========================================================
   FULL-SCREEN 7-STORY PLAYER (#view-story)
   ======================================================== */
.story-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(43, 26, 20, 0.97);
  backdrop-filter: blur(14px);
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.story-overlay.active { display: flex; }

.story-frame {
  width: 100%;
  max-width: 430px;
  height: 100%;
  max-height: 880px;
  background: #251610;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 20px 36px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-lg);
  color: var(--eggshell);
}

.story-progress-bar {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-bottom: 20px;
}

.progress-segment {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--yolk);
  transition: width 0.08s linear;
}

.story-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  position: relative;
  z-index: 30;
}

.story-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--yolk);
  letter-spacing: 0.04em;
}

.btn-story-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.story-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 20;
  pointer-events: none;
}

.story-content-area button,
.story-content-area a {
  pointer-events: auto;
}

.story-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  animation: fadeInStory 0.35s var(--ease) forwards;
}

.story-slide.active { display: flex; }

@keyframes fadeInStory {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.story-pretitle {
  color: var(--yolk);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.story-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--white);
}

.story-quote {
  font-size: 1.05rem;
  color: rgba(255, 246, 236, 0.85);
  line-height: 1.5;
  max-width: 340px;
  margin: 0 auto;
}

.story-stat-large {
  font-family: var(--font-display);
  font-size: 4.8rem;
  font-weight: 900;
  color: var(--yolk);
  line-height: 1;
  margin-bottom: 10px;
}

.story-mascot-img {
  width: 140px;
  height: auto;
  margin-bottom: 16px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.story-tap-left, .story-tap-right {
  position: absolute;
  top: 60px;
  bottom: 60px;
  width: 40%;
  z-index: 10;
  cursor: pointer;
}
.story-tap-left { left: 0; }
.story-tap-right { right: 0; width: 60%; }

.story-footer-prompt {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted-soft);
}

/* ========================================================
   RESULTS VIEW (#view-results)
   ======================================================== */
.results-view {
  display: none;
  flex-direction: column;
  gap: 24px;
  margin-top: 10px;
}

.results-view.active { display: flex; }

/* 3-Card Switcher Pills */
.card-switcher {
  display: flex;
  gap: 6px;
  background: var(--cream);
  padding: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  margin: 0 auto 8px;
  max-width: 460px;
  width: 100%;
}

.card-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--roost);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.card-tab:hover {
  background: rgba(217, 107, 59, 0.1);
}

.card-tab.active {
  background: var(--burnt);
  color: var(--white);
  box-shadow: 0 3px 10px rgba(217, 107, 59, 0.25);
}

.canvas-preview-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

#story-canvas {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(75, 47, 40, 0.22);
}

/* Social Buttons Grid */
.social-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s var(--ease);
}

.btn-social:hover { transform: translateY(-2px); }

/* Platform colors */
.btn-social--instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(220, 39, 67, 0.3);
}

.btn-social--tiktok {
  background: #010101;
  color: var(--white);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-social--facebook {
  background: #1877f2;
  color: var(--white);
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.3);
}

.btn-social--download {
  background: var(--roost);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(75, 47, 40, 0.25);
}

.btn-social--celebrate {
  background: var(--yolk);
  color: var(--roostDark);
  box-shadow: 0 4px 14px rgba(232, 176, 75, 0.3);
  font-weight: 800;
}
.btn-social--celebrate:hover { background: #dfa438; }

.btn-social--replay {
  background: var(--white);
  color: var(--roost);
  border: 1.5px solid var(--border-strong);
}
.btn-social--replay:hover { background: var(--cream); }

/* Core Product Bridge */
.bridge-card {
  background: var(--white);
  border: 2px solid var(--burnt);
  border-radius: var(--radius-lg);
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.bridge-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--roost);
  margin-bottom: 6px;
}

.bridge-desc {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 480px;
  margin: 0 auto 16px;
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--roost);
  color: var(--white);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: all 0.25s var(--ease);
  z-index: 2000;
  pointer-events: none;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Share Guide Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--roost);
  margin-bottom: 8px;
}

.modal-text {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .site-header__inner {
    padding: 8px 12px;
  }
  .brand {
    font-size: 1.15rem;
  }
  .btn-sm {
    min-height: 34px;
    padding: 0.32rem 0.8rem;
    font-size: 0.78rem;
  }
  .dna-container {
    padding: 20px 12px 60px;
  }
  .form-card {
    padding: 20px 16px;
  }
  .card-switcher {
    padding: 4px;
  }
  .card-tab {
    padding: 8px 4px;
    font-size: 0.76rem;
    gap: 4px;
  }
  .social-buttons-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .btn-social {
    padding: 11px 8px;
    font-size: 0.84rem;
    gap: 6px;
  }
}
