/* ============================================================
   BRAND GLOW — style.css
   Feminine · Premium · Soft Luxury · Modern · Clean
   ============================================================ */

/* ── CSS Custom Properties ── */
:root {
  --bg:        #F8F4EE;
  --beige:     #E7D8CC;
  --blush:     #EBCFC4;
  --peach:     #DDB8A6;
  --rose:      #CFAFA1;
  --ink:       #5C4A42;
  --ink-light: #9A7E75;
  --card:      #FFFCF8;
  --white:     #FFFFFF;

  --radius-card: 28px;
  --radius-btn:  50px;
  --radius-chip: 50px;
  --radius-input:14px;

  --shadow-luxury:    0 8px 48px rgba(92,74,66,0.10);
  --shadow-luxury-md: 0 14px 44px rgba(92,74,66,0.15);
  --shadow-luxury-lg: 0 22px 64px rgba(92,74,66,0.20);
  --shadow-card:      0 4px 20px rgba(92,74,66,0.07);

  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography helpers ── */
.font-display { font-family: 'Playfair Display', Georgia, serif; }

/* ══════════════════════════════════════
   NAVIGATION
══════════════════════════════════════ */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248,244,238,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(207,175,161,0.25);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav-logo-accent { color: var(--rose); }
.nav-logo-img {
  height: 54px;
  width: auto;
  display: block;
  mix-blend-mode: multiply;
}
.auth-logo-img {
  width: 320px;
  height: auto;
  display: block;
  margin: 0 auto 16px;
  mix-blend-mode: multiply;
}
.footer-logo-img {
  width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 8px;
  mix-blend-mode: multiply;
}
.mb-hint--note {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--ink-light);
  font-style: italic;
  line-height: 1.6;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  background: var(--ink);
  color: var(--card);
  border-radius: var(--radius-btn);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.nav-cta:hover { background: #3d2f2a; transform: translateY(-1px); }

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero-section {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 32px 64px;
  text-align: center;
}

/* Decorative blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.45;
  animation: blobFloat 8s ease-in-out infinite;
}
.blob-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #EBCFC4 0%, transparent 70%);
  top: -120px; right: -100px;
  animation-delay: 0s;
}
.blob-2 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, #DDB8A6 0%, transparent 70%);
  bottom: -80px; left: -80px;
  animation-delay: -3s;
}
.blob-3 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, #E7D8CC 0%, transparent 70%);
  top: 40%; right: 10%;
  animation-delay: -5s;
}
@keyframes blobFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-24px) scale(1.04); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  animation: heroFadeUp 0.9s ease both;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  background: var(--card);
  border: 1px solid var(--beige);
  border-radius: var(--radius-btn);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
}
.badge-dot { color: var(--rose); font-size: 0.7rem; }

.hero-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 600;
  line-height: 1.13;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.hero-headline-em {
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(135deg, #C17B5C, #CFAFA1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink-light);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 36px;
  background: linear-gradient(135deg, #C17B5C 0%, #CFAFA1 100%);
  color: #FFFCF8;
  border-radius: var(--radius-btn);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(193,123,92,0.38);
  transition: transform var(--transition), box-shadow var(--transition);
  margin-bottom: 40px;
}
.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(193,123,92,0.46);
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 28px;
}
.hero-feature {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--ink-light);
  font-weight: 400;
}
.fdot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rose);
  flex-shrink: 0;
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.scroll-line {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--rose), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity: 0.4; transform: scaleY(1); }
  50%      { opacity: 1;   transform: scaleY(1.15); }
}

/* ══════════════════════════════════════
   FORM SECTION
══════════════════════════════════════ */
.form-section {
  padding: 80px 32px 100px;
}
.form-container {
  max-width: 780px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-luxury);
  padding: 56px 56px 60px;
  border: 1px solid rgba(231,216,204,0.5);
}

.form-header { margin-bottom: 44px; text-align: center; }
.form-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--rose);
  font-weight: 500;
  margin-bottom: 12px;
}
.form-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 12px;
}
.form-sub {
  font-size: 0.92rem;
  color: var(--ink-light);
  line-height: 1.65;
  max-width: 520px;
  margin: 0 auto;
}

