/* ==========================================================================
   LADY LILA — stylesheet (shared by all pages)
   Pages: index, experiences, danke, datenschutz.
   Mobile-first: base rules are for phones, @media (min-width) adds more.
   No JavaScript anywhere: interactions use <details> and the popover
   attribute. Newer CSS (accordion animation, popover fade) is
   "progressive enhancement": browsers that don't support it simply
   open/close instantly.
   ========================================================================== */

/* ==========================================================================
   1. FONT — Lora for headings only. Body text uses the system font,
      which costs 0 KB because it's already on the visitor's device.
   ========================================================================== */

@font-face {
  font-family: "Lora";
  src: url("../fonts/lora-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   2. TOKENS
   ========================================================================== */

:root {
  /* Palette */
  --color-primary-accent: #d66853; /* rosy copper */
  --color-primary-dark: #212d40; /* deep space blue */
  --color-primary-neutral: #364156; /* charcoal blue */
  --color-secondary-accent: #6b5b7c; /* muted lavender-grey */
  --color-secondary-warm: #7d4e57; /* burnt rose */
  --color-text: #11151c; /* ink black */
  --color-bg: #f8f6f7; /* pale grey-purple */
  --color-bg-card: #ede9ea; /* light warm grey */
  --color-border: #c4b8bc; /* soft mid-tone */

  /* Type */
  --font-heading: "Lora", Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;

  /* Layout */
  --content: 44rem; /* comfortable reading width (~704px) */
  --gutter: 1.25rem;
  --radius: 8px;
  --nav-height: 3.75rem;

  /* Lets CSS animate to height: auto (used by the accordions) */
  interpolate-size: allow-keywords;
}

/* ==========================================================================
   3. RESET & BASE
   ========================================================================== */

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

/* Jumping to #booking or #faq: stop below the fixed nav, not under it */
html {
  scroll-padding-top: calc(var(--nav-height) + 1rem);
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1,
h2 {
  font-family: var(--font-heading);
  line-height: 1.15;
  color: var(--color-primary-dark);
  /* Long German words (Datenschutzerklärung) would otherwise overflow on
     phones. hyphens uses the page's lang attribute to hyphenate correctly. */
  hyphens: auto;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem);
  margin-bottom: 1.5rem;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--color-primary-accent);
  outline-offset: 3px;
}

/* Hidden visually, still read by screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   4. BUTTONS & LINKS
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border: none;
  border-radius: 4px;
  background-color: var(--color-primary-accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.btn:hover {
  background-color: var(--color-secondary-warm);
}

.btn-block {
  width: 100%;
}

.text-link {
  color: var(--color-secondary-accent);
  font-weight: 600;
  text-underline-offset: 0.2em;
}

.text-link:hover {
  color: var(--color-secondary-warm);
}

/* Secondary button: outline style, for use on the dark hero */
.btn-ghost {
  background-color: transparent;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   NAV — fixed bar, semi-transparent over the hero.
   Three short links fit even on a 320px phone, so there's no hamburger.
   ========================================================================== */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1rem;
  background-color: rgba(33, 45, 64, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--color-bg);
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.875rem;
}

.nav-links a {
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--color-primary-accent);
}

/* Current page: underline in the accent colour */
.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--color-primary-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

.nav-cta {
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  background-color: var(--color-primary-accent);
  color: #fff;
  font-weight: 600;
}

.nav-links .nav-cta:hover {
  color: #fff;
  background-color: var(--color-secondary-warm);
}

@media (min-width: 400px) {
  .site-nav {
    padding-inline: var(--gutter);
  }

  .nav-brand {
    font-size: 1.25rem;
  }

  .nav-links {
    gap: 1.25rem;
    font-size: 0.9375rem;
  }
}

@media (min-width: 769px) {
  .nav-links {
    gap: 2rem;
    font-size: 1rem;
  }

  .nav-cta {
    padding: 0.4rem 1rem;
  }
}

/*  5. HERO */

.hero {
  position: relative;
  min-height: 85svh; /* svh = "small viewport height", stable on phones */
  display: flex;
  align-items: flex-end;
  color: #fff;
  background-color: var(--color-primary-dark); /* shows while image loads */
  overflow: hidden;
  isolation: isolate; /* keeps the z-index layers below local to the hero */
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 15%; /* keep the face in frame when cropped */
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgba(33, 45, 64, 0.1) 0%,
    rgba(33, 45, 64, 0.55) 45%,
    rgba(33, 45, 64, 0.92) 100%
  );
}

