/* ==========================================================================
   The Melville Hotel — design tokens
   Palette drawn from Blackpool at dusk: prom-cream paper, illumination
   gold, deep seaside teal and a single warm coral for "act now" moments.
   The notched-corner shape echoes the badge on the hotel's own sign.
   ========================================================================== */

:root {
  --ink: #14181d;
  --paper: #f5efe3;
  --paper-alt: #ece1cd;
  --gold: #b9862c;
  --gold-deep: #8f6a26;
  --gold-soft: #e7cd97;
  --teal: #1e4a48;
  --teal-deep: #123332;
  --coral: #a84a3a;
  --charcoal: #221f1a;
  --line: rgba(34, 31, 26, 0.15);
  --line-on-dark: rgba(245, 239, 227, 0.2);
  --radius-cut: 14px;
  --shadow-soft: 0 18px 40px -22px rgba(20, 24, 29, 0.45);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper);
  padding: 12px 18px; z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Notched "badge" shape, used sparingly ---------- */
.cut-corner {
  clip-path: polygon(
    var(--radius-cut) 0, 100% 0, 100% calc(100% - var(--radius-cut)),
    calc(100% - var(--radius-cut)) 100%, 0 100%, 0 var(--radius-cut)
  );
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn--book { background: var(--gold); color: var(--ink); }
.btn--book:hover { background: var(--gold-deep); }
.btn--ghost { background: transparent; color: var(--paper); border: 1px solid var(--line-on-dark); clip-path: none; padding: 12px 24px; }
.btn--ghost:hover { border-color: var(--paper); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: var(--teal-deep); }
.btn:active { transform: translateY(1px); }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand__badge {
  width: 42px; height: 42px;
  background: var(--ink);
  color: var(--gold-soft);
  font-family: var(--font-display);
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  flex: none;
}
.brand__logo {
  height: 48px;
  width: auto;
  flex: none;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.site-nav {
  display: flex;
  gap: 22px;
  font-size: 0.96rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--charcoal);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  border-bottom-color: var(--gold);
}
.site-nav--mobile {
  display: none;
  flex-direction: column;
  padding: 8px 24px 20px;
  border-top: 1px solid var(--line);
}
.site-nav--mobile a { padding: 10px 0; border-bottom: 1px solid var(--line); }
.site-nav--mobile .btn { margin-top: 12px; width: max-content; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
}
.hero__media {
  position: absolute; inset: 0;
  background-size: cover;
  /* Portrait photo in a wide frame: anchor low so the sign, doors and steps show, not the wall above */
  background-position: center 82%;
}
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,22,27,0.35) 0%, rgba(18,22,27,0.55) 55%, rgba(18,22,27,0.92) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 64px 24px 56px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.8s ease-out 0.15s forwards;
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .hero__content { animation: none; opacity: 1; transform: none; }
}
.hero__eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-soft);
  font-size: 1.15rem;
  margin-bottom: 10px;
}
.hero h1 { color: var(--paper); max-width: 15ch; margin-bottom: 0.3em; }
.hero__lede { max-width: 46ch; color: var(--paper); opacity: 0.92; font-size: 1.08rem; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Amenity strip ---------- */
.amenities {
  border-bottom: 1px solid var(--line);
  background: var(--paper-alt);
}
.amenities__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  padding: 28px 0;
}
.amenities__item {
  padding: 10px 18px;
  border-left: 1px solid var(--line);
  font-size: 0.92rem;
}
.amenities__item:first-child { border-left: none; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--paper-alt); }
.section--dark { background: var(--ink); color: var(--paper); }
.section--dark h2, .section--dark h3 { color: var(--paper); }
.section--teal { background: var(--teal-deep); color: var(--paper); }
.section--teal h2, .section--teal h3 { color: var(--paper); }

