/* Spilafélag Vestfjarða
   Modelled on the feel of useorigin.com: near-black page, a full-bleed landscape
   that dissolves into it, light serif headlines that open on an italic word,
   monospace uppercase controls, and frosted-glass panels over photography.

   Photos: drop files into public/img/ (see img/README.txt). Until then every
   photo slot falls back to a drawn fjord / textured gradient. */

@view-transition { navigation: auto; }

/* Fonts are served from /fonts (latin subset covers Icelandic), not Google: no visitor data leaves the site. */
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('fonts/newsreader-latin-opsz-normal.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 200 800; font-display: swap; src: url('fonts/newsreader-latin-opsz-italic.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/roboto-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/roboto-mono-latin-500-normal.woff2') format('woff2'); }


:root {
  --bg: #0f1011;
  --bg-2: #131415;
  --fg: #fafafa;
  --fg-2: rgba(250, 250, 250, 0.9);
  --muted: rgba(250, 250, 250, 0.62);
  --faint: rgba(250, 250, 250, 0.4);
  --line: rgba(255, 255, 255, 0.1);
  --glass: rgba(15, 16, 17, 0.42);
  --glass-line: rgba(255, 255, 255, 0.15);
  --accent: #9fd8f0;   /* the pale blue Origin uses for data points — here: Arctic water */
  --danger: #ff8a7a;

  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Roboto Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --ease: cubic-bezier(0.455, 0.03, 0.515, 0.955);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1400px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--fg); color: var(--bg); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }

/* ── type ─────────────────────────────────────────────────────────── */

h1, h2, .display {
  font-family: var(--serif); font-weight: 300; font-optical-sizing: auto;
  letter-spacing: -0.02em; line-height: 0.95; margin: 0;
}
h1 { font-size: clamp(3.2rem, 7.6vw, 6.6rem); }
h2, .display { font-size: clamp(2.8rem, 6.6vw, 6rem); }
h1 em, h2 em, .display em { font-style: italic; }
h3 { font: 500 1.05rem/1.35 var(--sans); margin: 0; letter-spacing: -0.01em; }
.sub { color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.12rem); line-height: 1.45; max-width: 30rem; margin: 1.6rem auto 0; }
.label {
  font: 500 12px/1.33 var(--mono); letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1.4rem;
}

/* ── nav: floating frosted bar ────────────────────────────────────── */

.site-header {
  position: fixed; inset: 16px 16px auto; z-index: 50;
  view-transition-name: site-header;
  border-radius: 12px; border: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
}
.site-header.glass, .site-header.scrolled {
  background: rgba(15, 16, 17, 0.35);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border-color: var(--glass-line);
}
.site-header .bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 56px; padding: 0 8px 0 18px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; justify-self: start; }
.brand-mark { width: 24px; height: 24px; flex: none; }
.brand-name { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; }
.nav-center { display: flex; gap: 8px; }
.nav-right { display: flex; align-items: center; gap: 8px; justify-self: end; }
.nav-link {
  font: 400 12px/1.5 var(--mono); letter-spacing: 0.25px; text-transform: uppercase;
  text-decoration: none; color: var(--fg); padding: 8px 12px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.04); transition: background-color 0.3s var(--ease);
}
.nav-link:hover, .nav-link[aria-current='page'] { background: rgba(255, 255, 255, 0.12); }
.nav-link.plain { background: transparent; }
.nav-link.plain:hover { background: rgba(255, 255, 255, 0.08); }

/* ── buttons ──────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 18px; border-radius: 8px; border: 0;
  background: #fff; color: #000; cursor: pointer;
  font: 500 12px/1.33 var(--mono); letter-spacing: 0.02em; text-transform: uppercase; text-decoration: none;
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease), opacity 0.3s;
}
.btn:hover { background: #e9e9e9; }
.btn .arrow { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn.ghost { background: rgba(255, 255, 255, 0.1); color: var(--fg); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.18); }
.btn.small { padding: 10px 14px; }
.btn[disabled] { opacity: 0.5; cursor: progress; }
.link-quiet { color: var(--muted); font-size: 0.92rem; text-underline-offset: 4px; text-decoration-color: var(--line); }
.link-quiet:hover { color: var(--fg); text-decoration-color: currentColor; }

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

.hero { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media .photo { background: center / cover no-repeat; }
.hero-media .hero-video { opacity: 0; transition: opacity 1.2s var(--ease-out); }
.hero-media .hero-video.on { opacity: 1; }
.hero-media::after {   /* dissolve the landscape into the page */
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,16,17,0.35) 0%, rgba(15,16,17,0.15) 30%, rgba(15,16,17,0.55) 70%, var(--bg) 100%),
    radial-gradient(60% 45% at 50% 52%, rgba(15,16,17,0.35), transparent 70%);
}
/* The media drifts down on scroll (parallax), which would carry its own fade
   out of frame and leave a hard edge. This fade belongs to the section, so it
   stays put and the picture always melts into the page. */
