/* ============================================================
   COMPONENTS
   ============================================================ */

/* ============================================================
   BUTTONS
   ------------------------------------------------------------
   Gold is used as a thin edge and a fill on the primary only.
   Corners are softened, never square.
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem 2rem;
  min-height: 48px;              /* comfortable touch target */
  font-family: var(--font-house);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: var(--curve-pill);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.4s var(--ease), background 0.4s var(--ease),
              border-color 0.4s var(--ease), transform 0.3s var(--ease);
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* Primary — solid antique gold */
.btn--gold {
  background: var(--gold);
  color: var(--obsidian);
  font-weight: 500;
}
.btn--gold:hover, .btn--gold:focus-visible {
  background: var(--gold-champagne);
  color: var(--obsidian);
}

/* Secondary — gold hairline, fills warm on hover */
.btn--line {
  border-color: var(--gold);
  color: var(--gold);
  background: transparent;
}
.btn--line:hover, .btn--line:focus-visible {
  background: var(--gold);
  color: var(--obsidian);
}

/* Quiet — inherits the room's ink */
.btn--quiet {
  border-color: var(--edge, var(--gold-whisper));
  color: var(--fg, var(--ink-light));
  background: transparent;
}
.btn--quiet:hover, .btn--quiet:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

/* Text-only, with a curved underline that grows.
   Padding rather than min-height gives it a 44px target while
   keeping the underline tucked directly under the words. */
.btn--text {
  padding: 0.75rem 0;
  min-height: 44px;
  border-radius: 0;
  color: var(--gold);
  border: 0;
  overflow: visible;
}
.btn--text::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0.55rem;
  height: 5px;
  border-bottom: 1px solid currentColor;
  /* A shallow curve across the full width. Scaling it down at rest
     turned short labels into a small bowl, so the rest state fades
     instead of shrinking. */
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  opacity: 0.35;
  transition: opacity 0.4s var(--ease);
}
.btn--text:hover::after, .btn--text:focus-visible::after { opacity: 1; }

.btn--sm { padding: 0.7rem 1.3rem; min-height: 42px; font-size: 0.62rem; }
/* A small text button keeps its own padding so the rule stays close. */
.btn--text.btn--sm { padding: 0.7rem 0; min-height: 44px; }
.btn--wide { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] {
  opacity: 0.45;
  pointer-events: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}
.btn-row--center { justify-content: center; }

/* ============================================================
   CURVED IMAGE FRAMES
   ------------------------------------------------------------
   The spiral rules the geometry, so photographs are masked into
   arches and leaves rather than boxes. The mask never crops the
   product itself — object-fit keeps her work centred and whole.
   ============================================================ */

.frame {
  position: relative;
  overflow: hidden;
  background: var(--obsidian-lift);
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.frame--arch { border-radius: var(--curve-arch); }
.frame--leaf { border-radius: var(--curve-leaf); }
.frame--soft { border-radius: var(--curve-soft); }
.frame--round { border-radius: 50%; }

/* Aspect ratios */
.ar-portrait { aspect-ratio: 3 / 4; }
.ar-tall     { aspect-ratio: 2 / 3; }
.ar-square   { aspect-ratio: 1 / 1; }
.ar-land     { aspect-ratio: 4 / 3; }
.ar-wide     { aspect-ratio: 16 / 10; }

/* A thin gold hairline that follows the curve, inset slightly. */
.frame--ringed::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--gold-whisper);
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
}

/* Warm vignette so bright daylight photos settle onto dark ground. */
.frame--settle::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% 0%,
              transparent 40%, rgba(5, 5, 5, 0.35) 100%);
}

/* ============================================================
   SPIRAL MOTIFS
   ============================================================ */

/* A large, very faint spiral used as a section watermark. */
.spiral-watermark {
  position: absolute;
  pointer-events: none;
  color: var(--gold);
  opacity: 0.05;
  z-index: 0;
}
.spiral-watermark--right { right: -8%; top: 50%; transform: translateY(-50%); width: min(46vw, 620px); }
.spiral-watermark--left  { left: -10%; top: 20%; width: min(40vw, 540px); }

/* Everything else sits above the watermark. */
.room > .shell { position: relative; z-index: 1; }

/* A curved divider between two rooms. */
.room-divider {
  display: block;
  width: 100%;
  height: clamp(40px, 5vw, 80px);
  color: var(--gold);
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal--d1 { transition-delay: 0.09s; }
.reveal--d2 { transition-delay: 0.18s; }
.reveal--d3 { transition-delay: 0.27s; }
.reveal--d4 { transition-delay: 0.36s; }

/* ============================================================
   BADGES & STATUS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.8rem;
  border-radius: var(--curve-pill);
  font-family: var(--font-house);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.badge--gold   { color: var(--gold); }
.badge--ooak   { color: var(--gold-champagne); }
.lit-day .badge--ooak, .lit-dawn .badge--ooak { color: var(--gold-burnished); }
.badge--sold   { color: var(--status-sold); }
.badge--filled {
  background: var(--gold);
  color: var(--obsidian);
  border-color: var(--gold);
}

/* Availability dot + word */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--t-sm);
  color: var(--fg-soft);
}
.status::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.status--available { color: var(--status-available); }
.status--reserved  { color: var(--status-reserved); }
.status--sold      { color: var(--status-sold); }

/* ============================================================
   PANELS
   ------------------------------------------------------------
   Asymmetric radii so a panel never reads as a plain card.
   ============================================================ */
.panel {
  background: var(--bg-lift, var(--obsidian-lift));
  border: 1px solid var(--edge, var(--gold-whisper));
  border-radius: var(--curve-soft) var(--curve-soft) var(--curve-soft) 4rem;
  padding: clamp(1.4rem, 1rem + 1.6vw, 2.4rem);
  position: relative;
}
.panel--flip { border-radius: var(--curve-soft) 4rem var(--curve-soft) var(--curve-soft); }
.panel--plain { border-radius: var(--curve-soft); }