/* Field groups */
.fg { display: flex; flex-direction: column; gap: 6px; margin-bottom: 28px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 0;
}
.form-row .fg { margin-bottom: 28px; }

.flabel {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.req { color: var(--rose); }
.fhint {
  font-size: 0.77rem;
  color: var(--ink-light);
  margin-top: -2px;
}
.ferror {
  font-size: 0.76rem;
  color: #C17878;
  font-weight: 500;
}
.ferror.hidden { display: none; }

/* Inputs */
.finput,
.fselect,
.ftextarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg);
  border: 1.5px solid var(--beige);
  border-radius: var(--radius-input);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
.finput::placeholder,
.ftextarea::placeholder { color: var(--ink-light); opacity: 0.7; }
.finput:focus,
.fselect:focus,
.ftextarea:focus {
  border-color: var(--peach);
  box-shadow: 0 0 0 4px rgba(221,184,166,0.22);
}
.finput.error,
.fselect.error { border-color: #C17878; }

.ftextarea { resize: vertical; min-height: 90px; line-height: 1.6; }

/* Custom select */
.sel-wrap { position: relative; }
.sel-wrap .fselect { padding-right: 40px; cursor: pointer; }
.sel-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-light);
  pointer-events: none;
  display: flex;
}

/* Personality chips */
.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 4px;
}
.chip {
  padding: 8px 18px;
  border-radius: var(--radius-chip);
  border: 1.5px solid var(--beige);
  background: var(--bg);
  color: var(--ink-light);
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--peach);
  color: var(--ink);
  background: rgba(221,184,166,0.12);
}
.chip.active {
  background: linear-gradient(135deg, #CFAFA1, #DDB8A6);
  border-color: transparent;
  color: #FFFCF8;
  box-shadow: 0 4px 14px rgba(207,175,161,0.40);
}

/* Generate button */
.gen-btn {
  width: 100%;
  margin-top: 8px;
  padding: 17px 32px;
  background: linear-gradient(135deg, #C17B5C 0%, #CFAFA1 100%);
  color: #FFFCF8;
  border: none;
  border-radius: var(--radius-btn);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 28px rgba(193,123,92,0.32);
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.gen-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(193,123,92,0.42);
}
.gen-btn:disabled { opacity: 0.75; cursor: not-allowed; }
.gen-text, .gen-loading {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.gen-loading.hidden,
.gen-text.hidden { display: none; }

/* Spin animation */
.spin-icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════
   RESULTS SECTION
══════════════════════════════════════ */
.results-section {
  padding: 80px 32px 100px;
  background: linear-gradient(180deg, var(--bg) 0%, #F2EDE5 100%);
}
.results-section.hidden { display: none; }

.results-container { max-width: 1160px; margin: 0 auto; }

.results-header {
  text-align: center;
  margin-bottom: 52px;
  animation: fadeUp 0.6s ease both;
}
.results-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--rose);
  font-weight: 500;
  margin-bottom: 12px;
}
.results-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 12px;
}
.results-title-name {
  font-style: italic;
  color: var(--rose);
}
.results-sub {
  font-size: 0.92rem;
  color: var(--ink-light);
  max-width: 480px;
  margin: 0 auto;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.card-full  { grid-column: 1 / -1; }
.card-half  { grid-column: span 1; }

/* Result card base */
.result-card {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-luxury);
  border: 1px solid rgba(231,216,204,0.5);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: fadeUp 0.6s ease both;
}
.result-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-luxury-md);
}

