/* ==========================================================
   FARBEN UND SCHRIFTEN AN EINER STELLE
   ----------------------------------------------------------
   Das hier oben sind "Variablen": einmal festgelegt, ueberall
   im Dokument verwendbar. Willst du spaeter z.B. das Tuerkis
   aendern, aenderst du es nur hier - nicht an 30 Stellen.
   Die zwei Bindestriche am Anfang gehoeren zur Schreibweise.
   ========================================================== */
:root {
    --ink:       #F7F5F0;   /* Warmes Sand-Weiß, nimmt die "Leere" */
    --ink-soft:  #FFFFFF;   /* Strahlendes Weiß für Karten und Boxen als Kontrast */
    --sand:      #2A333A;   /* Fast Schwarz für perfekten Lesekontrast */
    --sand-dim:  #6E7781;   /* Graublau für unwichtigere Texte */
    --pool:      #14857B;   /* Hochwertiges, dunkleres Boutique-Türkis */
    --line:      rgba(0, 0, 0, 0.08); /* Zarte Linien */
}
    --f-head: 'Fraunces', Georgia, serif;      /* Ueberschriften */
    --f-body: 'DM Sans', system-ui, sans-serif; /* Fliesstext     */
}

/* ==========================================================
   SCHRIFTEN LOKAL LADEN
   ----------------------------------------------------------
   Die Schriftdateien liegen im Ordner static/fonts.
   Vorteil gegenueber dem Nachladen von Google: die Seite
   funktioniert auch ohne Internetverbindung zu Google und
   es werden keine Besucherdaten dorthin geschickt.
   ========================================================== */