.hero::after {
  content: ''; position: absolute; inset: auto 0 0; height: 45%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(15,16,17,0.6) 45%, var(--bg));
}
.fjord { transform-origin: 50% 100%; }
.fjord .clouds { animation: clouds 80s linear infinite alternate; }
@keyframes clouds { to { transform: translateX(-120px); } }

.hero-content { text-align: center; padding: 120px var(--gutter) 80px; max-width: 1020px; will-change: transform, opacity; }
.hero-content .sub { max-width: 27rem; color: rgba(250, 250, 250, 0.9); font-size: 1.05rem; }
.hero-content .btn { margin-top: 1.8rem; }

/* the glass "ask" pill, here a typewriter of what's on the table tonight */
.pill {
  display: flex; align-items: center; gap: 1rem; justify-content: space-between;
  width: min(590px, 100%); margin: 2.6rem auto 0; padding: 10px 10px 10px 30px;
  border-radius: 999px; text-align: left;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  color: var(--fg); font-size: 1rem; min-height: 80px; text-decoration: none;
}
.pill .typed::after { content: ''; display: inline-block; width: 1px; height: 1.1em; background: currentColor; margin-left: 2px; vertical-align: -0.15em; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.pill .go { flex: none; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.2); transition: background-color 0.3s var(--ease); }
.pill:hover .go { background: rgba(255, 255, 255, 0.32); }
.pill .go svg { width: 22px; height: 22px; }
.caption { color: var(--muted); margin-top: 1.4rem; font-size: 1rem; }

/* ── sections ─────────────────────────────────────────────────────── */

section { position: relative; padding: clamp(5rem, 11vw, 9rem) 0; }
.section-title { text-align: center; max-width: 980px; margin: 0 auto clamp(3rem, 6vw, 5rem); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* tall photo cards with a glass panel inside */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1400px; margin: 0 auto; }
.feature {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 16px; min-height: 690px;
  display: flex; flex-direction: column; justify-content: space-between; gap: clamp(1.8rem, 3vw, 2.6rem);
  padding: clamp(1.2rem, 2.2vw, 1.6rem);
  background: var(--card-bg); background-size: cover; background-position: center;
}
.feature::before { /* photo, if present */
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: var(--card-photo, none) center / cover no-repeat;
  transition: transform 1.4s var(--ease-out);
}
.feature:hover::before { transform: scale(1.04); }
.feature::after { /* darken the lower third so the copy reads */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(15,16,17,0) 45%, rgba(15,16,17,0.82) 100%);
}
.feature .copy { max-width: 22rem; padding: 0 0.4rem 0.6rem; }
.feature .copy p { color: var(--muted); margin: 0.3rem 0 0; font-size: 1.06rem; line-height: 1.4; }