/* Stagger animation for cards */
.result-card:nth-child(1) { animation-delay: 0.05s; }
.result-card:nth-child(2) { animation-delay: 0.12s; }
.result-card:nth-child(3) { animation-delay: 0.18s; }
.result-card:nth-child(4) { animation-delay: 0.24s; }
.result-card:nth-child(5) { animation-delay: 0.30s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Card header */
.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(231,216,204,0.5);
}
.card-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-head-text { flex: 1; min-width: 0; }
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.card-sub {
  font-size: 0.77rem;
  color: var(--ink-light);
  margin-top: 2px;
}

/* Copy button in cards */
.copy-btn {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1.5px solid var(--beige);
  background: transparent;
  color: var(--ink-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}
.copy-btn:hover {
  background: var(--beige);
  color: var(--ink);
  border-color: var(--peach);
}

/* Card body */
.card-body { padding: 28px 28px 28px; }

/* ── Brand Essence card ── */
.essence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
}
.essence-full { grid-column: 1 / -1; }
.essence-block { display: flex; flex-direction: column; gap: 8px; }
.elabel {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--rose);
  font-weight: 600;
}
.etext {
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.65;
}

/* Keyword pills */
.kw-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.kw-pill {
  padding: 5px 14px;
  background: linear-gradient(135deg, rgba(207,175,161,0.18), rgba(221,184,166,0.20));
  border: 1px solid rgba(207,175,161,0.45);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ── Color swatches ── */
.swatches-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.swatch-item {
  flex: 1;
  min-width: 80px;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(231,216,204,0.4);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition);
}
.swatch-item:hover { transform: translateY(-3px); }
.swatch-color {
  height: 80px;
  width: 100%;
  flex-shrink: 0;
}
.swatch-info {
  padding: 10px 10px 12px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.swatch-role {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--rose);
  font-weight: 600;
}
.swatch-name {
  font-size: 0.78rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.3;
}
.swatch-hex {
  font-size: 0.72rem;
  color: var(--ink-light);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--beige);
  transition: all var(--transition);
  width: fit-content;
}
.swatch-hex:hover {
  background: var(--beige);
  color: var(--ink);
}

/* ── Typography card ── */
.type-font-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(231,216,204,0.5);
  background: var(--bg);
  margin-bottom: 14px;
}
.type-role {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rose);
  font-weight: 600;
}
.type-preview-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.type-preview-body {
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.5;
}
.type-name {
  font-size: 0.82rem;
  color: var(--ink);
  font-weight: 600;
}
.type-backup-label {
  font-size: 0.75rem;
  color: var(--ink-light);
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 500;
}
.type-backup-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.type-backup-pill {
  padding: 4px 12px;
  border-radius: 50px;
  border: 1px solid var(--beige);
  background: var(--bg);
  font-size: 0.76rem;
  color: var(--ink-light);
}
.type-style-note {
  font-size: 0.82rem;
  color: var(--ink-light);
  line-height: 1.6;
  font-style: italic;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(231,216,204,0.5);
}

/* ── Brand Voice card ── */
.voice-tone {
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.68;
  font-style: italic;
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(207,175,161,0.12), rgba(235,207,196,0.15));
  border-left: 3px solid var(--rose);
  margin-bottom: 22px;
}
.voice-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.voice-list-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-weight: 600;
  margin-bottom: 10px;
}
.voice-list-title.do { color: #7AAB8A; }
.voice-list-title.dont { color: #B07878; }

.voice-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.voice-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--ink);
  line-height: 1.5;
}
.vi-check {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(122,171,138,0.18);
  color: #7AAB8A;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 700;
}
.vi-x {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(176,120,120,0.15);
  color: #B07878;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 700;
}

.voice-caption-block {
  padding-top: 18px;
  border-top: 1px solid rgba(231,216,204,0.5);
}
.voice-caption-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--rose);
  font-weight: 600;
  margin-bottom: 7px;
}
.voice-caption-text {
  font-size: 0.84rem;
  color: var(--ink-light);
  line-height: 1.65;
}

