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

body {
  font-family: 'EB Garamond', serif;
  background: #0a0805;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* SCENE — single merged definition */
.scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.08);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scene.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 1;
}

.scene-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* SIGNS — shared styling */
.sign {
  position: absolute;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  color: #f5e6c8;
  text-align: center;
  padding: 10px 18px;
  transition: transform 0.3s ease, filter 0.3s ease;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  z-index: 5;
}

.sign-title {
  display: block;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.sign-sub {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  opacity: 0.9;
  margin-top: 4px;
  font-style: italic;
}

.sign:hover {
  filter: drop-shadow(0 0 18px rgba(255, 200, 120, 0.8));
}

/* THE ATRIUM — Lamia's custom positioning */
.sign-left {
  top: 16.5%;
  left: 14%;
  transform: rotate(9.5deg);
}

/* THE STUDY — Lamia's custom positioning */
.sign-center {
  top: 22%;
  left: 51%;
  transform: translateX(-50%);
}

/* THE LETTERS — Lamia's custom positioning */
.sign-right {
  top: 18.5%;
  right: 13%;
  transform: rotate(-9.5deg);
}

/* PARCHMENT WELCOME CARD — Lamia's custom positioning (top: 60%) */
.welcome-card {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-1deg);
  width: min(420px, 80vw);
  padding: 38px 48px;
  background:
    radial-gradient(ellipse at 25% 15%, #f4dfa8 0%, #e8c97f 55%, #c9a558 100%);
  border: 1px solid rgba(100, 65, 25, 0.55);
  border-radius: 10px 14px 12px 16px / 14px 10px 16px 12px;
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.55),
    0 6px 14px rgba(0, 0, 0, 0.35),
    inset 0 0 80px rgba(140, 90, 30, 0.3),
    inset 0 0 30px rgba(100, 65, 20, 0.2);
  text-align: center;
  color: #3a2a14;
  z-index: 10;
  animation: card-float 6s ease-in-out infinite;
}

.welcome-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(100, 65, 20, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 75% 65%, rgba(140, 90, 30, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(100, 65, 20, 0.08) 0%, transparent 35%);
  pointer-events: none;
}

.welcome-card-inner {
  position: relative;
  z-index: 1;
}

.welcome-eyebrow {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  letter-spacing: 6px;
  text-transform: lowercase;
  color: #7a4f1c;
  margin-bottom: 14px;
  font-style: italic;
}

.welcome-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #2e1a08;
  margin-bottom: 18px;
  line-height: 1.1;
}

.welcome-body {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #4a300f;
  font-style: italic;
  margin-bottom: 22px;
}

.welcome-foot {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.7rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #7a4f1c;
  opacity: 0.75;
}

@keyframes card-float {
  0%, 100% { transform: translate(-50%, -50%) rotate(-1deg); }
  50%      { transform: translate(-50%, -52%) rotate(-1deg); }
}

/* ROOM TITLE (top of each room scene) */
.room-title {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  color: #f5e6c8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  z-index: 5;
}

.room-title h2 {
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.room-title p {
  font-size: 0.85rem;
  font-style: italic;
  letter-spacing: 3px;
  opacity: 0.8;
}

/* BACK BUTTON */
.back-button {
  position: absolute;
  top: 24px;
  left: 24px;
  background: rgba(40, 25, 10, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 230, 200, 0.3);
  color: #f5e6c8;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  letter-spacing: 2px;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  z-index: 6;
  text-transform: lowercase;
}

.back-button:hover {
  background: rgba(60, 40, 20, 0.75);
  transform: translateX(-3px);
}


/* ============================================
   STUDY CARDS — four parchment cards in The Study
   ============================================ */

.study-cards {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: 220px 220px;
  grid-template-rows: 130px 130px;
  gap: 30px;
  z-index: 4;
  pointer-events: none;
}

.study-card {
  position: relative;
  background:
    radial-gradient(ellipse at 25% 15%, #f4dfa8 0%, #e8c97f 55%, #c9a558 100%);
  border: 1px solid rgba(100, 65, 25, 0.55);
  border-radius: 10px 14px 12px 16px / 14px 10px 16px 12px;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.45),
    0 4px 8px rgba(0, 0, 0, 0.3),
    inset 0 0 60px rgba(140, 90, 30, 0.25);
  padding: 16px 20px;
  color: #3a2a14;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.study-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 6px 12px rgba(0, 0, 0, 0.35),
    inset 0 0 60px rgba(140, 90, 30, 0.25);
}


/* preview state (default) */
.study-card-preview {
  text-align: center;
}

.study-card-full {
  display: none;
}

/* expanded state */
.study-card.expanded {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(700px, 90vw);
  max-height: 85vh;
  transform: translate(-50%, -50%) !important;
  z-index: 50;
  overflow-y: auto;
  padding: 50px 60px;
  cursor: default;
}

.study-card.expanded .study-card-preview { display: none; }
.study-card.expanded .study-card-full    { display: block; }

/* backdrop when a card is expanded */
.study-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.study-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* CARD TYPOGRAPHY */
.card-eyebrow {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.75rem;
  letter-spacing: 5px;
  text-transform: lowercase;
  color: #7a4f1c;
  margin-bottom: 8px;
  font-style: italic;
}

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #2e1a08;
  margin-bottom: 8px;
}

