/* Broströms Gröna — single stylesheet. System fonts only (no Google Fonts: GDPR). */

:root {
  --green-900: #204035;
  --green-700: #4a6b55;
  --green-100: #e8efe6;
  --sand-50: #faf8f3;
  --earth: #8a5a32; /* darkened from #a8754a: ≥4.5:1 on --sand-50 for small text */
  --ink: #23302a;
  --muted: #5d6b63;
  --radius: 14px;
  --wrap: 68rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  font: 1.0625rem/1.65 var(--sans);
  color: var(--ink);
  background: var(--sand-50);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-underline-offset: .2em; } /* keeps "_" in @brostroms_grona visible */
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; color: var(--green-900); margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgb(250 248 243 / .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgb(32 64 53 / .1);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4rem; }
.logo { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--green-900); text-decoration: none; white-space: nowrap; }
.logo__mark { height: 2.5rem; width: auto; }
.topbar nav { display: flex; gap: clamp(.75rem, 3vw, 1.75rem); }
.topbar nav a { color: var(--ink); text-decoration: none; font-size: .95rem; white-space: nowrap; }
.topbar nav a:hover { color: var(--green-700); }

/* Hero */
.hero { padding: clamp(2.5rem, 8vw, 6rem) 0; }
.hero__inner { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 50rem) { .hero__inner { grid-template-columns: 1.2fr 1fr; } }
.hero__text > p:not(.badge) { font-size: 1.15rem; color: var(--muted); max-width: 36rem; }
.hero__img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

.cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1rem; }
.btn {
  display: inline-block; padding: .8rem 1.4rem; border-radius: 999px;
  border: 2px solid var(--green-900); color: var(--green-900);
  text-decoration: none; font-weight: 600;
}
.btn--primary { background: var(--green-900); color: #fff; }
.btn:hover { filter: brightness(1.15); }
.badge { display: inline-block; font-size: .9rem; color: var(--earth); font-weight: 600; }

/* Sections */
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section--tint { background: var(--green-100); }
.prose { max-width: 40rem; }

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card {
  background: #fff; border-radius: var(--radius); padding: 1.5rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 4px 16px rgb(32 64 53 / .06);
}
.card p:last-child { margin: 0; color: var(--muted); }

.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 50rem) { .split { grid-template-columns: 1fr 1.4fr; } }
.portrait { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; font-size: 1.15rem; }
.contact-list li { display: flex; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid rgb(32 64 53 / .12); }
.contact-list span { flex: none; width: 5.5rem; color: var(--muted); font-size: .95rem; padding-top: .15rem; } /* fixed column: never squeezed by a long value */
.contact-list a { overflow-wrap: anywhere; } /* last resort (e.g. large system font): wrap rather than overflow */

/* FAQ: native <details> fold-outs, no JS */
.faq { margin-top: 1.5rem; border-top: 1px solid rgb(32 64 53 / .15); }
.faq details { border-bottom: 1px solid rgb(32 64 53 / .15); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 0; cursor: pointer; list-style: none;
  font-family: var(--serif); font-weight: 700; font-size: 1.12rem; line-height: 1.3; color: var(--green-900);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { /* "+" that turns into "×" when open */
  content: "+"; flex: none; font: 400 1.6rem/1 var(--sans); color: var(--green-700);
  transition: transform .2s;
}
.faq details[open] > summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--green-700); }
.faq summary:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; border-radius: 4px; }
.faq__answer { padding: 0 2rem 1.1rem 0; }
.faq__answer p:last-child { margin-bottom: 0; }
/* Smooth open/close where supported (Chrome/Edge 131+); elsewhere it just snaps open */
@media (prefers-reduced-motion: no-preference) {
  @supports (interpolate-size: allow-keywords) {
    .faq details { interpolate-size: allow-keywords; }
    .faq details::details-content { height: 0; overflow: clip; transition: height .25s ease, content-visibility .25s allow-discrete; }
    .faq details[open]::details-content { height: auto; }
  }
}

/* Footer */
.footer { background: var(--green-900); color: var(--green-100); padding: 2.5rem 0; font-size: .95rem; }
.footer a { color: #fff; }
.footer p { margin: .25rem 0; }
.footer__meta { opacity: .75; font-size: .85rem; }
.footer__meta span { white-space: nowrap; } /* wrap between items, never inside one */
/* B-mark with the name set in the header's serif underneath */
.footer__brand { display: inline-flex; flex-direction: column; align-items: center; gap: .5rem; margin-bottom: 1.25rem; }
.footer__brand img { height: 5rem; width: auto; filter: brightness(0) invert(1); opacity: .92; } /* dark green → white */
.footer__brand span { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: #fff; line-height: 1.1; }

/* --- Grass on top of the footer ----------------------------------------------
   footer-grass-tidy.svg (480×36, tiles seamlessly) is white-on-transparent; used as
   a mask so it takes the footer green. Absolutely positioned above the footer's top
   edge: takes no space, so the layout is unchanged. z-index -1 puts it behind the
   page content above. --grass-h sets the height; tile width follows the 40:3 ratio. */
.footer { position: relative; }
.footer::before {
  --grass-h: clamp(2.25rem, 3vw, 2.75rem);
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); /* 1px overlap: no hairline gap */
  height: var(--grass-h); z-index: -1; pointer-events: none;
  background: var(--green-900);
  -webkit-mask: url("/img/footer-grass-tidy.svg") repeat-x center bottom / auto var(--grass-h);
          mask: url("/img/footer-grass-tidy.svg") repeat-x center bottom / auto var(--grass-h);
}
/* --- end grass ---------------------------------------------------------------- */

@media (max-width: 30rem) {
  .logo { font-size: 1.05rem; gap: .4rem; }
  .logo__mark { height: 2rem; }
  .topbar nav a { font-size: .85rem; }
}
/* Narrow phones (≤ 384px: 375px iPhones, 360px Androids, 320px iPhone SE 1st gen): tighten the top bar so it fits on one line */
@media (max-width: 24rem) {
  .topbar .wrap { padding: 0 .85rem; }
  .topbar__inner { gap: .5rem; }
  .logo { font-size: .95rem; gap: .3rem; }
  .logo__mark { height: 1.75rem; }
  .topbar nav { gap: .65rem; }
  .topbar nav a { font-size: .8rem; }
  .contact-list { font-size: 1.05rem; }
  .contact-list li { gap: .75rem; }
}
@media (max-width: 21rem) { /* ≤ 336px */
  .topbar .wrap { padding: 0 .7rem; }
  .logo { font-size: .88rem; }
  .logo__mark { height: 1.6rem; }
  .topbar nav { gap: .5rem; }
  .topbar nav a { font-size: .75rem; }
  .contact-list { font-size: .95rem; }
  .contact-list li { gap: .6rem; }
  .contact-list span { width: 5rem; }
}
