/* =========================
   RESET
========================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-image: url('./bkgnd.png');
  background-size: 110% auto;
  background-repeat: no-repeat;
  background-attachment: fixed;

  /* Arc crest aligned behind "Sunflower" */
  background-position: 70% -80px;

  min-height: 100vh;
  background-color: #E8DFD3; /* Warm Mist fallback */
  color: #1C1C1C; /* Ink */
  line-height: 1.65;
}

/* Hide overflow when full-canvas studio is active */
body:has(.full-canvas-studio[aria-hidden="false"]) {
  overflow: hidden;
}

/* Field Mode Tints - Subtle visual tuning */
body.mode-conserve {
  --field-tint: rgba(120, 140, 180, 0.03);
}

body.mode-steady {
  --field-tint: rgba(255, 255, 255, 0.02);
}

body.mode-prepare {
  --field-tint: rgba(200, 180, 140, 0.03);
}

body.mode-execute {
  --field-tint: rgba(255, 200, 120, 0.04);
}

body.mode-expand {
  --field-tint: rgba(255, 220, 160, 0.04);
}

/* Subtle field tint overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--field-tint, rgba(255, 255, 255, 0.04));
  pointer-events: none;
  z-index: 0;
}

/* Workspace container transparency */
.workspace,
.chat-container {
  background: transparent;
}

/* =========================
   SOFT SECTION TRANSITIONS
========================= */
main,
section,
.hero,
.orientation,
.rooms,
.workspace,
footer {
  position: relative;
  z-index: 1;
}

/* Removed: section fade lines interfere with continuous sky */

/* =========================
   TYPE
========================= */
h1, h3 { font-family: 'Cormorant Garamond', serif; }

h1 {
  font-size: clamp(3.2rem, 5.5vw, 4.8rem);
  font-weight: 500;
  margin-bottom: 1.6rem;
}

h3 {
  font-size: 1.55rem;
  font-weight: 500;
  margin-bottom: 0.7rem;
}

p { font-size: 1rem; color: #2A2A2A; } /* Warm dark, not pure Ink for readability */

/* =========================
   LABELS
========================= */
.eyebrow, .section-label {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #C4A574; /* Dawn Gold */
}

.section-label { margin-bottom: 2.1rem; }
.centered { text-align: center; }

/* =========================
   HERO
========================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: 7.5rem 7vw;
  background: transparent;
}

.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 920px;
}

.hero h1,
.hero p {
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.hero-subtext {
  max-width: 540px;
  font-size: 1.05rem;
  color: #cfd5de;
}

/* =========================
   TODAY STRIP
========================= */
.today-strip {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: #bfc6d2;
}

.today-item em {
  font-style: normal;
  color: #e0e4eb;
}

.divider { opacity: 0.4; }

/* =========================
   DESCENT CUE
========================= */
.descent-cue {
  margin-top: 3.6rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: rgba(210,177,120,0.9);
  opacity: 0.85;
  transition: opacity 200ms ease, transform 200ms ease;
}

.descent-cue:hover {
  opacity: 1;
  transform: translateY(2px);
}

/* =========================
   HERO ENVIRONMENT
========================= */
.hero,
.hero-veil,
.hero-environment {
  background: none;
}

.hero-environment {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.sola-presence {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: blur(0.6px) saturate(0.95);
  mix-blend-mode: screen;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* =========================
   ORIENTATION (moved to hero panel)
========================= */

/* =========================
   FIELD
========================= */
.field {
  padding: 7.5rem 7vw;
}

.field-inner {
  max-width: 920px;
}

.field-grid {
  /* No border - soft transitions only */
}

.field-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 18px 0;
}

.field-label {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #9fb0c6;
}

.field-value { text-align: right; }
.placeholder { font-style: italic; color: #aab2bf; }

.field-row-meta {
  grid-template-columns: 1fr;
  border-bottom: none;
}

.field-meta {
  font-size: 0.75rem;
  color: #8f98a6;
}

/* =========================
   ROOMS
========================= */
.rooms {
  padding: 7.5rem 7vw;
  opacity: 0;
  transform: translateY(24px);
  animation: rooms-arrive 900ms ease-out forwards;
  animation-delay: 400ms;
}

@keyframes rooms-arrive {
  to { opacity: 1; transform: translateY(0); }
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.4rem;
  margin-top: 3.4rem;
}

.room-card {
  background: rgba(255, 255, 255, 0.35); /* Glass Frosted */
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  padding: 2.6rem 2.4rem;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease, background 240ms ease;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.12),
    0 8px 16px rgba(0, 0, 0, 0.08);
}

.room-card:hover {
  transform: translateY(-7px);
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(196, 165, 116, 0.8); /* Dawn Gold */
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.15),
    0 12px 24px rgba(196, 165, 116, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.room-card:focus-visible {
  outline: none;
  border-color: #C4A574; /* Dawn Gold */
  box-shadow:
    0 0 0 3px rgba(196, 165, 116, 0.3),
    0 20px 40px rgba(0, 0, 0, 0.15);
}

/* =========================
   FULL CANVAS STUDIO
========================= */
.full-canvas-studio {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  opacity: 0;
  flex-direction: row;
  z-index: 100;
}

.full-canvas-studio[aria-hidden="false"] {
  display: flex;
  animation: studio-enter 600ms ease-out forwards;
}

@keyframes studio-enter {
  to { opacity: 1; }
}

/* Left Sidebar */
.studio-sidebar {
  width: 90px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0;
  gap: 1rem;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar-spacer {
  flex: 1;
}

.studio-sidebar button {
  width: 54px;
  height: 54px;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  border-radius: 14px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.studio-sidebar button:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(196, 165, 116, 0.25); /* Dawn Gold accent */
}

.studio-sidebar button:active {
  transform: translateY(0);
}

/* Main Canvas Area */
.studio-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Topbar */
.studio-topbar {
  height: 70px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2.5rem;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.studio-topbar h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 500;
  color: #2c2c2c;
  margin: 0;
}

.studio-actions {
  display: flex;
  gap: 0.5rem;
}

.studio-actions button {
  background: rgba(255, 255, 255, 0.6);
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  color: #2c2c2c;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.studio-actions button:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.studio-actions button:active {
  transform: translateY(0);
}

/* Canvas Area */
.studio-canvas-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4rem 6rem;
  background: transparent;
}

#canvasOutput {
  max-width: 1200px;
  margin: 0 auto;
  color: #2c2c2c;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Direct text rendering styles */
#canvasOutput p {
  margin-bottom: 1.5rem;
  color: #2c2c2c;
}

#canvasOutput .user-text {
  font-weight: 500;
  color: #1f2328;
  margin-bottom: 1rem;
}

#canvasOutput .assistant-text {
  color: #2c2c2c;
  margin-bottom: 2rem;
}