.card-teaser {
  font-family: 'EB Garamond', serif;
  font-size: 0.9rem;
  color: #5a3e20;
  font-style: italic;
  line-height: 1.4;
}

.study-card.expanded .card-title {
  font-size: 2rem;
  margin-bottom: 20px;
}

.study-card.expanded .card-eyebrow {
  font-size: 0.9rem;
  margin-bottom: 14px;
}

/* ENTRIES inside expanded cards */
.entry {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(100, 65, 25, 0.25);
}
.entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.entry-head h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #2e1a08;
}

.entry-date {
  font-family: 'EB Garamond', serif;
  font-size: 0.85rem;
  font-style: italic;
  color: #7a4f1c;
}

.entry-sub {
  font-family: 'EB Garamond', serif;
  font-size: 0.9rem;
  color: #5a3e20;
  font-style: italic;
  margin-bottom: 8px;
}

.entry-detail {
  font-family: 'EB Garamond', serif;
  font-size: 0.9rem;
  color: #4a300f;
  margin-bottom: 4px;
}

.entry ul {
  margin-left: 18px;
  margin-top: 6px;
}

.entry ul li {
  font-family: 'EB Garamond', serif;
  font-size: 0.9rem;
  color: #4a300f;
  line-height: 1.5;
  margin-bottom: 4px;
}

.skills-group {
  margin-bottom: 16px;
}

.skills-group h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  color: #2e1a08;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.skills-group p {
  font-family: 'EB Garamond', serif;
  font-size: 0.95rem;
  color: #4a300f;
  line-height: 1.6;
}

/* close button on expanded card */
.card-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: #7a4f1c;
  cursor: pointer;
  line-height: 1;
}
.card-close:hover { color: #2e1a08; }


/* ATRIUM — 3 cards in one row */
.atrium-grid {
  grid-template-columns: 220px 220px 220px;
  grid-template-rows: 130px;
}
/* ============================================
   THE LETTERS — contact form styled as a letter
   ============================================ */

.letter {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-0.5deg);
  width: min(560px, 90vw);
  max-height: 82vh;
  overflow-y: auto;
  padding: 50px 60px;
  background:
    radial-gradient(ellipse at 25% 15%, #faecbf 0%, #f0d695 55%, #d4b06a 100%);
  border: 1px solid rgba(100, 65, 25, 0.55);
  border-radius: 10px 14px 12px 16px / 14px 10px 16px 12px;
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.55),
    0 6px 14px rgba(0, 0, 0, 0.35),
    inset 0 0 80px rgba(140, 90, 30, 0.25),
    inset 0 0 30px rgba(100, 65, 20, 0.15);
  z-index: 4;
  color: #3a2a14;
  font-family: 'EB Garamond', serif;
}

.letter::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(100, 65, 20, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 75% 65%, rgba(140, 90, 30, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(100, 65, 20, 0.06) 0%, transparent 35%);
  pointer-events: none;
  z-index: 0;
}

.letter > * { position: relative; z-index: 1; }

.letter-header {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px dashed rgba(100, 65, 25, 0.35);
}

.letter-date {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.75rem;
  letter-spacing: 4px;
  text-transform: lowercase;
  color: #7a4f1c;
  font-style: italic;
  margin-bottom: 14px;
}

.letter-greeting {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: #2e1a08;
  letter-spacing: 1px;
}

.letter-field {
  margin-bottom: 18px;
}

.letter-field label {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: lowercase;
  color: #7a4f1c;
  font-style: italic;
  margin-bottom: 4px;
}

.letter-field input,
.letter-field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(100, 65, 25, 0.4);
  padding: 6px 4px;
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  color: #2e1a08;
  outline: none;
  transition: border-color 0.3s ease;
  resize: none;
}

.letter-field textarea {
  border: 1px solid rgba(100, 65, 25, 0.3);
  border-radius: 4px;
  padding: 10px;
  line-height: 1.5;
}

.letter-field input:focus,
.letter-field textarea:focus {
  border-color: #5a3e20;
}

.letter-field input::placeholder,
.letter-field textarea::placeholder {
  color: rgba(122, 79, 28, 0.5);
  font-style: italic;
}

.letter-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed rgba(100, 65, 25, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.letter-signoff {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: #5a3e20;
}

.letter-send {
  background: #5a3e20;
  color: #faecbf;
  border: 1px solid #2e1a08;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  letter-spacing: 2px;
  padding: 10px 22px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.letter-send:hover {
  background: #2e1a08;
  transform: translateX(3px);
}

.letter-send:disabled {
  opacity: 0.5;
  cursor: wait;
}

.letter-status {
  margin-top: 18px;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  min-height: 1.4em;
}

.letter-status.success { color: #2e6d4f; }
.letter-status.error   { color: #8a2e2e; }