/* evfl.se – design B "Fias färger".
   Palette taken from Fia herself: brindle brown, fawn and a warm off-white.
   Layout: dark split hero (text | photo), light content sections, dark footer. */
:root {
  --brindle: #3a2a1f;      /* dark brown: header, hero, footer */
  --brindle-deep: #2b1f17; /* footer, body text */
  --fawn: #e0a96d;         /* accent: buttons, highlights */
  --fawn-soft: #f3e2cc;    /* price box, soft panels */
  --cream: #fbf6ef;        /* page background */
  --sand: #eadbc8;         /* borders */
  --ink: #2b1f17;
  --ink-muted: #6b5747;
  --on-dark: #f5e6d3;
  --white: #fff;

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius: 18px;
  --wrap: 1120px;
  --gutter: max(16px, 4vw);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--fawn);
  outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.08; text-wrap: balance; margin: 0; }
h1 { font-weight: 800; letter-spacing: -0.015em; font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
h2 { font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.1rem); }
p { margin: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.section { padding-block: clamp(40px, 6vw, 72px); display: grid; gap: 22px; }
.section + .section { padding-top: 0; }
.prose { display: grid; gap: 16px; max-width: 64ch; }
.lead-dark { font-size: 1.22rem; font-weight: 700; line-height: 1.5; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--white); color: var(--ink); padding: 8px 12px; border-radius: 8px; }

/* ---------- header ---------- */
.site-header { background: var(--brindle); color: var(--on-dark); position: relative; z-index: 2; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 0.98rem; }
.site-nav a { text-decoration: none; padding-block: 6px; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--fawn); }
.site-nav a[aria-current="page"] { color: var(--fawn); border-bottom-color: var(--fawn); }
.menu-btn { display: none; }

@media (max-width: 820px) {
  .menu-btn {
    display: inline-block; font: inherit; font-weight: 700; color: var(--on-dark);
    background: transparent; border: 1px solid #f5e6d355; border-radius: 999px; padding: 6px 14px; cursor: pointer;
  }
  /* The open menu sits inside the header and pushes the page down,
     so it never covers the hero text or its button. */
  .header-row { flex-wrap: wrap; }
  .site-nav {
    display: none; flex-basis: 100%; flex-direction: column; gap: 0;
    padding: 0 0 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding-block: 12px; border-bottom: 1px solid #f5e6d322; }
  /* Without JS the menu stays visible so navigation always works. */
  .no-js .site-nav { display: flex; }
  .no-js .menu-btn { display: none; }
}

/* ---------- buttons & links ---------- */
.btn {
  display: inline-block; justify-self: start; text-decoration: none; cursor: pointer;
  font: 700 1rem/1 var(--body); padding: 14px 22px; border-radius: 999px; border: 0;
  background: var(--fawn); color: var(--brindle-deep);
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { background: #e8b884; transform: translateY(-1px); }
.btn-dark { background: var(--brindle); color: var(--on-dark); }
.btn-dark:hover { background: var(--brindle-deep); }
.more { font-weight: 700; color: var(--brindle); }
.more::after { content: " →"; }
.row-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }

/* ---------- hero (home) ---------- */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; background: var(--brindle); color: var(--on-dark);
}
.hero-text {
  display: grid; gap: 20px; align-content: center;
  padding: clamp(36px, 6vw, 80px) max(var(--gutter), env(safe-area-inset-left, 0px));
  max-width: 620px; justify-self: end; width: 100%;
}
.hero h1 em { font-style: normal; color: var(--fawn); }
.hero .lead { font-size: 1.15rem; max-width: 46ch; }
.hero-img { min-height: 320px; }
.hero-img picture, .hero-img img { height: 100%; width: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-text { justify-self: stretch; max-width: none; }
  .hero-img { min-height: 0; aspect-ratio: 4 / 3; }
}

/* ---------- page head (sub pages) ---------- */
.page-head { background: var(--brindle); color: var(--on-dark); }
.page-head-row { padding-block: clamp(28px, 5vw, 56px); }

/* ---------- cards ---------- */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
@media (max-width: 820px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }
.cards li {
  background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius);
  padding: 18px 20px; display: grid; gap: 4px; align-content: start;
}
.cards strong { font-family: var(--display); font-size: 1.15rem; }
.cards span { color: var(--ink-muted); }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li {
  background: var(--white); border: 1px solid var(--sand); border-radius: 14px;
  padding: 12px 16px 12px 46px; position: relative;
}
.checklist li::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  border-radius: 50%; background: var(--fawn);
}

/* ---------- media ---------- */
.split-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(24px, 4vw, 48px); align-items: center; }
.split-2 > * { min-width: 0; }
.align-start { align-items: start; }
.framed { border-radius: var(--radius); overflow: hidden; }
.framed img { width: 100%; object-fit: cover; }

