/* Rappelkiste – styles ported from the former WordPress theme.json. */

@font-face {
  font-family: "Baloo 2";
  font-weight: 500 800;
  font-display: swap;
  src: url(/fonts/baloo2-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/nunito-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Schoolbell";
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/schoolbell-latin.woff2) format("woff2");
}

:root {
  --primary: #5242b9;
  --secondary: #ffca4a;
  --accent: #ee7d3a; /* orange from the Canva design */
  --dots: #e15333;
  --green: #89d77c;
  --lavender: #b3c1ff;
  --peach: #ffd098;
  --dark: #0f0265;
  --base: #ffffff;
  --muted: #f5ebd1; /* matches the hero banner background */

  --font-heading: "Baloo 2", "Comic Sans MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;
  --font-nav: "Schoolbell", "Comic Sans MS", cursive;

  --content: 720px;
  --wide: 1200px;
  --gutter: 1.5rem;
  --scallop: 16px;
  /* Viewport-fixed so the header's dots line up with the page's dots behind it. */
  --dotted: url(/img/dots-tile.svg) 0 0 / 380px 300px repeat fixed, var(--accent);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 10rem; -webkit-text-size-adjust: 100%; }
@media (max-width: 760px) { html { scroll-padding-top: 5.5rem; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--dotted);
  color: var(--dark);
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.6rem); }

p { margin: 0 0 1rem; }
a { color: var(--dark); }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: var(--content); margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.lead { font-size: clamp(1.25rem, 1rem + 1.5vw, 1.6rem); line-height: 1.4; }
.nowrap { white-space: nowrap; }

@media (max-width: 640px) {
  :root { --gutter: 1.25rem; }
  body { font-size: 1.05rem; line-height: 1.6; }
}
.small { font-size: 0.95rem; }

/* Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  margin-bottom: calc(-1 * var(--scallop)); /* scallops overlap whatever comes next */
  padding-bottom: var(--scallop);
  /* On the parent, because the mask below would also cut away a shadow on the same element. */
  filter: drop-shadow(0 3px 0 rgb(15 2 101 / 0.18));
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--dotted);
  --edge: linear-gradient(#000 0 0) top / 100% calc(100% - var(--scallop)) no-repeat,
    url(/img/scallop.svg) bottom / 40px var(--scallop) repeat-x;
  -webkit-mask: var(--edge);
  mask: var(--edge);
}
.site-header .container {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 1.5rem;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-family: var(--font-nav);
  font-size: clamp(1.4rem, 2.8vw, 2.6rem);
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--dark);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
  -webkit-text-stroke: 0.6px currentColor; /* Schoolbell is thin; the Canva lettering is bolder */
}
@media (hover: hover) { .site-nav a:hover { color: var(--base); } }

/* Mobile-only header controls; on desktop the full nav fits (the CTA is re-shown below). */
/* Scoped to .site-header so the later generic .btn rule can't re-show the CTA on desktop. */
.site-header .brand, .site-header .header-cta, .site-header .nav-toggle { display: none; }

/* Desktop: nav on the left edge of the container, "Buchen" button on the right. */
@media (min-width: 761px) {
  .site-header .container { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 1.5rem; }
  .site-nav { grid-column: 1; grid-row: 1; }
  .site-nav ul { justify-content: flex-start; }
  .site-nav a { font-size: clamp(1.3rem, 2.3vw, 2.1rem); }
  .site-header .header-cta { display: inline-flex; grid-column: 2; grid-row: 1; justify-self: end; white-space: nowrap;
    /* Scales with the nav links so it doesn't look tiny next to them. */
    font-size: clamp(1.1rem, 1.9vw, 1.8rem); padding: 0.45em 1.2em; }
}

@media (max-width: 760px) {
  .site-header .container { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  /* Without JS (and on the short legal-page nav) the links wrap instead of scrolling off-screen. */
  .site-nav ul { gap: 0.1rem 1.25rem; }
  .site-nav a { font-size: 1.35rem; white-space: nowrap; }

  .js .has-menu .container { flex-wrap: wrap; align-items: center; gap: 0.5rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .js .has-menu .brand,
  .js .has-menu .header-cta,
  .js .has-menu .nav-toggle { display: inline-flex; align-items: center; }
  .js .has-menu .brand {
    margin-right: auto;
    font-family: var(--font-nav);
    font-size: clamp(1.3rem, 5.5vw, 1.6rem);
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    -webkit-text-stroke: 0.6px currentColor;
  }
  .js .has-menu .site-nav { display: none; width: 100%; }
  .js .has-menu.is-open .site-nav { display: block; }
  .js .has-menu .site-nav ul { flex-direction: column; align-items: center; gap: 0; padding: 0.25rem 0 0.5rem; }
  .js .has-menu .site-nav a { display: block; padding: 0.35rem 1rem; font-size: 1.9rem; }
}

.nav-toggle {
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--dark);
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--base);
  transition: transform 0.2s, background-color 0.2s;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }
