/* =========================================================
   BASE.CSS – gemensamt för ALLA sidor
   Grundstil, meny/navigation, länkar, tillgänglighet.
   ========================================================= */

/* ---------- GRUND ---------- */
body {
  margin: 0;
  padding: 40px 7%;
  font-family: Arial, sans-serif;
  color: #111;
}

/* ---------- NAVIGATION ---------- */
/* NAVIGATION */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 60px;
}

nav a {
  color: black;
  text-decoration: none;
  margin-left: 40px;
  font-size: 18px;
}

.contact-button {
  border: 1px solid black;
  padding: 15px 25px;
  text-decoration: none;
  color: black;
}

.contact-button:hover {
  background-color: black;
  color: white;
}
.name {
  font-family: "Italianno", cursive;
  font-size: 56px;
  color: #a00000;
  margin: 0;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-motto {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 20px;
  color: #2d0304;
  margin: 0;
  letter-spacing: 0.5px;
}

.brand .name {
  text-decoration: none;
}

/* ---------- MJUK SCROLL ---------- */
html {
  scroll-behavior: smooth;
}

#om-mig,
#kontakt {
  scroll-margin-top: 30px;
}

/* ---------- RESPONSIV GRUND (okt 2026) ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  min-width: 0;
  overflow-wrap: break-word;
}
img,
video,
svg {
  max-width: 100%;
}
img {
  height: auto;
}
a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 3px solid #921c29;
  outline-offset: 4px;
}
.site-nav {
  display: flex;
  gap: clamp(14px, 2vw, 32px);
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(24px, 4vw, 60px);
}
.site-nav .brand {
  flex: 0 0 auto;
  min-width: 0;
}
.site-nav .brand .name {
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1;
  margin: 0;
}
.site-nav .brand-motto {
  font-size: clamp(12px, 1.3vw, 18px);
}
.desktop-nav-links {
  display: flex;
  gap: clamp(10px, 2vw, 34px);
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.site-nav a {
  margin-left: 0;
  font-size: clamp(14px, 1.25vw, 18px);
}
.site-nav .contact-button {
  padding: 12px 18px;
  white-space: nowrap;
}
.mobile-nav {
  display: none;
}

@media (max-width: 1050px) {
  .site-nav {
    flex-wrap: wrap;
  }
  .site-nav .brand {
    margin-right: auto;
  }
  .desktop-nav-links {
    gap: 14px;
  }
  .site-nav .contact-button {
    padding: 10px 12px;
  }
}

@media (max-width: 760px) {
  body {
    padding: 20px 4%;
  }
  .site-nav {
    position: relative;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
  }
  .site-nav .brand {
    align-items: flex-start;
  }
  .site-nav .brand .name {
    font-size: clamp(36px, 9vw, 48px);
  }
  .site-nav .brand-motto {
    font-size: 13px;
  }
  .desktop-nav-links {
    display: none;
  }
  .mobile-nav {
    display: block;
    margin-left: auto;
    flex: 0 0 auto;
  }
  .mobile-nav summary {
    list-style: none;
    cursor: pointer;
    border: 1px solid #171717;
    padding: 11px 14px;
    font-size: 14px;
  }
  .mobile-nav summary::-webkit-details-marker {
    display: none;
  }
  .mobile-nav summary span {
    margin-left: 7px;
  }
  .mobile-nav-links {
    position: absolute;
    z-index: 50;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: #faf6f0;
    border: 1px solid #ded8d1;
    box-shadow: 0 12px 28px #00000017;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .mobile-nav-links a {
    display: block;
    padding: 13px 10px;
    font-size: 16px;
  }
  .mobile-nav-links .contact-button {
    margin-top: 4px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  body {
    padding: 12px 3%;
  }
  .site-nav .brand .name {
    font-size: 36px;
  }
  .site-nav .brand-motto {
    font-size: 11px;
  }
  .mobile-nav summary {
    padding: 10px;
  }
}

/* ---------- TILLGÄNGLIGHET ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
