/* ==========================================================================
   Villa Restaurant Soemmerda - Base Styles
   ==========================================================================
   Modern CSS Reset + Typografie Defaults.
   Setzt auf tokens.css und fonts.css auf.
   ========================================================================== */


/* === Modern Reset (Andy Bell + Josh Comeau) ============================== */

*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  min-height: 100svh;
  line-height: var(--vr-leading-relaxed);
  font-family: var(--vr-font-body);
  font-size: var(--vr-text-md);
  font-weight: var(--vr-fw-regular);
  color: var(--vr-text-primary);
  background: var(--vr-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}


/* === Bilder und Medien =================================================== */

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

img, video {
  height: auto;
}

img {
  font-style: italic;        /* zeigt alt Text kursiv wenn Bild fehlt */
  background-repeat: no-repeat;
  background-size: cover;
  shape-margin: 1rem;
}


/* === Typografie ========================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--vr-font-display);
  font-weight: var(--vr-fw-semibold);
  line-height: var(--vr-leading-tight);
  letter-spacing: var(--vr-tracking-tight);
  color: var(--vr-text-primary);
  text-wrap: balance;
}

h1 {
  font-size: var(--vr-text-hero);
  font-weight: var(--vr-fw-bold);
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(var(--vr-text-3xl), 5vw, var(--vr-text-5xl));
  font-weight: var(--vr-fw-semibold);
}

h3 {
  font-size: clamp(var(--vr-text-2xl), 3.5vw, var(--vr-text-3xl));
}

h4 {
  font-size: clamp(var(--vr-text-xl), 2.5vw, var(--vr-text-2xl));
  font-weight: var(--vr-fw-medium);
}

h5 {
  font-size: var(--vr-text-lg);
  font-weight: var(--vr-fw-medium);
}

h6 {
  font-size: var(--vr-text-md);
  font-weight: var(--vr-fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--vr-tracking-wider);
}

p {
  text-wrap: pretty;
  max-width: var(--vr-container-prose);
}

p, li, dd {
  hyphens: auto;
  -webkit-hyphens: auto;
}

strong, b {
  font-weight: var(--vr-fw-semibold);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--vr-text-sm);
}


/* === Eyebrow (Sektion Vorlauf Text) ====================================== */

.eyebrow {
  font-family: var(--vr-font-body);
  font-size: var(--vr-text-sm);
  font-weight: var(--vr-fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--vr-tracking-widest);
  color: var(--vr-gold-tief);
  margin-bottom: var(--vr-space-sm);
  display: inline-block;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--vr-gold);
  vertical-align: middle;
  margin-right: var(--vr-space-2xs);
}


/* === Akzente (Caveat Hand) =============================================== */

.hand,
.signature {
  font-family: var(--vr-font-hand);
  font-weight: var(--vr-fw-regular);
  font-size: var(--vr-text-3xl);
  color: var(--vr-burgund);
  line-height: 1;
}


/* === Links =============================================================== */

a {
  color: var(--vr-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--vr-gold-hell);
  transition: color var(--vr-trans-fast),
              text-decoration-color var(--vr-trans-fast);
}

a:hover {
  color: var(--vr-link-hover);
  text-decoration-color: var(--vr-burgund);
}

a:visited {
  color: var(--vr-link-visited);
}


/* === Listen ============================================================== */

ul, ol {
  padding-left: 1.5em;
  margin-bottom: var(--vr-space-md);
}

ul.unstyled, ol.unstyled,
nav ul, nav ol {
  list-style: none;
  padding-left: 0;
}

li {
  margin-bottom: var(--vr-space-2xs);
}


/* === Quote =============================================================== */

blockquote {
  font-family: var(--vr-font-display);
  font-style: italic;
  font-size: var(--vr-text-xl);
  line-height: var(--vr-leading-snug);
  color: var(--vr-text-secondary);
  border-left: var(--vr-border-gold);
  padding-left: var(--vr-space-md);
  margin: var(--vr-space-lg) 0;
  max-width: var(--vr-container-prose);
}

cite {
  font-style: normal;
  font-size: var(--vr-text-sm);
  color: var(--vr-text-muted);
  display: block;
  margin-top: var(--vr-space-2xs);
}

cite::before {
  content: "—  ";
}


/* === Horizontal Rule ===================================================== */

hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--vr-gold) 20%,
    var(--vr-gold) 80%,
    transparent
  );
  margin: var(--vr-space-2xl) 0;
}


/* === Code (selten, fuer Impressum etc.) ================================== */

code, kbd, samp, pre {
  font-family: var(--vr-font-mono);
  font-size: 0.9em;
}


/* === Form Defaults ======================================================= */

input, textarea, select, button {
  font: inherit;
  color: inherit;
}

input, textarea, select {
  background: var(--vr-papier);
  border: 1px solid var(--vr-linie);
  border-radius: var(--vr-radius-sm);
  padding: var(--vr-space-2xs) var(--vr-space-xs);
  width: 100%;
  transition: border-color var(--vr-trans-fast);
}

input:focus, textarea:focus, select:focus {
  outline: var(--vr-focus-ring);
  outline-offset: var(--vr-focus-offset);
  border-color: var(--vr-gold);
}

textarea {
  resize: vertical;
  min-height: 8rem;
}

label {
  display: block;
  margin-bottom: var(--vr-space-3xs);
  font-weight: var(--vr-fw-medium);
  font-size: var(--vr-text-sm);
  color: var(--vr-text-secondary);
}


/* === Tabellen (selten, fuer Speisekarte) ================================ */

table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: var(--vr-space-md);
}

th, td {
  padding: var(--vr-space-2xs) var(--vr-space-xs);
  text-align: left;
}

th {
  font-weight: var(--vr-fw-semibold);
  border-bottom: var(--vr-border-thin);
}


/* === Selection =========================================================== */

::selection {
  background: var(--vr-burgund);
  color: var(--vr-creme);
}


/* === Focus visible (Tastatur Navigation) ================================= */

:focus {
  outline: none;
}

:focus-visible {
  outline: var(--vr-focus-ring);
  outline-offset: var(--vr-focus-offset);
  border-radius: var(--vr-radius-xs);
}


/* === Skip Link (Accessibility) =========================================== */

.skip-link {
  position: absolute;
  left: -10000px;
  top: var(--vr-space-sm);
  z-index: var(--vr-z-toast);
  background: var(--vr-burgund);
  color: var(--vr-creme);
  padding: var(--vr-space-2xs) var(--vr-space-sm);
  border-radius: var(--vr-radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  left: var(--vr-space-sm);
}


/* === Visually Hidden (sr-only) =========================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* === Print =============================================================== */

@media print {
  body {
    background: white;
    color: black;
    font-size: 11pt;
  }
  a {
    color: black;
    text-decoration: underline;
  }
  .no-print {
    display: none;
  }
}