.f-bordspil { --card-bg: radial-gradient(120% 80% at 30% 10%, #3c5a35 0%, #1d2d1b 45%, #0d140c 100%); --card-photo: url('img/bordspil.jpg'); }
.f-safnkort { --card-bg: radial-gradient(120% 80% at 60% 20%, #2e5a52 0%, #173430 45%, #0a1615 100%); --card-photo: url('img/safnkortaspil.jpg'); }
.f-commander { --card-bg: radial-gradient(120% 80% at 35% 15%, #3a3560 0%, #1d1a33 45%, #0c0b14 100%); --card-photo: url('img/commander.jpg'); }
.cards.two { grid-template-columns: repeat(2, 1fr); max-width: 1180px; }
.cards.two .feature { min-height: 440px; justify-content: flex-end; }
.feature .copy h3 { font: 300 clamp(2.2rem, 3.4vw, 3rem)/1 var(--serif); letter-spacing: -0.02em; margin-bottom: 0.9rem; }
.cards.two .feature .copy { max-width: 30rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 1.3rem 0 0; padding: 0; }
.tags li { padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,0.08); font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.02em; }
.f-hlutverk { --card-bg: radial-gradient(120% 80% at 50% 0%, #5a4a2a 0%, #2e2614 45%, #120f08 100%); --card-photo: url('img/hlutverkaspil.jpg'); }
.meter { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.meter + .meter { margin-top: 14px; }
.meter b { font-weight: 400; font-variant-numeric: tabular-nums; }
.meter .track { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.meter .track i { display: block; height: 100%; width: var(--w); background: #fff; border-radius: 3px; transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease-out) var(--d, 0.2s); }
.in .meter .track i, .meter.in .track i { transform: scaleX(1); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.stats div { padding: 12px 6px; border-bottom: 1px solid var(--line); }
.stats div:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.stats div:nth-last-child(-n+3) { border-bottom: 0; }
.stats span { display: block; color: var(--muted); font-size: 12px; }
.stats b { font-weight: 400; font-size: 15px; }
.stats .roll { font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 1.1; }

/* steps */
.steps { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1180px; }
.steps li { border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); padding: 1.6rem; min-height: 260px; display: flex; flex-direction: column; }
.steps .n { font: 500 12px/1 var(--mono); color: var(--muted); margin-bottom: auto; }
.steps h3 { font: 300 2rem/1.05 var(--serif); letter-spacing: -0.015em; margin: 3rem 0 0.6rem; }
.steps h3 em { font-style: italic; }
.steps p { margin: 0; color: var(--muted); }

/* closing band with the landscape again */
.cta { overflow: hidden; isolation: isolate; text-align: center; padding: clamp(7rem, 16vw, 13rem) 0; }
.cta .hero-media::after {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(15,16,17,0.4) 35%, rgba(15,16,17,0.4) 65%, var(--bg) 100%);
}
/* the closing band's photo is an <img> in the page, so it never shows a placeholder first */
.cta .actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 2rem; }

.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.4rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem; }
.site-footer, .site-footer a { font: 400 12px/1.5 var(--mono); text-transform: uppercase; color: var(--muted); text-decoration: none; letter-spacing: 0.02em; }
.site-footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-footer a:hover { color: var(--fg); }

/* ── forms ────────────────────────────────────────────────────────── */

.page { position: relative; min-height: 100svh; padding: 140px 0 6rem; isolation: isolate; }
.page .glow { position: absolute; inset: 0 0 auto; height: 70vh; z-index: -1; overflow: hidden; }
.page .glow::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,16,17,0.45), var(--bg)); }
.page .glow img { width: 100%; height: 100%; object-fit: cover; }
.page .wrap { max-width: 1120px; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2.5rem, 7vw, 6rem); align-items: start; }
.page.narrow .wrap { grid-template-columns: 1fr; max-width: 500px; text-align: center; }
.page.narrow .form { text-align: left; }
.page-intro h1 { font-size: clamp(3rem, 6vw, 5.2rem); }
.page-intro .sub { margin-left: 0; }
.page.narrow .page-intro .sub { margin-left: auto; }
.aside-list { list-style: none; padding: 0; margin: 2.6rem 0 0; border-top: 1px solid var(--line); }
.aside-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--muted); display: flex; gap: 1rem; }
.aside-list li b { font: 500 12px/1.9 var(--mono); color: var(--fg); min-width: 1.6rem; }

.form {
  display: grid; gap: 1.2rem; padding: clamp(1.4rem, 3.5vw, 2.2rem); border-radius: 16px;
  background: rgba(19, 20, 21, 0.7); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
.field { display: grid; gap: 0.45rem; }
.field label, .field legend { font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.03em; color: var(--fg-2); }
.field .opt { color: var(--faint); }
.field input[type='text'], .field input[type='email'], .field input[type='tel'], .field input[type='password'], .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--fg);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.85rem 1rem; transition: border-color 0.2s, background-color 0.2s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.08); }
.field .hint { font-size: 0.8rem; color: var(--faint); }
.field .err { font-size: 0.82rem; color: var(--danger); }
.field.invalid input { border-color: var(--danger); }
fieldset.field { border: 0; padding: 0; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.3rem; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); font: 400 12px/1.4 var(--mono); text-transform: uppercase; cursor: pointer; transition: all 0.2s var(--ease); user-select: none; }
.chip span:hover { background: rgba(255, 255, 255, 0.12); }
.chip input:checked + span { background: #fff; color: #000; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.field label.check { display: flex; gap: 0.75rem; align-items: flex-start; font: 400 0.9rem/1.45 var(--sans); text-transform: none; letter-spacing: 0; color: var(--muted); }
.check input { margin-top: 0.2rem; accent-color: #fff; width: 1rem; height: 1rem; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 0.4rem; }
.alert { padding: 0.85rem 1rem; border-radius: 10px; font-size: 0.92rem; background: rgba(255, 138, 122, 0.1); color: var(--danger); }
.alert[hidden] { display: none; }
.done { display: grid; gap: 1rem; }
.done .display { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.done p { color: var(--muted); margin: 0; }

.member-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 3.5rem; }
.member-grid .form { min-height: 220px; align-content: start; }
.member-grid .form p { color: var(--muted); margin: 0; }

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

.reveal { opacity: 0; transform: translateY(32px); filter: blur(6px); transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out), filter 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* hero entrance on load */
.rise { animation: rise 1.4s var(--ease-out) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } }
.hero-media { animation: zoom-out 2.6s var(--ease-out) both; }
@keyframes zoom-out { from { transform: scale(1.08); opacity: 0.4; } }

::view-transition-old(root) { animation: 0.3s var(--ease) both vt-out; }
::view-transition-new(root) { animation: 0.55s var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .meter .track i { transform: none; }
  html { scroll-behavior: auto; }
}

/* ── responsive ───────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .cards, .steps, .member-grid { grid-template-columns: 1fr; }
  .feature { min-height: 560px; }
  .page .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-center { display: none; }
  .site-header .bar { grid-template-columns: 1fr auto; }
  .brand-name { display: none; }
  .row { grid-template-columns: 1fr; }
  .site-header { inset: 10px 10px auto; }
  .pill { min-height: 64px; padding-left: 20px; font-size: 0.92rem; }
  .pill .go { width: 46px; height: 46px; }
  .steps li { min-height: 0; }
  .steps h3 { margin-top: 1.6rem; }
}

/* ── board (stjórn) ───────────────────────────────────────────────── */

.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1180px; margin: 0 auto; }
.person { border-radius: 16px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.portrait {
  aspect-ratio: 4 / 5; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #34413f 0%, #1a2120 55%, #111415 100%);
  display: grid; place-items: center;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.25); transition: transform 1.4s var(--ease-out), filter 0.6s; }
