/* ==========================================================
   Surfschule Nordwind — Stylesheet
   Design: Inspired by the North Sea coast of Sylt —
   overcast skies, slate water, bleached driftwood,
   wet sand, salt spray. Palette extracted from
   coastal photography of the Schleswig-Holstein Wattenmeer.
   ========================================================== */

:root {
  /* — Palette — */
  --ink:          hsl(210, 30%, 14%);
  --sea-deep:     hsl(205, 55%, 22%);
  --sea-mid:      hsl(198, 42%, 38%);
  --sea-light:    hsl(195, 28%, 62%);
  --sand-warm:    hsl(36, 42%, 84%);
  --sand-light:   hsl(40, 35%, 94%);
  --foam:         hsl(48, 18%, 97%);
  --amber:        hsl(28, 82%, 52%);
  --amber-dark:   hsl(24, 75%, 42%);
  --driftwood:    hsl(28, 18%, 42%);
  --sky-grey:     hsl(210, 12%, 72%);
  --sail-white:   hsl(42, 30%, 96%);

  /* — Type scale (major second 1.125) — */
  --fs-xs:   0.79rem;
  --fs-sm:   0.889rem;
  --fs-base: 1rem;
  --fs-md:   1.125rem;
  --fs-lg:   1.266rem;
  --fs-xl:   1.424rem;
  --fs-2xl:  1.802rem;
  --fs-3xl:  2.281rem;
  --fs-4xl:  2.887rem;
  --fs-hero: clamp(2.2rem, 5vw + 1rem, 4rem);

  /* — Spacing — */
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1.25rem;
  --space-lg:  2rem;
  --space-xl:  3.5rem;
  --space-2xl: 6rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  font-family: Georgia, 'Palatino Linotype', 'Book Antiqua', serif;
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--ink);
  background: var(--sand-light);
  -webkit-font-smoothing: antialiased;
}

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

/* — Headings — */
h1, h2, h3, h4 {
  font-family: 'Trebuchet MS', 'Gill Sans', 'Avenir Next', 'Avenir', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

h2 {
  font-size: var(--fs-2xl);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sea-deep);
}

h3 {
  font-size: var(--fs-xl);
  color: var(--sea-mid);
  letter-spacing: 0.03em;
}

/* subtle sail-canvas texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image:
    repeating-linear-gradient(
      115deg,
      transparent,
      transparent 3px,
      hsla(35, 25%, 50%, 0.018) 3px,
      hsla(35, 25%, 50%, 0.018) 4px
    );
}

/* ============================
   NAVIGATION
   ============================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: hsla(40, 35%, 94%, 0.92);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid hsla(36, 42%, 84%, 0.6);
}

.nav-inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0.85rem var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: 'Trebuchet MS', 'Gill Sans', sans-serif;
  font-size: var(--fs-lg);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sea-deep);
  text-decoration: none;
}

.nav-logo span {
  color: var(--amber);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: var(--space-md);
}

.nav-links a {
  font-family: 'Trebuchet MS', 'Gill Sans', sans-serif;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-decoration: none;
  color: var(--sea-mid);
  padding: 0.3em 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s, color 0.25s;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--sea-deep);
  border-bottom-color: var(--amber);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--sea-deep);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* ============================
   HERO
   ============================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(
      172deg,
      hsl(210, 20%, 78%) 0%,
      hsl(205, 30%, 60%) 22%,
      hsl(200, 42%, 42%) 40%,
      hsl(198, 50%, 30%) 55%,
      hsl(195, 48%, 26%) 62%,
      hsl(36, 35%, 68%) 78%,
      hsl(38, 40%, 82%) 88%,
      var(--sand-light) 100%
    );
}

/* wind streaks across the hero */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -8deg,
      transparent,
      transparent 40px,
      hsla(195, 60%, 85%, 0.07) 40px,
      hsla(195, 60%, 85%, 0.07) 41px
    );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 68rem;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md) 8rem;
  width: 100%;
}

