/* =========================================================
   DreamMeaning.Today — Human-Centric Brand Layer
   Purpose: remove AI-template purple/black feeling and create
   a calm, emotional, journal-like dream interpretation experience.
   ========================================================= */

:root {
  --dm-bg: #f8f3ea;
  --dm-bg-soft: #fffaf2;
  --dm-card: #fffdf8;
  --dm-ink: #2e2a26;
  --dm-muted: #6f655c;
  --dm-border: #e4d8c8;

  --dm-terracotta: #b86b4b;
  --dm-terracotta-dark: #95523a;
  --dm-cocoa: #5a3e36;
  --dm-sage: #8c9a7a;
  --dm-blue: #7e93a8;
  --dm-sand: #d9c6ad;

  --dm-shadow: 0 20px 60px rgba(70, 48, 35, 0.08);
  --dm-radius: 28px;
}

/* Global human warmth */
body {
  background:
    radial-gradient(circle at top left, rgba(184, 107, 75, 0.10), transparent 32%),
    radial-gradient(circle at top right, rgba(126, 147, 168, 0.12), transparent 30%),
    linear-gradient(180deg, var(--dm-bg) 0%, #fffaf2 45%, #f6efe4 100%) !important;
  color: var(--dm-ink) !important;
}

/* Kill harsh AI purple/black feel where possible */
.bg-black,
.bg-gray-950,
.bg-slate-950,
.bg-zinc-950 {
  background-color: var(--dm-bg) !important;
}

.text-white {
  color: var(--dm-ink) !important;
}

.text-gray-300,
.text-gray-400,
.text-slate-300,
.text-slate-400,
.text-zinc-300,
.text-zinc-400 {
  color: var(--dm-muted) !important;
}

/* Exception: restore legible text inside dark-background cards */
a[class*="bg-slate-9"] .text-slate-100,
a[class*="bg-slate-9"] .text-slate-300,
a[class*="bg-slate-9"] .text-slate-400,
a[class*="bg-slate-8"] .text-slate-100,
a[class*="bg-slate-8"] .text-slate-300,
a[class*="bg-slate-8"] .text-slate-400,
div[class*="bg-slate-9"] .text-slate-300,
div[class*="bg-slate-9"] .text-slate-400 {
  color: rgba(255, 255, 255, 0.82) !important;
}

a[class*="bg-slate-9"] .text-slate-100,
a[class*="bg-slate-8"] .text-slate-100 {
  color: #f1f5f9 !important;
}

/* Softer cards */
.dm-human-card,
.card,
article,
section .rounded-2xl,
section .rounded-3xl {
  border-color: var(--dm-border) !important;
}

/* Human brand buttons */
.dm-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--dm-cocoa);
  color: #fffdf8 !important;
  padding: 0.95rem 1.35rem;
  font-weight: 700;
  box-shadow: 0 14px 35px rgba(90, 62, 54, 0.18);
  transition: all 180ms ease;
}

.dm-primary-button:hover {
  background: var(--dm-terracotta-dark);
  transform: translateY(-1px);
}

.dm-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--dm-border);
  background: rgba(255, 253, 248, 0.75);
  color: var(--dm-ink) !important;
  padding: 0.95rem 1.35rem;
  font-weight: 700;
  transition: all 180ms ease;
}

.dm-secondary-button:hover {
  background: #fffdf8;
  border-color: var(--dm-sand);
  transform: translateY(-1px);
}

/* Homepage hero */
.dm-hero {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 42px 42px;
  padding: 72px 20px 56px;
}

.dm-hero-inner {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
  box-sizing: border-box;
}

.dm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--dm-border);
  background: rgba(255, 253, 248, 0.78);
  color: var(--dm-muted);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.dm-hero h1 {
  margin-top: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
  color: var(--dm-ink);
}

.dm-hero h1 span {
  color: var(--dm-terracotta);
}

.dm-hero-subtitle {
  margin-top: 24px;
  max-width: 650px;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.7;
  color: var(--dm-muted);
}

.dm-trust-line {
  margin-top: 18px;
  color: var(--dm-muted);
  font-size: 0.96rem;
}

.dm-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Dream input panel */
.dm-dream-panel {
  position: relative;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: rgba(255, 253, 248, 0.86);
  backdrop-filter: blur(18px);
  border: 1px solid var(--dm-border);
  border-radius: var(--dm-radius);
  box-shadow: var(--dm-shadow);
  padding: 24px;
}


.dm-panel-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  line-height: 1.15;
  color: var(--dm-ink);
  letter-spacing: -0.025em;
}

.dm-panel-copy {
  margin-top: 8px;
  color: var(--dm-muted);
  line-height: 1.6;
}

.dm-dream-textarea {
  width: 100%;
  min-height: 170px;
  margin-top: 18px;
  border-radius: 22px;
  border: 1px solid var(--dm-border);
  background: #fffaf3;
  color: var(--dm-ink);
  padding: 16px 18px;
  line-height: 1.6;
  outline: none;
  resize: vertical;
}