/* ── Visual Direction card ── */
.visual-row {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.visual-block { display: flex; flex-direction: column; gap: 5px; }
.visual-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--rose);
  font-weight: 600;
}
.visual-text {
  font-size: 0.84rem;
  color: var(--ink);
  line-height: 1.65;
}
.texture-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.texture-pill {
  padding: 4px 12px;
  border-radius: 50px;
  background: var(--bg);
  border: 1px solid var(--beige);
  font-size: 0.76rem;
  color: var(--ink-light);
}
.ig-vibe {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(207,175,161,0.10), rgba(231,216,204,0.18));
  border-radius: 14px;
  border: 1px solid rgba(207,175,161,0.30);
}
.ig-badge {
  padding: 4px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #CFAFA1, #DDB8A6);
  color: #FFFCF8;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-top: 2px;
}
.ig-text {
  font-size: 0.83rem;
  color: var(--ink);
  line-height: 1.6;
}

/* ══════════════════════════════════════
   MOOD BOARD
══════════════════════════════════════ */

/* Header action group (refresh + copy) */
.mb-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Refresh button */
.mb-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--beige);
  background: transparent;
  color: var(--ink-light);
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.mb-refresh-btn:hover {
  border-color: var(--peach);
  color: var(--ink);
  background: rgba(221,184,166,0.12);
}
.mb-refresh-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Hint text */
.mb-hint {
  font-size: 0.83rem;
  color: var(--ink-light);
  line-height: 1.65;
  margin-bottom: 22px;
  font-style: italic;
}
.mb-hint strong { color: var(--ink); font-weight: 500; font-style: normal; }

/* ── Grid layout: 3-col masonry with explicit placement ── */
.moodboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 180px);
  gap: 12px;
}

/* Explicit placement creates the staggered masonry look */
.mood-tile:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
.mood-tile:nth-child(2) { grid-column: 2; grid-row: 1; }
.mood-tile:nth-child(3) { grid-column: 3; grid-row: 1 / 3; }
.mood-tile:nth-child(4) { grid-column: 2; grid-row: 2; }
.mood-tile:nth-child(5) { grid-column: 1; grid-row: 3; }
.mood-tile:nth-child(6) { grid-column: 2; grid-row: 3 / 5; }
.mood-tile:nth-child(7) { grid-column: 3; grid-row: 3; }
.mood-tile:nth-child(8) { grid-column: 1; grid-row: 4; }
.mood-tile:nth-child(9) { grid-column: 3; grid-row: 4; }

/* ── Individual tile ── */
.mood-tile {
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, var(--mb-c1, #E7D8CC), var(--mb-c2, #CFAFA1));
  cursor: default;
}

/* Skeleton pulse while loading */
.mood-skel {
  animation: skeletonPulse 1.6s ease-in-out infinite;
}
@keyframes skeletonPulse {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 0.90; }
}

/* Image wrapper — fills the tile completely */
.mood-img-wrap {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Image becomes visible after load */
.mood-loaded .mood-img-wrap { opacity: 1; }

/* Errored tile keeps the gradient fallback, hides img-wrap */
.mood-errored .mood-img-wrap { display: none; }

.mood-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.mood-tile:hover .mood-img-wrap img { transform: scale(1.06); }

/* Overlay label — slides up on hover */
.mood-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 12px 14px;
  background: linear-gradient(transparent 40%, rgba(45,30,25,0.68));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mood-tile:hover .mood-overlay { opacity: 1; }

.mood-label {
  font-size: 0.70rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(255,252,248,0.95);
}

/* Gradient fallback when image fails (or while loading) */
.mood-fallback-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  /* Hidden once image loads */
  transition: opacity 0.4s ease;
}
.mood-loaded .mood-fallback-inner { opacity: 0; pointer-events: none; }