.person:hover .portrait img { transform: scale(1.04); filter: none; }
.portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(19,20,21,0.9)); }
.monogram { font: italic 300 clamp(5rem, 10vw, 8rem)/1 var(--serif); color: rgba(250,250,250,0.85); letter-spacing: -0.04em; }
.person .info { padding: 0 1.5rem 1.6rem; margin-top: -3.2rem; position: relative; z-index: 1; }
.person .role { font: 500 12px/1.33 var(--mono); text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); }
.person .name { font: 300 clamp(1.7rem, 2.4vw, 2.1rem)/1.05 var(--serif); letter-spacing: -0.015em; margin: 0.45rem 0 0; }
.person .text { color: var(--muted); margin: 0.7rem 0 0; font-size: 0.95rem; }

/* ── grant + sponsors ─────────────────────────────────────────────── */

.grant {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center;
  max-width: 1180px; margin: 0 auto 16px; padding: clamp(1.6rem, 4vw, 3.2rem);
  border-radius: 16px; border: 1px solid var(--glass-line);
}
.grant > .bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.grant::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(15,16,17,0.88) 0%, rgba(15,16,17,0.6) 60%, rgba(15,16,17,0.35) 100%); }
.grant h3 { font: 300 clamp(2rem, 3.6vw, 3.2rem)/1 var(--serif); letter-spacing: -0.02em; margin: 0 0 1rem; }
.grant h3 em { font-style: italic; }
.grant p { color: var(--fg-2); margin: 0; max-width: 34rem; }
.grant .support { margin-top: 1.2rem; font: 500 12px/1.4 var(--mono); text-transform: uppercase; color: var(--muted); }
.grant .btn { margin-top: 1.6rem; }
.grant .mark { justify-self: end; text-align: right; }
.grant .mark img { max-height: 190px; width: auto; margin-left: auto; padding: 18px 22px; border-radius: 12px; background: rgba(255,255,255,0.92); }
.grant .year { font: italic 300 clamp(5rem, 12vw, 10rem)/0.85 var(--serif); letter-spacing: -0.04em; }
.grant .year-label { font: 500 12px/1 var(--mono); text-transform: uppercase; color: var(--muted); margin-top: 0.8rem; }

