/* Fælles Børn — landing page
   Palette lifted from the Fælles app's design tokens so the two read as
   one brand: Deep Forest #1F4D3A, Sage #7FA087, Soft Mint, Warm Sand,
   Peach #E8C6A0 on a cream ground. */

:root {
  --cream: #FAF7F2;
  --cream-deep: #F5F0E7;
  --ink: #14261E;
  --ink-soft: #5C6B62;
  --forest: #1F4D3A;
  --forest-deep: #163A2B;
  --sage: #7FA087;
  --mint: #E4F0E8;
  --mint-deep: #CFE4D6;
  --sand: #F3EDE3;
  --peach: #E8C6A0;
  --line: #E2E7DE;
  --white: #FFFFFF;

  --radius: 14px;
  --radius-lg: 24px;
  --wrap: 1140px;

  --shadow-sm: 0 1px 2px rgba(20, 38, 30, .04), 0 4px 14px rgba(20, 38, 30, .05);
  --shadow-lg: 0 2px 6px rgba(20, 38, 30, .04), 0 24px 60px rgba(20, 38, 30, .09);

  --font-display: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* An author `display` rule outranks the UA's [hidden] { display: none },
   so hiding .signup-row (display:flex) silently does nothing without
   this. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
img, svg { display: block; max-width: 100%; }

a { color: var(--forest); text-decoration-color: rgba(31, 77, 58, .3); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 22px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Visible focus everywhere, not just where it was remembered. */
:where(a, button, input):focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--forest); color: #fff;
  padding: 10px 18px; border-radius: 10px;
  font-size: 15px; text-decoration: none;
  transition: top .15s ease;
}
.skip:focus { top: 12px; }

/* ─── header ─────────────────────────────────────────────────── */

.site-header { padding: 22px 0 6px; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}

.wordmark-mark { width: 30px; height: 30px; flex: none; }

.wordmark-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.header-link {
  font-size: 15px;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background .18s ease, color .18s ease;
}
.header-link:hover { background: var(--mint); color: var(--forest); }

/* ─── hero ───────────────────────────────────────────────────── */

.hero { padding: clamp(38px, 8vw, 92px) 0 clamp(52px, 9vw, 104px); }

.hero-grid {
  display: grid;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--forest);
  background: var(--mint);
  border: 1px solid var(--mint-deep);
  padding: 7px 16px 7px 13px;
  border-radius: 999px;
  margin-bottom: 26px;
}

.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(127, 160, 135, .22);
}

h1 {
  font-size: clamp(2.15rem, 6.4vw, 3.85rem);
  line-height: 1.06;
  margin-bottom: 22px;
}

h1 em {
  font-style: normal;
  color: var(--forest);
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 34em;
}

.hero-copy .lede { margin-bottom: 34px; }

/* ─── signup ─────────────────────────────────────────────────── */

.signup { max-width: 500px; }

.signup-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.signup-input {
  flex: 1 1 220px;
  min-width: 0;
  font: inherit;
  font-size: 16px; /* keeps iOS from zooming the viewport on focus */
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.signup-input::placeholder { color: #9AA79F; }

.signup-input:hover { border-color: #CFD8CD; }

.signup-input:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(31, 77, 58, .12);
}

.signup-input[aria-invalid="true"] {
  border-color: #B4483F;
  box-shadow: 0 0 0 4px rgba(180, 72, 63, .1);
}

.btn {
  flex: 0 0 auto;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  background: var(--forest);
  border: 1px solid var(--forest);
  border-radius: var(--radius);
  padding: 14px 24px;
  cursor: pointer;
  transition: background .18s ease, transform .12s ease;
}

.btn:hover { background: var(--forest-deep); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: default; transform: none; }

.signup-hint {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-top: 12px;
}

.signup-status {
  font-size: 15px;
  margin-top: 12px;
  min-height: 0;
}
.signup-status:empty { margin-top: 0; }

.signup-status[data-state="ok"] {
  color: var(--forest);
  background: var(--mint);
  border: 1px solid var(--mint-deep);
  border-radius: 12px;
  padding: 12px 16px;
}

.signup-status[data-state="error"] { color: #9E3B33; }

.signup-center { margin-inline: auto; }
.signup-center .signup-row { justify-content: center; }

/* ─── hero visual ────────────────────────────────────────────── */

.hero-visual { display: none; }

.constellation {
  width: 100%;
  aspect-ratio: 1 / 1; /* reserved up front — no layout shift */
  overflow: visible;
}

.halo { fill: none; stroke: var(--line); stroke-width: 1; }
.halo-1 { stroke: #E9EEE6; }
.halo-2 { stroke-dasharray: 3 9; stroke: var(--mint-deep); }

.thread {
  fill: none;
  stroke: var(--sage);
  stroke-width: 1.6;
  stroke-linecap: round;
  opacity: .55;
}

.blob { fill: var(--sand); }

.node circle { stroke: var(--cream); stroke-width: 5; }
.node-a circle { fill: var(--forest); }
.node-b circle { fill: var(--sage); }
.node-c circle { fill: var(--peach); }
.node-d circle { fill: var(--mint-deep); }

.grid rect { fill: var(--mint-deep); opacity: .8; }
.grid rect.grid-on { fill: var(--forest); opacity: 1; }

/* ─── values ─────────────────────────────────────────────────── */

.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.45rem);
  margin-bottom: 18px;
}

.values {
  padding: clamp(52px, 8vw, 92px) 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
}

.values .section-title { margin-bottom: 44px; }

.value-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.value {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
}

.value h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.value p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}

.value-icon {
  display: block;
  width: 42px; height: 42px;
  border-radius: 13px;
  margin-bottom: 20px;
  position: relative;
}

.value-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
}