.photo-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;
}
.photo-grid li { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--sand); }
.photo-grid picture, .photo-grid img { width: 100%; height: 100%; object-fit: cover; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.video { margin: 0; display: grid; gap: 8px; }
.video figcaption { font-weight: 700; }
.video-play, .video iframe {
  display: block; position: relative; aspect-ratio: 16 / 9; width: 100%;
  border-radius: var(--radius); overflow: hidden; background: var(--brindle-deep); border: 0;
}
.video-play img { width: 100%; height: 100%; object-fit: cover; }
.play-badge {
  position: absolute; inset: 50% auto auto 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px;
  border-radius: 50%; background: var(--fawn); box-shadow: 0 6px 24px #0005;
}
.play-badge::after {
  content: ""; position: absolute; left: 27px; top: 22px;
  border-left: 20px solid var(--brindle-deep); border-top: 12px solid transparent; border-bottom: 12px solid transparent;
}
.video-play:hover .play-badge { transform: scale(1.06); }

/* ---------- call to action band ---------- */
.band-dark { background: var(--brindle); color: var(--on-dark); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 36px; }
.cta-text { font-family: var(--display); font-weight: 800; font-size: clamp(1.3rem, 2.6vw, 1.8rem); }

/* ---------- contact ---------- */
.signature { font-family: var(--display); font-weight: 800; font-size: 1.3rem; }
.price-box { background: var(--fawn-soft); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 4px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: grid; align-content: start; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.contact-list.on-light { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }


/* ---------- footer ---------- */
.site-footer { background: var(--brindle-deep); color: var(--on-dark); padding-block: 40px 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.footer-title { font-family: var(--display); font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; }
.contact-list strong { font-weight: 700; }
.footer-small { margin-top: 28px; font-size: 0.85rem; opacity: 0.7; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.footer-small a { text-decoration: none; }
.footer-small a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Fia berättar: article list, article page, share button */
.page-sub { margin: 10px 0 0; font-size: 1.1rem; color: var(--on-dark); }
.page-sub a { color: var(--fawn); font-weight: 700; }
/* Topic filter */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  text-decoration: none; font-weight: 700; font-size: 0.95rem; padding: 8px 16px;
  border-radius: 999px; border: 1px solid var(--sand); background: var(--white);
}
.chip:hover { border-color: var(--fawn); }
.chip[aria-current="page"] { background: var(--brindle); border-color: var(--brindle); color: var(--on-dark); }

/* Article cards: the newest is featured full width, photo beside the text */
.story-card { display: grid; gap: 14px; align-content: start; }
.story-card-img { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.story-card-img picture, .story-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.story-card:hover .story-card-img img { transform: scale(1.03); }
.story-card-text { display: grid; gap: 10px; align-content: center; }
.story-card time { color: var(--ink-muted); font-size: 0.95rem; }
.story-card h2 { font-size: 1.4rem; }
.story-card h2 a { text-decoration: none; }
.story-card h2 a:hover { text-decoration: underline; }
.story-card p { margin: 0; }
.story-card.featured {
  background: var(--white); border-radius: calc(var(--radius) + 6px); padding: clamp(14px, 2vw, 22px);
  box-shadow: 0 1px 0 var(--sand), 0 12px 32px -18px #3a2a1f55;
}
.story-card.featured .story-card-text { padding: 4px clamp(4px, 2vw, 24px); }
@media (min-width: 760px) {
  .story-card.featured { grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 48px); }
  .story-card.featured h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
  .story-card.featured p { font-size: 1.1rem; }
}
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 28px; margin-top: 12px; }
.story-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.story-topics a {
  font-size: 0.85rem; font-weight: 700; text-decoration: none; padding: 3px 10px;
  border-radius: 999px; background: var(--fawn-soft); color: var(--brindle);
}
.story-topics a:hover { background: var(--fawn); }
.narrow { max-width: 760px; }
.story { max-width: 760px; }
.story .prose h2 { font-size: 1.35rem; margin-top: 12px; }
.story .prose p { margin: 0; }
/* Extra photos and films inside an article; photos not placed in the text form a gallery at the end */
.story-figure { margin: 4px 0; display: grid; gap: 6px; }
.story-figure a { display: block; border-radius: 14px; overflow: hidden; background: var(--sand); }
.story-figure img { display: block; width: 100%; height: auto; }
.story-figure figcaption { font-size: 0.95rem; color: var(--ink-muted); }
.story .prose .video { margin: 4px 0; }
.story-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 12px; margin-top: 8px; }
.story-gallery .story-figure { margin: 0; align-content: start; }
.story-gallery .story-figure a { aspect-ratio: 1; }
.story-gallery .story-figure img { height: 100%; object-fit: cover; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-muted); margin: 0; }
.story-tools { display: grid; gap: 20px; border-top: 1px solid var(--sand); padding-top: 22px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.share-status { font-weight: 700; color: #2f6b3a; }
.share-link { flex-basis: 100%; margin: 0; font-size: 0.95rem; color: var(--ink-muted); overflow-wrap: anywhere; }
.no-js .share-btn { display: none; }
.mail-list { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; }
.price-box p { margin: 0; }

/* Note under an e-mail address that does not work yet */
.pending-note { display: block; font-size: 0.85rem; font-style: italic; opacity: 0.8; }

/* Share button on each article card in the list */
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.share-small {
  font: 700 0.9rem/1 var(--body); color: var(--brindle); background: transparent; cursor: pointer;
  border: 1px solid var(--sand); border-radius: 999px; padding: 8px 14px;
}
.share-small:hover { border-color: var(--fawn); background: var(--fawn-soft); }
.card-actions .share-status { flex-basis: 100%; font-size: 0.9rem; overflow-wrap: anywhere; }
.card-actions .share-status:empty { display: none; }

/* "Få notis om nya berättelser" (site.js shows it where notifications work) */
.push-box { display: grid; gap: 10px; justify-items: start; margin-top: 28px; padding: 20px 22px; border: 1px solid var(--sand); border-radius: var(--radius); background: var(--white); }
.push-box[hidden], .push-box [hidden] { display: none; }
.push-box p { margin: 0; }
.push-status:empty { display: none; }
.push-status { font-weight: 700; color: #2f6b3a; }
.push-status.err { color: #a23b2a; }
.push-note { font-size: 0.9rem; color: var(--ink-muted); }
.story-tools .push-box { margin-top: 0; }