.dm-dream-textarea::placeholder {
  color: #a29488;
}

.dm-dream-textarea:focus {
  border-color: rgba(184, 107, 75, 0.72);
  box-shadow: 0 0 0 4px rgba(184, 107, 75, 0.11);
}

.dm-feeling-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.dm-feeling-chip {
  display: inline-flex;
  align-items: center;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--dm-border);
  background: rgba(255, 253, 248, 0.9);
  color: var(--dm-muted);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 0.84rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 150ms ease, background 150ms ease;
}

.dm-feeling-chip.active {
  border-color: var(--dm-terracotta);
  background: rgba(184, 107, 75, 0.10);
  color: var(--dm-terracotta);
}

.dm-lang-outer {
  display: flex;
  align-items: center;
  margin-top: 10px;
  gap: 6px;
}

.dm-lang-scroller {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.dm-lang-row {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  gap: 6px;
  padding-bottom: 2px;
  align-items: center;
  scrollbar-width: none;
}
.dm-lang-row::-webkit-scrollbar { display: none; }

.dm-lang-scroller {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.dm-lang-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--dm-border);
  background: rgba(255, 253, 248, 0.97);
  color: var(--dm-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
  -webkit-tap-highlight-color: transparent;
}
.dm-lang-arrow:hover {
  border-color: var(--dm-ink);
  color: var(--dm-ink);
}

.dm-lang-label {
  font-size: 0.85rem;
  flex-shrink: 0;
  opacity: 0.55;
  margin-right: 2px;
}

.dm-lang-chip {
  display: inline-flex;
  align-items: center;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--dm-border);
  background: rgba(255, 253, 248, 0.7);
  color: var(--dm-muted);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.dm-lang-chip.active {
  border-color: var(--dm-ink);
  background: rgba(47, 42, 38, 0.07);
  color: var(--dm-ink);
  font-weight: 600;
}

.dm-panel-submit {
  width: 100%;
  margin-top: 16px;
  border: 0;
  cursor: pointer;
}

/* Emotional navigation */
.dm-emotion-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 20px;
}

.dm-section-kicker {
  color: var(--dm-terracotta);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dm-section-title {
  margin-top: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4vw, 3.7rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--dm-ink);
}

.dm-section-copy {
  margin-top: 14px;
  max-width: 720px;
  color: var(--dm-muted);
  line-height: 1.7;
  font-size: 1.05rem;
}

.dm-emotion-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.dm-emotion-card {
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid var(--dm-border);
  border-radius: 24px;
  padding: 18px;
  min-height: 132px;
  box-shadow: 0 10px 30px rgba(70, 48, 35, 0.05);
  transition: all 180ms ease;
  text-decoration: none;
  color: var(--dm-ink) !important;
}

.dm-emotion-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--dm-shadow);
  border-color: rgba(184, 107, 75, 0.35);
}

.dm-emotion-icon {
  font-size: 1.55rem;
}

.dm-emotion-card h3 {
  margin-top: 14px;
  font-size: 1rem;
  font-weight: 850;
  color: var(--dm-ink);
}

.dm-emotion-card p {
  margin-top: 6px;
  color: var(--dm-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Methodology strip */
.dm-method-strip {
  max-width: 1180px;
  margin: 0 auto 52px;
  padding: 0 20px;
}

.dm-method-inner {
  background: linear-gradient(135deg, rgba(90, 62, 54, 0.96), rgba(77, 68, 58, 0.96));
  color: #fffdf8;
  border-radius: 32px;
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 22px;
  box-shadow: var(--dm-shadow);
}

.dm-method-inner h3 {
  color: #fffdf8;
  font-weight: 850;
  font-size: 1.05rem;
}

.dm-method-inner p {
  margin-top: 8px;
  color: rgba(255, 253, 248, 0.76);
  line-height: 1.55;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 980px) {
  .dm-hero-inner {
    grid-template-columns: 1fr;
  }

  .dm-emotion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dm-method-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .dm-hero {
    padding: 36px 16px 40px;
    border-radius: 0 0 28px 28px;
    overflow: hidden;
  }

  .dm-hero h1 {
    font-size: clamp(2.4rem, 11vw, 3rem);
    line-height: 0.95;
  }

  .dm-eyebrow {
    font-size: 0.78rem;
    padding: 6px 11px;
  }

  .dm-hero-subtitle {
    font-size: 1rem;
    margin-top: 16px;
  }

  .dm-trust-line {
    font-size: 0.88rem;
    margin-top: 14px;
  }

  .dm-hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 22px;
  }

  .dm-primary-button,
  .dm-secondary-button {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }

  .dm-dream-panel {
    padding: 18px 16px;
  }

  .dm-panel-title {
    font-size: 1.4rem;
  }

  .dm-emotion-grid {
    grid-template-columns: 1fr;
  }
}

/* Prevent any horizontal overflow sitewide on mobile */
@media (max-width: 640px) {
  html, body {
    overflow-x: hidden;
    max-width: 100%;
  }
}