@font-face {
    font-family: 'Fraunces';
    font-weight: 400;
    font-display: swap;   /* zeigt sofort Ersatzschrift, tauscht dann */
    src: url('fonts/fraunces-latin-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Fraunces';
    font-weight: 600;
    font-display: swap;
    src: url('fonts/fraunces-latin-600-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Fraunces';
    font-weight: 700;
    font-display: swap;
    src: url('fonts/fraunces-latin-700-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-weight: 400;
    font-display: swap;
    src: url('fonts/dm-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-weight: 500;
    font-display: swap;
    src: url('fonts/dm-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-weight: 600;
    font-display: swap;
    src: url('fonts/dm-sans-latin-600-normal.woff2') format('woff2');
}

/* ==========================================================
   GRUNDEINSTELLUNGEN
   ========================================================== */

/* Der Stern bedeutet "gilt fuer alle Elemente".
   box-sizing sorgt dafuer, dass Innenabstand und Rahmen
   zur angegebenen Breite dazugehoeren - sonst wird alles
   breiter als gedacht. */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;   /* sanftes Scrollen bei Klick auf Links */
}

body {
    font-family: var(--f-body);
    background-color: var(--ink);
    color: var(--sand);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;  /* Schrift wirkt feiner */
}

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

a {
    color: inherit;            /* Links uebernehmen die Textfarbe */
    text-decoration: none;     /* keine Unterstreichung */
}

/* Ein wiederverwendbarer Innenbereich mit fester Maximalbreite.
   Verhindert, dass Text auf grossen Bildschirmen endlos breit wird. */
.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ==========================================================
   KOPFZEILE - schwebt ueber dem Video
   ========================================================== */
.topbar {
    position: fixed;    /* bleibt beim Scrollen stehen */
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;       /* liegt ueber allem anderen */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 40px;
    transition: background-color 0.4s ease, padding 0.4s ease;
}

/* Diese Klasse wird per JavaScript hinzugefuegt, sobald
   der Besucher nach unten scrollt. */
.topbar.scrolled {
    background-color: rgba(18, 16, 14, 0.94);
    backdrop-filter: blur(14px);   /* Hintergrund dahinter wird weich */
    padding: 14px 40px;
    border-bottom: 1px solid var(--line);
}

.topbar-name {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}

.topbar-link {
    font-size: 0.86rem;
    font-weight: 500;
    padding: 10px 22px;
    border: 1px solid rgba(244, 239, 230, 0.35);
    border-radius: 100px;
    transition: all 0.25s ease;
}

.topbar-link:hover {
    background-color: var(--sand);
    color: var(--ink);
    border-color: var(--sand);
}

/* ==========================================================
   HERO - der grosse Eindruck ganz oben
   ========================================================== */
.hero {
    position: relative;
    min-height: 100vh;          /* fuellt den ganzen Bildschirm */
    display: flex;
    align-items: flex-end;      /* Inhalt sitzt unten */
    overflow: hidden;
}

/* Das Video liegt hinter allem und fuellt die Flaeche komplett.
   object-fit: cover heisst: zuschneiden statt verzerren. */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Dunkler Verlauf ueber dem Video, damit der Text lesbar bleibt.
   Unten dunkler, oben fast durchsichtig. */
.hero-shade {
    position: absolute;
    inset: 0;                  /* Kurzform fuer top/right/bottom/left: 0 */
    background: linear-gradient(
        to top,
        rgba(18, 16, 14, 0.96) 0%,
        rgba(18, 16, 14, 0.55) 45%,
        rgba(18, 16, 14, 0.35) 100%
    );
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;                /* liegt ueber Video und Verlauf */
    width: 100%;
    padding-bottom: 68px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--pool);
    margin-bottom: 22px;
}

/* Der kurze Strich vor dem Text.
   ::before erzeugt ein zusaetzliches Element, das es im HTML nicht gibt. */
.hero-eyebrow::before {
    content: '';
    width: 34px;
    height: 1px;
    background-color: var(--pool);
}

.hero h1 {
    font-family: var(--f-head);
    font-weight: 600;
    /* clamp bedeutet: mindestens 2.8rem, am liebsten 6.5% der
       Bildschirmbreite, hoechstens 5.4rem. So passt die Groesse
       automatisch auf Handy und grossen Monitor. */
    font-size: clamp(2.8rem, 6.5vw, 5.4rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.hero-sub {
    font-size: 1.1rem;
    color: #DDD5C8;
    max-width: 520px;
    margin-bottom: 38px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

/* ==========================================================
   SCHALTFLAECHEN
   ========================================================== */
.btn {
    display: inline-block;
    padding: 17px 38px;
    border-radius: 100px;
    font-family: var(--f-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    border: none;
    transition: transform 0.25s ease, box-shadow 0.3s ease,
                background-color 0.25s ease;
}

.btn-main {
    background-color: var(--pool);
    color: #0B1415;
}

.btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(79, 191, 196, 0.32);
}

.btn-ghost {
    background-color: transparent;
    color: var(--sand);
    border: 1px solid rgba(244, 239, 230, 0.4);
}

.btn-ghost:hover {
    background-color: rgba(244, 239, 230, 0.1);
    border-color: var(--sand);
}

/* ==========================================================
   ECKDATEN-LEISTE direkt unter dem Hero
   Kurze harte Fakten - beantwortet die ersten Fragen sofort
   ========================================================== */
.facts {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background-color: var(--ink-soft);
}

.facts-inner {
    display: grid;
    /* repeat(4, 1fr) heisst: vier gleich breite Spalten */
    grid-template-columns: repeat(4, 1fr);
    max-width: 1180px;
    margin: 0 auto;
}

.fact {
    padding: 34px 28px;
    text-align: center;
    border-right: 1px solid var(--line);
}

/* :last-child = das letzte Element - dort keine Trennlinie mehr */
.fact:last-child {
    border-right: none;
}

.fact-value {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 1.45rem;
    line-height: 1.2;
    margin-bottom: 4px;
}

.fact-label {
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sand-dim);
}

/* ==========================================================
   ABSCHNITTE ALLGEMEIN
   ========================================================== */
section {
    padding: 104px 0;
}

.sec-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--pool);
    margin-bottom: 18px;
}

.sec-eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background-color: var(--pool);
}

.sec-title {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.015em;
    margin-bottom: 20px;
}

.sec-text {
    color: var(--sand-dim);
    font-size: 1.04rem;
    max-width: 560px;
}

/* ==========================================================
   VORSTELLUNG - Text links, Bild rechts
   ========================================================== */
.intro-grid {
    display: grid;
    /* 1fr 1fr = zwei gleich breite Spalten */
    grid-template-columns: 1fr 1fr;
    gap: 68px;
    align-items: center;
}

.intro-image {
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 4 / 5;     /* festes Seitenverhaeltnis */
}

.intro-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Die drei Vorteile unter dem Vorstellungstext */
.points {
    list-style: none;        /* keine Aufzaehlungspunkte */
    margin-top: 34px;
}

.points li {
    display: flex;
    gap: 16px;
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.98rem;
}

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

/* Der Haken vor jedem Punkt */
.points li::before {
    content: '✓';
    color: var(--pool);
    font-weight: 600;
    flex-shrink: 0;          /* schrumpft nicht, wenn es eng wird */
}

/* ==========================================================
   GALERIE - bewusst ungleiche Kacheln statt vier gleicher
   ========================================================== */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 52px;
}

.tile {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

/* grid-column: span 2 heisst: diese Kachel ist zwei Spalten breit.
   Damit sie GENAUSO HOCH bleibt wie die schmalen Kacheln, muss auch
   das Seitenverhaeltnis doppelt so breit sein: statt 4/3 also 8/3.
   Sonst waere sie doppelt so hoch und das Raster bekaeme Luecken. */
.tile.wide {
    grid-column: span 2;
    aspect-ratio: 8 / 3;
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.tile:hover img {
    transform: scale(1.06);  /* Bild zoomt leicht bei Mauskontakt */
}

/* Dunkler Verlauf unten auf jeder Kachel, damit der Text lesbar ist */
.tile-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 46px 20px 18px;
    background: linear-gradient(to top, rgba(10, 9, 8, 0.92), transparent);
    font-size: 0.92rem;
    font-weight: 500;
    pointer-events: none;    /* Klicks gehen durch, zur Kachel darunter */
}

/* ==========================================================
   AUSSTATTUNG
   ========================================================== */
.amenities {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;                /* schmaler Spalt -> wirkt wie Trennlinien */
    background-color: var(--line);
    margin-top: 52px;
    border: 1px solid var(--line);
}

.amenity {
    background-color: var(--ink);
    padding: 34px 30px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.amenity svg {
    flex-shrink: 0;
    margin-top: 2px;
    stroke: var(--pool);
}

.amenity-title {
    font-weight: 600;
    font-size: 0.98rem;
    margin-bottom: 3px;
}

.amenity-note {
    font-size: 0.88rem;
    color: var(--sand-dim);
}

/* ==========================================================
   BUCHUNG
   ========================================================== */
.booking {
    background-color: var(--ink-soft);
    border-top: 1px solid var(--line);
}

.booking-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;   /* rechts etwas breiter */
    gap: 68px;
    align-items: start;
}

/* Der Preisbereich */
.price-box {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 30px 32px;
    margin-top: 34px;
}

.price-from {
    font-size: 0.78rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--sand-dim);
    margin-bottom: 6px;
}

.price-value {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1;
    color: var(--pool);
}

.price-value span {
    font-family: var(--f-body);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--sand-dim);
}

