/*
Theme Name: Læsehjælp
Theme URI: https://laesehjaelp.dk
Author: Læsehjælp.dk
Description: Tema til Læsehjælp.dk – læseforløb for børn i 0.–10. klasse. Opretter forside, betingelser og privatlivspolitik ved aktivering.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: laesehjaelp
*/

/* Skrifttyperne ligger i temaet, så der ikke hentes noget fra Google. */
@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("skrifttyper/lexend.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("skrifttyper/nunito-sans.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito Sans";
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
  src: url("skrifttyper/nunito-sans-kursiv.woff2") format("woff2");
}

:root {
  --lh-sky: #3AA8E0;
  --lh-harbor: #1D5C7A;
  --lh-harbor-dark: #164A63;
  --lh-ink: #14323F;
  --lh-muted: #4A6570;
  --lh-paper: #FFFFFF;
  --lh-sage: #EEF3F1;
  --lh-sage-line: #D7E2DE;
  --lh-blush: #F8E3DE;
  --lh-blush-ink: #7A3E33;
  --lh-radius: 14px;
  --lh-display: "Lexend", "Segoe UI", system-ui, sans-serif;
  --lh-body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --lh-gutter: max(20px, calc((100% - 1080px) / 2));
}

/* ---------- Grundlæggende ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--lh-paper);
  color: var(--lh-ink);
  font-family: var(--lh-body);
  font-size: 18px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lh-harbor); text-underline-offset: 3px; }
a:hover { color: var(--lh-harbor-dark); }
:focus-visible { outline: 3px solid var(--lh-sky); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--lh-display); color: var(--lh-harbor); line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.1rem); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 500; }

.lh-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--lh-harbor); color: #fff; padding: 10px 16px; border-radius: 8px; }
.lh-skip:focus { left: 16px; color: #fff; }

/* ---------- Header ---------- */
.lh-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--lh-sage-line);
}
.admin-bar .lh-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .lh-header { top: 0; } }
.lh-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px var(--lh-gutter); }
.lh-brand img { height: 58px; width: auto; }
.lh-nav { display: flex; align-items: center; gap: 28px; }
.lh-nav a { color: var(--lh-ink); text-decoration: none; font-family: var(--lh-display); font-size: 0.95rem; }
.lh-nav a:hover { color: var(--lh-sky); }
.lh-nav .lh-nav-cta { background: var(--lh-harbor); color: #fff; padding: 10px 18px; border-radius: 999px; }
.lh-nav .lh-nav-cta:hover { background: var(--lh-harbor-dark); color: #fff; }
@media (max-width: 820px) { .lh-nav a:not(.lh-nav-cta) { display: none; } .lh-brand img { height: 48px; } }

/* ---------- Sektioner ---------- */
.lh-band { padding: clamp(56px, 8vw, 96px) var(--lh-gutter); display: flex; flex-direction: column; gap: 20px; }
.lh-band.lh-tint { background: var(--lh-sage); }
.lh-band.lh-hero { padding-block: clamp(40px, 6vw, 80px); }

/* Nulstil marginer – afstande styres med gap */
.lh-band :is(p, h1, h2, h3, ul, ol, figure, .wp-block-image, .wp-block-buttons, .wp-block-columns, .wp-block-group, .wp-block-details) { margin: 0; }
.lh-band .wp-block-column, .lh-band .wp-block-group { display: flex; flex-direction: column; gap: 16px; }
.lh-band .wp-block-columns { gap: clamp(32px, 5vw, 64px); }
.lh-band p { max-width: 62ch; }

.lh-eyebrow { font-family: var(--lh-display); font-size: 0.8rem !important; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lh-sky); }
.lh-lead { font-size: 1.2rem; color: var(--lh-muted); }

/* Knapper */
.lh-band .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.lh-band .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--lh-display); font-weight: 500; font-size: 1rem;
  padding: 14px 24px; border-radius: 999px; text-decoration: none;
  background: var(--lh-harbor); color: #fff; border: 2px solid var(--lh-harbor);
  transition: background .15s, color .15s;
}
.lh-band .wp-block-button__link:hover { background: var(--lh-harbor-dark); border-color: var(--lh-harbor-dark); color: #fff; }
.lh-band .wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--lh-harbor); border: 2px solid var(--lh-harbor); padding: 14px 24px; }
.lh-band .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--lh-harbor); color: #fff; }