.mood-fallback-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(92,74,66,0.55);
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .moodboard-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: unset;
    grid-auto-rows: 190px;
  }
  /* Reset explicit placement; use 2-col auto-flow */
  .mood-tile:nth-child(n) { grid-column: auto; grid-row: auto; }
  /* Restore tall tiles for 2-col */
  .mood-tile:nth-child(1),
  .mood-tile:nth-child(4) { grid-row: span 2; }
  /* Hide the 9th tile in 2-col to avoid odd orphan */
  .mood-tile:nth-child(9) { display: none; }
}

@media (max-width: 480px) {
  .moodboard-grid { grid-auto-rows: 150px; gap: 8px; }
  .mood-tile { border-radius: 14px; }
  .mood-tile:nth-child(1),
  .mood-tile:nth-child(4) { grid-row: span 2; }
}

/* ══════════════════════════════════════
   EXPORT BAR
══════════════════════════════════════ */
.export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 28px 36px;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-luxury);
  border: 1px solid rgba(231,216,204,0.5);
  animation: fadeUp 0.6s 0.4s ease both;
}
.export-label {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--ink);
  font-style: italic;
}
.export-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-btn);
  font-family: 'Poppins', sans-serif;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}
.btn-copy-all {
  background: linear-gradient(135deg, #C17B5C, #CFAFA1);
  color: #FFFCF8;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(193,123,92,0.28);
}
.btn-copy-all:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(193,123,92,0.36);
}
.btn-pdf {
  background: var(--ink);
  color: var(--card);
  border-color: transparent;
}
.btn-pdf:hover { background: #3d2f2a; transform: translateY(-1px); }

.btn-txt {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-txt:hover {
  background: var(--ink);
  color: var(--card);
  transform: translateY(-1px);
}

.btn-regen {
  background: transparent;
  color: var(--ink);
  border-color: var(--beige);
}
.btn-regen:hover {
  border-color: var(--peach);
  background: rgba(221,184,166,0.12);
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.site-footer {
  background: var(--ink);
  padding: 52px 32px;
  text-align: center;
}
.footer-inner { max-width: 480px; margin: 0 auto; }
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--card);
  margin-bottom: 8px;
}
.footer-tag {
  font-size: 0.88rem;
  color: var(--peach);
  margin-bottom: 16px;
  font-weight: 300;
}
.footer-copy {
  font-size: 0.76rem;
  color: rgba(255,252,248,0.35);
  letter-spacing: 0.03em;
}

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--card);
  padding: 12px 22px;
  border-radius: var(--radius-btn);
  font-size: 0.84rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(92,74,66,0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  .form-container { padding: 40px 36px 44px; }
  .cards-grid { grid-template-columns: 1fr; }
  .card-full, .card-half { grid-column: span 1; }
  .essence-grid { grid-template-columns: 1fr; }
  .voice-lists { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-inner { padding: 0 20px; }
  .hero-section { padding: 60px 20px 56px; }
  .form-section { padding: 48px 16px 64px; }
  .form-container { padding: 32px 24px 36px; }
  .form-row { grid-template-columns: 1fr; }
  .results-section { padding: 56px 16px 72px; }
  .cards-grid { gap: 16px; }
  .card-header { padding: 20px 20px 16px; gap: 10px; }
  .card-body { padding: 20px 20px 22px; }
  .export-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 24px;
  }
  .export-actions { width: 100%; }
  .export-btn { flex: 1; justify-content: center; }
  .swatches-row { gap: 8px; }
  .swatch-color { height: 60px; }
  .swatch-info { padding: 8px 8px 10px; }
}

@media (max-width: 400px) {
  .hero-headline { font-size: 2.2rem; }
  .chips-wrap { gap: 7px; }
  .chip { padding: 7px 14px; font-size: 0.78rem; }
}

/* ══════════════════════════════════════
   APP SHELL VISIBILITY
══════════════════════════════════════ */
.app-hide { display: none !important; }
.bg-hide  { display: none !important; }

