@import "editorial.css?v=12";

/*
 * metill.is — Design System CSS
 *
 * This is a starter stylesheet using CSS custom properties from DESIGN.md.
 * Replace with compiled Tailwind output once tailwindcss CLI is set up.
 * For now, this provides the design tokens + basic utility classes.
 */

/* ===== DESIGN TOKENS (Light) ===== */
:root {
  --bg-paper: #FAFAF7;
  --surface: #FFFFFF;
  --raised: #F5F5F2;
  --basalt: #1C1C28;
  --grot: #64748B;
  --subtle: #94A3B8;
  --jokull: #1B6B8A;
  --jokull-hover: #145A73;
  --jokull-light: #E8F4F8;
  --midnaetursol: #C4841D;
  --midnaetursol-light: #FEF3E2;
  --border: #E2E4E8;
  --border-light: #F0F1F3;
  --success: #15803D;
  --warning: #B45309;
  --error: #B91C1C;

  /* Editorial */
  --ink:             #0E0E16;
  --rule:            #1C1C28;
  --border-strong:   #CACDD4;
  --jokull-ink:      #0D3F52;

  /* Semantic — Íþróttir */
  --positive:        #2F7D5B;
  --negative:        #B8353E;
}

/* ===== DESIGN TOKENS (Dark) ===== */
[data-theme="dark"] {
  --bg-paper: #0F1117;
  --surface: #1C1E26;
  --raised: #252730;
  --basalt: #E8E9ED;
  --grot: #94A3B8;
  --subtle: #64748B;
  --jokull: #3B9EBF;
  --jokull-hover: #4DB8D9;
  --jokull-light: #1A2E35;
  --midnaetursol: #D4941D;
  --midnaetursol-light: #2A2115;
  --border: #2E3039;
  --border-light: #252730;

  /* Editorial */
  --ink:             #F2F3F7;
  --rule:            #E8E9ED;
  --border-strong:   #4A4D57;
  --jokull-ink:      #B8DBEB;

  /* Semantic — Íþróttir */
  --positive:        #5FBF8E;
  --negative:        #E67580;
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

/* ===== FONT FAMILIES ===== */
.font-display { font-family: 'Fraunces', 'Georgia', serif; }
.font-body { font-family: 'Source Sans 3', system-ui, sans-serif; }
.font-mono { font-family: 'Geist Mono', 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }

body { font-family: 'Source Sans 3', system-ui, sans-serif; }

/* ===== COLOUR UTILITIES ===== */
.bg-paper { background-color: var(--bg-paper); }
.bg-surface { background-color: var(--surface); }
.bg-raised { background-color: var(--raised); }
.text-basalt { color: var(--basalt); }
.text-grot { color: var(--grot); }
.text-subtle { color: var(--subtle); }
.text-jokull { color: var(--jokull); }
.text-midnaetursol { color: var(--midnaetursol); }
.bg-jokull { background-color: var(--jokull); }
.bg-jokull\/5 { background-color: color-mix(in srgb, var(--jokull) 5%, transparent); }
.bg-jokull\/10 { background-color: color-mix(in srgb, var(--jokull) 10%, transparent); }
.border-border { border-color: var(--border); }
.border-border-light { border-color: var(--border-light); }
.border-jokull { border-color: var(--jokull); }
.hover\:border-jokull:hover { border-color: var(--jokull); }
.hover\:bg-jokull-hover:hover { background-color: var(--jokull-hover); }
.focus\:border-jokull:focus { border-color: var(--jokull); }
.focus\:ring-jokull\/20:focus { --tw-ring-color: color-mix(in srgb, var(--jokull) 20%, transparent); }

/* ===== LAYOUT ===== */
.max-w-screen-xl { max-width: 1200px; }
.max-w-3xl { max-width: 48rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.-mt-4 { margin-top: -1rem; }
.mt-8 { margin-top: 2rem; }
.mt-16 { margin-top: 4rem; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* ===== FLEXBOX & GRID ===== */
.flex { display: flex; }
.grid { display: grid; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.hidden { display: none; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.flex-shrink-0 { flex-shrink: 0; }
.self-start { align-self: flex-start; }
.gap-3 { gap: 0.75rem; }
.text-center { text-align: center; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col-span-3 { grid-column: span 3 / span 3; }
.ml-auto { margin-left: auto; }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .md\:hidden { display: none; }
  .md\:flex { display: flex; }
  .md\:block { display: block; }
  .md\:gap-6 { gap: 1.5rem; }
}

/* ===== TYPOGRAPHY ===== */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.no-underline { text-decoration: none; }
.hover\:underline:hover { text-decoration: underline; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ===== BORDERS & SHAPES ===== */
.border { border-width: 1px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-l-\[3px\] { border-left-width: 3px; border-left-style: solid; }
.border-dashed { border-style: dashed; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.rounded-r-sm { border-top-right-radius: 0.25rem; border-bottom-right-radius: 0.25rem; }

/* ===== EFFECTS ===== */
.shadow-sm { box-shadow: 0 1px 2px rgba(28,28,40,0.04); }
.shadow-md { box-shadow: 0 4px 12px rgba(28,28,40,0.06); }
.hover\:shadow-md:hover { box-shadow: 0 4px 12px rgba(28,28,40,0.06); }
.transition-shadow { transition-property: box-shadow; transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 150ms; }
.transition-all { transition-property: all; transition-duration: 150ms; }

/* ===== POSITIONING ===== */
.relative { position: relative; }
.absolute { position: absolute; }

/* ===== INTERACTIVE ===== */
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }
.w-full { width: 100%; }
.w-9 { width: 2.25rem; }
.h-9 { height: 2.25rem; }
.h-80 { height: 20rem; }
.h-96 { height: 24rem; }
.min-h-\[300px\] { min-height: 300px; }
.min-h-\[400px\] { min-height: 400px; }
.min-h-\[500px\] { min-height: 500px; }
.max-h-60 { max-height: 15rem; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.overflow-y-auto { overflow-y: auto; }
.opacity-50 { opacity: 0.5; }
.outline-none { outline: none; }
.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--tw-ring-color, var(--jokull)); }
.focus\:border-jokull:focus { border-color: var(--jokull); }
.cursor-pointer { cursor: pointer; }
.text-white { color: #ffffff; }
.bg-transparent { background-color: transparent; }
.border-transparent { border-color: transparent; }
.hover\:bg-raised:hover { background-color: var(--raised); }
.hover\:text-basalt:hover { color: var(--basalt); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

/* ===== Added 2026-05-12: utilities referenced in templates but
   missing from the hand-written starter. Once tailwindcss CLI is
   installed these can be retired in favour of compiled output. ===== */
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-red-700 { color: var(--error); }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-16 { margin-bottom: 4rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.p-12 { padding: 3rem; }
.gap-1\.5 { gap: 0.375rem; }
.min-h-\[100px\] { min-height: 100px; }
.min-h-\[320px\] { min-height: 320px; }
.min-h-\[420px\] { min-height: 420px; }
.min-w-\[240px\] { min-width: 240px; }
.min-w-\[720px\] { min-width: 720px; }
.border-l-\[3px\] { border-left-width: 3px; }
.overflow-x-auto { overflow-x: auto; }
.whitespace-nowrap { white-space: nowrap; }
.tracking-wide { letter-spacing: 0.025em; }
.select-none { -webkit-user-select: none; user-select: none; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-10 > * + * { margin-top: 2.5rem; }
.transition-colors { transition: background-color 150ms, border-color 150ms, color 150ms, fill 150ms, stroke 150ms; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

/* Hover variants */
.hover\:text-jokull:hover { color: var(--jokull); }
.hover\:text-red-700:hover { color: var(--error); }
.hover\:bg-paper:hover { background-color: var(--bg-paper); }
.hover\:bg-jokull\/5:hover { background-color: color-mix(in srgb, var(--jokull) 5%, transparent); }

/* Disabled variants */
.disabled\:opacity-30:disabled { opacity: 0.3; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }

/* Dark mode utility */
[data-theme="dark"] .dark\:hidden { display: none; }
[data-theme="dark"] .dark\:inline { display: inline; }

/* ===== MUNICIPALITY PICKER ===== */
.picker-dropdown {
  box-shadow: 0 8px 24px rgba(28,28,40,0.10), 0 2px 8px rgba(28,28,40,0.06);
}
.picker-search {
  border: none;
  border-radius: 0;
  background: transparent;
  transition: border-color 150ms;
}
.picker-search:focus-within {
  border: none;
}
.picker-row {
  border-left: 3px solid transparent;
  transition: background-color 100ms, border-color 100ms;
}
.picker-row:hover { background: var(--raised); }
.picker-row.is-selected {
  border-left-color: var(--jokull);
  background: color-mix(in srgb, var(--jokull) 8%, transparent);
}
.picker-row.is-selected:hover {
  background: color-mix(in srgb, var(--jokull) 12%, transparent);
}
.picker-check {
  width: 16px; height: 16px;
  border-radius: 3px;
  border: 1.5px solid var(--border);
  background: var(--bg-paper);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 150ms;
}
.picker-row.is-selected .picker-check {
  border-color: var(--jokull);
  background: var(--jokull);
}
.picker-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--jokull) 8%, transparent);
  color: var(--jokull);
  font-size: 0.75rem;
  line-height: 1.25rem;
  transition: background-color 150ms;
}
.picker-tag:hover {
  background: color-mix(in srgb, var(--jokull) 14%, transparent);
}
.picker-tag button {
  opacity: 0.5;
  transition: opacity 150ms;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1;
}
.picker-tag:hover button { opacity: 1; }

/* Links inside content */
a { color: inherit; }
