/* =========================================================
   RESPONSIVE
   Landgasthof Schmidt
   Tablet · Smartphone · kleine Smartphones
   ========================================================= */


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

  .footer__top {
    grid-template-columns: 1fr 1fr;
    row-gap: var(--s-5);
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .menu {
    grid-template-columns: 1fr;
    gap: clamp(36px, 6vw, 60px);
  }

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


/* =========================================================
   MOBILE NAVIGATION
   Tablet + Smartphone
   ========================================================= */

@media (max-width: 900px) {

  .nav {
    z-index: 1000;
    isolation: isolate;

    padding: 16px 20px;

    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  .nav__brand {
    position: relative;
    z-index: 1002;

    max-width: calc(100% - 64px);
  }


  /* -------------------------------------------------------
     Burger Button
     ------------------------------------------------------- */

  .nav__toggle {
    display: flex;
    position: relative;
    z-index: 1002;
    pointer-events: auto;

    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    align-items: center;
    justify-content: center;

    padding: 0;

    background: transparent;
    border: 0;

    cursor: pointer;

    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .nav__toggle span {
    position: absolute;

    width: 25px;
    height: 1.5px;

    background: var(--c-green);

    transition:
      transform 0.45s var(--ease),
      opacity 0.3s var(--ease);
  }

  .nav__toggle span:nth-child(1) {
    transform: translateY(-7px);
  }

  .nav__toggle span:nth-child(2) {
    transform: translateY(0);
  }

  .nav__toggle span:nth-child(3) {
    transform: translateY(7px);
  }


  /* -------------------------------------------------------
     Burger → X
     ------------------------------------------------------- */

  .nav.is-open .nav__toggle span:nth-child(1) {
    transform: rotate(45deg);
  }

  .nav.is-open .nav__toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav.is-open .nav__toggle span:nth-child(3) {
    transform: rotate(-45deg);
  }


  /* -------------------------------------------------------
     Vollbild Menü
     ------------------------------------------------------- */

  .nav nav {
    position: fixed;
    inset: 0;

    z-index: 1001;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
    min-height: 100dvh;

    background: var(--c-paper);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-10px);

    transition:
      opacity 0.4s var(--ease),
      transform 0.5s var(--ease),
      visibility 0.4s;
  }

  .nav.is-open nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0);
  }


  /* Geöffnetes mobiles Menü: Links immer dunkel */

  .nav.is-open .nav__links a,
  .home .nav.is-open .nav__links a,
  .home .nav.is-open:not(.is-scrolled) .nav__links a {
    color: var(--c-ink);
  }


  /* -------------------------------------------------------
     Menü Links
     ------------------------------------------------------- */

  .nav__links {
    width: 100%;
    max-width: 520px;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    gap: 0;
    margin: 0;

    padding:
      max(110px, calc(env(safe-area-inset-top) + 90px))
      max(28px, env(safe-area-inset-right))
      max(48px, env(safe-area-inset-bottom))
      max(28px, env(safe-area-inset-left));
  }

  .nav__links li {
    width: 100%;

    border-bottom: 1px solid var(--c-line-soft);
  }

  .nav__links li:first-child {
    border-top: 1px solid var(--c-line-soft);
  }

  .nav__links a {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    min-height: 60px;

    padding: 18px 0;

    font-family: var(--font-serif);
    font-size: clamp(2rem, 8vw, 3.2rem);
    font-weight: 500;
    line-height: 1;

    letter-spacing: -0.02em;

    color: var(--c-green);

    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .nav__links a::after {
    content: "↗";

    font-family: var(--font-sans);
    font-size: 0.8rem;

    color: var(--c-gray);

    opacity: 0.45;
  }

  .nav__links a[aria-current="page"] {
    color: var(--c-ink);
  }

  .nav__links a[aria-current="page"]::after {
    content: "•";

    font-size: 1.4rem;

    color: var(--c-green);

    opacity: 1;
  }

  .nav.is-open {
    background: transparent;
    box-shadow: none;

    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.menu-open {
    overflow: hidden;
    touch-action: none;
  }


  /* -------------------------------------------------------
     INDEX / STARTSEITE – Navigation auf Mobile immer dunkel
     ------------------------------------------------------- */

  .home .nav .nav__brand,
  .home .nav:not(.is-scrolled) .nav__brand,
  .home .nav.is-open .nav__brand {
    color: #111111;
  }

  .home .nav .nav__brand small,
  .home .nav:not(.is-scrolled) .nav__brand small,
  .home .nav.is-open .nav__brand small {
    color: #111111;
  }

  .home .nav .nav__toggle span,
  .home .nav:not(.is-scrolled) .nav__toggle span,
  .home .nav.is-open .nav__toggle span {
    background: #111111;
  }

  .home .nav.is-open .nav__links a,
  .home .nav.is-open:not(.is-scrolled) .nav__links a,
  .home .nav.is-open.is-scrolled .nav__links a,
  .home .nav.is-open .nav__links a[aria-current="page"] {
    color: #111111;
  }
}


/* =========================================================
   SMARTPHONE
   ========================================================= */

@media (max-width: 760px) {

  :root {
    --gutter: 20px;
  }


  /* -------------------------------------------------------
     Allgemein
     ------------------------------------------------------- */

  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    overflow-x: hidden;
  }

  img,
  svg,
  video {
    max-width: 100%;
  }

  img {
    height: auto;
  }


  /* -------------------------------------------------------
     Navigation
     ------------------------------------------------------- */

  .nav {
    padding-top: 14px;
    padding-bottom: 14px;
  }


  /* -------------------------------------------------------
     Startseiten Hero
     ------------------------------------------------------- */

  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero__content {
    left: var(--gutter);
    right: var(--gutter);

    bottom: clamp(100px, 17svh, 140px);

    width: auto;
    max-width: none;
  }

  .hero__title {
    max-width: 100%;

    font-size: clamp(3rem, 13vw, 5rem);
    line-height: 0.9;

    overflow-wrap: normal;
  }

  .hero__sub {
    max-width: 32rem;

    font-size: clamp(0.9rem, 3.8vw, 1rem);
    line-height: 1.55;
  }

  .hero__place {
    font-size: 0.75rem;
    line-height: 1.4;

    letter-spacing: 0.1em;
  }


  /* -------------------------------------------------------
     Scroll Hinweis
     ------------------------------------------------------- */

  .scrollcue {
    left: 50%;
    right: auto;

    bottom: max(24px, env(safe-area-inset-bottom));

    transform: translateX(-50%);
  }


  /* -------------------------------------------------------
     Split Sections
     ------------------------------------------------------- */

  .split {
    grid-template-columns: 1fr;

    gap: var(--s-4);
  }

  .split--reverse .split__media {
    order: 0;
  }

  .split__media {
    width: 100%;

    aspect-ratio: 3 / 2;

    overflow: hidden;
  }

  .split__media img {
    width: 100%;
    height: 100%;

    object-fit: cover;
  }


  /* -------------------------------------------------------
     Überschriften / Text
     ------------------------------------------------------- */

  .split__body h2,
  .section-head h2 {
    font-size: clamp(2rem, 9vw, 3rem);
    line-height: 1.02;
  }

  .split__body p,
  .section-head p {
    line-height: 1.65;
  }


  /* -------------------------------------------------------
     Galerie – auf Mobile horizontal wischbar
     ------------------------------------------------------- */

  .gallery--mobile-swipe {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    grid-auto-flow: initial !important;

    gap: 14px !important;

    width: calc(100vw - var(--gutter)) !important;
    max-width: none !important;

    margin-right: calc(var(--gutter) * -1) !important;

    padding:
      0
      var(--gutter)
      14px
      0 !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    scroll-snap-type: x mandatory;

    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;

    scrollbar-width: none;
  }

  .gallery--mobile-swipe::-webkit-scrollbar {
    display: none;
  }

  .gallery--mobile-swipe > figure.gallery__item {
    position: relative !important;
    display: block !important;

    flex: 0 0 82vw !important;

    width: 82vw !important;
    min-width: 82vw !important;
    max-width: 82vw !important;

    height: auto !important;

    aspect-ratio: 4 / 3 !important;

    margin: 0 !important;
    padding: 0 !important;

    grid-column: auto !important;
    grid-row: auto !important;

    overflow: hidden !important;

    scroll-snap-align: start;
  }

  .gallery--mobile-swipe > figure.gallery__item > .ph {
    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
  }

  .gallery--mobile-swipe > figure.gallery__item > .ph > img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;
    max-width: none !important;

    object-fit: cover !important;

    transform: none !important;
  }


  /* Normale Galerien bleiben untereinander */

  .gallery:not(.gallery--mobile-swipe) {
    grid-template-columns: 1fr;

    gap: var(--s-3);
  }

  .gallery:not(.gallery--mobile-swipe) .g-a,
  .gallery:not(.gallery--mobile-swipe) .g-b,
  .gallery:not(.gallery--mobile-swipe) .g-c,
  .gallery:not(.gallery--mobile-swipe) .g-d {
    grid-column: 1 / -1;

    margin-top: 0;

    aspect-ratio: 3 / 2;

    overflow: hidden;
  }

  .gallery:not(.gallery--mobile-swipe) img {
    width: 100%;
    height: 100%;

    object-fit: cover;
  }


  /* -------------------------------------------------------
     Journey / Reise
     ------------------------------------------------------- */

  .journey {
    grid-auto-flow: row;
    grid-auto-columns: auto;

    width: 100%;
  }

  .journey__step {
    width: 100%;
  }


  /* -------------------------------------------------------
     Facts
     ------------------------------------------------------- */

  .facts {
    grid-template-columns: 1fr;

    gap: var(--s-4);
  }


  /* -------------------------------------------------------
     Steps
     ------------------------------------------------------- */

  .steps {
    grid-template-columns: 1fr;

    gap: var(--s-4);
  }


  /* -------------------------------------------------------
     Preise
     ------------------------------------------------------- */

  .price-row {
    gap: 12px;
  }

  .price-row__name {
    min-width: 0;

    font-size: 1.1rem;

    overflow-wrap: anywhere;
  }


  /* -------------------------------------------------------
     Kontakt
     ------------------------------------------------------- */

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

    gap: var(--s-5);
  }

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

  input,
  textarea,
  select,
  button {
    font-size: 16px;
  }


  /* -------------------------------------------------------
     Buttons / Touch
     ------------------------------------------------------- */

  .btn {
    min-height: 44px;

    touch-action: manipulation;

    -webkit-tap-highlight-color: transparent;
  }

  a {
    -webkit-tap-highlight-color: transparent;
  }


  /* -------------------------------------------------------
     Page Hero
     ------------------------------------------------------- */

  .page-hero {
    height: 78svh;
    min-height: 480px;
  }


  /* =======================================================
     ÜBERNACHTEN
     Mobile First
     ======================================================= */


  /* -------------------------------------------------------
     Übernachten Hero
     ------------------------------------------------------- */

  .stay-hero {
    position: relative;

    height: 100svh;
    min-height: 620px;
    max-height: 900px;

    overflow: hidden;
  }

  .stay-hero__media,
  .stay-hero__media .ph {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
  }

  .stay-hero__media img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
  }


  /* Dunkler Verlauf wie bei der Vorlage */

  .stay-hero::after {
    content: "";

    position: absolute;
    inset: 0;

    z-index: 1;

    pointer-events: none;

    background:
      linear-gradient(
        to bottom,
        rgba(12, 14, 10, 0.16) 0%,
        rgba(12, 14, 10, 0.20) 35%,
        rgba(12, 14, 10, 0.78) 100%
      );
  }


  /* Hero Inhalt */

  .stay-hero__inner {
    position: absolute;

    z-index: 2;

    left: 0;
    right: 0;

    bottom:
      max(
        36px,
        calc(env(safe-area-inset-bottom) + 24px)
      );

    width: 100%;

    color: var(--c-paper);
  }

  .stay-hero__inner .eyebrow {
    color: rgba(248, 246, 241, 0.82);
  }

  .stay-hero__inner .page-hero__title {
    max-width: 8.5ch;

    margin-top: 10px;

    font-size: clamp(3.25rem, 15vw, 5.5rem);
    line-height: 0.86;

    letter-spacing: -0.045em;

    color: var(--c-paper);
  }

  .stay-hero__inner .page-hero__sub {
    max-width: 31rem;

    margin-top: 18px;

    font-size: 0.98rem;
    line-height: 1.55;

    color: rgba(248, 246, 241, 0.86);
  }


  /* Hero Buttons */

  .stay-hero .cta-row {
    display: grid;

    grid-template-columns: 1fr;

    gap: 10px;

    width: 100%;
  }

  .stay-hero .btn-solid,
  .stay-hero .btn-ghost {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 52px;

    text-align: center;

    touch-action: manipulation;
  }

  .stay-hero .btn-ghost {
    color: var(--c-paper);

    border-color: rgba(248, 246, 241, 0.55);
  }


  /* -------------------------------------------------------
     Übernachten Intro
     ------------------------------------------------------- */

  .stay-intro {
    padding-top: clamp(64px, 18vw, 96px);
    padding-bottom: clamp(64px, 18vw, 96px);
  }

  .stay-intro .wrap {
    max-width: 38rem;
  }

  .stay-intro .serif-quote {
    max-width: 15ch;

    margin-inline: auto;

    font-size: clamp(2.25rem, 10.5vw, 3.5rem);
    line-height: 0.98;

    letter-spacing: -0.025em;
  }

  .stay-intro .muted {
    max-width: 34rem;

    margin-inline: auto;
  }


  /* -------------------------------------------------------
     Unterkunft Karten
     ------------------------------------------------------- */

  .stay-card {
    padding-top: 0;

    padding-bottom:
      clamp(
        72px,
        18vw,
        112px
      );
  }


  /*
     Bilder sollen auf Mobile bis an den Bildschirmrand gehen.
     Der Text erhält darunter wieder den normalen Gutter.
  */

  .stay-card .wrap {
    padding-left: 0;
    padding-right: 0;
  }

  .stay-card .split {
    gap: 0;
  }


  /* Unterkunft Bild */

  .stay-card .split__media {
    width: 100%;

    aspect-ratio: 4 / 5;

    overflow: hidden;
  }

  .stay-card .split__media .ph {
    width: 100%;
    height: 100%;
  }

  .stay-card .split__media img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
  }


  /* Unterkunft Text */

  .stay-card .split__body {
    padding:
      34px
      var(--gutter)
      0;
  }

  .stay-card .split__body h2 {
    max-width: 10ch;

    margin-top: 8px;

    font-size: clamp(2.7rem, 12vw, 4rem);
    line-height: 0.94;

    letter-spacing: -0.035em;
  }

  .stay-card
  .split__body
  > p:not(.eyebrow):not(.stay-note) {
    max-width: 35rem;

    margin-top: 20px;

    line-height: 1.65;
  }


  /* -------------------------------------------------------
     Unterkunft Preise
     ------------------------------------------------------- */

  .stay-card .pricelist {
    margin-top: 28px;
  }

  .stay-card .price-row {
    min-height: 48px;

    align-items: baseline;
  }

  .stay-card .price-row__name {
    font-size: 1rem;
  }

  .stay-card .price-row__price {
    white-space: nowrap;
  }


  /* -------------------------------------------------------
     Unterkunft Hinweis
     ------------------------------------------------------- */

  .stay-card .stay-note {
    margin-top: 18px;

    font-size: 0.9rem;
    line-height: 1.55;

    color: var(--c-gray);
  }


  /* -------------------------------------------------------
     Unterkunft CTA
     ------------------------------------------------------- */

  .stay-card .btn {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 52px;

    margin-top: 28px;

    text-align: center;

    touch-action: manipulation;
  }


  /* -------------------------------------------------------
     Gut zu wissen
     ------------------------------------------------------- */

  .stay-facts {
    gap: 0;
  }

  .stay-facts .fact {
    padding: 26px 0;

    border-bottom:
      1px solid
      var(--c-line-soft);
  }

  .stay-facts .fact:first-child {
    border-top:
      1px solid
      var(--c-line-soft);
  }


  /* -------------------------------------------------------
     Footer
     ------------------------------------------------------- */

  .footer__top {
    grid-template-columns: 1fr;

    gap: var(--s-5);
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;

    gap: var(--s-2);
  }

  .footer {
    padding-bottom:
      max(
        var(--s-4),
        env(safe-area-inset-bottom)
      );
  }
}