.hero h1 {
  font-size: var(--fs-hero);
  color: var(--foam);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  max-width: 14ch;
  text-shadow:
    0 1px 0 hsla(205, 55%, 15%, 0.3),
    0 2px 8px hsla(205, 55%, 10%, 0.2);
}

.hero-subtitle {
  margin-top: var(--space-md);
  font-size: var(--fs-md);
  color: hsl(42, 40%, 90%);
  max-width: 42ch;
  line-height: 1.6;
}

.hero-cta {
  display: inline-block;
  margin-top: var(--space-lg);
  padding: 0.85em 2em;
  font-family: 'Trebuchet MS', 'Gill Sans', sans-serif;
  font-size: var(--fs-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--ink);
  background: var(--amber);
  border: none;
  transition: background 0.3s, transform 0.2s;
}

.hero-cta:hover,
.hero-cta:focus {
  background: var(--amber-dark);
  transform: translateY(-2px);
}

/* wave at bottom of hero */
.wave-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  z-index: 3;
  line-height: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 60px;
}

.wave-back { fill: hsla(38, 40%, 88%, 0.5); }
.wave-front { fill: var(--sand-light); }

/* gentle horizontal drift on the back wave */
@keyframes wave-drift {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(-30px); }
  100% { transform: translateX(0); }
}

.wave-divider .wave-layer-back {
  animation: wave-drift 7s ease-in-out infinite;
}

/* ============================
   SECTIONS — shared
   ============================ */
.section {
  padding: var(--space-2xl) var(--space-md);
}

.section-inner {
  max-width: 68rem;
  margin: 0 auto;
}

.section-header {
  margin-bottom: var(--space-xl);
}

.section-header h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--amber);
  margin-top: var(--space-sm);
}

.bg-sand  { background: var(--sand-light); }
.bg-foam  { background: var(--foam); }
.bg-dark  { background: var(--sea-deep); color: var(--sail-white); }
.bg-dark h2 { color: var(--sand-warm); }
.bg-dark h2::after { background: var(--amber); }

/* wave transition between sections */
.section-wave {
  display: block;
  width: 100%;
  height: 45px;
  line-height: 0;
}

.section-wave svg {
  display: block;
  width: 100%;
  height: 100%;
}

.section-wave.sand-to-foam svg path { fill: var(--foam); }
.section-wave.foam-to-sand svg path { fill: var(--sand-light); }
.section-wave.sand-to-dark svg path { fill: var(--sea-deep); }
.section-wave.dark-to-sand svg path { fill: var(--sand-light); }

/* ============================
   LEISTUNGEN (Services)
   ============================ */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.service-item {
  padding: var(--space-lg);
  border-left: 4px solid var(--amber);
  background: hsla(42, 30%, 96%, 0.6);
  position: relative;
  transition: border-color 0.3s;
}

.service-item:nth-child(even) {
  transform: translateY(1.5rem);
}

.service-item:hover {
  border-left-color: var(--sea-mid);
}

.service-number {
  font-family: 'Trebuchet MS', 'Gill Sans', sans-serif;
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: hsla(36, 42%, 84%, 0.7);
  line-height: 1;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.service-item h3 {
  margin-bottom: var(--space-sm);
}

.service-item p {
  font-size: var(--fs-sm);
  color: var(--driftwood);
  line-height: 1.65;
}

/* ============================
   ÜBER UNS
   ============================ */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.about-text p {
  margin-bottom: var(--space-md);
  color: var(--driftwood);
}

.about-text p:first-child {
  font-size: var(--fs-md);
  color: var(--ink);
}

.about-aside {
  padding: var(--space-lg);
  border-top: 4px solid var(--amber);
  background: var(--sand-light);
}

.about-aside blockquote {
  font-size: var(--fs-xl);
  font-style: italic;
  color: var(--sea-deep);
  line-height: 1.45;
  margin-bottom: var(--space-md);
}

.about-aside cite {
  display: block;
  font-size: var(--fs-sm);
  font-style: normal;
  color: var(--driftwood);
  letter-spacing: 0.03em;
}

/* ============================
   ÖFFNUNGSZEITEN
   ============================ */
.hours-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  max-width: 48rem;
}