.price-note {
    font-size: 0.86rem;
    color: var(--sand-dim);
    margin-top: 12px;
}

/* Das Formular */
.form-card {
    background-color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 42px 40px;
}

.form-card h3 {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.form-card > p {
    font-size: 0.92rem;
    color: var(--sand-dim);
    margin-bottom: 30px;
}

form {
    display: flex;
    flex-direction: column;   /* Felder untereinander */
    gap: 18px;
}

.field label {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sand-dim);
    margin-bottom: 8px;
}

.field input {
    width: 100%;
    padding: 16px 18px;
    background-color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--sand);
    font-family: var(--f-body);
    font-size: 0.98rem;
    outline: none;            /* Standard-Umrandung aus */
    transition: border-color 0.25s ease;
}

/* :focus = wenn der Besucher in das Feld klickt */
.field input:focus {
    border-color: var(--pool);
}

/* Zwei Felder nebeneinander (Anreise / Abreise) */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.btn-submit {
    width: 100%;
    margin-top: 8px;
    background-color: var(--pool);
    color: #0B1415;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(79, 191, 196, 0.3);
}

.form-hint {
    text-align: center;
    font-size: 0.82rem;
    color: var(--sand-dim);
    margin-top: 16px;
}

/* ==========================================================
   FUSSZEILE
   ========================================================== */
footer {
    border-top: 1px solid var(--line);
    padding: 42px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.86rem;
    color: var(--sand-dim);
}

.footer-name {
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--sand);
}

/* ==========================================================
   BILDANSICHT (oeffnet sich beim Klick auf eine Kachel)
   ========================================================== */
.viewer {
    display: none;            /* zunaechst versteckt */
    position: fixed;
    inset: 0;
    z-index: 999;
    background-color: rgba(10, 9, 8, 0.97);
    align-items: center;
    justify-content: center;
}

/* Diese Klasse setzt JavaScript, um die Ansicht zu oeffnen */
.viewer.open {
    display: flex;
}

.viewer-img {
    max-width: 88%;
    max-height: 80vh;
    border-radius: 4px;
    animation: appear 0.3s ease;
}

/* Eine kleine Einblend-Bewegung */
@keyframes appear {
    from { opacity: 0; transform: scale(0.98); }
    to   { opacity: 1; transform: scale(1); }
}

.viewer-caption {
    position: absolute;
    bottom: 46px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 1rem;
    color: var(--sand-dim);
    letter-spacing: 0.06em;
}

.viewer-close {
    position: absolute;
    top: 28px;
    right: 36px;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--sand);
    background: none;
    border: none;
}

