/* ==========================================================================
   Restaurant Luegibrüggli - Visual Design System & Core Styles
   Visual Thesis: A table above Interlaken, between the two lakes and Jungfrau
   ========================================================================== */

:root {
  --color-bg: #f9f7f2;
  --color-surface: #ffffff;
  --color-surface-soft: #f2eee5;
  --color-surface-dark: #1f2722;
  --color-text-main: #242c26;
  --color-text-muted: #5e6961;
  --color-text-light: #f7f9f7;
  --color-primary: #8a3324;      /* Rich Alpine red / wine accent */
  --color-primary-hover: #72271a;
  --color-primary-soft: #f4e8e5;
  --color-accent: #2e4336;       /* Deep Alpine forest pine */
  --color-accent-hover: #223228;
  --color-border: #e2ddd3;
  --color-border-subtle: #eeeae0;

  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.12);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --container-max: 1200px;
  --container-narrow: 840px;
  --header-height: 74px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background-color: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

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

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--color-accent);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); margin-bottom: 0.75rem; }
p { margin-bottom: 1.25rem; color: var(--color-text-main); }
p.lead { font-size: 1.2rem; line-height: 1.6; color: var(--color-text-muted); }

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

.section-soft {
  background-color: var(--color-surface-soft);
}

.section-dark {
  background-color: var(--color-surface-dark);
  color: var(--color-text-light);
}

.section-dark h1, .section-dark h2, .section-dark h3 {
  color: #ffffff;
}

.section-dark p {
  color: #d1d9d4;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(249, 247, 242, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: transform 0.3s ease, background 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.1;
}

.brand-location {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  font-weight: 600;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.7rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-main);
  padding: 0.4rem 0.2rem;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-outline {
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--color-accent);
  color: #ffffff;
}

.btn-white {
  background-color: #ffffff;
  color: var(--color-accent);
}

.btn-white:hover {
  background-color: #f7f5ef;
  color: var(--color-primary);
}

/* Mobile Hamburger Toggle */
.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  position: relative;
  z-index: 102;
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background-color: var(--color-accent);
  display: block;
  position: relative;
  transition: all 0.25s ease;
}

.hamburger-line::before,
.hamburger-line::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background-color: var(--color-accent);
  transition: all 0.25s ease;
}

.hamburger-line::before { top: -6px; }
.hamburger-line::after { bottom: -6px; }

.mobile-toggle[aria-expanded="true"] .hamburger-line {
  background-color: transparent;
}

.mobile-toggle[aria-expanded="true"] .hamburger-line::before {
  transform: rotate(45deg);
  top: 0;
}

.mobile-toggle[aria-expanded="true"] .hamburger-line::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* Mobile Drawer Overlay */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(18, 24, 20, 0.6);
  backdrop-filter: blur(4px);
  z-index: 101;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 86vw;
  max-width: 360px;
  height: 100%;
  background-color: var(--color-bg);
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  padding: 5.5rem 2rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-nav-drawer.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer.active .mobile-nav-panel {
  transform: translateX(0);
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.mobile-nav-links a {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-accent);
  display: block;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.mobile-nav-links a.active {
  color: var(--color-primary);
  font-weight: 700;
}

/* First Viewport Hero (Desktop 80-90vh, Mobile 70-76svh) */
.hero-place {
  position: relative;
  height: clamp(550px, 85vh, 850px);
  width: 100%;
  display: flex;
  align-items: flex-end;
  background-color: var(--color-surface-dark);
  color: #ffffff;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(20, 28, 23, 0.35) 0%,
    rgba(20, 28, 23, 0.2) 40%,
    rgba(20, 28, 23, 0.8) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-bottom: clamp(2.5rem, 6vh, 4.5rem);
}

.hero-tag {
  display: inline-block;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: #f7d5cc;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.hero-title {
  color: #ffffff;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  max-width: 900px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
}

.hero-scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  margin-left: 1.5rem;
}

/* Calm Semantic Scroll Reveal (650-800ms ease-out) */
.reveal-scene {
  padding: 4.5rem 0;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.reveal-inner {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 750ms cubic-bezier(0.16, 1, 0.3, 1), transform 750ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-inner.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-kicker {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.reveal-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  line-height: 1.35;
  color: var(--color-accent);
}

/* Quick Destination Decision Grid (When, Where, How, Reserve) */
.decision-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  background: #ffffff;
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  margin-top: -3rem;
  position: relative;
  z-index: 10;
}

.decision-item {
  display: flex;
  flex-direction: column;
}

.decision-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.decision-val {
  font-weight: 600;
  color: var(--color-text-main);
  font-size: 1.05rem;
}

.decision-sub {
  font-size: 0.85rem;
  color: var(--color-primary);
  margin-top: 0.2rem;
}

/* Feature Grid Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-img-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  background-color: var(--color-surface-soft);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-img-wrap img {
  transform: scale(1.03);
}

.card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-body h3 {
  margin-bottom: 0.5rem;
}

.card-body p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 1rem;
}

.card-link:hover {
  color: var(--color-primary-hover);
}

/* Touch-Enabled Carousel / Gallery */
.gallery-section {
  position: relative;
  overflow: hidden;
}

.carousel-viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  display: flex;
  gap: 1.25rem;
  padding: 1rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.carousel-viewport::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 82%;
  max-width: 440px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.carousel-slide img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.carousel-slide-caption {
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--color-text-main);
  background: #ffffff;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.carousel-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.carousel-btn:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

/* Map Fallback / Scannable Arrival Component */
.map-container {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  position: relative;
  background-color: #e5e3df;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Tables & Lists */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: #ffffff;
}

table.data-table th, table.data-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

table.data-table th {
  background-color: var(--color-surface-soft);
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table.data-table tr:last-child td {
  border-bottom: none;
}

/* Honest Forms */
.form-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--color-accent);
}

.form-control {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background-color: #fdfdfc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(138, 51, 36, 0.15);
}

.form-notice {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* Honest Demo Notification */
.form-demo-alert {
  display: none;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  background-color: #fff8e6;
  border: 1px solid #f2c97d;
  color: #7a5405;
  margin-top: 1.25rem;
  font-size: 0.9rem;
}

/* Site Footer */
.site-footer {
  background-color: var(--color-surface-dark);
  color: #cfd8d2;
  padding: 4.5rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-serif);
}

.footer-col p {
  color: #aebdb3;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col ul a {
  color: #aebdb3;
  font-size: 0.9rem;
}

.footer-col ul a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: #88988e;
}

.footer-legal-links {
  display: flex;
  gap: 1.25rem;
}

.footer-legal-links a:hover {
  color: #ffffff;
}

/* Modal / Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 520px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
}

.cookie-banner.visible {
  display: block;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ==========================================================================
   Responsive Adaptations (Mobile 375px, 390px, Tablet 768px, Desktop)
   ========================================================================== */

/* The full navigation needs more room than the brand lockup at intermediate
   desktop widths. Switch to the same drawer used on mobile before items can
   collide with the logo/title area. */
@media (max-width: 1200px) {
  .nav-desktop {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .mobile-nav-drawer {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 64px;
  }

  .section {
    padding: 3rem 0;
  }

  .hero-place {
    height: clamp(480px, 74svh, 600px);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-scroll-cue {
    display: none;
  }

  .decision-bar {
    grid-template-columns: 1fr;
    padding: 1.25rem;
    margin-top: -1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .carousel-slide {
    flex: 0 0 92%;
  }

  .cookie-banner {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-inner {
    opacity: 1 !important;
    transform: none !important;
  }
}
