/* Peglio Rental — shared styles for the public site */
:root {
  --ink: #23201d;
  --ink-soft: #5d564f;
  --paper: #faf7f2;
  --paper-2: #f2ece3;
  --line: #e2d9cc;
  --terracotta: #b5563a;
  --terracotta-dark: #98462e;
  --radius: 4px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --wrap: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
}
h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}
h3 {
  font-size: 1.15rem;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

a {
  color: var(--terracotta);
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

.brand span {
  color: var(--terracotta);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.94rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.nav a:hover,
.nav a.active {
  color: var(--ink);
  border-color: var(--terracotta);
}

.lang {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.lang button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out);
}

.lang button.active {
  background: var(--terracotta);
  color: #fff;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: 1px solid var(--terracotta);
  background: var(--terracotta);
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.btn:hover {
  background: var(--terracotta-dark);
}

.btn:active {
  transform: scale(0.97);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn.ghost:hover {
  background: rgba(35, 32, 29, 0.06);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(420px, 68vh, 660px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--paper-2) center / cover no-repeat;
  color: #fff;
  padding: 72px 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(35, 32, 29, 0.28), rgba(35, 32, 29, 0.62));
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.1rem;
  max-width: 46ch;
  margin: 0 auto 18px;
}

.hero p.hero-note {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 42ch;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
}

.hero .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ---------- Sections ---------- */
.section {
  padding: 72px 0;
}

.section.alt {
  background: var(--paper-2);
}

.page-head {
  padding: 56px 0 8px;
}

.lede {
  font-size: 1.1rem;
  max-width: 62ch;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.card ul {
  margin: 0;
  padding-left: 18px;
}

.card li {
  color: var(--ink-soft);
  margin-bottom: 6px;
}

/* ---------- Gallery ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filters button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.88rem;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out),
    border-color 160ms var(--ease-out);
}

.filters button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.gallery figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-2);
  cursor: zoom-in;
}

.gallery img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 260ms var(--ease-out);
}

.gallery figure:hover img {
  transform: scale(1.03);
}

.gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.62));
}

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--ink-soft);
  background: #fff;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 18, 16, 0.9);
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox button {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
}

/* ---------- Table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

th,
td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

th {
  background: var(--paper-2);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.facts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.facts li:last-child {
  border-bottom: 0;
}

.facts strong {
  color: var(--ink);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding: 36px 0;
  margin-top: 8px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.88rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle {
    display: inline-block;
    order: 3;
  }

  .nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 0 16px;
  }

  .nav.open {
    display: flex;
  }

  .site-header .wrap {
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .section {
    padding: 52px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ---------- Layout helpers ---------- */
.wrap.narrow {
  max-width: 760px;
}

.muted {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.cta-row {
  margin-top: 28px;
}

/* ---------- Good to know (house rules) ---------- */
.rules {
  border-top: 1px solid var(--line);
}

.rules .rule {
  display: grid;
  grid-template-columns: minmax(150px, 240px) 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.rules .rule h3 {
  margin: 0;
  font-size: 1rem;
}

.rules .rule p {
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .rules .rule {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ---------- Availability calendar ---------- */
.calendar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
  max-width: 520px;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.cal-head strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
}

.cal-nav {
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  transition: background 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.cal-nav:hover {
  background: var(--paper-2);
}

.cal-nav:active {
  transform: scale(0.97);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 4px;
}

.cal-grid > * {
  min-width: 0;
}

.cal-dow {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 6px;
  overflow: hidden;
}

.cal-day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  min-width: 0;
}

.cal-day.empty {
  background: transparent;
  border-color: transparent;
}

.cal-day.free {
  background: #e3efe4;
  border-color: #9dc0a4;
  color: #2b5738;
  font-weight: 500;
}

.cal-day.booked {
  background: #f0d9d3;
  border-color: #c98d79;
  color: #8d3f26;
  text-decoration: line-through;
  font-weight: 500;
}

.cal-day.past {
  color: #b6ada2;
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.cal-legend .swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid var(--line);
  display: inline-block;
}

.cal-legend .swatch.free {
  background: #e3efe4;
  border-color: #9dc0a4;
}

.cal-legend .swatch.booked {
  background: #f0d9d3;
  border-color: #c98d79;
}

.cal-legend .swatch.past {
  background: var(--paper-2);
}

/* ---------- Map ---------- */
.map-embed {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-2);
  line-height: 0;
}

.map-embed iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* ---------- Inner page heroes ---------- */
.btn.whatsapp {
  background: #1f7a4d;
  border-color: #1f7a4d;
  color: #fff;
}

.btn.whatsapp:hover {
  background: #19653f;
  border-color: #19653f;
}

.hero.hero-inner {
  min-height: 340px;
  padding: 96px 0 72px;
}

.hero.hero-inner h1 {
  margin-bottom: 12px;
}

.hero.hero-inner p {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 760px) {
  .hero.hero-inner {
    min-height: 260px;
    padding: 72px 0 56px;
  }
}