/* ══════════════════════════════════════
   NAV RIGHT + ACCOUNT MENU
══════════════════════════════════════ */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Account wrapper */
.nav-account { position: relative; }

.nav-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--beige);
  background: transparent;
  color: var(--ink-light);
  font-family: 'Poppins', sans-serif;
  font-size: 0.80rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  max-width: 200px;
}
.nav-account-btn:hover {
  border-color: var(--peach);
  color: var(--ink);
  background: rgba(221,184,166,0.10);
}
#nav-user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dropdown menu */
.nav-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--card);
  border: 1px solid rgba(231,216,204,0.6);
  border-radius: 16px;
  box-shadow: var(--shadow-luxury-md);
  padding: 6px;
  z-index: 150;
  animation: fadeUp 0.18s ease both;
}
.nav-account-menu.hidden { display: none; }

.nav-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 10px;
  transition: background var(--transition), color var(--transition);
  text-align: left;
}
.nav-menu-item:hover { background: rgba(231,216,204,0.45); }
.nav-menu-item--danger { color: #B07878; }
.nav-menu-item--danger:hover { background: rgba(176,120,120,0.10); }

/* ══════════════════════════════════════
   AUTH OVERLAY
══════════════════════════════════════ */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-luxury-lg);
  border: 1px solid rgba(231,216,204,0.5);
  padding: 48px 44px 44px;
}

.auth-view.hidden { display: none; }

.auth-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  margin-bottom: 28px;
}

.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 8px;
  text-align: center;
}

.auth-sub {
  font-size: 0.88rem;
  color: var(--ink-light);
  line-height: 1.6;
  text-align: center;
  margin-bottom: 28px;
}

/* Google button */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--beige);
  background: var(--card);
  color: var(--ink);
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}
.btn-google:hover {
  border-color: var(--peach);
  box-shadow: var(--shadow-luxury);
  transform: translateY(-1px);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--ink-light);
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--beige);
}

/* Submit button inside auth */
.auth-submit-btn {
  margin-top: 4px;
  margin-bottom: 0;
}

/* Switch link */
.auth-switch {
  text-align: center;
  font-size: 0.83rem;
  color: var(--ink-light);
  margin-top: 22px;
}
.auth-link {
  background: none;
  border: none;
  color: var(--rose);
  font-family: 'Poppins', sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
.auth-link:hover { color: var(--ink); }

/* Forgot password link row */
.flabel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.auth-link--small {
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-light);
}
.auth-link--small:hover { color: var(--rose); }

/* Responsive auth card */
@media (max-width: 500px) {
  .auth-card { padding: 36px 24px 32px; }
  .auth-title { font-size: 1.4rem; }
}

/* ══════════════════════════════════════
   BRAND HISTORY SECTION
══════════════════════════════════════ */
.history-section {
  padding: 56px 32px 0;
}
.history-section.hidden { display: none; }

.history-container { max-width: 1160px; margin: 0 auto; }

.history-header {
  text-align: center;
  margin-bottom: 32px;
}
.history-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--rose);
  font-weight: 500;
  margin-bottom: 10px;
}
.history-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.history-sub {
  font-size: 0.88rem;
  color: var(--ink-light);
}

/* History grid */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* History card */
.hc-card {
  background: var(--card);
  border-radius: 20px;
  border: 1px solid rgba(231,216,204,0.5);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.hc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-luxury);
}

/* Color palette preview strip */
.hc-palette {
  display: flex;
  height: 10px;
}
.hc-dot {
  flex: 1;
}

.hc-body {
  padding: 16px 16px 10px;
  flex: 1;
}
.hc-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.hc-badge {
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(207,175,161,0.15);
  border: 1px solid rgba(207,175,161,0.35);
  font-size: 0.72rem;
  color: var(--ink-light);
  font-weight: 500;
}
.hc-date {
  font-size: 0.72rem;
  color: var(--ink-light);
  opacity: 0.7;
}