/* Forside-top */
.lh-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; list-style: none; color: var(--lh-muted); font-size: 0.95rem; }
.lh-facts li { display: flex; align-items: center; gap: 8px; }
.lh-facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lh-sky); }
.lh-portrait { position: relative; }
.lh-portrait img { width: 100%; border-radius: var(--lh-radius); }
.lh-portrait figcaption {
  position: absolute; left: -12px; bottom: 24px; margin: 0; background: var(--lh-paper); color: var(--lh-ink);
  padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(20,50,63,.14);
  font-size: 0.9rem; line-height: 1.35; text-align: left;
}
.lh-portrait figcaption strong { font-family: var(--lh-display); font-weight: 500; color: var(--lh-harbor); }
@media (max-width: 782px) { .lh-portrait figcaption { left: 12px; } }

/* Tjekliste */
.lh-checklist { list-style: none; padding: 0; display: grid; gap: 12px; }
.lh-checklist li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.lh-checklist li::before {
  content: ""; width: 24px; height: 24px; margin-top: 3px; border-radius: 50%;
  background: var(--lh-sky) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

/* Forløbet: trin */
.lh-steps { list-style: none; padding: 0; counter-reset: lh-step; display: grid; }
.lh-steps li { counter-increment: lh-step; position: relative; padding: 0 0 28px 66px; color: var(--lh-muted); min-height: 72px; }
.lh-steps li::before {
  content: counter(lh-step); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--lh-paper); border: 2px solid var(--lh-sky);
  font-family: var(--lh-display); font-weight: 600; color: var(--lh-harbor);
}
.lh-steps li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 48px; bottom: 4px; width: 2px; background: var(--lh-sage-line); }
.lh-steps strong { display: block; margin: 8px 0 6px; font-family: var(--lh-display); font-size: 1.2rem; font-weight: 500; color: var(--lh-harbor); }

/* Priskort */
.lh-band .lh-card { background: var(--lh-paper); border-radius: var(--lh-radius); padding: 28px; box-shadow: 0 1px 0 var(--lh-sage-line), 0 12px 32px rgba(20,50,63,.08); gap: 14px; }
.lh-price { font-family: var(--lh-display); font-size: 2.6rem !important; font-weight: 600; color: var(--lh-harbor); line-height: 1; font-variant-numeric: tabular-nums; }
.lh-price-sub { color: var(--lh-muted); margin-top: -6px !important; }
.lh-price-list { list-style: none; padding: 0; display: grid; gap: 10px; font-size: 0.97rem; color: var(--lh-muted); }
.lh-price-list li { display: flex; justify-content: space-between; gap: 16px; }
.lh-price-list strong { color: var(--lh-ink); font-variant-numeric: tabular-nums; text-align: right; }
.lh-small { font-size: 0.9rem; color: var(--lh-muted); }
.lh-card .lh-small { border-top: 1px solid var(--lh-sage-line); padding-top: 16px; }

/* Om mig */
.lh-creds { list-style: none; padding: 0; display: grid; gap: 20px; }
.lh-creds li { padding-left: 18px; border-left: 3px solid var(--lh-sky); }
.lh-creds strong { display: block; font-family: var(--lh-display); font-weight: 500; color: var(--lh-harbor); }

/* Hjemme hos os */
.lh-band .lh-photos { gap: 12px; }
.lh-photos img { width: 100%; border-radius: var(--lh-radius); }
.lh-band .lh-callout { background: var(--lh-blush); color: var(--lh-blush-ink); border-radius: 12px; padding: 16px 18px 16px 58px; position: relative; font-size: 0.97rem; }
.lh-callout::before {
  content: ""; position: absolute; left: 18px; top: 17px; width: 26px; height: 26px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V9l3-5 2 4h6l2-4 3 5v11z'/%3E%3Ccircle cx='9' cy='13' r='1' fill='black'/%3E%3Ccircle cx='15' cy='13' r='1' fill='black'/%3E%3Cpath d='M11 16.5h2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V9l3-5 2 4h6l2-4 3 5v11z'/%3E%3Ccircle cx='9' cy='13' r='1' fill='black'/%3E%3Ccircle cx='15' cy='13' r='1' fill='black'/%3E%3Cpath d='M11 16.5h2'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Spørgsmål og svar */
.lh-band .lh-faq { max-width: 780px; gap: 10px; }
.lh-faq .wp-block-details { background: var(--lh-paper); border-radius: 12px; border: 1px solid var(--lh-sage-line); }
.lh-tint .lh-faq .wp-block-details { border-color: transparent; }
.lh-faq summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 20px; font-family: var(--lh-display); font-weight: 500; color: var(--lh-harbor); position: relative; }
.lh-faq summary::-webkit-details-marker { display: none; }
.lh-faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; color: var(--lh-sky); }
.lh-faq details[open] summary::after { content: "–"; }
.lh-faq .wp-block-details > :not(summary) { padding: 0 20px 20px; }

