/*
Theme Name: Matvaruhuset
Theme URI: https://matvaruhuset.se/
Author: Matvaruhuset
Description: A focused Swedish B2B food wholesale theme for Matvaruhuset in Malmö.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: matvaruhuset
*/

:root {
  --forest: #123b2c;
  --forest-dark: #09271d;
  --leaf: #2d684e;
  --amber: #eea832;
  --amber-light: #f7c868;
  --cream: #f5f1e8;
  --cream-light: #fbfaf6;
  --ink: #14201a;
  --muted: #647068;
  --line: rgba(20, 32, 26, 0.14);
  --white: #ffffff;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1200px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream-light);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.admin-bar .site-header { top: 32px; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -100px;
  z-index: 9999;
  padding: .75rem 1rem;
  background: var(--white);
  color: var(--forest-dark);
  border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

.site-shell { overflow: hidden; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.section { padding: clamp(76px, 9vw, 132px) 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--leaf);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .15em;
  line-height: 1.3;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--amber); }
.eyebrow--light { color: #dbe8df; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.035em; line-height: 1.04; }
h1 { font-size: clamp(3.25rem, 7vw, 6.6rem); }
h2 { font-size: clamp(2.4rem, 5vw, 4.7rem); }
h3 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
.lead { max-width: 720px; color: var(--muted); font-size: clamp(1.05rem, 1.8vw, 1.25rem); }

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid var(--amber);
  border-radius: 999px;
  background: var(--amber);
  color: var(--forest-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover, .button:focus-visible { transform: translateY(-2px); background: var(--amber-light); border-color: var(--amber-light); }
.button--ghost { border-color: rgba(255,255,255,.45); background: transparent; color: var(--white); }
.button--ghost:hover, .button--ghost:focus-visible { background: var(--white); border-color: var(--white); color: var(--forest-dark); }

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,.18);
  color: var(--white);
}
body:not(.home) .site-header { background: var(--forest-dark); }
.header-inner { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; }
.brand img { width: 44px; height: 44px; }
.brand-name { font-family: var(--serif); font-size: 27px; letter-spacing: -.035em; }
.brand-name strong { color: var(--amber-light); font-weight: 400; }
.primary-nav { display: flex; align-items: center; gap: 30px; }
.primary-nav a { position: relative; color: rgba(255,255,255,.92); font-size: 14px; font-weight: 650; text-decoration: none; }
.primary-nav a:not(.button)::after { content: ""; position: absolute; right: 0; bottom: -7px; left: 0; height: 2px; background: var(--amber); transform: scaleX(0); transition: transform .2s ease; }
.primary-nav a:hover::after, .primary-nav a:focus-visible::after { transform: scaleX(1); }
.nav-toggle { display: none; width: 46px; height: 46px; padding: 0; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: transparent; color: var(--white); }
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { content: ""; display: block; width: 19px; height: 2px; margin: 4px auto; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }

.hero {
  position: relative;
  display: grid;
  min-height: 780px;
  align-items: end;
  isolation: isolate;
  padding: 190px 0 90px;
  background: var(--forest-dark);
  color: var(--white);
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("assets/images/hero-warehouse.webp") center / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4,25,18,.96) 0%, rgba(4,25,18,.87) 35%, rgba(4,25,18,.3) 72%, rgba(4,25,18,.12) 100%); }
.hero-content { max-width: 830px; }
.hero h1 { max-width: 820px; margin-bottom: 28px; }
.hero-copy { max-width: 610px; margin-bottom: 36px; color: rgba(255,255,255,.78); font-size: clamp(1.05rem, 1.7vw, 1.22rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; max-width: 760px; margin-top: 78px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.22); }
.proof-item { padding: 20px 22px; background: rgba(10,45,33,.72); backdrop-filter: blur(10px); }
.proof-item strong { display: block; margin-bottom: 3px; color: var(--amber-light); font-family: var(--serif); font-size: 23px; font-weight: 400; }
.proof-item span { color: rgba(255,255,255,.72); font-size: 13px; }

.intro { background: var(--cream-light); }
.intro-head { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; align-items: end; margin-bottom: 58px; }
.intro h2 { max-width: 740px; margin-bottom: 0; }
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.offer-card { min-height: 275px; padding: 38px 30px 34px; border-right: 1px solid var(--line); }
.offer-card:last-child { border-right: 0; }
.offer-icon { display: grid; width: 52px; height: 52px; place-items: center; margin-bottom: 58px; border: 1px solid var(--line); border-radius: 50%; color: var(--leaf); }
.offer-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.offer-card h3 { margin-bottom: 12px; }
.offer-card p { margin-bottom: 0; color: var(--muted); }

.assortment { background: var(--cream); }
.split { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(50px, 8vw, 105px); align-items: center; }
.media-frame { position: relative; min-height: 590px; overflow: hidden; border-radius: var(--radius); }
.media-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-frame::after { content: ""; position: absolute; width: 170px; height: 170px; right: -38px; bottom: -38px; border: 34px solid var(--amber); border-radius: 50%; opacity: .9; }
.assortment-copy h2 { margin-bottom: 25px; }
.check-list { display: grid; gap: 0; margin: 35px 0 40px; padding: 0; list-style: none; }
.check-list li { position: relative; padding: 18px 0 18px 38px; border-top: 1px solid var(--line); }
.check-list li:last-child { border-bottom: 1px solid var(--line); }
.check-list li::before { content: "✓"; position: absolute; left: 2px; color: var(--leaf); font-weight: 900; }