.nav-toggle:focus-visible, .site-nav a:focus-visible, .site-header .btn:focus-visible { outline: 3px solid var(--base); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { transition: none; } }

/* Sections ----------------------------------------------------------- */
/* Every section except the hero is a rounded, coloured panel floating on the dotted orange. */
section {
  width: min(100% - 2rem, var(--wide));
  margin: 2rem auto;
  padding: 3.5rem 0;
  border-radius: 32px;
  background: var(--base);
  box-shadow: 0 4px 0 rgb(15 2 101 / 0.12);
}
@media (max-width: 640px) {
  section { margin: 1.25rem auto; padding: 2.5rem 0; border-radius: 24px; }
}
.bg-muted { background: var(--muted); }
.bg-secondary { background: var(--secondary); }
.bg-primary { background: var(--primary); color: var(--base); }
.bg-primary a { color: var(--base); }

.hero { width: auto; margin: 0; padding: var(--scallop) 0 0; border-radius: 0; box-shadow: none; background: var(--muted); }
.hero img { width: 100%; max-width: var(--wide); margin: 0 auto; }
.hero-text { font-family: var(--font-body); font-weight: 400; }
/* The banner is ~3.8:1 – on phones that shrinks the logo to a sliver, so crop to 2:1 around the lettering. */
@media (max-width: 640px) {
  .hero img { aspect-ratio: 2 / 1; object-fit: cover; object-position: 60% 50%; }
}

/* Cards / grids ------------------------------------------------------ */
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; }

.card {
  border-radius: 20px;
  padding: 1.5rem;
  background: var(--base);
}
.card > :last-child { margin-bottom: 0; }
.tile { text-align: center; margin: 0; font-size: 1.6rem; }
@media (max-width: 640px) {
  .grid:has(> .tile) { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .tile { display: flex; align-items: center; justify-content: center; padding: 1rem 0.75rem; font-size: 1.15rem; border-radius: 16px; }
}

.bg-lavender { background: var(--lavender); }
.bg-green { background: var(--green); }
.bg-peach { background: var(--peach); }
.bg-yellow { background: var(--secondary); }

.occasions h3 { color: var(--secondary); }

/* Prices ------------------------------------------------------------- */
.price-card { text-align: center; border-radius: 24px; padding: 2rem 1.5rem; }
.price-card hr {
  border: 0;
  height: 1.5rem;
  margin: 0.5rem 0 1rem;
  background: radial-gradient(circle, var(--dark) 2px, transparent 2.5px) center / 1.5rem 1.5rem repeat-x;
  opacity: 0.6;
}
.price-card .slot { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.6rem); line-height: 1.4; }
@media (max-width: 640px) {
  .price-card { padding: 1.5rem 1rem 1rem; }
  .price-card hr { margin: 0.25rem 0 0.75rem; }
}

ol.steps { padding-left: 1.5rem; }
ol.steps li { margin-bottom: 0.5rem; }

/* Buttons ------------------------------------------------------------ */
.buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.5rem; }
.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--base);
  border-radius: 999px;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
}
.btn:hover { background: var(--dark); color: var(--base); }
.btn-light { background: var(--base); color: var(--dark); }
.btn-light:hover { background: var(--dark); color: var(--base); }
@media (max-width: 640px) {
  .buttons .btn { min-height: 48px; text-align: center; }
  .buttons:has(> .btn + .btn) .btn { flex: 1 1 auto; }
}

/* Contact map -------------------------------------------------------- */
.map { position: relative; margin: 1.5rem 0 0; }
.map-view { position: relative; height: clamp(300px, 45vw, 440px); border-radius: 20px; overflow: hidden; background: var(--muted); }
.map-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.map-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  translate: -50% calc(-50% - 25.5px); /* rotated corner (half-diagonal below centre) sits on the address */
  background: var(--accent);
  border: 3px solid var(--base);
  border-radius: 50% 50% 50% 0;
  rotate: -45deg;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.35);
}
.map-pin::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--base);
}
.map-btn { position: absolute; left: 1rem; top: 1rem; font-size: 1.1rem; box-shadow: 0 2px 8px rgb(0 0 0 / 0.25); }
.map figcaption { margin-top: 0.4rem; font-size: 0.8rem; text-align: right; }

