/* stigsen.dk – v2 */

:root {
  --accent: #3b82f6;
  --bg: #f6f6f3;
  --surface: #ffffff;
  --border: rgba(15, 17, 22, .09);
  --text: #15171c;
  --muted: #5d6270;
  --on-accent: #0b0c10;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px -12px rgba(0,0,0,.12);
  color-scheme: light;
}

/* Dark: default when the OS prefers it, unless the visitor chose light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c10;
    --surface: #14161c;
    --border: rgba(255, 255, 255, .08);
    --text: #eceef3;
    --muted: #9aa0ad;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 16px 40px -16px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c10;
  --surface: #14161c;
  --border: rgba(255, 255, 255, .08);
  --text: #eceef3;
  --muted: #9aa0ad;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 16px 40px -16px rgba(0,0,0,.6);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font: 400 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

h1, h2, .brand { font-family: Outfit, Inter, system-ui, sans-serif; letter-spacing: -.02em; }

/* Soft accent-coloured light in the background */
.glow {
  position: fixed;
  inset: -20vh -10vw auto;
  height: 80vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40% 50% at 20% 30%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%),
    radial-gradient(35% 45% at 80% 10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  filter: blur(20px);
}

/* ---------- Header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(clamp(16px, 4vw, 32px), calc((100% - 1120px) / 2 + clamp(16px, 4vw, 32px)));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}

.brand {
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
}
.brand span, h1 span { color: var(--accent); }

.top nav { display: flex; align-items: center; gap: 4px; }
.top nav a {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: .95rem;
  transition: color .2s, background .2s;
}
.top nav a:hover { color: var(--text); background: var(--border); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ---------- Layout ---------- */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

.hero {
  padding: clamp(56px, 12vw, 128px) 0 clamp(40px, 7vw, 72px);
}
.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
}
.hero h1 {
  margin: 0;
  font-size: clamp(3.2rem, 12vw, 8rem);
  line-height: .95;
  font-weight: 800;
}
.lead {
  margin: 20px 0 0;
  max-width: 36ch;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
}

/* ---------- Family cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s;
  scroll-margin-top: 90px;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.card:target { border-color: var(--accent); }

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
  background: var(--border);
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent);
  margin: 0 0 20px 5px;
}

.card h2 { margin: 0; font-size: 1.3rem; line-height: 1.25; font-weight: 700; }
.role { margin: 4px 0 18px; color: var(--muted); font-size: .95rem; }

blockquote {
  margin: 0 0 22px;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--accent);
}
blockquote p { margin: 0; font-style: italic; }
blockquote cite {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}
.links a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s, border-color .2s, color .2s;
}
.links a::after { content: " ↗"; opacity: .5; }
.links a:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- Contact ---------- */

.contact {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(24px, 5vw, 64px);
  margin: clamp(64px, 10vw, 112px) 0 0;
  padding: clamp(24px, 4vw, 48px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-margin-top: 90px;
}
.contact-intro h2 { margin: 0 0 8px; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; }
.contact-intro p { margin: 0; color: var(--muted); }

.form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.form label span {
  display: block;
  margin-bottom: 6px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
}
.form .full { grid-column: 1 / -1; }

input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 130px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
button[type="submit"] {
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, filter .2s;
}
button[type="submit"]:hover { filter: brightness(1.08); }
button[type="submit"]:active { transform: scale(.97); }
button[type="submit"]:disabled { opacity: .6; cursor: progress; }
.status { margin: 0; font-size: .9rem; color: var(--muted); }
.status.error { color: #e5484d; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.sent { align-self: center; }
.sent .big { margin: 0; font-family: Outfit, sans-serif; font-size: 2rem; font-weight: 800; color: var(--accent); }
.sent p { margin: 4px 0 0; }

[hidden] { display: none !important; }

/* ---------- Footer ---------- */

.bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px clamp(16px, 4vw, 32px);
  color: var(--muted);
  font-size: .85rem;
}
.bottom p { margin: 0; }

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease var(--delay, 0ms), transform .6s cubic-bezier(.2,.8,.2,1) var(--delay, 0ms);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .card { transition: none; opacity: 1; transform: none; }
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .top nav a { padding: 8px 8px; }
}
