/*
Theme Name: Sailing Dream
Theme URI: https://sailing-dream.de/
Author: Frank Saltheim
Description: Ein leichtes, responsives WordPress-Theme für den Bau und die Reise einer Segelyacht.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: sailing-dream
License: GNU General Public License v2 or later
*/

:root {
  --sd-ink: #112936;
  --sd-ocean: #124f67;
  --sd-ocean-deep: #082c3e;
  --sd-sky: #9dc9d7;
  --sd-coral: #e8443f;
  --sd-sand: #f5f2ea;
  --sd-white: #fff;
  --sd-muted: #657680;
  --sd-border: rgba(17, 41, 54, .14);
  --sd-shadow: 0 20px 55px rgba(8, 44, 62, .12);
  --sd-radius: 22px;
  --sd-content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--sd-ink);
  background: var(--sd-white);
  font-family: "Alegreya Sans", "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--sd-ocean); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--sd-coral); }
h1, h2, h3, h4 { margin: 0 0 .65em; line-height: 1.12; letter-spacing: -.025em; }
h1 { font-size: clamp(2.5rem, 6vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); }
p { margin: 0 0 1.2em; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed; z-index: 99999; top: 12px; left: 12px; width: auto; height: auto; padding: 12px 18px; clip: auto; background: #fff; color: #000; }
.sd-wrap { width: min(calc(100% - 40px), var(--sd-content)); margin-inline: auto; }

.site-header { position: relative; z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--sd-border); }
.site-header__inner { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.site-branding { display: flex; align-items: center; gap: 14px; min-width: 190px; color: var(--sd-ink); text-decoration: none; }
.custom-logo { display: block; width: auto; max-height: 82px; }
.site-branding__mark { width: 78px; height: 78px; }
.site-branding__text { display: grid; line-height: 1; }
.site-branding__name { font-family: Georgia, serif; font-size: 1.4rem; letter-spacing: .06em; }
.site-branding__tagline { margin-top: 8px; color: var(--sd-muted); font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; }

.menu-toggle { display: none; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; color: var(--sd-ink); background: var(--sd-sand); cursor: pointer; }
.menu-toggle > span:not(.screen-reader-text), .menu-toggle::before, .menu-toggle::after { content: ""; display: block; width: 22px; height: 2px; margin: 5px auto; background: currentColor; transition: .2s ease; }
.primary-menu, .primary-menu ul { margin: 0; padding: 0; list-style: none; }
.primary-menu { display: flex; align-items: center; gap: 8px; }
.primary-menu > li { position: relative; }
.primary-menu a { display: block; padding: 14px 13px; color: var(--sd-ink); font-weight: 700; text-decoration: none; }
.primary-menu a:hover, .primary-menu .current-menu-item > a, .primary-menu .current-menu-ancestor > a { color: var(--sd-coral); }
.primary-menu .sub-menu { position: absolute; top: calc(100% + 2px); left: 0; min-width: 250px; padding: 10px; visibility: hidden; opacity: 0; transform: translateY(8px); border: 1px solid var(--sd-border); border-radius: 14px; background: #fff; box-shadow: var(--sd-shadow); transition: .2s ease; }
.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu { visibility: visible; opacity: 1; transform: none; }

.sd-hero { position: relative; min-height: min(690px, 80vh); display: grid; align-items: center; isolation: isolate; overflow: hidden; color: #fff; background: var(--sd-ocean-deep); }
.sd-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(3,25,37,.9) 0%, rgba(3,25,37,.58) 48%, rgba(3,25,37,.25) 100%); pointer-events: none; }
.sd-hero__slides, .sd-hero__slide { position: absolute; inset: 0; }
.sd-hero__slides { z-index: 0; }
.sd-hero__slide { opacity: 0; background-position: center; background-size: cover; transform: scale(1.025); transition: opacity .9s ease, transform 7s ease; }
.sd-hero__slide.is-active { opacity: 1; transform: scale(1); }
.sd-hero__content { position: relative; z-index: 2; max-width: 820px; padding: 100px 0 175px; }
.sd-hero__wave { position: absolute; z-index: 4; right: 0; bottom: -1px; left: 0; height: clamp(105px, 12vw, 175px); color: #fff; line-height: 0; pointer-events: none; }
.sd-hero__wave svg { display: block; width: 100%; height: 100%; }
.sd-slider-controls { position: absolute; z-index: 5; right: max(20px, calc((100% - var(--sd-content)) / 2)); bottom: clamp(100px, 10vw, 145px); display: flex; align-items: center; gap: 10px; }
.sd-slider-arrow { display: grid; width: 42px; height: 42px; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; color: #fff; background: rgba(6,27,38,.38); font-size: 1.45rem; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); }
.sd-slider-arrow:hover, .sd-slider-arrow:focus-visible { color: var(--sd-ink); background: #fff; }
.sd-slider-dots { display: flex; gap: 7px; padding: 8px 10px; border-radius: 999px; background: rgba(6,27,38,.32); backdrop-filter: blur(6px); }
.sd-slider-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.48); cursor: pointer; }
.sd-slider-dot.is-active { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.sd-kicker { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; font-size: .82rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.sd-kicker::before { content: ""; width: 44px; height: 2px; background: var(--sd-coral); }
.sd-hero h1 { max-width: 820px; margin-bottom: 20px; font-family: "Segoe Print", "Bradley Hand", cursive; font-weight: 700; text-wrap: balance; }
.sd-hero__lead { max-width: 670px; margin-bottom: 32px; font-size: clamp(1.15rem, 2vw, 1.45rem); color: rgba(255,255,255,.9); }
.sd-button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 999px; color: #fff; background: var(--sd-coral); font-weight: 800; text-decoration: none; box-shadow: 0 12px 28px rgba(232,68,63,.28); transition: transform .2s ease, box-shadow .2s ease; }
.sd-button:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 34px rgba(232,68,63,.36); }

.sd-intro { padding: 92px 0 70px; }
.sd-intro__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(50px, 8vw, 110px); align-items: start; }
.sd-prose { max-width: 820px; }
.sd-prose > :first-child { margin-top: 0; }
.sd-prose h1 { font-size: clamp(2.4rem, 4vw, 4rem); }
.sd-prose h2 { margin-top: 1.5em; }
.sd-prose blockquote { margin: 2em 0; padding: 8px 0 8px 28px; border-left: 4px solid var(--sd-coral); font-size: 1.3rem; }
.sd-prose figure { margin: 2.4em 0; }
.sd-prose img { border-radius: 18px; box-shadow: var(--sd-shadow); }
.sd-fact { position: sticky; top: 30px; padding: 30px; border-radius: var(--sd-radius); color: #fff; background: var(--sd-ocean); box-shadow: var(--sd-shadow); }
.sd-fact__number { display: block; font-size: 3.2rem; font-weight: 800; line-height: 1; }
.sd-fact__label { display: block; margin-top: 8px; color: rgba(255,255,255,.78); }
.sd-fact hr { margin: 24px 0; border: 0; border-top: 1px solid rgba(255,255,255,.25); }

.sd-logbook { padding: 84px 0; background: var(--sd-sand); }
.sd-section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.sd-section-head p { max-width: 580px; margin: 0; color: var(--sd-muted); }
.sd-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.sd-card { overflow: hidden; border: 1px solid var(--sd-border); border-radius: var(--sd-radius); background: #fff; box-shadow: 0 12px 35px rgba(8,44,62,.06); transition: transform .2s ease, box-shadow .2s ease; }
.sd-card:hover { transform: translateY(-5px); box-shadow: var(--sd-shadow); }
.sd-card__image { display: block; aspect-ratio: 16/10; overflow: hidden; background: linear-gradient(135deg, var(--sd-sky), var(--sd-ocean)); }
.sd-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.sd-card:hover .sd-card__image img { transform: scale(1.04); }
.sd-card__body { padding: 26px; }
.sd-card__meta { margin-bottom: 10px; color: var(--sd-coral); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.sd-card h3 { margin-bottom: 12px; }
.sd-card h3 a { color: var(--sd-ink); text-decoration: none; }
.sd-card p { color: var(--sd-muted); }

.sd-page-hero { padding: 82px 0 90px; color: #fff; background: linear-gradient(125deg, var(--sd-ocean-deep), var(--sd-ocean)); }
.sd-page-hero h1 { max-width: 900px; font-size: clamp(2.6rem, 6vw, 5rem); }
.sd-page-hero p { max-width: 680px; margin: 0; color: rgba(255,255,255,.78); }
.sd-main { padding: 78px 0 100px; }
.sd-post-meta { margin-bottom: 28px; color: var(--sd-muted); }
.sd-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--sd-border); }
.sd-post-nav a { display: block; padding: 20px; border-radius: 14px; background: var(--sd-sand); font-weight: 700; text-decoration: none; }
.pagination { margin-top: 42px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { padding: 8px 14px; border-radius: 999px; background: var(--sd-sand); text-decoration: none; }
.page-numbers.current { color: #fff; background: var(--sd-ocean); }

.sd-contact { padding: 74px 0; color: #fff; background: var(--sd-ocean-deep); }
.sd-contact__inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
.sd-contact p { margin: 0; color: rgba(255,255,255,.72); }
.sd-contact a { color: #fff; }
.site-footer { padding: 28px 0; color: rgba(255,255,255,.65); background: #061b26; font-size: .9rem; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 24px; }
.site-footer a { color: rgba(255,255,255,.85); }
.footer-menu { display: flex; flex-wrap: wrap; gap: 20px; margin: 0; padding: 0; list-style: none; }

@media (max-width: 860px) {
  body { font-size: 17px; }
  .site-header__inner { min-height: 88px; }
  .site-branding__mark { width: 62px; height: 62px; }
  .menu-toggle { display: block; }
  .main-navigation { position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 14px 20px 24px; border-top: 1px solid var(--sd-border); background: #fff; box-shadow: 0 18px 30px rgba(0,0,0,.08); }
  .main-navigation.is-open { display: block; }
  .primary-menu { display: block; }
  .primary-menu a { padding: 12px 8px; }
  .primary-menu .sub-menu { position: static; min-width: 0; padding: 0 0 0 18px; visibility: visible; opacity: 1; transform: none; border: 0; box-shadow: none; }
  .sd-intro__grid { grid-template-columns: 1fr; }
  .sd-fact { position: static; }
  .sd-card-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .sd-wrap { width: min(calc(100% - 28px), var(--sd-content)); }
  .site-branding__tagline { display: none; }
  .sd-hero { min-height: 620px; }
  .sd-hero__content { padding: 70px 0 155px; }
  .sd-hero__wave { height: 115px; }
  .sd-slider-controls { right: 14px; bottom: 102px; }
  .sd-slider-arrow { width: 38px; height: 38px; }
  .sd-section-head, .sd-contact__inner, .site-footer__inner { display: block; }
  .sd-card-grid { grid-template-columns: 1fr; }
  .sd-contact .sd-button { margin-top: 25px; }
  .footer-menu { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