.process { background: var(--forest); color: var(--white); }
.process-head { display: grid; grid-template-columns: 1fr .75fr; gap: 80px; align-items: end; margin-bottom: 62px; }
.process-head h2 { max-width: 760px; margin-bottom: 0; }
.process-head p { margin-bottom: 0; color: rgba(255,255,255,.68); }
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: steps; }
.process-card { position: relative; min-height: 240px; padding: 32px; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); background: rgba(255,255,255,.035); counter-increment: steps; }
.process-card::before { content: "0" counter(steps); display: block; margin-bottom: 60px; color: var(--amber-light); font-family: var(--serif); font-size: 26px; }
.process-card h3 { margin-bottom: 12px; }
.process-card p { margin-bottom: 0; color: rgba(255,255,255,.68); }

.logistics { background: var(--white); }
.logistics .split { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.logistics .media-frame { min-height: 620px; order: 2; }
.logistics-copy { order: 1; }
.logistics-copy h2 { margin-bottom: 26px; }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.detail-card { padding: 20px; border: 1px solid var(--line); border-radius: 12px; }
.detail-card strong { display: block; margin-bottom: 6px; color: var(--forest); }
.detail-card span { color: var(--muted); font-size: 14px; }

.contact { position: relative; overflow: hidden; background: var(--amber); color: var(--forest-dark); }
.contact::after { content: "M"; position: absolute; right: -2vw; bottom: -13vw; color: rgba(255,255,255,.18); font-family: var(--serif); font-size: min(46vw, 620px); line-height: 1; }
.contact-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: 80px; align-items: end; }
.contact h2 { max-width: 780px; margin-bottom: 24px; }
.contact p { max-width: 650px; margin-bottom: 0; }
.contact-details { padding: 32px; border-left: 1px solid rgba(9,39,29,.3); }
.contact-details p { margin-bottom: 18px; }
.contact-details strong { display: block; margin-bottom: 4px; font-size: 12px; letter-spacing: .13em; text-transform: uppercase; }
.contact-details a { font-family: var(--serif); font-size: clamp(1.35rem, 2vw, 1.75rem); text-decoration-thickness: 1px; text-underline-offset: 5px; }

.site-footer { background: var(--forest-dark); color: rgba(255,255,255,.7); }
.footer-main { display: grid; grid-template-columns: 1.4fr .7fr .9fr; gap: 60px; padding: 70px 0 54px; }
.footer-brand p { max-width: 430px; margin: 22px 0 0; }
.footer-title { margin-bottom: 17px; color: var(--white); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.footer-links { display: grid; gap: 10px; }
.footer-links a { width: fit-content; text-decoration: none; }
.footer-links a:hover { color: var(--amber-light); }
.footer-bottom { display: flex; justify-content: space-between; gap: 25px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; }

.entry-shell { min-height: 65vh; padding: 170px 0 100px; }
.entry-shell h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); }

@media (max-width: 920px) {
  body.admin-bar .site-header { top: 46px; }
  .nav-toggle { display: block; }
  .primary-nav { position: absolute; top: 94px; right: 20px; left: 20px; display: none; align-items: stretch; flex-direction: column; gap: 0; padding: 15px; border-radius: 14px; background: var(--cream-light); box-shadow: 0 22px 70px rgba(0,0,0,.24); color: var(--ink); }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 13px 14px; color: var(--ink); }
  .primary-nav a:not(.button)::after { display: none; }
  .primary-nav .button { margin-top: 8px; }
  .hero { min-height: 720px; }
  .hero::after { background: linear-gradient(90deg, rgba(4,25,18,.95), rgba(4,25,18,.68)); }
  .intro-head, .process-head, .contact-inner { grid-template-columns: 1fr; gap: 25px; }
  .split, .logistics .split { grid-template-columns: 1fr; }
  .media-frame { min-height: 470px; }
  .logistics .media-frame { min-height: 480px; order: 1; }
  .logistics-copy { order: 2; }
  .footer-main { grid-template-columns: 1.2fr .8fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .header-inner { min-height: 78px; }
  .brand img { width: 39px; height: 39px; }
  .brand-name { font-size: 23px; }
  .primary-nav { top: 78px; right: 14px; left: 14px; }
  .hero { min-height: 760px; padding: 155px 0 58px; background-position: 60% center; }
  .hero h1 { font-size: clamp(3rem, 14vw, 4.3rem); }
  .hero-proof { grid-template-columns: 1fr; margin-top: 52px; }
  .proof-item { padding: 15px 17px; }
  .offer-grid, .process-grid { grid-template-columns: 1fr; }
  .offer-card { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .offer-card:last-child { border-bottom: 0; }
  .offer-icon { margin-bottom: 38px; }
  .media-frame, .logistics .media-frame { min-height: 390px; }
  .detail-list { grid-template-columns: 1fr; }
  .contact-details { padding: 28px 0 0; border-top: 1px solid rgba(9,39,29,.3); border-left: 0; }
  .footer-main { grid-template-columns: 1fr; gap: 38px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
}

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