/* ═══════════════════════════════════════════════
   PAWSCAR WILDE — Shared Stylesheet
   Covers: index.html + chat.html
   ═══════════════════════════════════════════════ */

/* ── VARIABLES: PARK MODE (light, default) ── */
:root {
  --cream: #f5f0e8;
  --parchment: #ede5d0;
  --ink: #1a1208;
  --gold: #c9a84c;
  --gold-light: #e8d5a3;
  --rust: #8b3a2a;
  --sage: #4a5e4a;
  --muted: rgba(26,18,8,0.5);
  --shadow: rgba(26,18,8,0.12);
  --nav-bg: rgba(245,240,232,0.94);
  --dark-bg: #1a1208;
}

/* ── VARIABLES: SOFA MODE (dark) ── */
body.sofa-mode {
  --cream: #0f0d09;
  --parchment: #1a160f;
  --ink: #e8d5a3;
  --gold: #c9a84c;
  --gold-light: #e8d5a3;
  --rust: #c4614a;
  --sage: #9ab89a;
  --muted: rgba(232,213,163,0.55);
  --shadow: rgba(0,0,0,0.4);
  --nav-bg: rgba(10,8,5,0.96);
  --dark-bg: #070604;
}

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

/* ── BASE BODY ── */
body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: 'Cormorant Garamond', serif;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(201,168,76,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(139,58,42,0.04) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── MODE TOGGLE ── */
.mode-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  background: #1a1208;
  border: 1px solid var(--gold);
  border-radius: 2rem;
  padding: 0.4rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.mode-toggle:hover { background: var(--gold); transform: translateY(-2px); }
.mode-toggle:hover .mode-label { color: #1a1208; }
.mode-icon { font-size: 1rem; line-height: 1; }
.mode-label {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.75rem;
  color: var(--gold-light);
  white-space: nowrap;
  transition: color 0.3s;
}

/* ── SHARED HEADER (chat page) ── */
header {
  text-align: center;
  padding: 3rem 2rem 1.5rem;
  position: relative;
}
.header-ornament {
  color: var(--gold);
  font-size: 1.2rem;
  letter-spacing: 0.5rem;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.2s;
}
h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.1;
  color: var(--ink);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.4s;
}
h1 span { color: var(--rust); }
.tagline {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--sage);
  margin-top: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.6s;
}
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem auto;
  max-width: 400px;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.7s;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.divider-paw { font-size: 1.2rem; }

/* ── SHARED FOOTER ── */
footer {
  background: var(--dark-bg);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.8rem;
  border-top: 1px solid rgba(201,168,76,0.2);
}
footer a { color: var(--gold); text-decoration: none; }
footer a:hover { color: var(--gold-light); }

/* ── SECTION DIVIDER ── */
.section-divider {
  text-align: center;
  padding: 1.5rem;
  color: var(--gold);
  font-size: 1.2rem;
  opacity: 0.5;
}

/* ── BUTTONS ── */
/* btn-primary: always dark fill, always gold text — never flips */
.btn-primary {
  background: #1a1208;
  color: #e8d5a3;
  padding: 0.8rem 2rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
  border: 1px solid var(--gold);
  text-decoration: none;
  transition: all 0.25s;
  letter-spacing: 0.02em;
  display: inline-block;
}
.btn-primary:hover {
  background: var(--gold);
  color: #1a1208;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.25);
}

/* btn-secondary: outline — light bg only, keep var() so it adapts */
.btn-secondary {
  background: transparent;
  color: var(--ink);
  padding: 0.8rem 2rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
  border: 1px solid var(--ink);
  text-decoration: none;
  transition: all 0.25s;
  display: inline-block;
}
.btn-secondary:hover {
  background: #1a1208;
  color: #e8d5a3;
  border-color: #1a1208;
  transform: translateY(-2px);
}

