/* The Ravensmoor. Deep green, brass and paper — a hotel, not a tech demo.
   The agent panel next to it is deliberately a different world. */

:root {
  --paper:   #F4F0E6;
  --paper-2: #EAE4D5;
  --card:    #FFFDF8;
  --ink:     #1A1D1B;
  --body:    #4A4F4B;
  --faint:   #7C817C;
  --green:   #1D3B32;
  --green-2: #2A5245;
  --brass:   #A67C32;
  --brass-2: #C9A15A;
  --line:    #DDD5C4;
  --bad:     #A33B2A;

  --disp: "Fraunces", Georgia, "Times New Roman", serif;
  --site-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--site-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--green-2); }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass);
}

:where(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 3px;
}

/* --- demo banner ------------------------------------------------------- */
.demo-banner {
  margin: 0; padding: 9px 20px; text-align: center;
  background: var(--green); color: #E7EFEA;
  font-size: 12.5px; letter-spacing: 0.01em;
}
.demo-banner strong { color: var(--brass-2); }
.demo-banner a { color: #E7EFEA; text-underline-offset: 3px; }

/* --- header ------------------------------------------------------------ */
.head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 28px; max-width: 1080px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--green); }
.brand__mark { color: var(--green); }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__text strong { font-family: var(--disp); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.brand__text em {
  font-style: normal; font-family: var(--mono);
  font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint);
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--body); text-decoration: none; font-size: 14.5px; }
.nav a:hover { color: var(--green); }

/* --- hero -------------------------------------------------------------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 44px; align-items: center;
  max-width: 1080px; margin: 12px auto 60px; padding: 0 28px;
}
.hero h1 {
  font-family: var(--disp); font-weight: 600;
  font-size: clamp(38px, 5.6vw, 62px); line-height: 1.02; letter-spacing: -0.025em;
  color: var(--ink); margin: 14px 0 18px;
}
.lede { font-size: 17px; max-width: 46ch; text-wrap: pretty; }
.hero__plate { border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3.2; box-shadow: 0 24px 50px -34px rgb(29 59 50 / 0.55); }
.hero__plate svg { width: 100%; height: 100%; }

/* --- search ------------------------------------------------------------ */
.search {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px; box-shadow: 0 18px 40px -34px rgb(29 59 50 / 0.5);
}
.search__form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 150px; }
.field--sm { flex: 0 1 116px; }
.field--wide { flex: 1 1 100%; }
.field > span {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint);
}
.field input, .field select {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 14.5px; color: var(--ink); width: 100%;
}

.filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.chk span {
  display: inline-block; padding: 5px 11px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--paper);
  font-size: 12.5px; color: var(--body);
  transition: background 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.chk input:checked + span { background: var(--green); border-color: var(--green); color: #F0EDE3; }
.chk input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }

/* --- buttons ----------------------------------------------------------- */
.btn {
  background: var(--green); color: #F4F0E6; border: 1px solid var(--green);
  border-radius: 8px; padding: 11px 20px; font-size: 14.5px; font-weight: 500;
  cursor: pointer; transition: background 0.16s var(--ease);
  text-decoration: none; display: inline-block;
}
.btn:hover { background: var(--green-2); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn--ghost { background: transparent; color: var(--green); }
.btn--ghost:hover { background: var(--paper-2); }
.btn--sm { padding: 8px 15px; font-size: 13.5px; }

/* --- results ----------------------------------------------------------- */
.results-summary {
  margin: 30px 0 16px; font-size: 14.5px; color: var(--body);
  padding-left: 12px; border-left: 3px solid var(--line);
}
.results-summary[data-tone="good"] { border-left-color: var(--brass); }
.results-summary[data-tone="bad"]  { border-left-color: var(--bad); color: var(--bad); }

.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); gap: 20px; }

.room {
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.room:hover { box-shadow: 0 20px 40px -32px rgb(29 59 50 / 0.6); transform: translateY(-2px); }
.room--gone { opacity: 0.58; }

.plate { aspect-ratio: 200 / 130; background: var(--paper-2); }
.plate svg { width: 100%; height: 100%; }

.room__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.room__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.room__head h3 { font-family: var(--disp); font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -0.015em; }
.room__rate { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--green); white-space: nowrap; }
.room__rate span { font-size: 10.5px; font-weight: 400; color: var(--faint); }
.room__blurb { font-size: 14px; }
.room__facts { font-size: 12.5px; color: var(--faint); }

.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-size: 11px; padding: 3px 9px; border-radius: 20px;
  background: var(--paper-2); color: var(--body); border: 1px solid var(--line);
}

