/* Fledge lead magnet: shared styles. Mobile first, sizes in rem. */

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sue Ellen Francisco";
  src: url("/fonts/sue-ellen-francisco-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-heading: "Instrument Serif", Georgia, serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand: "Sue Ellen Francisco", "Comic Sans MS", cursive;

  --color-bg: #fbfaf7;
  --color-bg-alt: #f3f1ec;
  --color-text: #17171c;
  --color-text-muted: #5a5a63;
  --color-line: #e2dfd8;
  --color-accent: #4a5fff;
  --color-on-accent: #ffffff;
  --color-accent-soft: #eceeff;
  --color-error: #b3261e;

  --text-small: 0.9375rem;
  --text-body: 1.0625rem;
  --text-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --text-h2: clamp(1.75rem, 1.45rem + 1.3vw, 2.5rem);
  --text-h1: clamp(2.375rem, 1.7rem + 3.2vw, 4.25rem);

  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4.5rem;

  --gutter: 1rem;
  --measure: 38rem;
  --radius: 0.75rem;
}
@media (min-width: 48em) {
  :root { --gutter: 2rem; --space-2xl: 6rem; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-wrap: balance;
  hyphens: auto;
  overflow-wrap: anywhere; /* long Danish compounds must wrap, never scroll sideways */
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: 1.375rem; line-height: 1.25; }
p, li { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
::selection { background: var(--color-accent); color: var(--color-on-accent); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -10rem; z-index: 10;
  padding: var(--space-2xs) var(--space-s);
  background: var(--color-text); color: var(--color-bg);
}
.skip-link:focus { top: var(--space-s); }

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */
.site-header { padding-block: var(--space-m); }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-s); }
.brand { font-family: var(--font-heading); font-size: 1.5rem; line-height: 1; text-decoration: none; }
.lang-link { font-size: var(--text-small); font-weight: 700; }

/* Hero */
.hero { padding-block: var(--space-xl) var(--space-2xl); }
.hero h1 { max-width: 14ch; }
.hero .lead { margin-top: var(--space-m); font-size: var(--text-lead); line-height: 1.5; color: var(--color-text); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-s) var(--space-m); margin-top: var(--space-l); }

.hand-note {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-accent);
  transform: rotate(-3deg);
}
.hand-note svg { width: 2.5rem; height: auto; flex: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem;
  padding: 0.8em 1.5em;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border: 2px solid var(--color-accent);
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover { background: #3346e6; border-color: #3346e6; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Sections */
.section { padding-block: var(--space-xl); border-top: 1px solid var(--color-line); }
@media (min-width: 48em) { .section { padding-block: var(--space-2xl); } }
.section h2 { margin-bottom: var(--space-m); }
.section > .wrap > * + * { margin-top: var(--space-s); }
.section > .wrap > h2 + * { margin-top: 0; }

.ticks { list-style: none; padding: 0; display: grid; gap: var(--space-s); }
.ticks li { position: relative; padding-left: 1.75rem; }
.ticks li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 0.75rem; height: 0.4rem;
  border-left: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: rotate(-45deg);
}

.steps { list-style: none; padding: 0; display: grid; gap: var(--space-m); counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.25rem 1fr; gap: var(--space-s); align-items: baseline; }
.steps li::before {
  content: counter(step);
  font-family: var(--font-heading);
  font-size: 2rem;
  line-height: 1;
  color: var(--color-accent);
}


/* Signup form */
.signup { background: var(--color-bg-alt); }
.form { display: grid; gap: var(--space-m); margin-top: var(--space-l); }
.field { display: grid; gap: var(--space-2xs); }
.field-label, .form legend { font-weight: 700; font-size: var(--text-small); }
.form input[type="email"],
.form input[type="password"] {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  font: inherit;
  color: var(--color-text);
  background: #fff;
  border: 1px solid #c9c5bc;
  border-radius: var(--radius);
}
.form input[type="email"]:focus-visible,
.form input[type="password"]:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 1px; border-color: var(--color-accent); }
.form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form legend { padding: 0; margin-bottom: var(--space-2xs); }
.choices { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.choice {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  background: #fff;
  border: 1px solid #c9c5bc;
  border-radius: 999px;
  cursor: pointer;
}
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--color-accent); background: var(--color-accent-soft); box-shadow: inset 0 0 0 1px var(--color-accent); }
.choice:has(input:focus-visible) { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.check { display: grid; grid-template-columns: 1.25rem 1fr; gap: var(--space-xs); align-items: start; cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; accent-color: var(--color-accent); }

.newsletter-line { font-size: var(--text-small); }
.form .btn { justify-self: start; }
@media (max-width: 30em) { .form .btn { justify-self: stretch; } }
.small-print { font-size: var(--text-small); color: var(--color-text-muted); }

.form-status { font-weight: 700; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--color-error); }
.sent {
  margin-top: var(--space-l);
  padding: var(--space-m);
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}
.sent h3 { margin-bottom: var(--space-2xs); }

/* Honeypot: hidden from people, visible to naive bots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* FAQ */
.faq { display: grid; gap: var(--space-m); }
.faq dt { font-weight: 700; }
.faq dd { margin-top: 0.25rem; color: var(--color-text-muted); }

.site-footer { padding-block: var(--space-xl); border-top: 1px solid var(--color-line); font-size: var(--text-small); color: var(--color-text-muted); }

.btn-ghost { background: transparent; color: var(--color-accent); }
.btn-ghost:hover { background: var(--color-accent-soft); border-color: var(--color-accent); }

/* Admin */
.admin-main { padding-block: var(--space-xl); }
.admin-main h1 { font-size: var(--text-h2); }
.admin-main > p { margin-top: var(--space-s); color: var(--color-text-muted); }

/* Privacy policy */
.legal { padding-block: var(--space-xl) var(--space-2xl); }
.legal h1 { font-size: var(--text-h2); }
.legal h2 { font-size: 1.625rem; margin-top: var(--space-xl); margin-bottom: var(--space-s); }
.legal > p { margin-top: var(--space-s); }
.legal ul { padding-left: 1.25rem; display: grid; gap: var(--space-s); }
.legal li { padding-left: 0.25rem; }
.site-footer a { color: inherit; }
