/* =========================================================
   CASA — Cucina Moderna
   Token system:
   colour  — paper #F2E6D4, taupe #A89684, ink #1C1A17, red #C00000
   type    — Fraunces (display), Inter (body), IBM Plex Mono (menu/labels)
   layout  — printed-menu motif carried through nav, hero eyebrow, contact card
   ========================================================= */

:root {
  --paper: #f2e6d4;
  --paper-deep: #e9d9c1;
  --taupe: #a89684;
  --taupe-deep: #8f7d6c;
  --ink: #1c1a17;
  --ink-soft: #4a453f;
  --red: #b3241f;
  --line: rgba(28, 26, 23, 0.16);
  --line-light: rgba(242, 230, 212, 0.28);

  --font-display: "Fraunces", serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --nav-h: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--red); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* subtle paper grain overlay, ties every section back to the printed menu stock */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.placeholder-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15em 0.5em;
  border: 1px solid currentColor;
  opacity: 0.55;
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 0.4em;
}

/* ---------- eyebrow / section titles ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-style: italic;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--red);
  margin: 0 0 0.9rem;
}
.eyebrow--light { color: #f3d2c2; font-weight: 500; }

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.08;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}
.section-title--light { color: var(--paper); }

.section-note {
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.section-head {
  padding: 6.5rem clamp(1.5rem, 6vw, 5rem) 2.5rem;
}
.section-head--onlight { color: var(--paper); }
.section-head--onlight .section-note { color: rgba(242,230,212,0.75); }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  background: rgba(242, 230, 212, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav__mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.nav__links a { position: relative; padding: 0.3rem 0; color: var(--ink-soft); }
.nav__links a:hover { color: var(--ink); }
.nav__links .idx { color: var(--red); margin-right: 0.35em; opacity: 0.8; }
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active .idx { opacity: 1; }
.nav__cta.is-active { background: var(--ink); color: var(--paper) !important; }

.nav__cta {
  border: 1px solid var(--ink);
  padding: 0.55rem 1.1rem !important;
  border-radius: 2px;
  color: var(--ink) !important;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav__cta:hover { background: var(--ink); color: var(--paper) !important; }
.nav__cta .idx { display: none; }

.nav__toggle {
  display: none;
  width: 34px; height: 34px;
  background: none; border: none; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.nav__toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: transform 0.25s ease, opacity 0.25s ease; }

.nav__right {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

/* ---------- language switcher ---------- */
.lang-switch { position: relative; }

.lang-switch__current {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  transition: border-color 0.2s ease;
}
.lang-switch__current:hover { border-color: var(--line); }

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 150px;
  padding: 0.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 12px 28px rgba(28,26,23,0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.lang-switch__menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.lang-switch__menu a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.6rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.lang-switch__menu a:hover { background: var(--paper-deep); color: var(--ink); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: saturate(0.92) contrast(1.02);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20,16,12,0.35) 0%, rgba(20,16,12,0.18) 38%, rgba(16,13,10,0.9) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  color: var(--paper);
  padding: 4rem clamp(1.5rem, 6vw, 5rem) 5rem;
  max-width: 780px;
  text-shadow: 0 1px 12px rgba(0,0,0,0.3);
}

.hero__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02;
  margin: 0 0 1.3rem;
}

.hero__sub {
  font-size: 1.02rem;
  max-width: 46ch;
  color: rgba(242,230,212,0.85);
  margin: 0 0 1.4rem;
}

.hero__phone {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin: 0 0 2rem;
}
.hero__phone a { border-bottom: 1px solid rgba(242,230,212,0.4); padding-bottom: 0.1rem; }
.hero__phone a:hover { border-bottom-color: var(--paper); }

.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding: 0.95rem 1.6rem;
  border-radius: 2px;
  display: inline-block;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--solid { background: var(--red); color: var(--paper); border-color: var(--red); }
.btn--solid:hover { background: #8f1b17; border-color: #8f1b17; }
.btn--ghost { border-color: rgba(242,230,212,0.55); color: var(--paper); }
.btn--ghost:hover { border-color: var(--paper); background: rgba(242,230,212,0.1); }
.btn--full { width: 100%; text-align: center; }

.hero__scroll {
  position: absolute;
  bottom: 1.6rem; right: clamp(1.5rem, 6vw, 5rem);
  z-index: 1;
  width: 34px; height: 34px;
  border: 1px solid rgba(242,230,212,0.5);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.hero__scroll span {
  width: 1px; height: 10px; background: var(--paper);
  animation: scrollpulse 1.8s ease-in-out infinite;
}
@keyframes scrollpulse {
  0%, 100% { transform: translateY(-2px); opacity: 0.5; }
  50% { transform: translateY(3px); opacity: 1; }
}

/* =========================================================
   MENU SECTION — styled like the printed card
   ========================================================= */
.menu-section { background: var(--paper); }

.menu-card {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 6vw, 5rem) 6rem;
}

.menu-group {
  padding: 2.6rem 0;
  border-top: 1px solid var(--line);
}
.menu-group:first-child { border-top: none; padding-top: 0; }

.menu-group__title {
  font-family: var(--font-mono);
  font-style: italic;
  color: var(--red);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 1.6rem;
}

.menu-tag {
  font-family: var(--font-mono);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--taupe-deep);
  margin: 1.6rem 0 0.6rem;
}