.value-icon-a { background: var(--mint); }
.value-icon-a::after {
  width: 16px; height: 16px;
  border: 2.5px solid var(--forest);
  border-radius: 50%;
}

.value-icon-b { background: var(--sand); }
.value-icon-b::after {
  width: 18px; height: 4px;
  border-radius: 4px;
  background: var(--peach);
  box-shadow: 0 -7px 0 var(--sage), 0 7px 0 var(--sage);
}

/* Two roofs, echoing "under ét eller flere tage". */
.value-icon-c { background: #F0EBE1; }
.value-icon-c::before,
.value-icon-c::after {
  content: "";
  position: absolute;
  inset: auto;
  margin: 0;
  bottom: 13px;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 11px solid var(--sage);
}
.value-icon-c::before { left: 5px; }
.value-icon-c::after { right: 5px; border-bottom-color: var(--forest); }

/* ─── product preview ────────────────────────────────────────── */

.preview {
  padding: clamp(56px, 9vw, 100px) 0;
  border-top: 1px solid var(--line);
}

.preview-inner {
  display: grid;
  gap: clamp(36px, 6vw, 64px);
  align-items: center;
  justify-items: center;
}

.preview-copy p { color: var(--ink-soft); }
.preview-copy .section-title { margin-bottom: 16px; }

/* Sage would read as the natural accent here, but at ~2.6:1 on cream it
   fails AA for body text. Keep the muted ink and let size carry the
   de-emphasis instead. */
.preview-note {
  margin-top: 16px;
  font-size: 15px;
  color: var(--ink-soft);
}

.phone {
  width: min(252px, 72vw);
  aspect-ratio: 9 / 18.5;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow-lg);
  padding: 14px;
  flex: none;
}

.phone-screen {
  height: 100%;
  background: var(--cream);
  border-radius: 22px;
  padding: 18px 15px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.phone-top { display: flex; align-items: center; justify-content: space-between; }

.phone-month {
  width: 62px; height: 9px;
  border-radius: 5px;
  background: var(--forest);
  opacity: .85;
}

.phone-dots { display: flex; gap: 5px; }
.phone-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--mint-deep); }

.phone-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.phone-cal i {
  aspect-ratio: 1;
  border-radius: 5px;
  background: var(--white);
  border: 1px solid var(--line);
}

.phone-cal i.a { background: var(--forest); border-color: var(--forest); }
.phone-cal i.b { background: var(--sage); border-color: var(--sage); opacity: .55; }

.phone-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

.phone-row {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 11px;
}

.pip { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pip-a { background: var(--forest); }
.pip-b { background: var(--peach); }
.pip-c { background: var(--sage); }

.bar { height: 7px; border-radius: 4px; background: var(--mint-deep); }
.w70 { width: 70%; }
.w50 { width: 50%; }
.w60 { width: 60%; }

/* ─── closing ────────────────────────────────────────────────── */

.closing {
  padding: clamp(56px, 9vw, 104px) 0;
  border-top: 1px solid var(--line);
  background: var(--mint);
}

.closing-inner { text-align: center; }
.closing .lede { margin: 0 auto 30px; }

/* ─── footer ─────────────────────────────────────────────────── */

.site-footer {
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: baseline;
  justify-content: space-between;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.footer-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.footer-meta a { color: var(--ink-soft); }
.footer-meta a:hover { color: var(--forest); }
.footer-sep { color: var(--line); }

/* On narrow screens the button wraps onto its own line, where a
   content-width button next to a full-width field reads unfinished. */
@media (max-width: 520px) {
  .btn { width: 100%; }
}

/* ─── larger screens ─────────────────────────────────────────── */

@media (min-width: 860px) {
  body { font-size: 17px; }

  .hero-grid {
    grid-template-columns: 1.05fr .95fr;
  }

  .hero-visual { display: block; }

  .value-list { grid-template-columns: repeat(3, 1fr); gap: 22px; }

  .preview-inner {
    grid-template-columns: auto 1fr;
    justify-items: start;
    gap: clamp(48px, 7vw, 92px);
  }

  .closing .lede { max-width: 30em; }
}

/* ─── motion ─────────────────────────────────────────────────── */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

.hero-copy > *, .hero-visual {
  animation: rise .62s cubic-bezier(.22, .68, .3, 1) backwards;
}
.hero-copy > *:nth-child(1) { animation-delay: .02s; }
.hero-copy > *:nth-child(2) { animation-delay: .08s; }
.hero-copy > *:nth-child(3) { animation-delay: .14s; }
.hero-copy > *:nth-child(4) { animation-delay: .20s; }
.hero-visual { animation-delay: .16s; }

.node-a, .node-b, .node-c, .node-d, .blob {
  animation: drift 9s ease-in-out infinite;
  transform-origin: center;
}
.node-b { animation-duration: 11s; animation-delay: -3s; }
.node-c { animation-duration: 10s; animation-delay: -5s; }
.node-d { animation-duration: 12s; animation-delay: -1.5s; }
.blob   { animation-duration: 13s; animation-delay: -6s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
