/* ==========================================================================
   THE STAR INN — 2026 STYLESHEET
   Design tokens grounded in Dylife: limewashed stone, hill moss, old
   embers, and the brass of a weathered pub sign. Waymarker motifs echo
   the drovers' roads and OS-map trails that pass the door.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Palette */
  --ink: #16211c;
  --ink-soft: #24352c;
  --parchment: #efe8d6;
  --parchment-dim: #ded2ae;
  --moss: #414f3f;
  --moss-deep: #2b362a;
  --ember: #b04e26;
  --ember-deep: #8a3c1c;
  --brass: #c69a3b;
  --slate: #56666b;
  --stone-line: rgba(22, 33, 28, 0.12);

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Rhythm */
  --gap-xl: clamp(4rem, 8vw, 8rem);
  --gap-lg: clamp(2.5rem, 5vw, 4.5rem);
  --radius: 4px;
  --max-width: 1180px;

  --hero-image: url('../gifs/ystarbackground7.jpg');
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--parchment);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; margin: 0 0 0.6em; line-height: 1.12; }
p { margin: 0 0 1em; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brass);
  color: var(--ink);
  padding: 0.75em 1.25em;
  z-index: 999;
  font-family: var(--font-body);
  font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* ---------- Navigation ---------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem clamp(1.25rem, 4vw, 3rem);
  background: linear-gradient(to bottom, rgba(22, 33, 28, 0.88), rgba(22, 33, 28, 0));
  transition: background 0.3s ease;
}
#navbar.solid { background: var(--ink); box-shadow: 0 1px 0 var(--stone-line); }
#navbar .logo img { height: 58px; width: auto; }
#navbar ul.menu {
  list-style: none;
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
  margin: 0;
  padding: 0;
}
#navbar ul.menu a {
  color: var(--parchment);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
}
#navbar ul.menu a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--brass);
  transition: width 0.25s ease;
}
#navbar ul.menu a:hover::after,
#navbar ul.menu a:focus-visible::after { width: 100%; }
#navbar .hamburger {
  display: none;
  color: var(--parchment);
  font-family: var(--font-body);
  font-weight: 600;
  align-items: center;
  gap: 0.5em;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  #navbar ul.menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--ink);
    padding: 1rem clamp(1.25rem, 4vw, 3rem) 1.5rem;
    gap: 1rem;
  }
  #navbar ul.menu.open { display: flex; }
  #navbar .hamburger { display: inline-flex; }
}

/* ---------- Hero ---------- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  color: var(--parchment);
}
.hero-media {
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center 65%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(20, 30, 24, 0.5) 0%, rgba(20, 30, 24, 0.05) 40%, rgba(20, 30, 24, 0.4) 100%);
}
.hero-contours {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  mix-blend-mode: screen;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(7.5rem, 16vw, 10.5rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 1rem;
  text-shadow: 0 1px 10px rgba(10, 16, 12, 0.75), 0 1px 3px rgba(10, 16, 12, 0.9);
}
#hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  color: var(--parchment);
  margin: 0 0 0.3em;
  text-shadow: 0 4px 24px rgba(10, 16, 12, 0.65), 0 2px 6px rgba(10, 16, 12, 0.8);
}
#hero h1 em {
  font-style: italic;
  color: var(--brass);
}
.hero-tagline {
  display: inline-block;
  font-size: 1.05rem;
  max-width: 34em;
  color: var(--parchment);
  background: rgba(15, 22, 18, 0.45);
  text-shadow: 0 1px 6px rgba(10, 16, 12, 0.6);
  padding: 0.65em 1em;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 0.85em 1.6em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ember); color: var(--parchment); }
.btn-primary:hover { background: var(--ember-deep); }
.btn-outline { background: transparent; border-color: rgba(239, 232, 214, 0.5); color: var(--parchment); }
.btn-outline:hover { border-color: var(--brass); color: var(--brass); }
.btn-dark { background: var(--ink); color: var(--parchment); }
.btn-dark:hover { background: var(--ink-soft); }
.btn img { vertical-align: middle; margin-right: 0.5em; }
.btn-beige { background: var(--parchment); color: var(--ink); border-color: var(--parchment); }
.btn-beige:hover { background: var(--parchment-dim); border-color: var(--parchment-dim); }

.availability-widget {
  background: #ffffff;
  border: 1px solid var(--stone-line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  max-width: 30em;
}
.availability-widget p.label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.75rem;
}

/* ---------- Waymarkers (signature element) ---------- */
.waymarkers {
  background: var(--moss-deep);
  color: var(--parchment);
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem);
  position: relative;
}
.waymarkers::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(239,232,214,0.05) 0, rgba(239,232,214,0.05) 1px, transparent 1px, transparent 64px);
  pointer-events: none;
}
.waymarkers-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
}
.waymarkers-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.2rem;
}
.waymarker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
}
.waymarker-list li {
  position: relative;
  padding: 0.9rem 1.4rem 0.9rem 0;
  border-left: 1px solid rgba(239, 232, 214, 0.18);
  padding-left: 1.4rem;
}
.waymarker-list li:first-child { border-left: none; padding-left: 0; }
.waymarker-route {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin-bottom: 0.2rem;
}
.waymarker-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--parchment-dim);
  letter-spacing: 0.02em;
}