/* A quiet note — used for "confirm with the House" messages. */
.note {
  border-left: 2px solid var(--gold);
  padding: 0.9rem 0 0.9rem 1.1rem;
  font-size: var(--t-sm);
  color: var(--fg-soft);
  line-height: 1.55;
  border-radius: 0 var(--curve-soft) var(--curve-soft) 0;
  background: var(--gold-breath);
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 300;
  display: grid;
  gap: 0.5rem;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  background: rgba(5, 5, 5, 0.95);
  border: 1px solid var(--gold-whisper);
  border-radius: var(--curve-pill);
  color: var(--ink-light);
  padding: 0.85rem 1.4rem;
  font-size: var(--t-sm);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  box-shadow: var(--lift-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: toast-in 0.45s var(--ease-spiral) both;
  pointer-events: auto;
}
.toast svg { width: 17px; height: 17px; color: var(--gold); flex: none; }
.toast.is-out { animation: toast-out 0.35s var(--ease) both; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(10px) scale(0.97); }
}

/* ============================================================
   MODAL / DRAWER
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(5, 5, 5, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.overlay.is-open { opacity: 1; visibility: visible; }

.modal {
  position: fixed;
  z-index: 160;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%) scale(0.98);
  width: min(94vw, 620px);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--obsidian-lift);
  border: 1px solid var(--gold-whisper);
  border-radius: var(--curve-soft);
  padding: clamp(1.5rem, 1rem + 2vw, 2.6rem);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease-spiral);
  color: var(--ink-light);
  --fg: var(--ink-light);
  --fg-soft: var(--ink-light-soft);
  --edge: var(--gold-whisper);
  --bg-lift: #100e0c;
}
.modal.is-open {
  opacity: 1; visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
.modal__close { position: absolute; top: 0.8rem; right: 0.8rem; }
.modal h2 { margin-bottom: 0.6rem; }

/* Slide-in drawer, used for favourites */
.drawer {
  position: fixed;
  z-index: 160;
  top: 0; right: 0;
  height: 100%;
  width: min(94vw, 420px);
  background: var(--obsidian-lift);
  border-left: 1px solid var(--gold-whisper);
  padding: 1.4rem;
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.45s var(--ease-spiral), visibility 0.45s;
  color: var(--ink-light);
  --fg: var(--ink-light);
  --fg-soft: var(--ink-light-soft);
  --edge: var(--gold-whisper);
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--obsidian-edge);
  margin-bottom: 1.2rem;
}

/* ============================================================
   TABS / FILTER PILLS
   ============================================================ */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pill {
  padding: 0.55rem 1.1rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--curve-pill);
  border: 1px solid var(--edge, var(--gold-whisper));
  font-family: var(--font-house);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-soft);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}
.pill:hover, .pill:focus-visible { color: var(--gold); border-color: var(--gold); }
.pill[aria-pressed='true'], .pill.is-on {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--obsidian);
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty {
  text-align: center;
  padding: var(--space-lg) 1rem;
  color: var(--fg-soft);
}
.empty svg { width: 46px; height: 46px; color: var(--gold); opacity: 0.5; margin: 0 auto 1rem; }
.empty p { margin-bottom: 1.2rem; }

/* ============================================================
   ACCORDION (FAQ, care, help)
   ============================================================ */
.accordion { border-top: 1px solid var(--edge); }
.acc-item { border-bottom: 1px solid var(--edge); }
.acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  text-align: left;
  font-family: var(--font-house);
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  color: var(--fg);
  transition: color 0.3s var(--ease);
  min-height: 56px;
}
.acc-trigger:hover, .acc-trigger:focus-visible { color: var(--gold); }
.acc-trigger .chev {
  flex: none;
  width: 18px; height: 18px;
  color: var(--gold);
  transition: transform 0.4s var(--ease-spiral);
}
.acc-trigger[aria-expanded='true'] .chev { transform: rotate(180deg); }
.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-spiral);
}
.acc-panel > div { overflow: hidden; }
.acc-trigger[aria-expanded='true'] + .acc-panel { grid-template-rows: 1fr; }
.acc-panel .inner { padding-bottom: 1.3rem; color: var(--fg-soft); max-width: var(--measure); }
.acc-panel .inner p + p { margin-top: 0.8em; }

/* ============================================================
   CARE PAGE BLOCKS
   ============================================================ */
.care-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
}
.care-block + .care-block { margin-top: var(--space-lg); }
.care-block h2 { margin-bottom: 0.6rem; }
.care-block .lede { margin-bottom: 1.4rem; }
.care-block[hidden] { display: none; }

/* ============================================================
   LETTERS FROM THE HOUSE (email capture)
   ============================================================ */
/* Always a dark inset panel, whatever light the page around it keeps,
   so it carries its own colours rather than inheriting them. */
.letters {
  --fg: var(--ink-light);
  --fg-soft: var(--ink-light-soft);
  --edge: var(--gold-whisper);
  --bg-lift: #100e0c;
  color: var(--ink-light);
  border-radius: var(--curve-soft);
  border: 1px solid var(--gold-whisper);
  background:
    radial-gradient(90% 130% at 50% 0%, rgba(200, 154, 60, 0.09), transparent 60%),
    var(--obsidian-lift);
  padding: clamp(1.6rem, 1.2rem + 2vw, 3rem);
  text-align: center;
}
.letters .house-label,
.letters .field label { color: var(--gold); }
.letters .pill { color: var(--ink-light-soft); }
.letters .choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-block: 1.2rem;
}
