/* ===== Fonts (self-hosted, SIL Open Font License) ===== */
@font-face {
  font-family: "Special Elite";
  src: url("/assets/fonts/special-elite.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===== Design tokens: change the look of the whole site here ===== */
:root {
  --color-bg: #ffffff;
  --color-text: #2b2b2b;
  --color-muted: #6b6b6b;
  --color-link: #3f6b2a;
  --color-accent: #3f6b2a;
  --color-accent-text: #ffffff;
  --color-surface: #f5f3ee;
  --color-border: #e2ded5;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Special Elite", "American Typewriter", "Courier New", monospace;
  --max-width: 52rem;
  --gutter: 1rem;
  --radius: 6px;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
body { margin: 0; font: 1.0625rem/1.65 var(--font-body); color: var(--color-text); background: var(--color-bg); }
a { color: var(--color-link); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; line-height: 1.25; }
h1 { font-size: 2rem; margin: 1.5rem 0 1rem; }
h2 { font-size: 1.5rem; margin: 2rem 0 .5rem; }
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: var(--gutter); background: var(--color-bg); padding: .5rem; z-index: 10; }

/* ===== Header / nav ===== */
.site-header { border-bottom: 1px solid var(--color-border); background: var(--color-surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: .75rem; padding-bottom: .75rem; }
.logo img { height: 56px; width: auto; }
nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
nav a { font-family: var(--font-heading); text-decoration: none; color: var(--color-text); padding: .25rem 0; border-bottom: 2px solid transparent; }
nav a:hover { border-bottom-color: var(--color-border); }
nav a[aria-current="page"] { border-bottom-color: var(--color-accent); }
@media (max-width: 40rem) {
  .site-header .wrap { flex-direction: column; gap: .5rem; }
  nav { flex-wrap: nowrap; justify-content: space-between; width: 100%; gap: 0 .25rem; font-size: min(1rem, 3.5vw); }
  nav a { padding: .5rem 0; }
}

/* ===== Content ===== */
main { padding-bottom: 3rem; }
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.photos img { border-radius: var(--radius); width: 100%; }
.timestamp { max-width: 100%; border-radius: var(--radius); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Gårdsbutik */
.notice { background: var(--color-surface); border-left: 4px solid var(--color-accent); border-radius: var(--radius); padding: .9rem 1.1rem; }
.stock-note { color: var(--color-muted); font-size: .95rem; margin: 1.5rem 0 2rem; }
.stock-note p { margin: 0 0 .5rem; }
.card, .panel { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem; margin: 1.5rem 0; }
.product { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.product-body > :first-child { margin-top: 0; }
.product-photo { margin: 0; }
.product-photo img { border-radius: var(--radius); width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
@media (min-width: 40rem) { .product { grid-template-columns: 13rem 1fr; } }
.panel h2 { margin-top: 0; }
.prices { width: 100%; border-collapse: collapse; margin: 1.25rem 0 0; border-top: 2px solid var(--color-accent); }
.prices td { padding: .5rem 0; border-bottom: 1px solid var(--color-border); }
.prices td:last-child { text-align: right; font-weight: 600; color: var(--color-accent); font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 1rem; }

/* Kontakt */
.contact-grid, .card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.contact-grid .card, .card-grid .card { margin: 0; }
.contact-grid h2, .card-grid h2 { font-size: 1.25rem; margin: 0 0 .5rem; }
.contact-grid p, .contact-grid address, .card-grid p { margin: 0 0 .5rem; font-style: normal; }
.contact-grid ul { list-style: none; margin: 0; padding: 0; }
.contact-grid > .card > :last-child, .card-grid > .card > :last-child { margin-bottom: 0; }

/* Slakteri */
.lead { font-size: 1.15rem; }
.hero-photo { margin: 1.5rem 0; }
.hero-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.photos-3 img { aspect-ratio: 4 / 3; object-fit: cover; }
.notice-eu { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.5rem 2rem; margin: 2rem 0; background: #fff; border: 1px solid var(--color-border); }
.notice-eu > div { flex: 1 1 18rem; }
.notice-eu h2 { font-size: 1.25rem; margin: 0 0 .5rem; }
.notice-eu p { margin: 0 0 .5rem; }
.notice-eu .eu-logo { width: 100%; max-width: 18rem; height: auto; background: #fff; }

/* Köttlådor */
.cut-list { list-style: none; columns: 3; column-gap: 2rem; margin: 1rem 0 1.5rem; padding: .5rem 1.25rem; background: var(--color-surface); border: 1px solid var(--color-border); border-top: 3px solid var(--color-accent); border-radius: var(--radius); }
.cut-list li { break-inside: avoid; position: relative; padding: .55rem 0 .55rem 1.5rem; font-weight: 600; }
.cut-list li::before { content: ""; position: absolute; left: .2rem; top: 50%; width: .5rem; height: .5rem; margin-top: -.25rem; border-radius: 50%; background: var(--color-accent); }
@media (max-width: 36rem) { .cut-list { columns: 2; } }
@media (max-width: 24rem) { .cut-list { columns: 1; } }
.box-option h3 { margin: 0 0 .5rem; }
.box-price { font-size: 1.5rem; font-weight: 600; color: var(--color-accent); margin: 1rem 0 0 !important; }
.notice { margin: 1.5rem 0; }
.notice > :last-child { margin-bottom: 0; }
.notice > :first-child { margin-top: 0; }

/* Startsida */
.hero { position: relative; margin: 1rem 0 1.5rem; border-radius: var(--radius); overflow: hidden; background: #222; }
.hero img { width: 100%; aspect-ratio: 16 / 9; min-height: 18rem; object-fit: cover; object-position: center 75%; }
.hero-text { position: absolute; inset: auto 0 0 0; padding: 3rem 1.5rem 1.5rem; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0)); }
.hero-text p { margin: 0 0 1rem; font-size: 1.25rem; max-width: 36rem; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 0 !important; }
.button:hover { background: #2f541f; }
.button.button-light { background: #fff; color: var(--color-text); }
.button.button-light:hover { background: var(--color-surface); }
.card-grid-photos .card { overflow: hidden; padding: 0 0 1.25rem; }
.card-grid-photos .card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 1rem; }
.card-grid-photos .card h2, .card-grid-photos .card p { padding: 0 1.25rem; }
.split { display: grid; gap: 1.5rem; align-items: start; }
.split p:first-child { margin-top: 0; }
.split-photos img { width: 100%; border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 40rem) { .split { grid-template-columns: 3fr 2fr; } }
.news { margin-top: 2rem; }
.news h2 { margin-top: 0; }
.social { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin: 2rem 0 0; padding: 1.5rem; border-radius: var(--radius); background: #2b2b2b; color: #fff; }
.social > div { flex: 1 1 16rem; }
.social h2 { margin: 0 0 .25rem; font-size: 1.35rem; }
.social p { margin: 0; color: #ddd; }
.button.button-instagram { display: inline-flex; align-items: center; gap: .6rem; padding: .8rem 1.4rem; font-weight: 600; background: linear-gradient(45deg, #f09433, #dc2743 55%, #bc1888); color: #fff; }
.button.button-instagram:hover { background: linear-gradient(45deg, #dc7f1f, #c4163a 55%, #a3127a); }
.button.button-facebook { display: inline-flex; align-items: center; gap: .6rem; padding: .8rem 1.4rem; font-weight: 600; background: #1877f2; color: #fff; }
.button.button-facebook:hover { background: #1664d0; }
.social-links { display: grid; gap: .75rem; }

/* Buttons & forms */
.button, button { display: inline-block; background: var(--color-accent); color: var(--color-accent-text); border: 0; border-radius: var(--radius); padding: .6rem 1.2rem; font: inherit; text-decoration: none; cursor: pointer; }
.newsletter { display: grid; gap: 1rem; max-width: 24rem; }
.newsletter label { display: grid; gap: .3rem; }
.newsletter .label-text { font-size: .95rem; font-weight: 600; }
.newsletter .req { color: var(--color-accent); }
.newsletter input, .newsletter select { font: inherit; width: 100%; padding: .6rem .75rem; background: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--radius); }
.newsletter select { appearance: none; padding-right: 2.5rem; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; }
.newsletter input:focus, .newsletter select:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; border-color: var(--color-accent); }
.newsletter button { justify-self: start; padding: .65rem 1.5rem; }
.newsletter button:hover { filter: brightness(1.1); }
.hp { position: absolute; left: -5000px; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-muted); padding: 1.5rem 0; text-align: center; font-size: .9rem; }

/* Cards with the photo as background and the text on top */
.card-grid-overlay .card { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 18rem; min-width: 0; padding: 1.25rem; border: 0; color: #fff; }
.card-grid-overlay .card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-grid-overlay .card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, .35) 55%, transparent); }
.card-grid-overlay .card > h2, .card-grid-overlay .card > h3, .card-grid-overlay .card > p { position: relative; z-index: 1; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.card-grid-overlay .card > h2, .card-grid-overlay .card > h3 { margin-top: 0; }
.card-grid-overlay .card a { color: #fff; text-decoration: underline; }

/* Hero on phones: text below the photo so the animals stay visible */
@media (max-width: 40rem) {
  .hero img { aspect-ratio: 4 / 3; min-height: 0; object-position: center 80%; }
  .hero-text { position: static; padding: 1.25rem 1rem 1.5rem; background: none; }
}

/* Contact cards */
.contact-grid .card { border-top: 4px solid var(--color-accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.contact-grid .social-links .button { display: inline-flex; align-items: center; gap: .6rem; padding: .8rem 1.4rem; font-weight: 600; }
.contact-grid address { line-height: 1.5; margin-bottom: .75rem; }