.hero-content {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  /* top padding keeps the text clear of the fixed nav */
  padding: calc(var(--nav-height) + 2rem) var(--gutter) 3rem;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.5rem, 1.8rem + 4vw, 4.5rem);
  font-weight: 600;
  margin-bottom: 1rem;
}

.intro {
  font-size: 1.125rem;
  max-width: 36rem;
  margin-bottom: 1.75rem;
  color: rgba(255, 255, 255, 0.92);
}

/* Phones: buttons stacked, both stretched to the same full width */
.hero-actions {
  display: grid;
  gap: 0.75rem;
}

.hero-actions .btn {
  text-align: center;
}

/* A plain text link (danke page) shouldn't stretch like a button */
.hero-actions .text-link {
  justify-self: start;
}

/* Once both fit on one line: side by side again, natural widths */
@media (min-width: 520px) {
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
  }
}

@media (min-width: 769px) {
  .hero {
    min-height: 90svh;
  }

  .hero-content {
    padding-bottom: 4rem;
  }

  .intro {
    font-size: 1.25rem;
  }

  /* On wide screens there's room to the right of the subject */
  .hero::after {
    background: linear-gradient(
      100deg,
      rgba(33, 45, 64, 0.05) 25%,
      rgba(33, 45, 64, 0.6) 55%,
      rgba(33, 45, 64, 0.9) 100%
    );
  }

  .hero {
    align-items: center;
  }

  .hero-content {
    max-width: none;
    padding-left: 52%;
    padding-right: 6vw;
  }
}

/* ==========================================================================
   6. SECTIONS
   ========================================================================== */

.section {
  max-width: var(--content);
  margin: 0 auto;
  padding: 4rem var(--gutter) 0;
}

/* The gallery breaks out of the reading column to use the full width */
.section-wide {
  max-width: none;
  padding-inline: 0;
}

.section-lead {
  margin-bottom: 2rem;
  color: var(--color-primary-neutral);
}

/* --- Experiences list on the home page (each links to its section) --- */
.link-list {
  list-style: none;
  border-top: 1px solid var(--color-border);
}

.link-list li {
  border-bottom: 1px solid var(--color-border);
}

.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0.25rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

/* Arrow drawn as text; slides right on hover */
.link-list a::after {
  content: "→";
  color: var(--color-primary-accent);
  transition: transform 0.2s ease;
}

.link-list a:hover {
  color: var(--color-secondary-accent);
}

.link-list a:hover::after {
  transform: translateX(0.25rem);
}

/* ==========================================================================
   SUBPAGES (experiences, danke, datenschutz)
   ========================================================================== */

/* Reading column, pushed down below the fixed nav */
.page {
  max-width: var(--content);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 3rem) var(--gutter) 0;
}

.page h1 {
  font-size: clamp(2.25rem, 1.8rem + 2.5vw, 3.25rem);
  margin-bottom: 1rem;
}

.page-header {
  margin-bottom: 1rem;
}

/* One block per experience */
.experience {
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border);
}

.experience h2 {
  margin-bottom: 1rem;
}

.experience p {
  margin-bottom: 1rem;
}

.page-cta {
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}

/* Thank-you page: centred, fills most of the screen */
.page-center {
  min-height: 70svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

/* Long-form text (Datenschutz) */
.prose h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 0.75rem;
}

.prose p {
  margin-bottom: 1rem;
}

/* ==========================================================================
   7. ACCORDION (FAQ)
   ========================================================================== */

.accordion {
  border-top: 1px solid var(--color-border);
}

.accordion details {
  border-bottom: 1px solid var(--color-border);
}

.accordion summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0.25rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-primary-dark);
  cursor: pointer;
  list-style: none; /* hide the default triangle (Firefox) */
  transition: color 0.2s ease;
}

.accordion summary::-webkit-details-marker {
  display: none; /* hide the default triangle (Safari) */
}

.accordion summary:hover {
  color: var(--color-secondary-accent);
}

/* Plus sign drawn with CSS; turns into a minus when open */
.accordion summary::after {
  content: "";
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  /* two bars: horizontal + vertical */
  background-image:
    linear-gradient(var(--color-primary-accent) 0 0),
    linear-gradient(var(--color-primary-accent) 0 0);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 2px, 2px 100%;
  transition: background-size 0.3s ease;
}