.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split--reverse .split__media { order: 2; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}
.split__media img {
  width: 100%; height: 100%; object-fit: cover;
  aspect-ratio: 4 / 3;
}
.split__media img.img-focus-top { object-position: center 18%; } /* keeps the top of the Tower in frame */
.split__media--social { display: flex; justify-content: center; }
.fb-feed { width: 100%; max-width: 500px; }
.fb-feed iframe { display: block; width: 100%; max-width: 500px; height: 600px; margin: 0 auto; background: var(--paper-alt); }
.fb-feed__link { margin: 12px 0 0; text-align: center; font-size: 0.92rem; }
.eyebrow-rule {
  display: inline-block;
  width: 46px; height: 3px; background: var(--gold);
  margin-bottom: 18px;
}

/* Pull quote */
.pull-quote {
  border-top: 1px solid var(--line-on-dark);
  border-bottom: 1px solid var(--line-on-dark);
  padding: 40px 0;
  text-align: center;
}
.pull-quote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  max-width: 44ch;
  margin: 0 auto 16px;
  line-height: 1.4;
}
.pull-quote cite { font-style: normal; font-size: 0.9rem; opacity: 0.8; }

/* Facility / feature list */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.feature-grid > div { background: var(--paper); padding: 26px; }
.feature-grid h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature-grid p { font-size: 0.94rem; margin: 0; max-width: none; }

/* Listing rows: What's On / Offers / Attractions */
.listing { display: flex; flex-direction: column; }
.listing-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.listing-row:first-child { border-top: 1px solid var(--line); }
.listing-row__media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.listing-row__media--empty {
  background: var(--paper-alt);
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-deep);
  font-family: var(--font-display);
  font-size: 2rem;
}
.listing-row h3 { margin-bottom: 6px; }
.listing-row__meta { font-size: 0.85rem; color: var(--gold-deep); font-weight: 700; margin-bottom: 8px; }
.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  background: var(--coral);
  color: var(--paper);
  margin-bottom: 10px;
}
.tag--muted { background: var(--paper-alt); color: var(--charcoal); }
@media (max-width: 640px) {
  .listing-row { grid-template-columns: 1fr; }
}

.empty-state {
  border: 1px dashed var(--line);
  padding: 48px 32px;
  text-align: center;
  color: var(--charcoal);
}
.empty-state h3 { margin-bottom: 8px; }

/* Attractions two-column text list */
.attraction-list {
  columns: 2;
  column-gap: 56px;
}
.attraction-list article {
  break-inside: avoid;
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.attraction-list h3 { font-size: 1.08rem; margin-bottom: 6px; }
.attraction-list p { font-size: 0.95rem; }
@media (max-width: 720px) { .attraction-list { columns: 1; } }

/* Directions cards */
.directions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.directions-grid div { border-top: 3px solid var(--gold); padding-top: 16px; }

/* Page banner (interior pages) */
.page-banner {
  background: var(--ink);
  color: var(--paper);
  padding: 70px 0 46px;
}
.page-banner h1 { color: var(--paper); margin-bottom: 6px; }
.page-banner p { color: var(--gold-soft); font-family: var(--font-display); font-style: italic; margin: 0; }

/* Footer */
.site-footer { background: var(--ink); color: var(--paper); padding-top: 60px; }
.site-footer .brand__badge, .site-footer .brand__logo { margin-bottom: 16px; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-on-dark);
}
.site-footer h2 { color: var(--gold-soft); font-size: 0.95rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 14px; }
.site-footer__addr { font-size: 0.94rem; line-height: 1.7; }
.site-footer__addr a { text-decoration: none; }
.site-footer__addr a:hover { text-decoration: underline; }
.footer-links { list-style: none; margin: 0; padding: 0; font-size: 0.94rem; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { text-decoration: none; opacity: 0.85; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }
.site-footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 22px 24px; font-size: 0.85rem; opacity: 0.75;
}
.site-footer__bottom a { text-decoration: underline; }
@media (max-width: 780px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Auth / admin ---------- */
.auth-shell {
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink);
  padding: 40px 20px;
}
.auth-card {
  background: var(--paper);
  padding: 40px 36px;
  width: 100%; max-width: 380px;
  box-shadow: var(--shadow-soft);
}
.auth-card .brand__badge { margin: 0 auto 18px; }
.auth-card h1 { font-size: 1.5rem; text-align: center; }
.auth-card p.lede { text-align: center; color: var(--charcoal); opacity: 0.7; font-size: 0.92rem; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
}
.field textarea { min-height: 130px; resize: vertical; }
.field small { display: block; margin-top: 4px; opacity: 0.65; font-size: 0.82rem; }

