/* villa-of-tuscany.com */
@font-face { font-family: "Playfair Display"; src: url("/assets/fonts/PlayfairDisplay-VariableFont_wght.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/assets/fonts/SourceSansPro-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/assets/fonts/SourceSansPro-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/assets/fonts/SourceSansPro-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --burgundy: #8d2838;
  --burgundy-soft: rgba(141, 40, 56, 0.85);
  --burgundy-dark: #6e1f2c;
  --navy: #14384c;
  --slate: #2c3c4c;
  --cream: #f8f7f3;
  --grey: #f8f8f8;
  --muted: #929292;
  --text: #31261d;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Source Sans Pro", Helvetica, Arial, sans-serif;
  --wrap: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.7; color: var(--text); background: #fff; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--burgundy); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; text-transform: uppercase; color: var(--navy); line-height: 1.2; margin: 0 0 0.6em; overflow-wrap: break-word; hyphens: manual; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.6rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); }
h4 { font-size: 1.25rem; letter-spacing: 0.02em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

.wrap { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }
.wrap--text { width: min(100% - 3rem, 1100px); }
.center { text-align: center; }
.section { padding: clamp(3rem, 7vw, 6rem) 0; position: relative; }
.section--grey { background: var(--grey); }
.h-large { font-size: clamp(1.7rem, 3.4vw, 3rem); margin: clamp(2.5rem, 5vw, 4.5rem) auto clamp(1.5rem, 3vw, 2.5rem); padding-inline: 1.5rem; }
.h-medium { font-size: clamp(1.4rem, 2.4vw, 2rem); margin: 3rem 0 1.5rem; }
.section > .h-large:first-child, .wrap > .h-large:first-child { margin-top: 0; }

/* buttons */
.btn { display: inline-block; background: var(--burgundy-soft); color: #fff; font-family: var(--sans); font-weight: 600; font-size: 0.875rem; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; padding: 0.8em 1.5em; border: 0; border-radius: 0; cursor: pointer; transition: background-color 0.2s; }
.btn:hover, .btn:focus-visible { background: var(--burgundy); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.cta { text-align: center; margin: 2.5rem 0 0; }

/* header */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: clamp(1rem, 2.5vw, 2.25rem) clamp(1rem, 3vw, 2.5rem); }
.site-header--solid { position: static; background: var(--slate); }
.nav { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; }
.nav-toggle { display: none; }
.header-actions { display: flex; align-items: flex-start; gap: 1rem; }
.lang { position: relative; font-size: 0.875rem; }
.lang summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.5em; height: 3.3em; padding: 0 1em; background: var(--burgundy-soft); color: #fff; transition: background-color 0.2s; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; width: 0.4em; height: 0.4em; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-25%) rotate(45deg); transition: transform 0.2s; }
.lang[open] summary::after { transform: translateY(25%) rotate(-135deg); }
.lang summary:hover, .lang[open] summary { background: var(--burgundy); }
.lang ul { position: absolute; right: 0; top: calc(100% + 2px); width: max-content; min-width: 100%; display: grid; gap: 2px; z-index: 30; }
.lang a { display: flex; align-items: center; gap: 0.75em; padding: 0.8em 1.25em; background: var(--burgundy); color: #fff; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: background-color 0.2s; }
.lang a:hover, .lang a:focus-visible { background: var(--burgundy-dark); }
.lang a[aria-current] { background: var(--burgundy-dark); }
.lang a[aria-current]::after { content: "\2713"; margin-left: auto; padding-left: 1em; }
.flag { display: inline-block; vertical-align: middle; width: 28px; height: 19px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
.lang li .flag { width: 24px; height: 16px; }

/* hero */
.hero { position: relative; height: 100vh; min-height: 560px; overflow: hidden; background: var(--slate); color: #fff; }
.hero__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.9s ease, visibility 0.9s; }
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.12) 70%); }
.hero__content { position: absolute; z-index: 1; left: clamp(1.25rem, 9vw, 11rem); right: 1.25rem; top: 50%; transform: translateY(-42%); max-width: 62rem; }
.hero__kicker { font-family: var(--serif); text-transform: uppercase; font-size: clamp(1.1rem, 2vw, 1.75rem); margin: 0 0 0.4em; }
.hero__title { color: #fff; font-size: clamp(2rem, 5.2vw, 4rem); margin: 0 0 0.35em; max-width: 14em; }
.hero__text { font-weight: 600; font-size: clamp(1rem, 1.25vw, 1.15rem); max-width: 46rem; margin: 0; }
.hero--animate .hero__slide.is-active .hero__kicker, .hero--animate .hero__slide.is-active .hero__text { animation: fade-left 0.7s 0.3s both ease-in-out; }
.hero--animate .hero__slide.is-active .hero__title { animation: fade-right 0.7s 0.5s both ease-in-out; }
@keyframes fade-left { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
@keyframes fade-right { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.hero__arrows { position: absolute; z-index: 2; left: clamp(1.25rem, 5vw, 4.5rem); bottom: 2.5rem; display: flex; gap: 8px; }
.hero__arrows button, .carousel__arrow { width: 50px; height: 50px; border: 0; background: var(--burgundy-soft); color: #fff; font-size: 1.25rem; cursor: pointer; transition: background-color 0.2s; }
.hero__arrows button:hover, .carousel__arrow:hover { background: var(--burgundy); }

/* facts */
.facts { padding: clamp(2rem, 4vw, 3.5rem) 0; }
.facts ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; text-align: center; }
.facts img { height: 64px; width: auto; }
.facts li { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; font-family: var(--serif); font-size: 1.2rem; color: var(--navy); }

/* carousels */
.carousel { position: relative; }
.carousel__track { display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { margin: 0; flex: 0 0 auto; scroll-snap-align: center; }
.carousel__slide img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.carousel--gallery .carousel__track { padding-inline: 15vw; scroll-padding-inline: 15vw; }
.carousel--gallery .carousel__slide { width: 70vw; }
.carousel--gallery .carousel__slide img { aspect-ratio: 16 / 9; }
.carousel--rooms { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }
.carousel--rooms .carousel__slide { width: calc(50% - 0.75rem); scroll-snap-align: start; }
.carousel__slide figcaption { padding: 1.25rem 0 0; }
.carousel__slide figcaption h4 { margin-bottom: 0.4em; }
.carousel__slide figcaption p { margin: 0; }
.carousel__arrow { position: absolute; top: 38%; transform: translateY(-50%); z-index: 2; }
.carousel__arrow--prev { left: 0; }
.carousel__arrow--next { right: 0; }
.carousel--rooms .carousel__arrow--prev { left: -1.5rem; }
.carousel--rooms .carousel__arrow--next { right: -1.5rem; }
.carousel__arrow[disabled] { opacity: 0.35; cursor: default; }
.carousel__dots { display: flex; justify-content: center; gap: 6px; margin-top: 1.75rem; }
.carousel__dots span { width: 34px; height: 2px; background: #d9d9d9; transition: background-color 0.2s; }
.carousel__dots span.is-active { background: var(--burgundy); }

/* amenities */
.amenities { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3rem 1.5rem; text-align: center; margin-bottom: 1rem; }
.amenities li { display: flex; flex-direction: column; align-items: center; }
.amenities img { margin-bottom: 1rem; }
.amenities h4 { font-size: 1.05rem; text-transform: none; margin: 0; }
.amenities p { margin: 0.25rem 0 0; font-size: 0.9rem; color: var(--burgundy); line-height: 1.4; }

/* feel */
.ghost-title { font-family: var(--serif); text-transform: uppercase; text-align: center; font-size: clamp(2rem, 6vw, 5rem); line-height: 1.1; color: rgba(146, 146, 146, 0.35); margin: 0 0 clamp(1.5rem, 3vw, 3rem); }
.video { position: relative; background: #000; }
.video video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video__play { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 84px; height: 60px; border: 0; border-radius: 14px; background: var(--burgundy); color: #fff; font-size: 1.5rem; cursor: pointer; }
.video.is-playing .video__play { display: none; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 2.5rem; }
.features img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 1.25rem; }

/* info */
.cols { display: grid; gap: 2.5rem; }
.cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.block { font-size: 1rem; line-height: 1.65; }
.block--hl { color: var(--burgundy); }
.prose { margin-top: 3rem; }
.plans figure { margin: 0; text-align: center; }
.plans h4 { color: var(--burgundy); }
.plans img { width: 100%; height: auto; }

/* booking */
.booking { overflow: hidden; }
.booking__bg { position: absolute; inset: auto 0 0 0; width: 100%; height: 100%; object-fit: cover; object-position: bottom; opacity: 0.5; pointer-events: none; }
.booking .wrap { position: relative; }
.booking__intro { align-items: start; margin: 2.5rem 0 3rem; }
.prices { width: 100%; border-collapse: collapse; background: var(--cream); text-align: center; }
.prices th, .prices td { padding: 0.7em 0.75em; }
.prices thead { background: var(--burgundy); color: #fff; }
.prices th { font-weight: 600; }
.booking__grid { display: grid; grid-template-columns: minmax(0, 23rem) minmax(0, 1fr); gap: clamp(2rem, 8vw, 9rem); align-items: start; }

.calendar { display: grid; gap: 1.25rem; }
.cal { background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08); }
.cal__head { display: flex; align-items: center; justify-content: space-between; background: var(--slate); color: #fff; padding: 0.3rem; font-size: 0.85rem; font-weight: 600; min-height: 2.4rem; }
.cal__head span { flex: 1; text-align: center; text-transform: capitalize; }
.cal__nav { width: 1.8rem; height: 1.8rem; border: 0; background: var(--burgundy); color: #fff; cursor: pointer; font-size: 0.7rem; }
.cal__nav[disabled] { visibility: hidden; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 2px; }
.cal__dow { text-align: center; font-size: 0.75rem; font-weight: 600; padding: 0.6rem 0; text-transform: uppercase; }
.cal__day { aspect-ratio: 1; border: 0; padding: 0; font: inherit; font-size: 0.85rem; font-weight: 600; line-height: 1.1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--muted); color: var(--cream); cursor: pointer; }
.cal__day small { font-size: 0.55rem; font-weight: 400; }
.cal__day--empty { background: #f4f4f4; cursor: default; }
.cal__day--past { background: #e6e6e6; color: #b5b5b5; cursor: default; }
.cal__day--booked { background: var(--burgundy); color: #fff; cursor: default; }
.cal__day--start { background: linear-gradient(to bottom right, var(--muted) 50%, var(--burgundy) 50%); }
.cal__day--end { background: linear-gradient(to bottom right, var(--burgundy) 50%, var(--muted) 50%); }
.cal__day--selected { background: var(--navy); color: #fff; }
.cal__day--start.cal__day--selected { background: linear-gradient(to bottom right, var(--navy) 50%, var(--burgundy) 50%); }
.cal__day--end.cal__day--selected { background: linear-gradient(to bottom right, var(--burgundy) 50%, var(--navy) 50%); }
.cal__day:not([disabled]):hover { outline: 2px solid var(--navy); outline-offset: -2px; }
.cal__legend { display: flex; gap: 1.25rem; font-size: 0.85rem; }
.cal__legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.cal__legend i { width: 0.9rem; height: 0.9rem; background: var(--muted); display: inline-block; }
.cal__legend i.is-booked { background: var(--burgundy); }

.form { display: grid; gap: 1rem; font-size: 0.95rem; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.field { display: grid; gap: 0.3rem; }
.field > span { font-weight: 600; }
.field abbr { color: var(--burgundy); text-decoration: none; margin-left: 1px; }
.field input, .field select { font: inherit; width: 100%; padding: 0.55em 0.75em; border: 1px solid #cfcfcf; border-radius: 0; background: #fff; color: var(--text); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--burgundy); box-shadow: 0 0 0 1px var(--burgundy); }
.field output { min-height: 1.7em; }
.form__hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form__total { font-weight: 600; font-size: 1.1rem; margin: 0; }
.form__status { margin: 0; }
.form__status.is-error { color: var(--burgundy); font-weight: 600; }
.form__note { font-size: 0.85rem; color: #6b6b6b; margin: 0; }
.form .btn { justify-self: start; }
.form__success { background: var(--cream); padding: 2rem; border-left: 4px solid var(--burgundy); }
.form__success h3 { margin-bottom: 0.5em; }

/* footer */
.site-footer__main { background: var(--slate); min-height: 150px; position: relative; overflow: hidden; }
.site-footer__art { position: absolute; right: 2%; top: 0; height: 240px; width: auto; opacity: 0.6; }
.site-footer__bar { background: var(--burgundy); color: #fff; font-size: 0.9rem; font-weight: 600; }
.site-footer__bar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding: 0.9rem 0; }
.site-footer__bar p { margin: 0; }
.site-footer__bar a { color: #fff; text-decoration: none; }
.site-footer__bar a:hover { text-decoration: underline; }
.to-top { position: fixed; right: 0.4rem; bottom: 5rem; z-index: 15; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 0.8rem; color: var(--burgundy); text-decoration: none; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.to-top.is-visible { opacity: 1; pointer-events: auto; }

/* legal pages */
.legal { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.legal h1 { font-size: clamp(2rem, 4vw, 3rem); }
.legal h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-top: 2.5rem; }
.legal h3 { margin-top: 2rem; }
.legal h4 { font-size: 1.05rem; text-transform: none; margin-top: 1.5rem; }
.legal ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1em; }
.legal table { border-collapse: collapse; margin-bottom: 1em; }
.legal td { border: 1px solid #ddd; padding: 0.4em 0.7em; vertical-align: top; }
.legal { overflow-wrap: anywhere; }

/* responsive */
/* ---------- availability loading + admin (/admin/) ---------- */
[hidden] { display: none !important; }
.calendar.is-loading .cal { opacity: 0.45; pointer-events: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.btn--plain { background: transparent; color: var(--burgundy); box-shadow: inset 0 0 0 1px var(--burgundy); padding: 0.5em 1em; }
.btn--plain:hover, .btn--plain:focus-visible { background: var(--burgundy); color: #fff; }
.admin { padding: clamp(2rem, 5vw, 4rem) 0; }
.admin h1 { font-size: clamp(2rem, 4vw, 3rem); }
.admin h2 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.admin__box { background: var(--cream); padding: 1.5rem; margin-bottom: 2rem; border-left: 4px solid var(--burgundy); }
.admin__box > :last-child { margin-bottom: 0; }
.admin__login { max-width: 26rem; }
.admin__grid { display: grid; grid-template-columns: minmax(0, 23rem) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.admin__grid .admin__box { margin-bottom: 0; }
.admin__table-wrap { overflow-x: auto; }
.admin__table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.admin__table th { text-align: left; font-weight: 600; border-bottom: 2px solid var(--slate); padding: 0.5rem; }
.admin__table td { border-bottom: 1px solid #ddd; padding: 0.5rem; vertical-align: middle; }
.admin__table td:last-child { text-align: right; }
.admin__table tr.is-past { color: #9a9a9a; }
.admin__table tr.is-highlight td { background: #f3e3e6; }
.admin__logout { margin-top: 2rem; }

@media (max-width: 1000px) {
  .cols--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols--3 { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .booking__grid, .admin__grid { grid-template-columns: 1fr; }
  .calendar { max-width: 26rem; }
  .header-cta { display: none; }
}
@media (max-width: 800px) {
  .nav-toggle { display: inline-block; background: var(--burgundy-soft); color: #fff; border: 0; font: inherit; font-weight: 600; font-size: 0.875rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.8em 1.2em; cursor: pointer; }
  .site-header { flex-wrap: wrap; }
  .nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; gap: 2px; }
  .nav.is-open, .nav--always { display: flex; }
  .nav--always { order: 0; flex-basis: auto; }
  .nav .btn { text-align: center; background: var(--burgundy); }
  .facts ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .amenities { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 1rem; }
  .features, .cols--2 { grid-template-columns: minmax(0, 1fr); }
  .carousel--gallery .carousel__track { padding-inline: 4vw; scroll-padding-inline: 4vw; gap: 0.75rem; }
  .carousel--gallery .carousel__slide { width: 92vw; }
  .carousel--gallery .carousel__slide img { aspect-ratio: 3 / 2; }
  .carousel--rooms .carousel__slide { width: 100%; }
  .carousel--rooms .carousel__arrow--prev { left: 0; }
  .carousel--rooms .carousel__arrow--next { right: 0; }
  .carousel__arrow { width: 40px; height: 40px; }
  .hero__content { transform: translateY(-35%); }
  .hero__arrows { left: 1.25rem; bottom: 1.5rem; }
  .site-footer__main { min-height: 100px; }
  .site-footer__art { height: 160px; }
  .to-top { display: none; }
}
@media (max-width: 520px) {
  .cols--4 { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  /* long single words (Zahlungsbedingungen, koffiezetapparaat) would push the page wider than 320px */
  h2, h3, h4, .prices th { hyphens: auto; }
  .prices th, .prices td { padding: 0.7em 0.4em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__slide, .hero__slide.is-active * { transition: none; animation: none !important; }
}
