/*
Theme Name: Hugos Charkuteri
Theme URI: https://hugoscharkuteri.se/
Author: Local rebuild
Description: Visual rebuild of hugoscharkuteri.se brochure site.
Version: 0.7.2
Text Domain: hugoscharkuteri
*/

@font-face {
  font-family: "HK Grotesk";
  src: url("assets/fonts/HKGrotesk-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NOVA";
  src: url("assets/fonts/NOVABOLD.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mabry Pro";
  src: url("assets/fonts/Mabry-Pro-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DIN Next Slab";
  src: url("assets/fonts/DINNextSlabProMedium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Recoleta";
  src: url("assets/fonts/RECOLTA.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-text: #4a4a4a;
  --color-muted: #707070;
  --color-brown: #91795f;
  --color-accent: #eb7757;
  --color-accent-dark: #d46545;
  --color-white: #ffffff;
  --color-footer: #2a2420;
  --font-display: "Mabry Pro", "HK Grotesk", "Helvetica Neue", sans-serif;
  --font-body: "HK Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-title: "NOVA", "Recoleta", Georgia, serif;
  --header-h: 5.5rem;
  --max: 72rem;
}

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

html {
  /* Avoid height:100% — combined with WP admin-bar margin-top it creates
     extra scroll and a white strip under the footer. */
  background: var(--color-footer);
  overflow-x: clip;
  overflow-y: auto;
  /* Keep layout width stable when accordion opens and a scrollbar appears */
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--color-brown) var(--color-footer);
  scroll-behavior: smooth;
}

/* Match reserved gutter: brown track, warmer thumb (no system-grey flash) */
html::-webkit-scrollbar {
  width: 12px;
}

html::-webkit-scrollbar-track {
  background: var(--color-footer);
}

html::-webkit-scrollbar-thumb {
  background: var(--color-brown);
  border-radius: 999px;
  border: 3px solid var(--color-footer);
  background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
  border: 3px solid var(--color-footer);
  background-clip: padding-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

/* WP adds html { margin-top: 32/46px } for the fixed admin bar. */
body.admin-bar {
  min-height: calc(100dvh - 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar {
    min-height: calc(100dvh - 46px);
  }
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  background: transparent;
  border-bottom: 2px solid transparent;
  transition:
    padding 0.45s ease,
    background 0.45s ease,
    border-color 0.45s ease,
    backdrop-filter 0.45s ease,
    box-shadow 0.45s ease;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 1.5rem, 90rem);
  margin-inline: auto;
}

.site-logo img {
  width: clamp(9.5rem, 22vw, 14rem);
  height: auto;
  transition: width 0.45s ease, padding 0.45s ease;
}

.site-nav--desktop {
  display: none;
}

.site-nav--desktop ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  justify-content: flex-end;
}

.site-nav--desktop a {
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.site-nav--desktop a:hover {
  color: var(--color-accent);
}

.site-header.is-scrolled {
  padding: 0.45rem 0;
  background: rgba(42, 36, 32, 0.72);
  border-bottom-color: #f6a002;
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.site-header.is-scrolled .site-logo img {
  width: clamp(7.25rem, 16vw, 11rem);
}

body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

.menu-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 1.65rem;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

.site-nav--mobile {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(42, 36, 32, 0.97);
  color: var(--color-white);
  padding: 5rem 1.75rem 2rem;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.site-nav--mobile.is-open {
  transform: translateX(0);
}

.site-nav--mobile a {
  display: block;
  padding: 0.9rem 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-nav--mobile .socials {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.site-nav--mobile .socials img {
  width: 1.75rem;
  height: 1.75rem;
}

@media (min-width: 960px) {
  .menu-toggle {
    display: none;
  }

  .site-nav--desktop {
    display: block;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--color-white);
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

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

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.2) 45%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.35), transparent 40%);
}

.hero__content {
  width: min(100% - 2rem, 40rem);
  text-align: center;
  padding: 6rem 0 4rem;
}

.hero__icon {
  width: 5.2rem;
  margin: 0 auto 1.25rem;
  filter: brightness(0) invert(1);
}

.hero__title {
  margin: 0 auto;
  max-width: 100%;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 4.2vw, 2.45rem);
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.hero__rule {
  width: min(12rem, 55%);
  height: 1px;
  margin: 1.1rem auto;
  background: rgba(255, 255, 255, 0.85);
}

.hero__lead {
  margin: 0 0 1.75rem;
  font-size: clamp(0.95rem, 2.4vw, 1.2rem);
  line-height: 1.45;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--color-accent-dark);
}

.btn:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 3px;
}

/* ---------- Content sections ---------- */
.site-main {
  flex: 1 0 auto;
  width: 100%;
  overflow-x: clip;
}

.site-footer {
  flex: 0 0 auto;
  width: 100%;
  margin-top: auto;
  background: var(--color-footer);
  padding: 2.5rem 0;
  /* Avoid subpixel seam under footer on some displays */
  box-shadow: 0 1px 0 var(--color-footer);
}

.split {
  display: grid;
  gap: 1.75rem;
  padding: 3rem 0;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  align-items: center;
}

.split__media img {
  width: 100%;
  border-radius: 0;
}

.split__copy {
  text-align: center;
}

.split__copy h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  line-height: 1.2;
}

.split__kicker {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  color: var(--color-brown);
}

.split__copy p {
  margin: 0;
  color: var(--color-text);
}

.split__icon {
  width: 4.5rem;
  margin: 0 auto 1rem;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 4rem 0;
  }

  .split--reverse .split__copy {
    order: 2;
  }

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

/* ---------- Footer ---------- */
.site-footer__inner {
  display: flex;
  justify-content: center;
}

.site-footer img {
  width: clamp(10rem, 28vw, 14rem);
  height: auto;
  opacity: 0.95;
}

/* Kill common overflow culprits on small screens */
@media (max-width: 767px) {
  .split,
  .hero__content,
  .site-header__inner,
  .wrap {
    max-width: 100%;
  }
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 2rem, 0);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Subpages ---------- */
.page-hero {
  position: relative;
  height: clamp(14rem, 38vw, 22rem);
  overflow: hidden;
}

.page-hero__media,
.page-hero__shade {
  position: absolute;
  inset: 0;
}

.page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero__shade {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0.25)),
    rgba(75, 70, 57, 0.35);
  mix-blend-mode: multiply;
}

.page-shell {
  padding: 1.5rem 0 3.5rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin: 0 0 1.25rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.breadcrumbs a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.page-title {
  margin: 0 0 1.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.02em;
  color: #3d3d3d;
}

.about-photo {
  width: min(100%, 46rem);
  margin: 0 auto 1.75rem;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.page-content {
  max-width: 46rem;
  margin-inline: auto;
}

.page-content > *:first-child {
  margin-top: 0;
}

.page-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.page-content a.btn {
  color: var(--color-white);
  text-decoration: none;
}

/* Contact block (editable WP content) */
.kontakt-card {
  display: grid;
  gap: 1.25rem;
  justify-items: center;
  text-align: center;
}

.kontakt-card__photo {
  width: min(100%, 22rem);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

.kontakt-card p {
  margin: 0.35rem 0;
}

.kontakt-card strong {
  font-size: 1.05rem;
}

.hitta-intro {
  text-align: center;
  font-family: "DIN Next Slab", var(--font-body);
  color: var(--color-muted);
  margin: 0 0 1.5rem;
}

/* ---------- Stores map ---------- */
.stores {
  display: grid;
  gap: 1.25rem;
  max-width: 100%;
}

.stores__map {
  width: 100%;
  height: min(70vh, 34rem);
  min-height: 20rem;
  border-radius: 0.35rem;
  overflow: hidden;
  background: #e8e4de;
  z-index: 1;
}

.stores__count {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.stores__list {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stores__item {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(74, 74, 74, 0.14);
  background: #faf8f5;
}

.stores__item strong {
  font-family: var(--font-display);
}

.stores__item span {
  color: var(--color-muted);
  font-size: 0.92rem;
}

.stores__empty {
  padding: 2rem;
  text-align: center;
}

@media (min-width: 720px) {
  .stores__list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .stores__list {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Leaflet popup should not cause page overflow */
.leaflet-container {
  max-width: 100%;
  font: inherit;
}

/* ---------- Product page (butik) ---------- */
body:has(.product-accordions),
.site-main:has(.product-accordions) {
  background: #f3ebe0;
}

.page-shell:has(.product-accordions) {
  padding-bottom: 4rem;
}

.page-article:has(.product-accordions) .page-title {
  margin-bottom: 0;
  font-family: var(--font-title);
  font-size: clamp(2rem, 5vw, 2.85rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2f2a26;
}

.page-article:has(.product-accordions) .page-title::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 2px;
  margin: 0.85rem auto 0;
  background: var(--color-accent);
}

.page-content:has(.product-accordions) {
  max-width: 38rem;
}

.page-content:has(.product-accordions) > p:first-child {
  margin: 1.15rem 0 1.75rem;
  text-align: center;
  font-family: "DIN Next Slab", Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #4a433c;
}

/* ---------- Product accordions ---------- */
.product-accordions {
  display: grid;
  gap: 1rem;
  margin: 0 auto;
  overflow-anchor: none;
}

.product-accordion {
  border-radius: 1.15rem;
  background: #fffcf7;
  box-shadow:
    0 1px 2px rgba(74, 58, 42, 0.04),
    0 10px 28px rgba(74, 58, 42, 0.08);
  overflow: clip;
  overflow-anchor: none;
  transition: box-shadow 0.35s ease;
}

.product-accordion.is-open {
  box-shadow:
    0 1px 2px rgba(74, 58, 42, 0.05),
    0 14px 34px rgba(74, 58, 42, 0.11);
}

.product-accordion__trigger {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 1.2rem 1.35rem 1.15rem;
  border: 0;
  background: transparent;
  color: #2f2a26;
  cursor: pointer;
  text-align: left;
}

.product-accordion__heading {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.product-accordion__title {
  font-family: var(--font-title);
  font-size: clamp(1.2rem, 3.2vw, 1.45rem);
  letter-spacing: 0.03em;
  line-height: 1.15;
  text-transform: uppercase;
}

.product-accordion__summary {
  font-family: "DIN Next Slab", Georgia, serif;
  font-size: 0.98rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.4;
  color: #3f3832;
}

.product-accordion__chevron {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.15rem;
  color: #2f2a26;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-accordion.is-open .product-accordion__chevron {
  transform: rotate(180deg);
}

.product-accordion__panel {
  height: 0;
  opacity: 1;
  overflow: hidden;
}

.product-accordion__panel-inner {
  min-height: 0;
}

.product-accordion__list {
  margin: 0;
  padding: 0 1.35rem 1.2rem;
  list-style: none;
}

.product-accordion__list li {
  padding: 0.95rem 0;
  border-top: 1px solid rgba(74, 58, 42, 0.12);
}

.product-accordion__list li:first-child {
  padding-top: 0.35rem;
  border-top: 0;
}

.product-accordion__name {
  display: block;
  font-family: "Recoleta", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  text-transform: none;
  color: #2f2a26;
}

.product-accordion__desc {
  display: block;
  margin-top: 0.28rem;
  font-family: "DIN Next Slab", Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #5a534c;
}

.product-accordion__trigger:focus {
  outline: none;
}

.product-accordion__trigger:focus-visible {
  outline: 2px solid rgba(47, 42, 38, 0.35);
  outline-offset: 3px;
  border-radius: 0.35rem;
}

@media (max-width: 640px) {
  .product-accordion__trigger {
    padding: 1.05rem 1.1rem 1rem;
  }

  .product-accordion__list {
    padding: 0 1.1rem 1.05rem;
  }

  .product-accordion__summary {
    font-size: 0.92rem;
  }
}