.notice {
  padding: 14px 18px;
  margin-bottom: 22px;
  border-left: 4px solid var(--gold);
  background: var(--paper-alt);
  font-size: 0.94rem;
}
.notice--error { border-left-color: var(--coral); }

.admin-shell { background: var(--paper-alt); min-height: 100vh; }
.admin-topbar {
  background: var(--ink); color: var(--paper);
  padding: 16px 0;
}
.admin-topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-topbar a { color: var(--paper); text-decoration: none; }
.admin-topbar nav { display: flex; gap: 18px; font-size: 0.92rem; }
.admin-topbar nav a[aria-current="page"] { color: var(--gold-soft); }
.admin-main { padding: 44px 0 80px; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }

.card { background: #fff; border: 1px solid var(--line); padding: 30px; margin-bottom: 30px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.dashboard-card {
  background: #fff; border: 1px solid var(--line); padding: 26px;
  text-decoration: none; color: var(--charcoal);
  border-top: 3px solid var(--gold);
}
.dashboard-card h3 { margin-bottom: 6px; }
.dashboard-card p { font-size: 0.92rem; margin: 0; }

table.admin-table { width: 100%; border-collapse: collapse; background: #fff; }
table.admin-table th, table.admin-table td {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 0.94rem; vertical-align: middle;
}
table.admin-table th { background: var(--paper-alt); font-family: var(--font-body); }
table.admin-table img.thumb { width: 64px; height: 44px; object-fit: cover; }
.row-actions a { margin-right: 12px; font-size: 0.88rem; text-decoration: underline; }
.row-actions .danger { color: var(--coral); }
.status-pill { font-size: 0.78rem; font-weight: 700; padding: 3px 9px; }
.status-pill--active { background: #e4efdc; color: #2f5a1f; }
.status-pill--expired { background: #f4dcd8; color: #7a2c22; }

.btn--small { padding: 9px 18px; font-size: 0.86rem; }

/* ---------- Responsive nav toggle ---------- */
@media (max-width: 760px) {
  .site-header .site-nav:not(.site-nav--mobile) { display: none; }
  .site-header__inner .btn--book { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery-item {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--paper-alt);
  aspect-ratio: 4 / 3;
}
.gallery-item__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 14px 10px;
  color: #fff; font-size: 0.9rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  opacity: 0; transition: opacity 0.25s ease;
}
.gallery-item:hover .gallery-item__cap, .gallery-item:focus-visible .gallery-item__cap { opacity: 1; }
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.04); }
.gallery-cta { margin-top: 36px; }
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(18, 22, 27, 0.94);
  display: none;
  align-items: center; justify-content: center;
  flex-direction: column;
  padding: 56px 64px 40px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; }
.lightbox__caption { color: var(--paper); margin: 14px 0 0; font-size: 0.95rem; text-align: center; max-width: 70ch; }
.lightbox button {
  position: absolute; background: none; border: none; color: var(--paper);
  font-size: 2.4rem; line-height: 1; cursor: pointer; padding: 12px;
}
.lightbox button:hover { color: var(--gold-soft); }
.lightbox__close { top: 10px; right: 14px; }
.lightbox__prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 820px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .lightbox { padding: 56px 12px 40px; }
}