/* ---------- Intro / serencontrol block ---------- */
#intro {
  padding: var(--gap-xl) clamp(1.25rem, 4vw, 3rem);
}
.intro-box {
  max-width: 46em;
  margin: 0 auto;
  text-align: left;
}
.intro-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.75rem;
}
.intro-box h1,
.intro-box h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  color: var(--ink);
}
.intro-box h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--moss);
  margin-top: 1.6em;
}
p.paragraph {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.75;
}
p.paragraph:first-of-type {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--moss);
}

/* ---------- Menu images + lightbox (Restaurant page) ---------- */
.menu-section {
  max-width: 46em;
  margin: 2rem auto 0;
}
.menu-section h2 {
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  color: var(--ink);
  margin-bottom: 1rem;
}
.menu-image-wrap { margin-bottom: 1.2rem; }
.menu-image {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--stone-line);
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}
.menu-image:hover { opacity: 0.92; }
.menu-hint {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--slate);
  margin: -0.6rem 0 1.4rem;
}
.menu-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 22, 18, 0.92);
  padding: 4rem 1.5rem 2rem;
  text-align: center;
}
.menu-modal.open { display: block; }
.menu-modal .modal-content {
  margin: 0 auto;
  display: block;
  max-width: 900px;
  width: 90%;
  border-radius: var(--radius);
}
.menu-modal .close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  color: var(--parchment);
  font-size: 2.4rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
}
.menu-modal .close:hover { color: var(--brass); }
.menu-modal #caption {
  margin-top: 1rem;
  color: var(--parchment-dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ---------- Booking widget section (Accommodation page) ---------- */
.booking-section {
  max-width: 46em;
  margin: 3rem auto 0;
  text-align: center;
}
.booking-section h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  color: var(--ink);
}
.booking-box {
  background: #ffffff;
  border: 1px solid var(--stone-line);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: left;
}

/* ---------- Room / pod cards (Accommodation page) ---------- */
.rooms-section {
  max-width: var(--max-width);
  margin: 3.5rem auto 0;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}