.sponsors { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 1180px; margin: 0 auto; }
.sponsor {
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; min-height: 190px;
  padding: 1.4rem 1.5rem; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line);
  text-decoration: none; transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
a.sponsor:hover { border-color: rgba(255,255,255,0.3); background: #17181a; }
.sponsor .logo { height: 56px; display: flex; align-items: center; gap: 14px; }
.sponsor .logo img { max-height: 56px; max-width: 180px; width: auto; filter: grayscale(1) brightness(1.6); opacity: 0.85; transition: filter 0.4s, opacity 0.4s; }
a.sponsor:hover .logo img { filter: none; opacity: 1; }
.sponsor .wordmark { font: 300 1.8rem/1 var(--serif); letter-spacing: -0.015em; }
.sponsor .meta { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.sponsor .what { font: 500 12px/1.33 var(--mono); text-transform: uppercase; color: var(--muted); }
.sponsor .ext { width: 16px; height: 16px; color: var(--muted); flex: none; transition: transform 0.3s var(--ease), color 0.3s; }
a.sponsor:hover .ext { transform: translate(2px, -2px); color: var(--fg); }
.sponsor.invite { border-style: dashed; background: transparent; }
.sponsor.invite .wordmark em { font-style: italic; }
.sponsor.invite p { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.95rem; }

.photo-credit { position: absolute; right: var(--gutter); bottom: 24px; margin: 0; font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.03em; color: rgba(250,250,250,0.6); }
.photo-credit a { text-decoration: none; }
.photo-credit a:hover { color: var(--fg); }
.support-line { color: var(--muted); }

@media (max-width: 1000px) {
  .board { grid-template-columns: 1fr; max-width: 460px; }
  .grant { grid-template-columns: 1fr; }
  .grant .mark { justify-self: start; text-align: left; }
  .grant .mark img { margin-left: 0; }
}

/* ── board bio dialog ─────────────────────────────────────────────── */

button.person { display: block; width: 100%; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; -webkit-appearance: none; appearance: none; }
button.person:hover { border-color: rgba(255,255,255,0.3); }
button.person:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.person .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 1rem; font: 500 12px/1 var(--mono); text-transform: uppercase; color: var(--muted); transition: color 0.3s; }
.person .more svg { width: 12px; height: 12px; transition: transform 0.3s var(--ease); }
button.person:hover .more { color: var(--fg); }
button.person:hover .more svg { transform: translateX(3px); }

dialog.bio {
  width: min(880px, calc(100vw - 32px)); max-height: calc(100svh - 48px); padding: 0; border: 1px solid var(--glass-line); border-radius: 20px;
  background: rgba(19, 20, 21, 0.86); color: var(--fg); overflow: auto;
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: 0 40px 120px -30px rgba(0,0,0,0.8);
  opacity: 0; transform: translateY(18px) scale(0.98);
  transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out), overlay 0.4s allow-discrete, display 0.4s allow-discrete;
}
dialog.bio[open] { opacity: 1; transform: none; }
@starting-style { dialog.bio[open] { opacity: 0; transform: translateY(18px) scale(0.98); } }
dialog.bio::backdrop { background: rgba(8, 9, 10, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); transition: all 0.4s var(--ease-out), overlay 0.4s allow-discrete, display 0.4s allow-discrete; }
dialog.bio[open]::backdrop { background: rgba(8, 9, 10, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@starting-style { dialog.bio[open]::backdrop { background: rgba(8, 9, 10, 0); backdrop-filter: blur(0); } }
body:has(dialog.bio[open]) { overflow: hidden; }

.bio-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; }
.bio .portrait { aspect-ratio: auto; min-height: 100%; }
.bio .portrait::after { background: linear-gradient(90deg, transparent 60%, rgba(19,20,21,0.6)); }
.bio-body { padding: clamp(1.6rem, 4vw, 2.8rem); display: flex; flex-direction: column; }
.bio-body .role { font: 500 12px/1.33 var(--mono); text-transform: uppercase; color: var(--muted); }
.bio-body h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: 0.6rem 0 1.4rem; }
.bio-body p { color: var(--fg-2); margin: 0 0 1rem; line-height: 1.6; }
.bio-body .faves { margin-top: auto; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.bio-body .faves .label { margin-bottom: 0.7rem; }
.bio-body .faves ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bio-body .faves li { padding: 8px 12px; border-radius: 8px; background: rgba(255,255,255,0.07); font: 400 12px/1.3 var(--mono); text-transform: uppercase; }
.bio-close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--fg); background: rgba(15,16,17,0.55);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background-color 0.3s;
}
.bio-close:hover { background: rgba(255,255,255,0.18); }
.bio-close svg { width: 16px; height: 16px; }