.hours-block {
  padding: var(--space-lg);
  background: hsla(42, 30%, 96%, 0.5);
  border-left: 4px solid var(--sea-mid);
}

.hours-block h3 {
  margin-bottom: var(--space-sm);
  font-size: var(--fs-lg);
}

.hours-block .hours-period {
  font-family: 'Trebuchet MS', 'Gill Sans', sans-serif;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sea-light);
  margin-bottom: var(--space-xs);
}

.hours-block .hours-time {
  font-size: var(--fs-lg);
  font-weight: 700;
  font-family: 'Trebuchet MS', 'Gill Sans', sans-serif;
  color: var(--ink);
}

.hours-block .hours-note {
  font-size: var(--fs-sm);
  color: var(--driftwood);
  margin-top: var(--space-xs);
}

/* ============================
   KONTAKT
   ============================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.contact-block h3 {
  color: var(--sand-warm);
  margin-bottom: var(--space-md);
  font-size: var(--fs-lg);
}

.contact-block p,
.contact-block address {
  font-style: normal;
  font-size: var(--fs-md);
  line-height: 1.8;
  color: hsl(195, 15%, 75%);
}

.contact-block a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid hsla(28, 82%, 52%, 0.3);
  transition: border-color 0.25s;
}

.contact-block a:hover {
  border-bottom-color: var(--amber);
}

/* ============================
   FOOTER
   ============================ */
.site-footer {
  background: hsl(210, 35%, 12%);
  color: var(--sky-grey);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  font-size: var(--fs-sm);
}

.footer-inner {
  max-width: 68rem;
  margin: 0 auto;
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.footer-links a {
  font-family: 'Trebuchet MS', 'Gill Sans', sans-serif;
  text-decoration: none;
  color: var(--sky-grey);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  transition: color 0.25s;
}

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

.footer-copy {
  color: hsl(210, 10%, 45%);
  font-size: var(--fs-xs);
}

/* ============================
   LEGAL PAGES (Impressum, Datenschutz)
   ============================ */
.legal-section {
  padding: var(--space-2xl) var(--space-md);
  background: var(--foam);
  border-top: 1px solid hsla(36, 42%, 84%, 0.5);
}

.legal-inner {
  max-width: 52rem;
  margin: 0 auto;
}

.legal-inner h2 {
  margin-bottom: var(--space-lg);
}

.legal-inner h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  font-size: var(--fs-lg);
  color: var(--sea-deep);
}

.legal-inner p,
.legal-inner ul {
  margin-bottom: var(--space-md);
  color: var(--driftwood);
  font-size: var(--fs-sm);
  line-height: 1.75;
}

.legal-inner ul {
  padding-left: var(--space-md);
}

.legal-inner li {
  margin-bottom: var(--space-xs);
}

.legal-inner a {
  color: var(--sea-mid);
}

/* divider line between legal sections */
.legal-divider {
  border: none;
  border-top: 1px solid var(--sand-warm);
  margin: var(--space-xl) 0;
}

/* ============================
   MOBILE RESPONSIVE
   ============================ */
@media (max-width: 52rem) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: hsla(40, 35%, 94%, 0.97);
    padding: var(--space-md);
    gap: 0;
    border-bottom: 1px solid var(--sand-warm);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid hsla(36, 42%, 84%, 0.4);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: var(--space-sm) 0;
    border-bottom: none;
  }

  .hero {
    min-height: 80vh;
  }

  .hero-inner {
    padding-top: var(--space-xl);
    padding-bottom: 6rem;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-item:nth-child(even) {
    transform: none;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-aside {
    order: -1;
  }

  .hours-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: var(--space-xl) var(--space-md);
  }
}

@media (max-width: 30rem) {
  :root {
    --fs-hero: 1.8rem;
  }

  .hero {
    min-height: 75vh;
  }

  .service-item {
    padding: var(--space-md);
  }

  .hours-block {
    padding: var(--space-md);
  }
}

/* — Focus states for accessibility — */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

/* — Reduced motion — */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wave-divider .wave-layer-back { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