/* Booking ------------------------------------------------------------ */
.booking {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: start;
  margin-top: 2rem;
}
@media (max-width: 900px) { .booking { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .booking .card { padding: 1.25rem 1rem; } }
.booking .card { padding: 1.5rem; }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.cal-title { margin: 0; font-size: 1.5rem; }
.cal-nav {
  width: 2.75rem; height: 2.75rem;
  border: 0; border-radius: 50%;
  background: var(--muted); color: var(--dark);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.cal-nav:hover:not(:disabled) { background: var(--secondary); }
.cal-nav:disabled { opacity: 0.3; cursor: default; }
.cal-weekdays, .cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.cal-weekdays { font-size: 0.85rem; font-weight: 700; text-align: center; margin-bottom: 0.35rem; }
.day {
  aspect-ratio: 1;
  border: 0; border-radius: 12px;
  font: 700 1.05rem var(--font-body); color: var(--dark);
  cursor: pointer;
  transition: transform 0.1s;
}
.day.free { background: var(--green); }
.day.partial { background: var(--peach); }
.day.full { background: #ece6d8; color: rgb(15 2 101 / 0.4); text-decoration: line-through; cursor: default; }
.day.off { background: transparent; color: rgb(15 2 101 / 0.3); cursor: default; }
.day.holiday:not(.off) { box-shadow: inset 0 0 0 2px var(--dark); }
.day:hover:not(:disabled) { transform: scale(1.08); }
.day.selected { background: var(--primary); color: var(--base); }
.day:focus-visible, .slot:focus-visible, .cal-nav:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.cal-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; list-style: none; padding: 0; margin: 1rem 0 0; font-size: 0.9rem; }
.cal-legend li { display: flex; align-items: center; gap: 0.4rem; }
.swatch { width: 1rem; height: 1rem; border-radius: 4px; }
.swatch.free { background: var(--green); }
.swatch.partial { background: var(--peach); }
.swatch.full { background: #ece6d8; }

.booking-hint { margin: 0; padding: 3rem 1rem; text-align: center; font-size: 1.3rem; }
.slot-date { font-size: 1.4rem; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.slot {
  display: grid; gap: 0.1rem;
  padding: 0.9rem;
  border: 3px solid transparent; border-radius: 16px;
  background: var(--muted); color: var(--dark);
  font: inherit; font-size: 1rem; text-align: center;
  cursor: pointer;
}
.slot strong { font-family: var(--font-heading); font-size: 1.25rem; }
.slot-price { font-weight: 700; }
.slot:hover:not(:disabled) { border-color: var(--primary); }
.slot.selected { background: var(--primary); color: var(--base); }
.slot:disabled { opacity: 0.45; cursor: default; }

.booking-form { margin-top: 1.5rem; border-top: 2px dashed rgb(15 2 101 / 0.2); padding-top: 1.25rem; }
.booking-summary { background: var(--muted); border-radius: 12px; padding: 0.75rem 1rem; }
.field-row { display: grid; gap: 0.75rem; margin-bottom: 0.75rem; }
.field-row.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .field-row.two { grid-template-columns: 1fr; } }
.booking-form label { display: grid; gap: 0.25rem; font-weight: 700; font-size: 0.95rem; }
.booking-form input, .booking-form select, .booking-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 2px solid rgb(15 2 101 / 0.2); border-radius: 10px;
  background: var(--base); color: var(--dark);
  font: 400 1rem var(--font-body);
}
.booking-form input:focus, .booking-form select:focus, .booking-form textarea:focus { outline: none; border-color: var(--primary); }
.booking-form label.check { display: flex; align-items: flex-start; gap: 0.6rem; font-weight: 400; margin: 1rem 0; }
.booking-form label.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; flex: none; accent-color: var(--primary); }
.field-note { margin-top: -0.25rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-errors ul { margin: 0 0 1rem; padding: 0.75rem 1rem 0.75rem 2rem; background: #ffe1dc; border-radius: 12px; color: #8a1c0a; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: flex-end; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-light { box-shadow: inset 0 0 0 2px rgb(15 2 101 / 0.15); }
.booking-done { text-align: center; padding: 2rem 0.5rem; }
.booking-contact { margin-top: 2rem; }
.booking-contact .buttons { margin-top: 0.5rem; }

/* Admin -------------------------------------------------------------- */
body.admin { background: var(--muted); padding: 2rem 0; }
.admin h1 { font-size: 2.5rem; }
.admin h2 { font-size: 1.8rem; margin-top: 2.5rem; }
.admin .notice { background: var(--green); border-radius: 12px; padding: 0.75rem 1rem; }
.btn-small { font-size: 1rem; padding: 0.45rem 1.1rem; border: 0; cursor: pointer; }
.block-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.block-form input, .block-form select { font: inherit; padding: 0.4rem 0.6rem; border-radius: 8px; border: 2px solid rgb(15 2 101 / 0.2); }
.table-wrap { overflow-x: auto; padding: 0.5rem; }
.admin table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.admin th, .admin td { text-align: left; vertical-align: top; padding: 0.75rem; border-bottom: 1px solid rgb(15 2 101 / 0.1); }
.admin .actions { white-space: nowrap; }
.admin .actions form { display: inline-block; margin: 0 0.25rem 0.25rem 0; }
.admin .msg { margin-top: 0.4rem; padding: 0.4rem 0.6rem; background: var(--muted); border-radius: 8px; white-space: pre-wrap; }
.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; background: var(--muted); }
.status-pending .badge { background: var(--secondary); }
.status-confirmed .badge { background: var(--green); }
.status-blocked .badge { background: var(--lavender); }
.status-declined, .status-cancelled { opacity: 0.5; }

/* Polaroid gallery -------------------------------------------------- */
.polaroids {
  display: grid;
  gap: 2rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  max-width: 1000px;
  margin: 2.5rem auto 3rem;
}
.polaroid {
  margin: 0;
  padding: 0.75rem 0.75rem 0;
  background: var(--base);
  border-radius: 4px;
  box-shadow: 0 6px 16px rgb(15 2 101 / 0.15);
  transform: rotate(var(--tilt, -2deg));
  transition: transform 0.2s;
}
.polaroid:nth-child(2n) { --tilt: 1.5deg; }
.polaroid:nth-child(3n) { --tilt: -1deg; }
.polaroid:nth-child(4n) { --tilt: 2.5deg; }
.polaroid:hover { transform: rotate(0) scale(1.03); }
.polaroid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.polaroid figcaption {
  font-family: var(--font-nav);
  font-size: 1.4rem;
  line-height: 1.2;
  text-align: center;
  padding: 0.5rem 0 0.75rem;
}
@media (max-width: 640px) {
  .polaroids { grid-template-columns: 1fr 1fr; gap: 1.25rem 1rem; }
  .polaroid { padding: 0.5rem 0.5rem 0; }
  .polaroid figcaption { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { .polaroid { transition: none; } }

/* Footer ------------------------------------------------------------- */
.site-footer {
  margin-top: 3rem;
  padding: calc(3rem + var(--scallop)) 0 2rem;
  background: var(--dark);
  color: var(--base);
  --edge: linear-gradient(#000 0 0) bottom / 100% calc(100% - var(--scallop)) no-repeat,
    url(/img/scallop-up.svg) top / 40px var(--scallop) repeat-x;
  -webkit-mask: var(--edge);
  mask: var(--edge);
}
.site-footer h3 { color: var(--secondary); }
.site-footer a { color: var(--base); }
.site-footer a:hover { color: var(--secondary); }
.site-footer h3 { font-size: 1.5rem; }
.site-footer .copy { text-align: center; margin-top: 2rem; font-size: 0.95rem; }
.site-footer p a { display: inline-block; padding: 0.15rem 0; }
@media (max-width: 640px) {
  .site-footer { margin-top: 2rem; padding-top: calc(2.25rem + var(--scallop)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; }
  .footer-grid > :nth-child(-n+2) { grid-column: 1 / -1; }
}

/* Legal pages -------------------------------------------------------- */
.page-title { background: var(--secondary); padding: 3rem 0 1rem; text-align: center; }
.page-body { background: var(--base); padding: 2rem 0 4rem; }
.page-body h2 { font-size: 1.8rem; margin-top: 2rem; }
.page-body h3 { font-size: 1.3rem; margin-top: 1.5rem; }
.legal li p { margin: 0.2rem 0; } /* pandoc wraps list items from Word in <p> */