@media (max-width: 760px) {
  .bio-grid { grid-template-columns: 1fr; }
  .bio .portrait { aspect-ratio: 16 / 10; min-height: 0; }
  .bio .portrait::after { background: linear-gradient(180deg, transparent 50%, rgba(19,20,21,0.9)); }
  .bio .monogram { font-size: 5rem; }
}
.bio-close:focus:not(:focus-visible) { outline: none; }

/* ── um félagið ───────────────────────────────────────────────────── */

.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); max-width: 1180px; margin: 0 auto; align-items: start; }
.about-head { position: sticky; top: 120px; }
.about-head h2 { font-size: clamp(2.6rem, 5.4vw, 4.8rem); margin: 0.6rem 0 0; }
.about-body p { margin: 0 0 1.1rem; color: var(--muted); font-size: 1.05rem; line-height: 1.6; max-width: 36rem; }
.about-body .lead { color: var(--fg); font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.5; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 2rem 0 0; border-top: 1px solid var(--line); max-width: 36rem; }
.facts div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts div:nth-child(odd) { padding-right: 1rem; }
.facts dt { font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.facts dd { margin: 0.25rem 0 0; font: 300 1.25rem/1.2 var(--serif); }

/* the board, smaller: a row of name chips under "um félagið" */
.board-block { max-width: 1180px; margin: clamp(3.5rem, 7vw, 6rem) auto 0; padding-top: 2rem; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.board-head h3 { font: 300 2rem/1.05 var(--serif); letter-spacing: -0.015em; }
.board-head h3 em { font-style: italic; }
.board-head p { color: var(--muted); margin: 0.6rem 0 0; max-width: 22rem; }
.board.compact { grid-template-columns: 1fr; gap: 10px; max-width: none; margin: 0; }
.board.compact .person { display: flex; align-items: center; gap: 16px; padding: 12px 18px 12px 12px; border-radius: 14px; text-align: left; }
.board.compact .portrait { width: 64px; height: 64px; aspect-ratio: 1; border-radius: 50%; flex: none; }
.board.compact .portrait::after { display: none; }
.board.compact .monogram { font-size: 1.9rem; }
.board.compact .info { margin: 0; padding: 0; flex: 1; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name more" "role more" "text text"; align-items: center; column-gap: 1rem; }
.board.compact .name { grid-area: name; font-size: 1.45rem; margin: 0; }
.board.compact .role { grid-area: role; margin-top: 0.3rem; }
.board.compact .text { grid-area: text; }
.board.compact .more { grid-area: more; margin: 0; }

/* ── upcoming events + first-timer Q&A (above the schedule strip) ──── */

.dates-block { max-width: 1180px; margin: 0 auto clamp(2rem, 4vw, 3rem); display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; }
.dates-block > div { padding: clamp(1.4rem, 3vw, 2rem); border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); }
.dates { list-style: none; margin: 0; padding: 0; }
.dates li { display: grid; grid-template-columns: 4.6rem 1fr; gap: 1rem; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.dates li:first-child { border-top: 0; padding-top: 0; }
.dates .day { font: 300 2.4rem/0.9 var(--serif); letter-spacing: -0.02em; }
.dates .day small { display: block; margin-top: 0.35rem; font: 500 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.dates h3 { font: 400 1.05rem/1.3 var(--sans); display: flex; align-items: center; gap: 8px; }
.dates .meta { color: var(--muted); font-size: 0.92rem; margin: 0.15rem 0 0; }
.dates .note { color: var(--faint); font-size: 0.88rem; margin: 0.2rem 0 0; }
.dates .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(159,216,240,0.5); animation: pulse 2.4s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(159,216,240,0); } 100% { box-shadow: 0 0 0 0 rgba(159,216,240,0); } }
.dates-empty { color: var(--muted); margin: 0; }
.faq { margin: 0; }
.faq div + div { margin-top: 1.1rem; }
.faq dt { font: 400 1.05rem/1.3 var(--sans); }
.faq dd { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.95rem; }

/* ── in English ──────────────────────────────────────────────────────── */

.english { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 0.8fr 1.2fr; column-gap: clamp(2rem, 6vw, 5rem); align-items: start;
  padding: clamp(1.6rem, 3.5vw, 2.6rem); border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); }
.english .label { grid-column: 1 / -1; }
.english h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.english p { color: var(--muted); margin: 0 0 1rem; }
.english p:last-child { margin-bottom: 0; }

.volunteer { max-width: 1180px; margin: 16px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: clamp(1.6rem, 3vw, 2.4rem); border-radius: 16px; border: 1px dashed rgba(255,255,255,0.22); }
.volunteer h3 { font: 300 clamp(1.7rem, 2.6vw, 2.2rem)/1.1 var(--serif); letter-spacing: -0.015em; }
.volunteer h3 em { font-style: italic; }
.volunteer p { margin: 0.7rem 0 0; color: var(--muted); max-width: 44rem; }
.volunteer .btn { flex: none; }

@media (max-width: 1000px) {
  .about, .board-block { grid-template-columns: 1fr; }
  .dates-block, .english { grid-template-columns: 1fr; }
  .english h2 { margin-bottom: 1.2rem; }
  .cards.two { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .volunteer { flex-direction: column; align-items: flex-start; }
  .board.compact .info { grid-template-areas: "name" "role" "more" "text"; grid-template-columns: 1fr; }
  .board.compact .more { margin-top: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) { .dates .dot { animation: none; } }
@media (max-width: 1000px) { .about-head { position: static; } }

/* when & where — a glass strip under "Magic fyrst" */
.schedule { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.1fr 1fr; max-width: 1180px; margin: 0 auto clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); overflow: hidden; }
.schedule div { padding: 18px clamp(1rem, 2.4vw, 2rem); }
.schedule div + div { border-left: 1px solid var(--line); }
.schedule dt { font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.schedule dd { margin: 0.3rem 0 0; font: 300 1.35rem/1.15 var(--serif); white-space: nowrap; }
.schedule dd em { font-style: italic; }
@media (max-width: 1000px) {
  .schedule { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .schedule dd { white-space: normal; }
  .schedule div + div { border-left: 0; }
  .schedule div { border-bottom: 1px solid var(--line); }
  .schedule div:first-child { grid-column: 1 / -1; }
  .schedule div:nth-child(odd):not(:first-child) { border-left: 1px solid var(--line); }
  .schedule div:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ── long text pages (persónuvernd) ───────────────────────────────── */

.page.text .wrap { grid-template-columns: 1fr; max-width: 760px; gap: 2.5rem; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 2.4rem 0 0.8rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin: 0 0 1rem; line-height: 1.6; color: var(--muted); }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.35rem; }
.prose strong { color: var(--fg-2); font-weight: 500; }
.prose a { text-underline-offset: 3px; }
.prose .updated { font: 500 12px/1.4 var(--mono); text-transform: uppercase; color: var(--faint); margin-top: 2.4rem; }

/* ── members area ─────────────────────────────────────────────────── */
.sample-note { margin: 1rem 0 0; font: 400 12px/1.5 var(--mono); text-transform: uppercase; color: var(--faint); }
#m-error { margin-top: 1.5rem; max-width: 34rem; }
.m-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 3rem 0 0;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: rgba(19, 20, 21, 0.7); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.m-stats > div { padding: 1.3rem 1.4rem 1.4rem; display: grid; gap: 0.35rem; align-content: start; }
.m-stats > div + div { border-left: 1px solid var(--line); }
.m-stats dt { font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.m-stats dd { margin: 0; font: italic 300 clamp(2.2rem, 4vw, 3rem)/1 var(--serif); font-variant-numeric: tabular-nums; }
.m-stats small { color: var(--faint); font-size: 0.8rem; }

.m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.m-card { align-content: start; gap: 0.9rem; }
.m-card .label { margin: 0; }
.m-card h3 { margin: 0; }
.m-card > p:not(.label) { color: var(--muted); margin: 0; font-size: 0.95rem; }
.m-wide { grid-column: 1 / -1; }
.m-empty { color: var(--muted); }

.m-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.m-table th { text-align: left; font: 500 11px/1.4 var(--mono); text-transform: uppercase; color: var(--faint); padding: 0 0.8rem 0.6rem 0; }
.m-table td { padding: 0.75rem 0.8rem 0.75rem 0; border-top: 1px solid var(--line); vertical-align: top; }
.m-table td small { display: block; color: var(--faint); font-size: 0.8rem; }
.m-table td:first-child { color: var(--muted); white-space: nowrap; }
.m-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-table tr.first td:nth-child(3) { color: var(--fg); font-weight: 500; }
.m-table tr.first td:nth-child(3)::before { content: '★ '; color: #e7c86a; }

.m-list { list-style: none; margin: 0; padding: 0; }
.m-list li { display: grid; grid-template-columns: 4.2rem 1fr; gap: 0.6rem; padding: 0.7rem 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.m-list .when { color: var(--muted); white-space: nowrap; }
.m-list small { display: block; color: var(--faint); font-size: 0.8rem; }
.m-list .won { margin-left: 0.5rem; font: 500 10px/1 var(--mono); text-transform: uppercase; padding: 3px 6px; border-radius: 6px; background: rgba(231, 200, 106, 0.15); color: #e7c86a; vertical-align: 2px; }

.m-adild div { margin-top: auto; }
.btn.danger { background: rgba(255, 138, 122, 0.14); color: var(--danger); }
.btn.danger:hover { background: rgba(255, 138, 122, 0.24); }

dialog.m-dialog {
  width: min(460px, calc(100vw - 32px)); padding: 0; border: 0; background: transparent; color: var(--fg);
}
dialog.m-dialog::backdrop { background: rgba(8, 9, 10, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog.m-dialog .form { background: rgba(19, 20, 21, 0.94); box-shadow: 0 40px 120px -30px rgba(0,0,0,0.8); }
dialog.m-dialog h2 { margin: 0; font-size: 1.6rem; }
dialog.m-dialog p { margin: 0; color: var(--muted); }

@media (max-width: 860px) {
  .m-grid { grid-template-columns: 1fr; }
  .m-stats { grid-template-columns: 1fr 1fr; }
  .m-stats > div:nth-child(3) { border-left: 0; }
  .m-stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Facebook line under the event cards, governance notes under "Aðild", language switch */
.fb-line { max-width: 40rem; margin-top: clamp(2rem, 4vw, 3rem); }
.fb-line a { text-underline-offset: 3px; }
.governance { max-width: 1180px; margin: 16px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.governance > div { padding: 1.4rem 1.6rem; border-radius: 16px; border: 1px solid var(--line); }
.governance h3 { font: 300 1.5rem/1.1 var(--serif); letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.governance p { margin: 0; color: var(--muted); }
.lang-switch { font-weight: 500; }
@media (max-width: 760px) { .governance { grid-template-columns: 1fr; } .cards.two .feature { min-height: 360px; } }
.fb-line + .volunteer { margin-top: clamp(2.5rem, 5vw, 4rem); }

/* ── bylaws: one collapsible row per article ─────────────────────── */
.bylaws { max-width: 860px; margin: 0 auto; border-top: 1px solid var(--line); }
.bylaws details { border-bottom: 1px solid var(--line); }
.bylaws summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 0.2rem; font: 300 1.35rem/1.2 var(--serif); }
.bylaws summary::-webkit-details-marker { display: none; }
.bylaws summary::after { content: '+'; font: 300 1.5rem/1 var(--sans); color: var(--muted); transition: transform 0.25s var(--ease); }
.bylaws details[open] summary::after { transform: rotate(45deg); }
.bylaws summary:hover::after { color: var(--fg); }
.bylaws details > div { padding: 0 0.2rem 1.3rem; color: var(--muted); max-width: 46rem; }
.bylaws details p { margin: 0 0 0.8rem; }
.bylaws details ol { margin: 0 0 0.8rem; padding-left: 1.4rem; }
.bylaws details li + li { margin-top: 0.3rem; }
.bylaws-foot { margin: 1.4rem 0 0; }
.bylaws-foot a { color: var(--muted); text-underline-offset: 3px; }
.bylaws-foot a:hover { color: var(--fg); }

/* Upcoming sets on the members page: a countdown per set, the next one lit. */
.m-sets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.m-sets li {
  display: grid; gap: 0.35rem; align-content: start; padding: 1.1rem 1.2rem 1.2rem;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.03);
}
.m-sets li.next { border-color: rgba(159, 216, 240, 0.4); background: rgba(159, 216, 240, 0.06); }
.m-sets .count { font: italic 300 clamp(2.2rem, 4vw, 2.8rem)/1 var(--serif); font-variant-numeric: tabular-nums; }
.m-sets li.next .count { color: var(--accent); }
.m-sets .count small { margin-left: 0.4rem; font: 500 11px/1 var(--mono); font-style: normal; text-transform: uppercase; color: var(--muted); }
.m-sets .name { font-weight: 500; margin-top: 0.3rem; }
.m-sets .date { color: var(--muted); font-size: 0.9rem; }