/* Custom scrollbar */
.studio-canvas-area::-webkit-scrollbar {
  width: 10px;
}

.studio-canvas-area::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.studio-canvas-area::-webkit-scrollbar-thumb {
  background: rgba(210, 177, 120, 0.25);
  border-radius: 5px;
}

.studio-canvas-area::-webkit-scrollbar-thumb:hover {
  background: rgba(210, 177, 120, 0.4);
}

/* Input Bar */
.studio-input-bar {
  height: 120px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 1rem;
  padding: 1.5rem 2.5rem;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.studio-input-bar textarea {
  flex: 1;
  height: 70px;
  border-radius: 16px;
  border: none;
  padding: 1rem 1.4rem;
  font-size: 1rem;
  resize: none;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-family: 'Montserrat', sans-serif;
  color: #2c2c2c;
}

.studio-input-bar textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.studio-input-bar textarea::placeholder {
  color: rgba(44, 44, 44, 0.4);
}

.studio-input-bar button {
  padding: 1.1rem 1.8rem;
  border-radius: 14px;
  border: none;
  background: #ffffff;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  color: #2c2c2c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
  height: 70px;
}

.studio-input-bar button:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.studio-input-bar button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* =========================
   FOOTER
========================= */
.footer {
  padding: 7.5rem 6vw;
  text-align: center;
}

.footer-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.footer-note {
  font-size: 0.78rem;
  color: #7A7A7A; /* Warm medium gray */
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 720px) {
  .field-row {
    grid-template-columns: 1fr;
  }
  .field-value {
    text-align: left;
  }
  .orientation-meta {
    flex-direction: column;
    gap: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .room-card { transition: none; }
  .full-canvas-studio[aria-hidden="false"] { animation: none; opacity: 1; }
  @keyframes studio-enter { to { opacity: 1; } }
}

/* ============================= */
/* HERO SECTION                  */
/* ============================= */

.hero {
  padding-top: 90px;
  padding-bottom: 120px;
  text-align: center;
}

.hero-top {
  margin-bottom: 50px;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 72px;
  font-weight: 500;
  color: #19181C;
  margin: 0;
  line-height: 1.1;
}

.italic-name {
  font-style: italic;
  font-weight: 500;
}

.hero-date-row {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(25, 24, 28, 0.55);
  position: relative;
}

.hero-date-row::before,
.hero-date-row::after {
  content: "";
  width: 50px;
  height: 1px;
  background: rgba(25, 24, 28, 0.25);
}

.date-arrow {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: rgba(25, 24, 28, 0.6);
  transition: opacity 0.2s ease;
}

.date-arrow:hover {
  opacity: 0.7;
}

.hero-panel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 90px;
  border-radius: 32px;

  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);

  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.05);
}

.orientation-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  color: #1A1A1A;
  opacity: 0.8;
}

.orientation-message h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 48px;
  font-weight: 500;
  margin-top: 24px;
  text-align: center;
  color: #19181C;
}

/* =========================
   CTA
========================= */
.cta {
  display: flex;
  justify-content: center;
  margin: 60px 0 120px 0;
}

#begin-creation {
  padding: 18px 48px;
  border-radius: 40px;
  border: none;
  background: #C9A24A;
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

#begin-creation:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}