/* btn-gold: outline gold — for use on DARK backgrounds */
.btn-gold {
  background: transparent;
  color: var(--gold-light);
  padding: 0.8rem 2rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
  border: 1px solid var(--gold);
  text-decoration: none;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-gold:hover {
  background: var(--gold);
  color: var(--ink);
  transform: translateY(-2px);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.85); }
}
@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ════════════════════════════════════════
   INDEX.HTML STYLES
   ════════════════════════════════════════ */

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 3rem;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201,168,76,0.25);
  animation: slideDown 0.6s ease forwards;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
}
.nav-logo span { color: var(--rust); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--rust); }
.nav-cta {
  background: #1a1208 !important;
  color: #e8d5a3 !important;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--gold);
  transition: all 0.2s !important;
}
.nav-cta:hover {
  background: var(--gold) !important;
  color: #1a1208 !important;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
}
.hero-eyebrow {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.3s;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 900;
  line-height: 0.95;
  color: var(--ink);
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.5s;
}
.hero-title em {
  font-style: italic;
  color: var(--rust);
  display: block;
}
.hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-style: italic;
  color: var(--muted);
  margin-top: 1.5rem;
  max-width: 520px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.7s;
}
.hero-paw {
  font-size: 3rem;
  margin: 1.5rem 0;
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.9s;
  filter: drop-shadow(0 4px 8px rgba(201,168,76,0.3));
}
.hero-quote {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--ink);
  max-width: 580px;
  line-height: 1.6;
  padding: 1.5rem 2rem;
  border-left: 3px solid var(--gold);
  border-right: 3px solid var(--gold);
  background: rgba(201,168,76,0.06);
  margin: 1rem 0;
  opacity: 0;
  animation: fadeUp 1s ease forwards 1.1s;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 1s ease forwards 1.3s;
}
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeUp 1s ease forwards 2s;
}
.scroll-hint span {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.2em;
}
.scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: pulse 2s infinite;
}

/* ── ABOUT ── */
.about {
  padding: 6rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-portrait {
  position: relative;
}
.portrait-frame {
  aspect-ratio: 3/4;
  background: var(--parchment);
  border: 1px solid var(--gold-light);
  position: relative;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--gold-light), 12px 12px 0 rgba(201,168,76,0.2);
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  filter: sepia(10%) contrast(1.05);
}
body.sofa-mode .portrait-frame img {
  filter: sepia(10%) contrast(1.05) brightness(1.4);
}
.portrait-frame::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201,168,76,0.4);
  pointer-events: none;
}
.portrait-caption {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.75rem;
  letter-spacing: 0.05em;
}
.about-text .section-label {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.about-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-style: italic;
  line-height: 1.15;
  margin: 0.75rem 0;
  letter-spacing: 0.05em;
}
.about-text h2 span { color: var(--rust); }
.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 1rem;
}

/* ── MUSINGS ── */
.musings {
  background: var(--dark-bg);
  padding: 6rem 2rem;
}
.musings-inner { max-width: 1100px; margin: 0 auto; }
.musings .section-label {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-align: center;
  display: block;
  margin-bottom: 0.75rem;
}
.musings h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-style: italic;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 3rem;
}
.musings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.musing-card {
  border: 1px solid rgba(201,168,76,0.2);
  padding: 2rem;
  background: rgba(255,255,255,0.03);
  transition: transform 0.3s, border-color 0.3s;
}
.musing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201,168,76,0.5);
}
.musing-card blockquote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--gold-light);
  margin-bottom: 1rem;
}
.musing-card cite {
  font-size: 0.8rem;
  color: var(--gold);
  font-style: normal;
  font-family: 'IM Fell English', serif;
}

/* ── CHAT CTA ── */
.chat-cta {
  padding: 6rem 2rem;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.chat-cta .section-label {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  display: block;
}
.chat-cta h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.chat-cta h2 span { color: var(--rust); }
.chat-cta p {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  font-style: italic;
}

/* ── FOLLOW SECTION ── */
.follow-section {
  background: var(--dark-bg);
  padding: 5rem 2rem;
  text-align: center;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
}
.follow-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-style: italic;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}
.follow-section p {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.follow-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ════════════════════════════════════════
   CHAT.HTML STYLES
   ════════════════════════════════════════ */

.chat-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.9s;
}