.hc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(231,216,204,0.4);
}
.hc-btn-load {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-btn);
  background: linear-gradient(135deg, #C17B5C, #CFAFA1);
  color: #FFFCF8;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.hc-btn-load:hover { opacity: 0.88; transform: translateY(-1px); }

.hc-btn-del {
  width: 32px; height: 32px;
  border-radius: 10px;
  border: 1.5px solid rgba(176,120,120,0.35);
  background: transparent;
  color: #B07878;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}
.hc-btn-del:hover {
  background: rgba(176,120,120,0.10);
  border-color: #B07878;
}

/* ══════════════════════════════════════
   CHANGE PASSWORD MODAL
══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(92,74,66,0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.modal-overlay.hidden { display: none; }

.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-luxury-lg);
  border: 1px solid rgba(231,216,204,0.5);
  padding: 40px 36px 36px;
  animation: fadeUp 0.22s ease both;
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.modal-sub {
  font-size: 0.84rem;
  color: var(--ink-light);
  line-height: 1.6;
  margin-bottom: 24px;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.modal-submit-btn { margin-top: 0; font-size: 0.9rem; padding: 14px 24px; }
.modal-cancel-btn {
  width: 100%;
  padding: 11px 24px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--beige);
  background: transparent;
  color: var(--ink-light);
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.modal-cancel-btn:hover {
  border-color: var(--peach);
  color: var(--ink);
}

@media (max-width: 480px) {
  .modal-card { padding: 32px 22px 28px; }
  .history-section { padding: 40px 16px 0; }
  .history-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hc-name { font-size: 0.88rem; }
}

/* ══════════════════════════════════════
   PRINT / PDF STYLES
══════════════════════════════════════ */
@media print {

  /* ── 1. Force ALL background colours, images & gradients to print ── */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* ── 2. Hide UI chrome ── */
  .nav-bar,
  .hero-section,
  .form-section,
  .export-bar,
  .site-footer,
  .toast,
  .copy-btn,
  .mb-refresh-btn,
  .mb-hint,
  .mood-overlay,
  .blob,
  .scroll-cue { display: none !important; }

  /* ── 3. Page shell ── */
  body { background: #fff; color: #333; }
  .results-section {
    padding: 20px;
    background: #fff;
    display: block !important;
  }
  .results-section.hidden { display: block !important; }

  /* ── 4. Cards ── */
  .cards-grid { display: block; }
  .result-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 28px;
    box-shadow: none;
    border: 1.5px solid #E7D8CC;
  }
  .card-header { border-bottom: 1.5px solid #E7D8CC; }
  .results-header { margin-bottom: 28px; }
  .results-title  { font-size: 2rem; }
  a { text-decoration: none; color: inherit; }

  /* ── 5. Colour palette — force swatch backgrounds to print ── */
  .swatch-color {
    height: 70px;
    border-radius: 10px 10px 0 0;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  /* ── 6. Mood board — show images, flatten grid for print ── */
  #card-moodboard { break-before: page; }

  .moodboard-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: unset !important;
    grid-auto-rows: 160px !important;
    gap: 10px !important;
  }
  /* Reset all explicit placement so tiles flow naturally */
  .mood-tile:nth-child(n) {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  .mood-tile {
    break-inside: avoid;
    page-break-inside: avoid;
    position: relative;
    overflow: hidden;
  }
  /* Make images visible regardless of JS load-state class */
  .mood-img-wrap {
    opacity: 1 !important;
    position: absolute;
    inset: 0;
  }
  .mood-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  /* Show brand-colour gradient on tiles where image failed */
  .mood-errored {
    background: linear-gradient(135deg, var(--mb-c1, #E7D8CC), var(--mb-c2, #CFAFA1)) !important;
  }
}