/* Kontakt */
.lh-contact-line { font-size: 0.85rem; color: var(--lh-muted); }
.lh-contact-line a { display: block; font-family: var(--lh-display); font-size: 1.25rem; font-weight: 500; color: var(--lh-harbor); text-decoration: none; word-break: break-word; }
.lh-social { display: flex; flex-wrap: wrap; gap: 12px; }
.lh-social a { display: inline-flex; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--lh-sage-line); text-decoration: none; color: var(--lh-ink); font-size: 0.95rem; }
.lh-social a:hover { border-color: var(--lh-harbor); color: var(--lh-harbor); }

.lh-form { background: var(--lh-paper); border-radius: var(--lh-radius); padding: clamp(20px, 4vw, 32px); box-shadow: 0 1px 0 var(--lh-sage-line), 0 12px 32px rgba(20,50,63,.08); display: grid; gap: 16px; }
.lh-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .lh-form-row { grid-template-columns: 1fr; } }
.lh-form label { display: grid; gap: 6px; font-size: 0.93rem; font-weight: 700; }
.lh-form .lh-opt { font-weight: 400; color: var(--lh-muted); }
.lh-form input, .lh-form select, .lh-form textarea {
  font: inherit; font-size: 1rem; color: var(--lh-ink); background: var(--lh-paper);
  border: 1.5px solid var(--lh-sage-line); border-radius: 10px; padding: 12px 14px; width: 100%;
}
.lh-form input:focus, .lh-form select:focus, .lh-form textarea:focus { outline: none; border-color: var(--lh-sky); box-shadow: 0 0 0 3px rgba(58,168,224,.2); }
.lh-form textarea { min-height: 120px; resize: vertical; }
.lh-form .lh-consent { grid-template-columns: 22px 1fr; gap: 10px; font-weight: 400; font-size: 0.9rem; color: var(--lh-muted); align-items: start; }
.lh-form .lh-consent input { width: 20px; height: 20px; margin-top: 3px; padding: 0; accent-color: var(--lh-harbor); }
.lh-form button {
  justify-self: start; font-family: var(--lh-display); font-weight: 500; font-size: 1rem; cursor: pointer;
  padding: 14px 28px; border-radius: 999px; background: var(--lh-harbor); color: #fff; border: 2px solid var(--lh-harbor);
}
.lh-form button:hover { background: var(--lh-harbor-dark); }
.lh-form-msg { border-radius: 10px; padding: 14px 16px; font-size: 0.97rem; margin: 0; }
.lh-form-msg.lh-ok { background: var(--lh-sage); }
.lh-form-msg.lh-err { background: var(--lh-blush); color: var(--lh-blush-ink); }
.lh-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Undersider (betingelser, privatliv) ---------- */
.lh-page { padding: clamp(40px, 6vw, 72px) var(--lh-gutter) clamp(56px, 8vw, 96px); }
.lh-page-inner { max-width: 760px; }
.lh-page-inner > h1 { margin: 0 0 24px; }
.lh-page-inner h2 { font-size: 1.35rem; margin: 32px 0 8px; }
.lh-page-inner p, .lh-page-inner ul, .lh-page-inner ol { margin: 0 0 12px; }
.lh-page-inner li { margin-bottom: 6px; }

/* ---------- Footer ---------- */
.lh-footer { background: var(--lh-harbor); color: #DCEBF2; padding: 40px var(--lh-gutter); font-size: 0.92rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; }
.lh-footer p { margin: 0; }
.lh-footer p + p { margin-top: 4px; }
.lh-footer a { color: #fff; }