/* =========================================================
   KLEINE SMARTPHONES
   iPhone SE etc.
   ========================================================= */

@media (max-width: 480px) {

  :root {
    --gutter: 18px;
  }


  /* -------------------------------------------------------
     Navigation
     ------------------------------------------------------- */

  .nav {
    padding-left: 18px;
    padding-right: 18px;
  }

  .nav__links {
    padding-left: 22px;
    padding-right: 22px;
  }

  .nav__links a {
    padding: 16px 0;

    font-size: clamp(1.8rem, 9vw, 2.7rem);
  }


  /* -------------------------------------------------------
     Startseite
     ------------------------------------------------------- */

  .hero__content {
    left: var(--gutter);
    right: var(--gutter);
  }

  .hero__title {
    font-size: clamp(2.8rem, 14vw, 4.2rem);
  }

  .hero__sub {
    font-size: 0.92rem;
  }


  /* -------------------------------------------------------
     Allgemeine Bilder
     ------------------------------------------------------- */

  .split__media,
  .gallery:not(.gallery--mobile-swipe) .g-a,
  .gallery:not(.gallery--mobile-swipe) .g-b,
  .gallery:not(.gallery--mobile-swipe) .g-c,
  .gallery:not(.gallery--mobile-swipe) .g-d {
    aspect-ratio: 4 / 3;
  }


  /* =======================================================
     Übernachten
     ======================================================= */

  .stay-hero {
    min-height: 600px;
  }

  .stay-hero__inner .page-hero__title {
    font-size:
      clamp(
        3rem,
        15vw,
        4.5rem
      );
  }

  .stay-hero__inner .page-hero__sub {
    max-width: 29rem;
  }


  /*
     Überschreibt absichtlich die allgemeine
     4:3-Regel von oben.
  */

  .stay-card .split__media {
    aspect-ratio: 4 / 5;
  }

  .stay-card .split__body {
    padding-top: 30px;
  }
}


