/* ==========================================================================
   Sijis Massage – Global Stylesheet
   Mobile-first, no framework. Structure:
   1. Custom properties (design tokens)
   2. Base / reset
   3. Typography
   4. Layout helpers
   5. Buttons
   6. Header + navigation
   7. Hero sections
   8. Content components (cards, service sections, tables, contact)
   9. Footer
   10. Scroll animations
   11. Breakpoints: 48em (768px) tablet, 64em (1024px) desktop
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Local fonts (assets/fonts/, variable fonts, latin + latin-ext)
      Kein externer Request: die Schriften liegen im Projekt.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../assets/fonts/cormorant-garamond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../assets/fonts/cormorant-garamond-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../assets/fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../assets/fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Muted pine green accent for buttons and highlights */
  --accent: #47714b;
  --accent-strong: #558259; /* hover state */
  --accent-dark: #26402a;
  --accent-deep: #101c12;
  /* Light sage for links/accents on dark backgrounds (AA contrast) */
  --accent-light: #a7c49e;
  --accent-pale: #d9e6d3;

  /* Near-neutral anthracite backgrounds with a hint of green */
  --bg: #131813;
  --bg-alt: #191f19;
  --surface: #202821;
  --surface-raised: #273028;
  --border: rgba(255, 255, 255, 0.09);

  /* Text: soft off-white with a cool green undertone */
  --text: #e9ece7;
  --text-muted: #b3bab0;
  --heading: #f5f7f3;

  /* Type */
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Jost", "Segoe UI", Arial, sans-serif;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --radius: 10px;
  --container: 71.25rem; /* 1140px */
  --header-height: 4.5rem;
}

/* --------------------------------------------------------------------------
   2. Base / reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Anchor targets should not hide behind the sticky header */
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

ul,
ol {
  padding-left: 1.25rem;
}

/* Visible focus for keyboard users */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link: hidden until focused */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 200;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--heading);
  line-height: 1.15;
  margin: 0 0 var(--space-2);
}

h1 {
  font-size: clamp(2.4rem, 7vw, 4rem);
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1.9rem, 5vw, 2.75rem);
}

h3 {
  font-size: clamp(1.4rem, 3.5vw, 1.75rem);
}

p {
  margin: 0 0 var(--space-2);
}

a {
  color: var(--accent-light);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-pale);
}

/* Small uppercase label above headings */
.eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: var(--space-2);
}

.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 46em;
}

/* --------------------------------------------------------------------------
   4. Layout helpers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.section {
  padding-block: var(--space-5);
}

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

.section-head {
  max-width: 42em;
  margin-bottom: var(--space-4);
}

.section-head.centered {
  margin-inline: auto;
  text-align: center;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease,
    color 0.25s ease, transform 0.25s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-outline:hover {
  border-color: var(--accent-light);
  color: var(--accent-pale);
}

.btn-lg {
  padding: 1rem 2.6rem;
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   6. Header + navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(19, 24, 19, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: var(--header-height);
}

.brand img {
  width: 180px;
  height: auto;
}

/* Burger button, visible on mobile only */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.6rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle .bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Burger turns into an X when the menu is open */
.nav-open .nav-toggle .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-open .nav-toggle .bar:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile: nav is a collapsible panel under the header */
.main-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  display: none;
}

.nav-open .main-nav {
  display: block;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: var(--space-2) var(--space-3) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.main-nav a:not(.btn) {
  display: block;
  padding: 0.7rem 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0.05em;
  border-radius: 6px;
}

.main-nav a:not(.btn):hover {
  color: var(--accent-pale);
}

/* Current page marker */
.main-nav a[aria-current="page"] {
  color: var(--accent-light);
}

.nav-cta {
  margin-top: var(--space-1);
}

/* --------------------------------------------------------------------------
   7. Hero sections
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(
      ellipse at 20% 0%,
      rgba(71, 113, 75, 0.32) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse at 90% 100%,
      rgba(71, 113, 75, 0.17) 0%,
      transparent 50%
    ),
    linear-gradient(160deg, #1a211a 0%, #0f140f 70%);
  padding-block: var(--space-6) var(--space-5);
  text-align: center;
}

.hero .container {
  max-width: 52rem;
}

.hero-logo {
  width: min(320px, 70vw);
  margin: 0 auto var(--space-4);
}

.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 40em;
  margin-inline: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* Smaller hero for subpages */
.hero-sub {
  padding-block: var(--space-5) var(--space-4);
}

/* Hero background video (Startseite). Ohne Videodatei zeigt das Poster,
   ohne Poster der Verlauf des .hero-Hintergrunds. */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Dark overlay keeps logo, headline and buttons readable (WCAG AA) */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(13, 17, 13, 0.82) 0%,
    rgba(13, 17, 13, 0.68) 45%,
    rgba(13, 17, 13, 0.85) 100%
  );
}

.hero-has-video .container {
  position: relative;
  z-index: 2;
}

/* Small screens: skip the video (JS removes the element, this hides it even
   without JS) and show the poster as a static background instead. The
   gradient layers below remain the fallback if the poster is missing. */
@media (max-width: 47.99em) {
  .hero-video {
    display: none;
  }

  .hero-has-video {
    background:
      url("../assets/video/hero-spa-poster.jpg") center / cover no-repeat,
      radial-gradient(
        ellipse at 20% 0%,
        rgba(71, 113, 75, 0.32) 0%,
        transparent 55%
      ),
      linear-gradient(160deg, #1a211a 0%, #0f140f 70%);
  }
}

/* Reduced motion: no video playback, poster or gradient stays */
@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   8. Content components
   -------------------------------------------------------------------------- */

/* Studiofotos: in Textabschnitten (4:3), in Karten (3:2) und als
   einzelnes Foto (z. B. Anfahrt). Die Dateien sind bereits im jeweiligen
   Seitenverhaeltnis zugeschnitten, aspect-ratio und object-fit halten das
   Layout auch bei abweichenden Bildern stabil. */
.media-photo,
.card-photo,
.photo-figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  object-fit: cover;
  background: #1a211a;
}