.rooms-section h2 {
  max-width: 46em;
  margin: 0 auto 1.6rem;
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  color: var(--ink);
  text-align: center;
}
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.room-card {
  background: var(--ink);
  color: var(--parchment);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
}
.room-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  color: #ffffff;
  margin: 0 0 0.3em;
}
.room-card .room-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin-top: 0.2em;
}
.room-card p {
  color: var(--parchment-dim);
  font-size: 0.92rem;
  flex: 1;
  margin-bottom: 1rem;
}
.room-card .btn { align-self: flex-start; }
.room-card.room-card-new {
  background: var(--moss-deep);
}
.room-card .room-status {
  color: var(--brass);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Highlight cards ---------- */
.highlights {
  padding: 0 clamp(1.25rem, 4vw, 3rem) var(--gap-xl);
}
.highlights-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.highlight-card {
  background: var(--parchment);
  border: 1px solid var(--stone-line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.highlight-media {
  height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.highlight-media.pattern-a { background-color: var(--moss); background-image: var(--hero-restaurant, none); }
.highlight-media.pattern-b { background-color: var(--ember-deep); background-image: var(--hero-accommodation, none); }
.highlight-card:hover .highlight-media { filter: saturate(1.08); }
.highlight-body {
  padding: 1.6rem 1.5rem 1.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.highlight-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--slate);
  margin-bottom: 0.6rem;
}
.highlight-card h3 { font-size: 1.4rem; color: var(--ink); }
.highlight-card p { color: var(--slate); font-size: 0.96rem; flex: 1; }
.highlight-card .btn { align-self: flex-start; margin-top: 0.5rem; }
.btn-line {
  background: none;
  border: none;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.2em 0;
  color: var(--ink);
}
.btn-line:hover { border-color: var(--ember); color: var(--ember); }

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: var(--parchment-dim);
  padding: var(--gap-lg) clamp(1.25rem, 4vw, 3rem) 2.5rem;
  text-align: center;
}
footer h3 {
  color: var(--parchment);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}
.star-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5em 0.9em;
  font-size: 0.9rem;
  margin: 1.4rem 0;
}
.star-links img { display: none; }
.star-links a { color: var(--parchment-dim); border-bottom: 1px solid transparent; }
.star-links a:hover { color: var(--brass); border-color: var(--brass); }

footer > p { font-size: 0.92rem; color: var(--parchment-dim); }
footer > p strong { color: var(--parchment); font-weight: 600; }
footer a[href^="https://www.google.com/maps"],
footer a[href^="https://what3words.com"] { color: var(--brass); }

.contact-info {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 1.2rem 0;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.95rem;
}
.contact-item img { height: 18px; width: auto; filter: invert(1) brightness(1.6); }
.contact-item a:hover { color: var(--brass); }
.facebook-link { display: inline-flex; align-items: center; gap: 0.5em; }
.facebook-link:hover { color: var(--brass); }

footer button.btn-whatsapp {
  font-family: var(--font-body);
  font-weight: 600;
  background: #25a25a;
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  padding: 0.7em 1.4em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
footer button.btn-whatsapp:hover { background: #1c8148; }
footer button.btn-whatsapp img { height: 18px; }

footer button {
  font-family: var(--font-body);
  font-weight: 600;
  background: var(--ember);
  color: var(--parchment);
  border: none;
  border-radius: var(--radius);
  padding: 0.7em 1.4em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
footer button:hover { background: var(--ember-deep); }
footer button img { height: 18px; }

footer iframe {
  margin-top: 1rem;
  border-radius: var(--radius);
  filter: grayscale(0.3) contrast(1.05);
}

/* Old inline button/anchor pairs used inside the serencontrol call-to-action row */
.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }
.cta-row .btn-beige {
  /* This row sits on the page's own parchment background, so the shared
     beige button needs a slightly deeper fill + border here to still
     read as a button rather than disappearing into the section. */
  background: var(--parchment-dim);
  border-color: var(--stone-line);
}
.cta-row .btn-beige:hover { filter: brightness(0.94); }

@media (max-width: 600px) {
  .waymarker-list li { border-left: none; padding-left: 0; border-top: 1px solid rgba(239,232,214,0.18); padding-top: 0.9rem; }
  .waymarker-list li:first-child { border-top: none; padding-top: 0; }
}

/* ---------- 404 page ---------- */
.error-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
  color: var(--parchment);
  padding: clamp(7rem, 14vw, 9rem) clamp(1.25rem, 4vw, 3rem) 4rem;
}
.error-hero .hero-contours {
  opacity: 0.22;
}
.error-content {
  position: relative;
  z-index: 2;
  max-width: 40em;
  margin: 0 auto;
  text-align: center;
}
.error-number {
  font-family: var(--font-mono);
  font-size: clamp(3.5rem, 12vw, 6rem);
  color: var(--brass);
  letter-spacing: 0.05em;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.error-content h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--parchment);
  margin-bottom: 0.5rem;
}
.error-content p.error-lede {
  font-size: 1.1rem;
  color: var(--parchment-dim);
  max-width: 32em;
  margin: 0 auto 2.2rem;
}
.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 3rem;
}
.error-hero .waymarkers {
  background: transparent;
  padding: 1.5rem 0 0;
  text-align: left;
}
.error-hero .waymarkers::before { display: none; }
.error-hero .waymarkers-inner {
  border-top: 1px solid rgba(239, 232, 214, 0.18);
  padding-top: 1.5rem;
}
.error-hero .waymarker-list a { display: block; }
.error-hero .waymarker-list a:hover .waymarker-route { color: var(--brass); }

/* ---------- Gallery (portfolio.pl) ---------- */
body.page-gallery #hero {
  min-height: 50vh;
}
.gallery-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem) var(--gap-xl);
}
.gallery-wrap h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  color: var(--ink);
  margin-bottom: 1rem;
}
.gallery-breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--slate);
  margin-bottom: 1.8rem;
  line-height: 1.9;
}
.gallery-breadcrumb img { vertical-align: middle; margin-right: 0.35em; opacity: 0.7; }
.gallery-breadcrumb a { color: var(--slate); border-bottom: 1px solid var(--stone-line); }
.gallery-breadcrumb a:hover { color: var(--ember); border-color: var(--ember); }
.gallery-breadcrumb strong { color: var(--ink); }
.gallery-description {
  max-width: 46em;
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 2rem;
}

/* Folder tiles */
.portfolio-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.portfolio-box {
  background: var(--parchment);
  border: 1px solid var(--stone-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.portfolio-box:hover { transform: translateY(-2px); border-color: var(--brass); }
.portfolio-box p { font-family: var(--font-display); color: var(--ink); }
.portfolio-box .picture-frame { line-height: 0; }
.portfolio-box .picture-frame img { width: 100%; display: block; }

/* Individual images / justified rows (widths set inline per-image by the
   script's proportional row-layout math -- left untouched functionally).
   NOTE: 879px / 870px below must match $imagepanelwidth (870, set at the
   top of portfolio.pl) + 9px. If that constant ever changes, update here
   too -- these two numbers are coupled but can't both live in one place
   since one is Perl and one is static CSS. */
.gallery-pane {
  margin: 0 auto;
  width: 879px;
}
.gallery-pane-mobile { display: none; }
.gallery-return-link { margin-top: 2rem; }

@media only screen and (max-width: 870px) {
  .gallery-pane { display: none; }
  .gallery-pane-mobile { display: block; }
}