/* =========================================================
   SEHR KLEINE SMARTPHONES
   ========================================================= */

@media (max-width: 380px) {

  :root {
    --gutter: 16px;
  }


  /* -------------------------------------------------------
     Navigation
     ------------------------------------------------------- */

  .nav {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav__links a {
    font-size: 1.8rem;
  }


  /* -------------------------------------------------------
     Startseite
     ------------------------------------------------------- */

  .hero__title {
    font-size: 2.7rem;
  }

  .hero__sub {
    font-size: 0.88rem;
  }


  /* -------------------------------------------------------
     Übernachten
     ------------------------------------------------------- */

  .stay-hero__inner .page-hero__title {
    font-size: 2.9rem;
  }

  .stay-hero__inner .page-hero__sub {
    font-size: 0.9rem;
  }

  .stay-card .split__body h2 {
    font-size: 2.55rem;
  }

  .stay-card .price-row {
    gap: 8px;
  }

  .stay-card .price-row__name,
  .stay-card .price-row__price {
    font-size: 0.92rem;
  }
}


/* =========================================================
   TOUCH GERÄTE
   ========================================================= */

@media (hover: none) and (pointer: coarse) {

  .btn,
  .btn-solid,
  .btn-ghost,
  .nav__toggle,
  .nav__links a,
  .link-underline {
    touch-action: manipulation;
  }
}


/* =========================================================
   REDUCED MOTION
   Barrierefreiheit
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;
  }
}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1600px) {

  :root {
    --maxw: 1480px;
  }
}