/* Open: shrink the vertical bar to nothing, leaving a minus */
.accordion details[open] > summary::after {
  background-size: 100% 2px, 2px 0;
}

.accordion-body {
  padding: 0 0.25rem 1.5rem;
}

.accordion-body p + p {
  margin-top: 0.75rem;
}

/* Smooth open/close. ::details-content is new (Chrome/Edge 131+ at the
   time of writing). Browsers that don't know it skip this whole rule. */
details::details-content {
  block-size: 0;
  overflow: hidden;
  transition:
    block-size 0.35s ease,
    content-visibility 0.35s allow-discrete;
}

details[open]::details-content {
  block-size: auto;
}

/* ==========================================================================
   8. GALLERY — horizontal strip with scroll-snap
   ========================================================================== */

.gallery {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  /* side padding lines the first photo up with the text column */
  padding: 0.25rem max(var(--gutter), (100% - var(--content)) / 2) 1rem;
  scroll-padding-inline: max(var(--gutter), (100% - var(--content)) / 2);
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.gallery li {
  flex: none;
  scroll-snap-align: start;
}

.gallery-thumb {
  display: block;
  border: none;
  padding: 0;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
}

/* Same height for every photo; width follows each photo's own shape */
.gallery-thumb img {
  height: clamp(16rem, 55vw, 24rem);
  width: auto;
  transition: transform 0.4s ease;
}

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

/* --- Enlarged photo (popover) --- */
.photo-popover {
  position: fixed;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  max-width: 94vw;
  max-height: 92svh;
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
}

.photo-popover img {
  max-width: 94vw;
  max-height: 92svh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
}

.photo-popover::backdrop {
  background: rgba(17, 21, 28, 0.9);
}

.popover-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-primary-dark);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

/* Fade in/out (progressive enhancement) */
.photo-popover,
.photo-popover::backdrop {
  opacity: 0;
  transition:
    opacity 0.25s ease,
    overlay 0.25s allow-discrete,
    display 0.25s allow-discrete;
}

.photo-popover:popover-open,
.photo-popover:popover-open::backdrop {
  opacity: 1;
}

@starting-style {
  .photo-popover:popover-open,
  .photo-popover:popover-open::backdrop {
    opacity: 0;
  }
}

/* ==========================================================================
   9. BOOKING FORM
   ========================================================================== */

.booking-form {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem;
  background-color: var(--color-bg-card);
  border-radius: var(--radius);
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-primary-neutral);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background-color: #fff;
  font: inherit;
  color: var(--color-text);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--color-secondary-accent);
  outline-offset: 0;
  border-color: var(--color-secondary-accent);
}

.field textarea {
  resize: vertical;
}

.field-row {
  display: grid;
  gap: 1.25rem;
}

/* "(optional)" hint next to a label: lighter and not bold */
.optional {
  font-weight: 400;
  color: var(--color-secondary-warm);
}

.honeypot {
  position: absolute;
  left: -9999px;
}

@media (min-width: 481px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 769px) {
  .booking-form {
    padding: 2rem;
  }
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */

.site-footer {
  margin-top: 5rem;
  padding: 3rem var(--gutter);
  background-color: var(--color-primary-dark);
  color: var(--color-bg);
}

.footer-inner {
  max-width: var(--content);
  margin: 0 auto;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin-bottom: 2rem;
}

.footer-links a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--color-primary-accent);
}

.legal {
  border-top: 1px solid rgba(248, 246, 247, 0.2);
}

.legal summary {
  padding: 0.85rem 0;
  font-weight: 600;
  cursor: pointer;
}

.legal-body {
  padding-bottom: 1.25rem;
  font-size: 0.95rem;
}

.legal-body p + p {
  margin-top: 0.75rem;
}

.placeholder-note {
  color: var(--color-primary-accent);
}

.footer-small {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(248, 246, 247, 0.2);
  font-size: 0.875rem;
  opacity: 0.8;
}

.footer-small a {
  text-underline-offset: 0.2em;
}

.footer-small a:hover {
  color: var(--color-primary-accent);
}

/* ==========================================================================
   11. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Separate rule on purpose: if a browser doesn't know ::details-content,
   only this rule is dropped, not the one above. */
@media (prefers-reduced-motion: reduce) {
  ::details-content {
    transition-duration: 0.01ms !important;
  }
}