.room__total {
  margin-top: auto; padding-top: 9px; font-size: 13.5px; color: var(--ink); font-weight: 500;
}
.room__total--gone { color: var(--bad); font-weight: 400; }
.scarce {
  display: block; font-style: normal; font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass); margin-top: 3px;
}
.room__actions { display: flex; gap: 8px; }
.room__actions .btn { flex: 1; text-align: center; padding: 9px 12px; font-size: 13.5px; }

/* --- detail ------------------------------------------------------------ */
.detail {
  position: relative; margin: 28px 0 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.detail__inner { display: grid; grid-template-columns: 300px 1fr; gap: 0; }
.detail__inner .plate { aspect-ratio: auto; height: 100%; min-height: 260px; }
.detail__text { padding: 26px 28px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.detail__text h2 { font-family: var(--disp); font-size: 28px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.detail__desc { font-size: 15px; }
.detail__rate { font-family: var(--mono); font-size: 14px; color: var(--green); }
.detail__gone { color: var(--bad); font-size: 14px; }
.detail__close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  background: var(--card); border: 1px solid var(--line); border-radius: 50%;
  width: 30px; height: 30px; cursor: pointer; color: var(--faint); line-height: 1;
}
.detail__close:hover { color: var(--ink); }

/* --- booking ----------------------------------------------------------- */
.booking {
  margin: 28px 0 0; padding: 26px 28px;
  background: var(--green); color: #E7EFEA; border-radius: 14px;
}
.booking h2 { font-family: var(--disp); font-size: 24px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.booking__summary { font-size: 14.5px; color: #C4D3CB; margin-bottom: 20px; line-height: 1.7; }
.booking__summary strong { color: #fff; }
.b-total { font-family: var(--mono); font-size: 18px; color: var(--brass-2); font-weight: 600; }

.booking__form { display: flex; flex-wrap: wrap; gap: 14px; }
.booking .field > span { color: #93A79C; }
.booking .field input {
  background: rgb(255 255 255 / 0.06); border-color: rgb(255 255 255 / 0.16); color: #F0F4F1;
}
.booking .field input::placeholder { color: #7E958A; }
.booking__actions { display: flex; gap: 10px; flex: 1 1 100%; }
.booking .btn { background: var(--brass); border-color: var(--brass); color: #221803; font-weight: 600; }
.booking .btn:hover { background: var(--brass-2); }
.booking .btn--ghost { background: transparent; border-color: rgb(255 255 255 / 0.22); color: #C4D3CB; font-weight: 400; }
.booking .btn--ghost:hover { background: rgb(255 255 255 / 0.07); }
.booking__note { flex: 1 1 100%; font-size: 12.5px; color: #8FA79A; }

.booking__done h3 { font-family: var(--disp); font-size: 22px; color: #fff; margin-bottom: 10px; }
.booking__done p { font-size: 14.5px; color: #C4D3CB; margin-bottom: 12px; }
.demo-note { font-family: var(--mono); font-size: 11.5px; color: var(--brass-2); }

/* --- info -------------------------------------------------------------- */
.info { margin: 64px 0 0; }
.info h2 { font-family: var(--disp); font-size: 27px; font-weight: 600; color: var(--ink); margin-bottom: 22px; letter-spacing: -0.02em; }
.info__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 22px 32px; }
.info__grid dt {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brass); margin-bottom: 5px;
}
.info__grid dd { font-size: 14.5px; }

/* --- footer ------------------------------------------------------------ */
.foot {
  margin-top: 80px; padding: 34px 28px; border-top: 1px solid var(--line);
  max-width: 1080px; margin-inline: auto; font-size: 13.5px;
}
.foot strong { color: var(--ink); font-family: var(--disp); }
.foot__demo { margin-top: 8px; font-size: 12.5px; color: var(--faint); max-width: 62ch; }

/* --- the agent moved something ---------------------------------------- */
/* An agent's edits are correct but silent. This is the only cue that anything
   happened, so it has to be visible without being a toy. */
.just-changed { animation: nudge 1.5s var(--ease); }
@keyframes nudge {
  0%   { box-shadow: 0 0 0 3px rgb(201 161 90 / 0.85); }
  100% { box-shadow: 0 0 0 3px rgb(201 161 90 / 0); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .hero__plate { order: -1; aspect-ratio: 16 / 9; }
  .detail__inner { grid-template-columns: 1fr; }
  .detail__inner .plate { min-height: 190px; aspect-ratio: 16 / 8; }
}
@media (max-width: 560px) {
  .head { flex-wrap: wrap; }
  .nav { gap: 16px; }
  .search__form > .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .just-changed, .room { animation: none; transition: none; }
}

/* Same trap as the panel: .booking__form and .search__form are display:flex, so
   the [hidden] attribute alone would not hide them. */
[hidden] { display: none !important; }