.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(244, 239, 230, 0.1);
    color: var(--sand);
    border: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.viewer-nav:hover {
    background-color: rgba(244, 239, 230, 0.26);
}

.viewer-prev { left: 30px; }
.viewer-next { right: 30px; }

/* ==========================================================
   HANDY UND TABLET
   ----------------------------------------------------------
   Alles ab hier gilt NUR, wenn der Bildschirm schmaler ist
   als der angegebene Wert.
   ========================================================== */
@media (max-width: 900px) {
    .intro-grid,
    .booking-grid {
        grid-template-columns: 1fr;   /* Spalten untereinander */
        gap: 44px;
    }

    .intro-image {
        order: -1;            /* Bild nach oben schieben */
        aspect-ratio: 16 / 10;
    }

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

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

    /* Bei zwei Spalten braucht die zweite Kachel keine Trennlinie */
    .fact:nth-child(2) {
        border-right: none;
    }

    .fact:nth-child(1),
    .fact:nth-child(2) {
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 640px) {
    section {
        padding: 68px 0;
    }

    .topbar {
        padding: 16px 20px;
    }

    .topbar-link {
        padding: 9px 18px;
        font-size: 0.8rem;
    }

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

    /* Auf dem Handy sind alle Kacheln gleich gross - das
       ungleiche Raster wuerde sonst unruhig wirken */
    .tile.wide,
    .tile.tall {
        grid-column: span 1;
        grid-row: span 1;
        aspect-ratio: 4 / 3;
    }

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

    .form-card {
        padding: 30px 24px;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .viewer-nav {
        width: 42px;
        height: 42px;
    }

    .viewer-prev { left: 12px; }
    .viewer-next { right: 12px; }
}

/* ==========================================================
   LAGE - Entfernungen links, Karte rechts
   ========================================================== */
.location-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;   /* Karte etwas breiter */
    gap: 60px;
    align-items: center;
    margin-top: 52px;
}

/* Eine Zeile: Ort ... gepunktete Linie ... Entfernung */
.dist {
    display: flex;
    align-items: baseline;   /* Schrift sitzt auf einer Linie */
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.dist:last-child {
    border-bottom: none;
}

.dist-place {
    font-size: 1rem;
    font-weight: 500;
    flex-shrink: 0;          /* Name wird nicht gequetscht */
}

/* Die Fuellinie dazwischen.
   flex: 1 heisst: nimm den ganzen uebrigen Platz ein. */
.dist-line {
    flex: 1;
    border-bottom: 1px dotted rgba(244, 239, 230, 0.22);
}

.dist-value {
    font-size: 0.92rem;
    color: var(--pool);
    flex-shrink: 0;
    white-space: nowrap;     /* nie umbrechen */
}

/* Rahmen um die Karte */
.map-frame {
    position: relative;      /* Bezugspunkt fuer den Fallback darunter */
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    height: 420px;
    background-color: var(--ink-soft);
}

/* Liegt hinter dem Kartenfenster und wird nur sichtbar,
   wenn die Karte nicht laedt */
.map-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pool);
    font-size: 0.95rem;
}

/* Das Kartenfenster fuellt den Rahmen komplett aus */
.map-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;               /* Standardrahmen des Fensters weg */
    display: block;
    position: relative;      /* liegt ueber dem Fallback */
    /* Leicht entsaettigt, damit die helle Karte im dunklen Design
       nicht zu grell wirkt. Bewusst dezent - eine komplett
       umgefaerbte Karte wird schnell unleserlich. */
    filter: saturate(0.85) brightness(0.94);
}

@media (max-width: 900px) {
    .location-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .map-frame {
        height: 320px;
    }
}
/* ==========================================================
   HERO & KONTRAST-FIX (Zwingt Text auf dem Video zu Weiß)
   ========================================================== */
.hero h1,
.hero .hero-sub,
.hero .hero-eyebrow {
    color: #FFFFFF !important;
}

.hero .hero-eyebrow::before {
    background-color: #FFFFFF !important;
}

.hero .btn-main {
    color: #FFFFFF !important;
    background-color: var(--pool) !important;
}

.hero .btn-ghost {
    color: #FFFFFF !important;
    border: 1px solid #FFFFFF !important;
}

.hero .btn-ghost:hover {
    background-color: #FFFFFF !important;
    color: var(--sand) !important;
}

.topbar {
    color: #FFFFFF !important;
}

.topbar-link {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.topbar-link:hover {
    background-color: #FFFFFF !important;
    color: var(--sand) !important;
}

.topbar.scrolled {
    color: var(--sand) !important;
    background-color: rgba(247, 245, 240, 0.95) !important;
}

.topbar.scrolled .topbar-link {
    border-color: var(--sand) !important;
}