/* ============================================================
   Insamlingssidan: En robot till gräsmattan i Brålanda
   Mobilen först. Lugn grön skala, varm accent för Ge en gåva.
   ============================================================ */
:root {
  --bg: #f5f6ee;
  --paper: #fffef9;
  --ink: #17301f;
  --ink-soft: #46594b;
  --green: #2f6b3a;
  --leaf: #e2edd3;
  --leaf-deep: #c8dfae;
  --accent: #d4401c;
  --accent-dark: #a02e0f;
  --yellow: #ffd34d;
  --line: rgba(23, 48, 31, 0.14);
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Fraunces', Georgia, serif;
  --gutter: 20px;
  --wide: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; line-height: 1.05; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(30px, 7.4vw, 46px); }
p { margin: 0 0 1em; }
[id] { scroll-margin-top: 16px; }

.kicker {
  margin: 0 0 10px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--green);
}
.kicker-light { color: rgba(255, 255, 255, 0.85); }
.kicker-yellow { color: var(--yellow); }

.placeholder {
  padding: 2px 8px;
  border: 1.5px dashed #c08a1a;
  border-radius: 8px;
  background: #fff6d6;
  color: #7a5200;
  font-size: 15px;
}

/* ---------- Knappar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px;
  padding: 14px 28px;
  border: 0; border-radius: 999px;
  font: 700 18px/1.15 var(--sans);
  text-decoration: none; text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(2px); }
.btn-give { background: var(--accent); color: #fff; box-shadow: 0 4px 0 var(--accent-dark), 0 12px 24px rgba(212, 64, 28, 0.28); }
.btn-give:hover { background: #e04a25; }
.btn-glass { background: rgba(255, 255, 255, 0.16); color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn-play { background: var(--yellow); color: var(--ink); box-shadow: 0 5px 0 #c99a12; font-size: 21px; min-height: 64px; padding: 16px 44px; }
.btn-small { min-height: 42px; padding: 9px 18px; font-size: 15px; box-shadow: 0 3px 0 var(--accent-dark); }
.btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* ---------- Sidhuvud över bilden ---------- */
.top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--gutter) 0;
}
.top-logo { display: block; flex: none; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.94); }
.top-logo img { width: auto; height: 20px; max-width: none; }
@media (min-width: 430px) { .top-logo { padding: 9px 12px; } .top-logo img { height: 26px; } }
@media (max-width: 349px) { .top .btn-small { padding: 9px 11px; font-size: 14px; } .top-logo img { height: 17px; } }
.top-nav { display: flex; flex: none; align-items: center; gap: 8px; }
.btn-home { background: rgba(255, 255, 255, 0.94); color: var(--ink); padding-left: 16px; padding-right: 16px; }
.btn-home:hover { background: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 600px; min-height: min(92svh, 860px);
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}
.hero-img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero-shade {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(180deg, rgba(15, 34, 21, 0.38) 0%, rgba(15, 34, 21, 0) 22%, rgba(15, 34, 21, 0.1) 42%, rgba(15, 34, 21, 0.86) 78%, rgba(15, 34, 21, 0.96) 100%);
}
.hero-text {
  position: relative;
  width: 100%; max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter) 92px;
}
.hero h1 { font-size: clamp(42px, 12.5vw, 88px); font-weight: 700; max-width: 12ch; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3); }
.hero-lede { max-width: 34em; margin: 16px 0 22px; font-size: clamp(17px, 4.4vw, 21px); line-height: 1.45; color: rgba(255, 255, 255, 0.92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { flex: 1 1 200px; max-width: 320px; }

/* ---------- Termometern ---------- */
.thermo-wrap { position: relative; z-index: 2; margin-top: -56px; padding: 0 12px; }
.thermo {
  --p: 0;
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 20px 22px;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 2px 0 rgba(23, 48, 31, 0.06), 0 24px 60px rgba(23, 48, 31, 0.18);
  text-align: center;
}
.thermo-amount { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(54px, 17vw, 96px); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.thermo-kr { font-size: 0.42em; letter-spacing: 0; color: var(--green); }
.thermo-of { margin: 6px 0 0; font-size: 18px; color: var(--ink-soft); }

.lawnbar { position: relative; height: 84px; margin: 44px 6px 0; }
.lawnbar-clip { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; border-radius: 0 0 18px 18px; }
/* högt gräs: det som återstår */
.lawnbar-tall {
  position: absolute; top: 0; bottom: 0; right: 0;
  left: calc(var(--p) * 1%);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='22'%3E%3Cpath d='M0 22L3 5l3 17zM5 22L9 0l4 22zM12 22l3-14 4 14zM18 22l4-19 4 19z' fill='%232f6b3a'/%3E%3C/svg%3E") repeat-x top left / 26px 22px,
    linear-gradient(#2f6b3a, #24562d) no-repeat 0 21px / 100% 100%;
  transition: left 2.2s cubic-bezier(0.22, 1, 0.36, 1);
}
/* klippt gräs: det som är insamlat */
.lawnbar-mown {
  position: absolute; left: 0; bottom: 0;
  width: calc(var(--p) * 1%); height: 52px;
  background: repeating-linear-gradient(90deg, #a6d366 0 20px, #8fc152 20px 40px);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.25);
  transition: width 2.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.lawnbar::after { /* marklinje */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  border-radius: 0 0 18px 18px; background: rgba(23, 48, 31, 0.18);
}
.lawnbar-robot {
  position: absolute; bottom: 20px; z-index: 2;
  left: clamp(30px, calc(var(--p) * 1%), calc(100% - 30px));
  width: 72px; margin-left: -36px;
  transition: left 2.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.lawnbar-robot svg { display: block; animation: idle 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.is-moving .lawnbar-robot svg { animation: drive 0.28s linear infinite; }
.robot-led { animation: led 1.6s ease-in-out infinite; }
@keyframes idle { 50% { transform: translateY(-2px) rotate(-1.5deg); } }
@keyframes drive { 50% { transform: translateY(-1.5px) rotate(1.5deg); } }
@keyframes led { 50% { opacity: 0.35; } }
.lawnbar-flag {
  position: absolute; right: -4px; top: -30px; z-index: 1;
  padding: 3px 10px 4px; border-radius: 8px 8px 8px 0;
  background: var(--yellow); color: var(--ink);
  font-size: 13px; font-weight: 700;
}
.lawnbar-flag::after { content: ''; position: absolute; left: 0; top: 100%; width: 3px; height: 34px; background: var(--ink); border-radius: 0 0 2px 2px; }
.lawnbar-ticks { display: flex; justify-content: space-evenly; margin: 6px 6px 0; font-size: 12px; font-weight: 600; color: var(--ink-soft); opacity: 0.75; }
.no-anim .lawnbar-tall, .no-anim .lawnbar-mown, .no-anim .lawnbar-robot { transition: none; }

.thermo-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0 0; }
.thermo-stats div { padding: 12px 6px; border-radius: 16px; background: var(--leaf); }
.thermo-stats dt { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.thermo-stats dd { margin: 2px 0 0; font-family: var(--serif); font-weight: 700; font-size: clamp(20px, 5.6vw, 30px); line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ---------- Om projektet ---------- */
.about { max-width: var(--wide); margin: 0 auto; padding: 72px var(--gutter) 24px; display: grid; gap: 30px; }
.about-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 28px; box-shadow: 0 20px 50px rgba(23, 48, 31, 0.18); }
.about-text h2 { margin-bottom: 18px; }
.about-text p { font-size: 18px; }
.steps { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); font-weight: 600; }
.steps span { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--leaf-deep); font-family: var(--serif); font-weight: 700; font-size: 19px; }

/* ---------- Spelet ---------- */
.game {
  position: relative; overflow: hidden;
  margin-top: 56px;
  padding: 68px var(--gutter) 72px;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(255, 211, 77, 0.16), transparent 70%),
    radial-gradient(70% 60% at 0% 100%, rgba(120, 190, 90, 0.22), transparent 70%),
    var(--ink);
  color: #f3f6ea;
}
.game-inner { max-width: var(--wide); margin: 0 auto; display: grid; gap: 40px; justify-items: center; text-align: center; }
.game h2 { color: #fff; margin-bottom: 18px; }
.game-text p { max-width: 30em; margin-left: auto; margin-right: auto; font-size: 18px; color: rgba(243, 246, 234, 0.9); }
.game-text .btn-play { margin-top: 10px; }
.game-note { margin: 16px auto 0 !important; font-size: 14.5px !important; opacity: 0.75; }

.phone {
  position: relative; display: block;
  width: min(74vw, 300px); height: calc(min(74vw, 300px) * 16 / 9);
  border: 9px solid #0c1c12; border-radius: 42px;
  background: #0c1c12;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14), 0 30px 70px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: rotate(2.5deg);
  transition: transform 0.3s ease;
  color: var(--ink); text-decoration: none;
}
.phone:hover { transform: rotate(0deg) scale(1.02); }
.phone canvas { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; display: block; background: #3d7a2c; }
.phone-hud {
  position: absolute; top: 0; left: 0; right: 0; z-index: 1;
  display: flex; justify-content: space-around;
  padding: 9px 8px 7px;
  background: rgba(23, 48, 31, 0.88); color: #f3f6ea;
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
}
.phone-hud b { margin-left: 4px; font-size: 14px; letter-spacing: 0; font-variant-numeric: tabular-nums; color: var(--yellow); }
.phone-play {
  position: absolute; left: 50%; bottom: 22px; z-index: 1;
  display: grid; place-items: center;
  width: 66px; height: 66px; margin-left: -33px; padding-left: 4px;
  border-radius: 50%; background: var(--yellow);
  box-shadow: 0 5px 0 #c99a12, 0 0 0 0 rgba(255, 211, 77, 0.6);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse { 70%, 100% { box-shadow: 0 5px 0 #c99a12, 0 0 0 22px rgba(255, 211, 77, 0); } }

/* ---------- Ge en gåva ---------- */
.give { padding: 76px var(--gutter) 40px; }
.give-inner { max-width: var(--wide); margin: 0 auto; display: grid; gap: 28px; }
.give h2 { margin-bottom: 14px; }
.give-lede { font-size: 18px; }
.amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.amounts button {
  min-height: 62px;
  border: 2px solid var(--line); border-radius: 18px;
  background: var(--paper); color: var(--ink);
  font: 700 21px var(--serif);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.amounts button:hover { border-color: var(--green); }
.amounts button.is-on { background: var(--ink); border-color: var(--ink); color: #fff; transform: scale(1.02); }
.amount-custom {
  display: flex; align-items: center; gap: 12px;
  margin-top: 10px; padding: 0 18px;
  min-height: 60px;
  border: 2px solid var(--line); border-radius: 18px; background: var(--paper);
  font-weight: 600;
}
.amount-custom:focus-within { border-color: var(--green); }
.amount-custom input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 700 21px var(--serif); color: var(--ink); text-align: right; }
.amount-custom input::placeholder { color: rgba(23, 48, 31, 0.35); font-weight: 500; }

.swish {
  padding: 26px 22px;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 2px 0 rgba(23, 48, 31, 0.06), 0 20px 50px rgba(23, 48, 31, 0.14);
}
.swish-kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.swish-number { margin: 4px 0 2px; font-family: var(--serif); font-weight: 700; font-size: clamp(34px, 10vw, 46px); line-height: 1.1; letter-spacing: -0.01em; white-space: nowrap; }
.swish-org { margin: 0; font-size: 15px; color: var(--ink-soft); }
.swish-qr-row { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.swish-qr-row p { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); }
.swish-qr { flex: none; display: grid; place-items: center; width: 132px; height: 132px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.swish-qr svg { width: 100%; height: 100%; display: block; }
.qr-missing { font-size: 13px; font-weight: 700; color: #7a5200; text-align: center; }

/* ---------- Givare ---------- */
.donors { padding: 40px var(--gutter) 30px; }
.donors-inner { max-width: 760px; margin: 0 auto; }
.donors h2 { margin-bottom: 12px; }
.donors-lede { color: var(--ink-soft); }
.donor-list { margin-top: 18px; border-radius: 22px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.donor-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 18px; }
.donor-row + .donor-row { border-top: 1px solid var(--line); }
.donor-row strong { display: block; }
.donor-row span { display: block; font-size: 15px; color: var(--ink-soft); }
.donor-amount { flex: none; font-family: var(--serif); font-weight: 700; font-size: 19px; color: var(--green); white-space: nowrap; }
.donor-empty { margin: 0; padding: 26px 18px; text-align: center; font-weight: 600; color: var(--ink-soft); }

/* ---------- Kontakt och sidfot ---------- */
.contact { padding: 30px var(--gutter) 76px; }
.contact-inner { max-width: 760px; margin: 0 auto; padding: 26px 22px; border-radius: 28px; background: var(--leaf); display: grid; gap: 14px; }
.contact h2 { font-size: clamp(26px, 6.4vw, 34px); }
.contact-who { margin: 0; display: grid; gap: 6px; justify-items: start; font-size: 19px; }

.foot { padding: 44px var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 110px); background: var(--paper); border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-soft); }
.foot-inner { max-width: var(--wide); margin: 0 auto; display: grid; gap: 12px; }
.foot img { width: 190px; }
.foot p { margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-legal { font-size: 13px; opacity: 0.8; }

/* ---------- Flytande gåvoknapp på mobil ---------- */
.sticky-give {
  position: fixed; z-index: 20;
  left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  width: min(calc(100% - 28px), 380px);
  transform: translate(-50%, 140%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.sticky-give.is-on { transform: translate(-50%, 0); }
.sticky-give:active { transform: translate(-50%, 2px); }

/* ---------- Mjuka inträden ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .phone.reveal { transform: translateY(26px) rotate(2.5deg); }
.js .phone.reveal.is-in { transform: rotate(2.5deg); }
.js .phone.reveal.is-in:hover { transform: rotate(0deg) scale(1.02); }

/* ---------- Större skärmar ---------- */
@media (min-width: 860px) {
  :root { --gutter: 40px; }
  body { font-size: 18px; }
  .top { padding-top: 24px; }
  .top-logo img { height: 32px; }
  .hero-text { padding-bottom: 130px; }
  .hero-actions .btn { flex: 0 0 auto; }
  .thermo-wrap { margin-top: -84px; }
  .thermo { padding: 38px 44px 34px; }
  .lawnbar { height: 96px; }
  .lawnbar-mown { height: 62px; }
  .about { grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; padding-top: 110px; }
  .game { margin-top: 90px; padding: 100px var(--gutter); }
  .game-inner { grid-template-columns: 1.1fr 0.9fr; text-align: left; justify-items: start; align-items: center; }
  .game-text p { margin-left: 0; }
  .game-note { margin-left: 0 !important; }
  .phone { justify-self: center; width: 310px; height: 551px; }
  .hero h1 { max-width: 14ch; }
  .give { padding-top: 110px; }
  .give-inner { grid-template-columns: 1fr 440px; gap: 64px; align-items: start; }
  .amounts { grid-template-columns: repeat(4, 1fr); }
  .swish { padding: 34px 32px; }
  .contact-inner { grid-template-columns: 1fr auto; align-items: center; padding: 34px 38px; }
  .foot { padding-bottom: 48px; }
  .sticky-give { display: none; }
}

/* ---------- Mindre rörelse ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .phone.reveal { opacity: 1; transform: none; transition: none; }
  .phone, .js .phone.reveal.is-in { transform: none; transition: none; }
  .lawnbar-tall, .lawnbar-mown, .lawnbar-robot { transition: none; }
  .lawnbar-robot svg, .robot-led, .phone-play { animation: none; }
  .btn, .amounts button, .sticky-give { transition: none; }
}