.chat-box {
  background: var(--parchment);
  border: 1px solid var(--gold-light);
  border-radius: 2px;
  box-shadow: 0 2px 4px var(--shadow), 0 8px 32px rgba(26,18,8,0.08);
  overflow: hidden;
}

.chat-header {
  background: linear-gradient(135deg, var(--dark-bg) 0%, #2d1f0a 100%);
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 2px solid var(--gold);
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--rust) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  border: 2px solid var(--gold-light);
  box-shadow: 0 0 12px rgba(201,168,76,0.3);
  overflow: hidden;
}

.chat-header-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--gold-light);
  font-weight: 400;
}
.chat-header-text p {
  font-size: 0.75rem;
  color: rgba(232,213,163,0.65);
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.05em;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #6abf69;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  animation: pulse 2s infinite;
}

#messages {
  padding: 1.5rem;
  min-height: 320px;
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: var(--parchment);
}

.message { display: flex; flex-direction: column; max-width: 85%; }
.message.pawscar { align-self: flex-start; }
.message.user    { align-self: flex-end; }

.message-label {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
  letter-spacing: 0.05em;
}
.message.user .message-label { text-align: right; }

.bubble {
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  line-height: 1.7;
  font-family: 'Cormorant Garamond', serif;
  border-radius: 2px;
}
.message.pawscar .bubble {
  background: var(--parchment);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--ink);
  border-left: 3px solid var(--gold);
}
.message.user .bubble {
  background: #2d1f0a;
  color: var(--gold-light);
  border: 1px solid var(--gold);
}

.suggestions {
  padding: 0.75rem 1.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(201,168,76,0.15);
  background: var(--parchment);
}
.chip {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--gold-light);
  color: var(--rust);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 1px;
  white-space: nowrap;
}
.chip:hover {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.chat-input-area {
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(201,168,76,0.25);
  background: var(--parchment);
}
.chat-input-area textarea {
  flex: 1;
  padding: 1rem 1.2rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  background: transparent;
  border: none;
  color: var(--ink);
  resize: none;
  outline: none;
  line-height: 1.5;
  max-height: 120px;
}
.chat-input-area textarea::placeholder { color: var(--muted); font-style: italic; }
.chat-input-area button {
  padding: 1rem 1.5rem;
  background: #1a1208;
  color: #e8d5a3;
  border: none;
  border-left: 1px solid rgba(201,168,76,0.25);
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.chat-input-area button:hover { background: var(--gold); color: #1a1208; }
.chat-input-area button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Typing indicator */
.typing-indicator { display: flex; gap: 4px; align-items: center; padding: 0.4rem 0; }
.typing-indicator span {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

/* Loading spinner */
.loading-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--gold-light);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* Social links below chat */
.chat-social {
  text-align: center;
  margin-top: 1.2rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.chat-social a {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--rust);
  text-decoration: none;
  border: 1px solid var(--gold-light);
  padding: 0.35rem 0.9rem;
  transition: all 0.2s;
}
.chat-social a:hover {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .about { grid-template-columns: 1fr; gap: 2.5rem; padding: 4rem 1.5rem; }
  .musings-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(3.5rem, 16vw, 5rem); }
  .portrait-frame { aspect-ratio: 1/1; max-width: 280px; margin: 0 auto; }
  .chat-wrapper { padding: 0 1rem 2rem; }
}

/* ── CHAT PAGE: nav back link ── */
.nav-back {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--rust); }

/* ── CHAT PAGE: thinking dots ── */
.thinking {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 0.6rem 0;
}
.thinking span {
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 1.2s infinite;
}
.thinking span:nth-child(2) { animation-delay: 0.2s; }
.thinking span:nth-child(3) { animation-delay: 0.4s; }

/* ── CHAT PAGE: footer note ── */
.footer-note {
  text-align: center;
  margin-top: 1rem;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.75rem;
  color: var(--muted);
}