.dish { margin-bottom: 1.5rem; }
.dish:last-child { margin-bottom: 0; }

.dish__row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.dish__name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
  white-space: nowrap;
}

.dish__leader {
  flex: 1;
  border-bottom: 1px dotted var(--line);
  transform: translateY(-0.35em);
}

.dish__price {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  white-space: nowrap;
}

.dish__ingredients {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0.45rem 0 0;
}

.dish__sizes {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--taupe-deep);
  margin: 0.3rem 0 0;
}

.dish__wine {
  font-family: var(--font-mono);
  font-style: italic;
  font-size: 0.76rem;
  color: var(--red);
  opacity: 0.85;
  margin: 0.5rem 0 0;
}

.menu-footnote {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
  margin-top: 0.5rem;
}

/* =========================================================
   GALLERY
   ========================================================= */
.gallery { background: var(--taupe); }

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6rem;
  padding: 0 clamp(1.5rem, 6vw, 5rem) 6rem;
}

.g-item {
  margin: 0;
  overflow: hidden;
  grid-column: span 2;
  aspect-ratio: 3 / 4;
  border-radius: 2px;
}
.g-item--tall { grid-row: span 2; aspect-ratio: 3 / 5.2; }
.g-item--wide { grid-column: span 4; aspect-ratio: 16 / 10; }

.g-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.g-item:hover img { transform: scale(1.045); }

/* =========================================================
   CONTACT PHOTO (second grid column on pages like Kontakt —
   sits beside the text on wide screens, below it on narrow ones)
   ========================================================= */
.contact__photo {
  margin: 0;
  min-height: 320px;
}
.contact__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 38%;
  filter: saturate(0.95) contrast(1.02);
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  background: var(--ink);
  color: var(--paper);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.contact__info {
  padding: 6.5rem clamp(1.5rem, 5vw, 4.5rem) 5rem;
}

.contact__intro {
  max-width: 42ch;
  color: rgba(242,230,212,0.75);
  margin-bottom: 3rem;
}

.contact__facts {
  display: grid;
  gap: 2rem;
  margin: 0;
  max-width: 480px;
}

.fact dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.fact dd { margin: 0; font-size: 0.98rem; }
.fact a:hover { color: #e7b9a9; }

.hours-row {
  display: flex;
  justify-content: space-between;
  max-width: 260px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.2rem 0;
}
.hours-row--closed { color: rgba(242,230,212,0.45); }

.contact__form {
  background: var(--paper);
  color: var(--ink);
  padding: 6.5rem clamp(1.5rem, 5vw, 4rem) 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
}

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.optional { text-transform: none; letter-spacing: 0; opacity: 0.7; }

input, textarea {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.1rem;
  resize: vertical;
}
input:focus, textarea:focus {
  outline: none;
  border-bottom-color: var(--red);
}

.form-note {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-soft);
  margin: 0;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--ink);
  color: rgba(242,230,212,0.6);
  border-top: 1px solid rgba(242,230,212,0.12);
  padding: 1.5rem clamp(1.5rem, 6vw, 5rem);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.footer__mark { color: var(--paper); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .g-item, .g-item--wide { grid-column: span 2; aspect-ratio: 4/5; }
  .g-item--tall { grid-row: span 1; }
}

@media (max-width: 720px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav__links.is-open { max-height: 420px; }
  .nav__links a { padding: 1rem 1.5rem; width: 100%; border-top: 1px solid var(--line); }
  .nav__cta { margin: 1rem 1.5rem; text-align: center; }

  .dish__row { flex-wrap: wrap; }
  .dish__leader { display: none; }
  .field-row { grid-template-columns: 1fr; }

  .contact__photo { min-height: 220px; height: 32vh; }

  /* Hero: stack photo above text instead of overlaying — keeps faces
     fully visible and guarantees text contrast on a solid ground. */
  .hero {
    display: block;
    position: static;
    min-height: 0;
    overflow: visible;
  }
  .hero__img {
    position: relative;
    inset: auto;
    height: 32vh;
    min-height: 220px;
    object-position: center 22%;
  }
  .hero__scrim { display: none; }
  .hero__content {
    position: static;
    color: var(--ink);
    background: var(--paper);
    max-width: none;
    padding: 1.4rem clamp(1.25rem, 6vw, 2rem) calc(1.8rem + env(safe-area-inset-bottom, 0px));
    text-shadow: none;
  }
  .hero__content .eyebrow { margin-bottom: 0.6rem; }
  .hero__content .eyebrow--light { color: var(--red); font-weight: 500; }
  .hero__content .placeholder-tag { display: none; }
  .hero__title { margin-bottom: 0.8rem; }
  .hero__sub { color: var(--ink-soft); margin-bottom: 1rem; }
  .hero__phone { color: var(--ink); margin-bottom: 1.2rem; }
  .hero__phone a { border-bottom-color: var(--line); }
  .hero__phone a:hover { border-bottom-color: var(--ink); }
  .btn--ghost { border-color: var(--ink); color: var(--ink); }
  .btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .hero__actions { flex-wrap: nowrap; gap: 0.6rem; }
  .hero__actions .btn {
    flex: 1 1 0;
    text-align: center;
    padding: 0.85rem 0.4rem;
    font-size: 0.7rem;
    white-space: normal;
  }
}