.media-photo,
.photo-figure img {
  aspect-ratio: 4 / 3;
}

.card-photo {
  aspect-ratio: 3 / 2;
  margin-bottom: var(--space-2);
}

/* Einzelnes Foto mit Bildunterschrift */
.photo-figure {
  margin: var(--space-4) auto 0;
  max-width: 34rem;
}

.photo-figure figcaption {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
}

/* Decorative image placeholder until real photos are added */
.img-placeholder {
  border-radius: var(--radius);
  background: linear-gradient(140deg, #242d24 0%, #181f18 55%, #222b22 100%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(233, 236, 231, 0.35);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  min-height: 220px;
}

.img-placeholder.tall {
  min-height: 300px;
}

/* Inside cards the placeholder is a compact thumbnail */
.card .img-placeholder {
  min-height: 160px;
  margin-bottom: var(--space-2);
}

/* Card grid (services overview, teasers) */
.card-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 196, 158, 0.4);
}

.card h3 {
  margin-bottom: var(--space-1);
}

.card p {
  color: var(--text-muted);
  flex-grow: 1;
}

.card .card-link {
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Service detail block: text next to image placeholder on desktop */
.service {
  padding-block: var(--space-4);
  border-top: 1px solid var(--border);
}

.service:first-of-type {
  border-top: 0;
}

.service-inner {
  display: grid;
  gap: var(--space-3);
  align-items: start;
}

.service h2 {
  margin-bottom: var(--space-1);
}

.service .facts {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0;
  display: grid;
  gap: 0.75rem;
}

.service .facts li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--text-muted);
}

/* Leaf-like bullet in the accent color */
.service .facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50% 0;
  background: var(--accent-light);
}

.service .facts strong {
  color: var(--text);
  font-weight: 500;
}

/* Price tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 22rem;
}

caption {
  text-align: left;
  padding: var(--space-2) var(--space-3) 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--heading);
}

th,
td {
  padding: 0.85rem var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

thead th {
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light);
}

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

tbody th {
  font-weight: 400;
  color: var(--text);
}

td {
  color: var(--text-muted);
}

td.price {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}

/* Preisspalte immer rechtsbuendig am Tabellenrand, damit die Betraege in
   jeder Box gleich sitzen und ueber alle Boxen hinweg untereinander stehen */
.price-block thead th:last-child,
.price-block td.price {
  text-align: right;
}

.price-block {
  margin-bottom: var(--space-4);
}

.price-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Highlighted note / info box */
.note-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--space-3);
}

/* Booking widget placeholder area */
.widget-shell {
  background: var(--surface);
  border: 1px dashed rgba(167, 196, 158, 0.45);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-3);
  text-align: center;
}

/* Full-width call-to-action band */
.cta-band {
  background: linear-gradient(150deg, var(--accent-dark) 0%, var(--accent-deep) 100%);
  text-align: center;
  padding-block: var(--space-5);
}

.cta-band h2 {
  margin-bottom: var(--space-2);
}

.cta-band p {
  color: var(--accent-pale);
  max-width: 38em;
  margin-inline: auto;
}

.cta-band .btn {
  margin-top: var(--space-2);
}

/* Contact / address layout */
.contact-grid {
  display: grid;
  gap: var(--space-3);
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
}

.contact-card h2,
.contact-card h3 {
  margin-bottom: var(--space-2);
}

address {
  font-style: normal;
  color: var(--text-muted);
}

/* Definition-style list for opening hours / contact placeholders */
.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
  color: var(--text-muted);
}

.info-list strong {
  color: var(--text);
  font-weight: 500;
}

/* Legal pages: constrain line length */
.legal {
  max-width: 46em;
}

.legal h2 {
  font-size: 1.5rem;
  margin-top: var(--space-4);
}

/* Placeholder marker used across the site, easy to spot in the markup */
.placeholder {
  color: var(--accent-light);
}

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: #0d110d;
  border-top: 1px solid var(--border);
  padding-block: var(--space-5) var(--space-3);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.footer-brand img {
  width: 190px;
  margin-bottom: var(--space-2);
}

.site-footer h3 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-light);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-pale);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   10. Scroll animations (fadeInUp)
   Elements with .reveal start hidden and slide up once visible.
   JS adds .is-visible via IntersectionObserver.
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect users who prefer reduced motion: show everything immediately */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .card {
    transition: none;
  }
}

/* If JS is disabled, .reveal elements must still be visible */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   11. Breakpoints
   -------------------------------------------------------------------------- */

/* Tablet and up */
@media (min-width: 48em) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-inner {
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-4);
  }

  /* Alternate image side for visual rhythm */
  .service:nth-of-type(even) .service-inner > .service-media {
    order: -1;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop and up: inline navigation instead of burger */
@media (min-width: 64em) {
  .nav-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    display: block;
    background: transparent;
    border: 0;
  }

  .main-nav ul {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2);
    padding: 0;
  }

  .main-nav a:not(.btn) {
    padding: 0.4rem 0.6rem;
  }

  .nav-cta {
    margin: 0 0 0 var(--space-2);
  }

  .brand img {
    width: 210px;
  }

  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}
