/* =========================================================
   RARE COLLECTION — design tokens
   A heritage travel-ledger palette: teak charcoal, antique
   brass, and haveli-garden green. Typography pairs an
   engraved serif display face with a clean geometric sans,
   and a monospace utility face for ledger-style numerals.
   ========================================================= */

:root {
  --bg:            #a9d7ee;
  --bg-soft:       #1a1512;
  --surface:       #1f1916;
  --surface-hi:    #271f1b;
  --rule:          rgba(198, 161, 91, 0.22);
  --rule-strong:   rgba(198, 161, 91, 0.45);

  --gold:          #c6a15b;
  --gold-bright:   #e6c98a;
  --emerald:       #4a6350;

  --ivory:         #f2e9da;
  --ivory-dim:     #cdc0ab;
  --stone:         #948a7d;

  --radius:        3px;
  --radius-lg:     4px;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Jost', 'Segoe UI', Arial, sans-serif;
  --mono:  'Space Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 24px 60px;
  background:
    radial-gradient(ellipse at top, var(--bg-soft) 0%, var(--bg) 55%);
  background-color: var(--bg);
  color: var(--ivory);
  font-family: var(--sans);
}

::selection { background: var(--gold); color: var(--bg); }

/* focus visibility, kept simple and legible */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

/* -------------------- masthead -------------------- */

.masthead {
  max-width: 760px;
  margin: 64px auto 40px;
  text-align: center;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}

.masthead h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(38px, 6vw, 64px);
  margin: 0 0 14px;
  color: var(--ivory);
  letter-spacing: 0.01em;
}

.deck {
  font-size: 16px;
  color: var(--ivory-dim);
  margin: 0 auto;
  max-width: 480px;
  line-height: 1.6;
}

/* -------------------- ledger search bar -------------------- */

.ledger-bar {
  max-width: 900px;
  margin: 0 auto 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
}

.search-field {
  position: relative;
  flex: 1 1 260px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--stone);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 14px;
  padding: 10px 34px 10px 34px;
  transition: border-color 0.2s ease;
}

.search-field input::placeholder { color: var(--stone); }

.search-field input:focus {
  border-color: var(--gold);
  outline: none;
}

.clear-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--stone);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}
.clear-btn:hover { color: var(--gold-bright); }

.sort-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sort-tab {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ivory-dim);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sort-tab:hover { border-color: var(--rule-strong); color: var(--ivory); }

.sort-tab.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
  font-weight: 700;
}

.result-meta {
  max-width: 900px;
  margin: 14px auto 28px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--stone);
  text-align: right;
  padding: 0 4px;
}

/* -------------------- grid -------------------- */

#hotels-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
}

/* -------------------- hotel card -------------------- */

.hotel-card {
  display: flex;
  flex-direction: column;
  background: #ffffff; /* White background for the card */
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 18px 20px 22px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08); /* Adjusted soft shadow for white background */
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: rise 0.5s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hotel-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

.frame {
  position: relative;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 6px;
  margin-bottom: 16px;
}

.frame img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 2px;
}

.seal {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.hotel-card h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  color: #111111; /* Black text for titles */
  margin: 0 0 4px;
  line-height: 1.2;
}

.hotel-card .location {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald);
  background: rgba(74, 99, 80, 0.18);
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  margin: 0 0 12px;
  width: fit-content;
}

.hotel-card .description {
  font-size: 14.5px;
  line-height: 1.65;
  color: #444444; /* Dark grey/black text for descriptions */
  margin: 0 0 18px;
  flex-grow: 1;
  word-wrap: break-word;
}


.hotel-link {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-bright);
  text-decoration: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 9px 18px;
  transition: background 0.2s ease, color 0.2s ease;
}

.hotel-link:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
}

/* -------------------- skeleton loading -------------------- */

.hotel-card.skeleton { pointer-events: none; }

.skeleton-img,
.skeleton-line {
  background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius);
}

.skeleton-img { height: 190px; margin-bottom: 18px; }
.skeleton-line { height: 12px; margin-bottom: 10px; }
.skeleton .w-60 { width: 60%; height: 20px; }
.skeleton .w-40 { width: 40%; }
.skeleton .w-90 { width: 90%; }
.skeleton .w-70 { width: 70%; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* -------------------- empty / error state -------------------- */

.state-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius-lg);
}

.state-title {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ivory);
  margin: 0 0 8px;
}

.state-body {
  color: var(--stone);
  font-size: 14px;
  margin: 0 0 20px;
}

.retry-btn {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  padding: 10px 22px;
  cursor: pointer;
}
.retry-btn:hover { background: var(--gold-bright); }

/* -------------------- footer -------------------- */

.footer {
  margin-top: 60px;
  padding: 24px 0 0;
  text-align: center;
  border-top: 1px solid var(--rule);
}

.footer h2 {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
}

/* -------------------- responsive -------------------- */

@media (max-width: 520px) {
  body { padding: 0 16px 40px; }
  .masthead { margin: 40px auto 28px; }
  .ledger-bar { flex-direction: column; align-items: stretch; }
  .sort-tabs { justify-content: flex-start; }
  #hotels-container { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .hotel-card, .skeleton-img, .skeleton-line {
    animation: none !important;
    transition: none !important;
  }
}

.new {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--emerald);
  color: var(--ivory);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: var(--radius);
}
.old{
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--stone);
    color: var(--ivory);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 8px;
    border-radius: var(--radius);

}
