/* Shared styles for all tunabattle.no tabs (generated pages include this). */
:root {
  --navy: #0a2350;
  --sea: #1d5fc4;
  --red: #e0262f;
  --spray: #f5f8fc;
  --granite: #5d6672;
  --ink: #0f1b2e;
  --line: #d5deea;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--spray);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}
img { max-width: 100%; display: block; }
a { color: var(--sea); text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.wrap { width: min(100% - 32px, 1100px); margin-inline: auto; }
.narrow { max-width: 68ch; }

/* Hero: the poster is the identity */
.hero {
  background: var(--navy);
  padding: 24px 0 0;
}
.hero picture img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: 6px 6px 0 0;
}
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 18px 40px -24px rgba(10, 35, 80, .6);
  position: relative;
  top: 40px;
  margin-top: -40px;
}
.facts div { padding: 18px 22px; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; }
.facts dt { font-size: .875rem; color: var(--granite); }
.facts dd {
  margin: 2px 0 0;
  font: italic 700 1.5rem/1.15 var(--display);
  color: var(--navy);
}
@media (max-width: 760px) {
  .hero { padding-top: 0; }
  .hero .wrap { width: 100%; }
  .hero picture img { border-radius: 0; }
  .facts { grid-template-columns: 1fr 1fr; top: 0; margin-top: 0; border-radius: 0; box-shadow: none; }
  .facts div:nth-child(3) { border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .facts div { padding: 14px 16px; }
}

/* Section headings: the one loud element, a skewed brush stripe */
h2 {
  font: italic 900 clamp(2rem, 5vw, 2.75rem)/1 var(--display);
  color: #fff;
  display: inline-block;
  position: relative;
  padding: 10px 26px 12px 18px;
  margin: 0 0 28px -6px;
  z-index: 0;
}
h2::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--red);
  transform: skewX(-14deg);
  z-index: -1;
  clip-path: polygon(0 8%, 100% 0, 97% 100%, 2% 92%);
}
h2.blue::before { background: var(--navy); }

section { padding: 72px 0 8px; }
section:first-of-type { padding-top: 96px; }
@media (max-width: 760px) { section:first-of-type { padding-top: 48px; } }

.lede {
  font-size: 1.25rem;
  line-height: 1.55;
  margin: 0 0 16px;
}
.lede strong { color: var(--navy); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 4px;
  font: 700 1rem/1 var(--body);
  text-decoration: none;
}
.btn-primary { background: var(--sea); color: #fff; }
.btn-primary:hover { background: var(--navy); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #b81d25; }
.facts dd a { color: var(--red); }
.btn-outline { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* Organizers: two small round portraits */
.organizers { margin-top: 40px; }
.organizers h3 { font: italic 800 1.5rem/1.1 var(--display); color: var(--navy); margin: 0 0 16px; }
.organizers ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px 40px; }
.organizers li { display: flex; align-items: center; gap: 16px; }
.organizers img {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--red);
}
.organizers strong { display: block; font: italic 800 1.375rem/1.1 var(--display); color: var(--navy); }
.organizers span { color: var(--granite); font-size: .95rem; }
.rules.rules-weather { border-left-color: var(--sea); }
.btn-quiet {
  background: transparent; color: var(--granite);
  border: 2px dashed var(--line);
  cursor: default;
}

/* Practical info: a harbour-notice list, not a card grid */
.notice {
  list-style: none; margin: 0; padding: 0;
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.notice li {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 8px 32px;
  padding: 22px 26px;
  border-top: 1px solid var(--line);
}
.notice li:first-child { border-top: 0; }
.notice h3 {
  margin: 0;
  font: italic 700 1.45rem/1.15 var(--display);
  color: var(--navy);
}
.notice p { margin: 0 0 8px; max-width: 62ch; }
.notice p:last-child { margin-bottom: 0; }
.price { font-weight: 700; color: var(--red); white-space: nowrap; }
@media (max-width: 760px) {
  .notice li { grid-template-columns: 1fr; padding: 18px 16px; }
}

/* Coming soon */
.soon {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.soon > div {
  border: 2px dashed var(--line);
  border-radius: 6px;
  padding: 20px 22px;
}
.soon h3 { margin: 0 0 4px; font: italic 700 1.45rem/1.15 var(--display); color: var(--navy); }
.soon p { margin: 0; color: var(--granite); }
.soon p + p { margin-top: 8px; }
.rules { margin-top: 16px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--navy); border-radius: 6px; padding: 20px 24px; }
.rules h3 { margin: 0 0 6px; font: italic 700 1.45rem/1.15 var(--display); color: var(--navy); }
.rules p { margin: 0 0 8px; max-width: 72ch; }
.rules p:last-child { margin: 0; }
.soon .set { border: 1px solid var(--line); background: #fff; }
.soon .set p { color: var(--ink); }
@media (max-width: 760px) { .soon { grid-template-columns: 1fr; } }

.board {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.board iframe { display: block; width: 100%; height: 560px; border: 0; }
.board.live-map iframe { height: 640px; }
@media (max-width: 760px) { .board.live-map iframe { height: 520px; } }
.press { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 24px; }
.press h3 { font: italic 700 1.5rem/1.1 var(--display); color: var(--navy); margin: 18px 0 8px; }
.press h3:first-child { margin-top: 0; }
.press ul { margin: 0; padding-left: 20px; }
.press li { margin-bottom: 4px; }
.press-note { color: var(--granite); font-size: .95rem; }
.press ul.press-imgs { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.press-imgs li:first-child { grid-column: 1 / -1; }
.press-imgs img { width: 100%; height: auto; border-radius: 4px; }
.press-imgs span { display: block; font-size: .9rem; color: var(--granite); margin-top: 4px; }
@media (max-width: 760px) { .press { grid-template-columns: 1fr; padding: 18px 16px; } }
.board-h { font: italic 700 1.75rem/1.1 var(--display); color: var(--navy); margin: 32px 0 12px; }
.board-note { margin: 10px 0 0; font-size: .9375rem; color: var(--granite); }
@media (max-width: 760px) { .board iframe { height: 480px; } }

.altskjer { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px 12px; margin-top: 16px; }

.merch {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center;
  background: var(--navy); color: #e6ecf7; border-radius: 6px; padding: 32px;
}
.merch .lede { color: #fff; }
.merch-deadline {
  margin: 0 0 22px; padding: 14px 16px; border-radius: 4px;
  background: rgba(255, 255, 255, .08); border-left: 4px solid var(--red);
}
.merch-deadline strong { color: #fff; }
.merch-img img { width: 100%; height: auto; border-radius: 4px; transform: rotate(2deg); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); }
.btn-big { padding: 18px 28px; font-size: 1.125rem; }
@media (max-width: 760px) {
  .merch { grid-template-columns: 1fr; padding: 22px 16px; gap: 20px; }
  .merch-img { order: -1; }
  .merch-img img { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .merch-img img { transform: none; } }

.map {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 28px;
  align-items: start;
}
.map iframe {
  width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: 6px;
  background: var(--line);
}
@media (max-width: 760px) { .map { grid-template-columns: 1fr; } }

footer {
  margin-top: 88px;
  background: var(--navy);
  color: #cfdaf0;
  padding: 44px 0 52px;
}
footer .sign {
  font: italic 900 clamp(2.4rem, 7vw, 3.6rem)/1 var(--display);
  color: #fff;
  margin: 0 0 12px;
}
footer a { color: #fff; }
footer p { margin: 0 0 6px; }
footer .credit { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.15); font-size: .875rem; color: #9fb2d6; }
footer .credit a { color: #cfdaf0; }
footer .credit p { margin: 0 0 4px; }

/* Fish facts: teaser card and dialog (a copy of FishComp's species modal) */
#makrellstorje { padding-top: 40px; }
.fish-teaser {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; align-items: center;
  background: linear-gradient(135deg, #e8f4f8 0%, #d4e8f0 50%, #f5f1e8 100%);
  border-radius: 6px; padding: 24px 28px;
}
.fish-teaser img { width: 100%; height: auto; mix-blend-mode: multiply; }
.fish-teaser h3 { margin: 0 0 6px; font: italic 900 2rem/1.05 var(--display); color: var(--navy); }
.fish-teaser p { margin: 0 0 18px; }
.fish-teaser button { border: 0; cursor: pointer; }
@media (max-width: 760px) { .fish-teaser { grid-template-columns: 1fr; padding: 18px 16px; gap: 12px; } }

dialog.fish {
  --gold: #c9a227; --gold-light: #e8d48a; --gold-dark: #8b6914; --deep: #0a2540; --slate: #64748b; --cream: #fffef9;
  width: min(720px, calc(100% - 24px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: 16px; overflow: auto;
  background: var(--cream); color: var(--ink);
  box-shadow: 0 12px 40px rgba(10, 37, 64, .15);
}
dialog.fish::backdrop { background: rgba(10, 35, 80, .55); }
.fish-hero {
  position: relative; text-align: center; padding: 40px 32px 24px;
  background: linear-gradient(135deg, #e8f4f8 0%, #d4e8f0 50%, #f5f1e8 100%);
}
.fish-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .9); color: var(--slate); font-size: 1.5rem; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}
.fish-close:hover { background: var(--deep); color: #fff; }
.fish-close:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.fish-img img { width: 100%; max-width: 560px; height: auto; margin: 0 auto 8px; mix-blend-mode: multiply; }
.fish-credit { margin: 0 0 14px; font-size: .75rem; color: var(--slate); }
h2.fish-name { display: block; margin: 0 0 4px; padding: 0; font: italic 900 2.5rem/1.05 var(--display); color: var(--deep); }
h2.fish-name::before { display: none; }
.fish-alt { margin: 0; font-size: .9rem; color: var(--slate); }
.fish-alt:empty { display: none; }
.fish-sci { margin: 2px 0 0; font-style: italic; font-size: 1.1rem; color: var(--slate); }
.fish-strip {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 12px;
  padding: 18px 32px; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #fef9e7 0%, #fdf6e3 50%, #fcf3d9 100%);
  border-top: 1px solid var(--gold-light);
}
.fish-strip + .fish-strip { border-top-style: dashed; }
.fish-strip:last-of-type, .fish-strip-world { border-bottom: 1px solid var(--gold-light); }
.fish-strip::before {
  content: ""; position: absolute; inset: 0 -100%;
  background: linear-gradient(90deg, transparent 0%, rgba(201, 162, 39, .1) 50%, transparent 100%);
  animation: fish-shimmer 3s ease-in-out infinite; pointer-events: none;
}
@keyframes fish-shimmer { 0%, 100% { transform: translateX(-25%); } 50% { transform: translateX(25%); } }
.fish-strip-label { font-size: .8rem; font-weight: 700; letter-spacing: .08em; color: var(--gold-dark); }
.fish-strip-weight { font: italic 900 1.9rem/1 var(--display); color: var(--deep); }
.fish-strip-meta { font-size: .95rem; }
.fish-strip-link { font-size: .9rem; font-weight: 700; color: var(--gold-dark); }
.fish-body { padding: 24px 32px 32px; }
.fish-stats {
  display: flex; justify-content: center; gap: 40px; margin: 0 0 24px; padding-bottom: 20px;
  border-bottom: 1px solid rgba(100, 116, 139, .15); text-align: center;
}
.fish-stats div { display: flex; flex-direction: column; }
.fish-stats dd { margin: 0; font-weight: 700; }
.fish-stats dt { font-size: .8rem; color: var(--slate); }
.fish-desc { margin: 0 0 18px; line-height: 1.7; max-width: 62ch; }
.fish-desc::first-letter { float: left; font: italic 900 3.1em/.8 var(--display); color: var(--deep); margin: 6px 8px 0 0; }
.fish-sources { font-size: .85rem; color: var(--slate); margin: 0 0 10px; }
.fish-more { margin: 0; font-weight: 700; }
@media (max-width: 760px) {
  .fish-hero { padding: 48px 16px 18px; }
  h2.fish-name { font-size: 2rem; }
  .fish-strip, .fish-body { padding-left: 16px; padding-right: 16px; }
  .fish-stats { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) { .fish-strip::before { animation: none; } }

/* ---------- "Takk for i år" banner ---------- */
.over {
  background: var(--red); color: #fff; text-align: center;
  padding: 14px 16px 16px;
}
.over p { margin: 0; }
.over .tag { font: italic 900 clamp(1.6rem, 6vw, 2.6rem)/1.05 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.over .sub { font-size: 1rem; margin-top: 6px; }
.over a { color: #fff; font-weight: 700; }

/* ---------- tab menu (one page per tab, like havfiskern.no) ---------- */
.tabs {
  position: sticky; top: 0; z-index: 10;
  background: var(--navy); border-bottom: 4px solid var(--red);
  box-shadow: 0 6px 18px -12px rgba(10, 35, 80, .8);
}
.tabs .wrap { display: flex; align-items: center; gap: 20px; }
.tabs .brand {
  flex: none; color: #fff; text-decoration: none;
  font: italic 900 1.35rem/1 var(--display); letter-spacing: .01em; padding: 14px 0;
}
.tabs ul {
  list-style: none; margin: 0 0 0 auto; padding: 0;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
}
.tabs ul::-webkit-scrollbar { display: none; }
.tabs a.tab {
  display: block; white-space: nowrap; padding: 16px 12px 13px;
  color: #cfdaf0; text-decoration: none; font-weight: 700; font-size: .98rem;
  border-bottom: 3px solid transparent;
}
.tabs a.tab:hover { color: #fff; }
.tabs a.tab[aria-current="page"] { color: #fff; border-bottom-color: var(--red); }
@media (max-width: 960px) {
  .tabs .wrap { display: block; width: 100%; }
  .tabs .brand { display: block; padding: 12px 16px 2px; font-size: 1.2rem; }
  .tabs ul { margin: 0; padding: 0 56px 0 6px;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .tabs a.tab { padding: 12px 10px 11px; font-size: .95rem; }
}

/* ---------- subpage head ---------- */
.page-head { background: var(--navy); color: #e6ecf7; padding: 40px 0 44px; }
.page-head h1 { font: italic 900 clamp(2.4rem, 8vw, 4rem)/1 var(--display); color: #fff; margin: 0 0 10px; }
.page-head p { margin: 0; font-size: 1.15rem; max-width: 62ch; }
.page-head + main section:first-of-type { padding-top: 48px; }

/* Home: short summary of the year */
.year-stats { margin-top: 0; }
.media-list { list-style: none; margin: 0; padding: 0; }
.media-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.media-list li:first-child { border-top: 0; padding-top: 0; }
.media-list .src { display: block; font-size: .875rem; color: var(--granite); }

/* Makrellstørje tab: the species card inline instead of in a dialog */
article.fish { max-width: 760px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #fffef9;
  --gold: #c9a227; --gold-light: #e8d48a; --gold-dark: #8b6914; --deep: #0a2540; --slate: #64748b;
  box-shadow: 0 12px 40px rgba(10, 37, 64, .15); }

/* Lagene: team names as cards (alphabetical, deliberately no numbers: they would read as a ranking) */
.teams { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.teams .team {
  display: flex; align-items: flex-start; gap: 16px;
  background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--red); border-radius: 6px; padding: 16px 18px;
}
.team-logo { flex: 0 0 72px; width: 72px; height: 72px; display: grid; place-items: center; }
.team-logo img { width: 72px; height: 72px; object-fit: contain; }
.team-mono { border-radius: 50%; background: var(--navy); color: #fff; font: italic 900 2rem/1 var(--display); }
.team-info { min-width: 0; }
.team-info h2 { display: block; padding: 0; margin: 0; font: italic 800 1.5rem/1.1 var(--display); color: var(--navy); }
.team-info h2::before { display: none; }
.team-city { margin: 2px 0 8px; font-size: .9rem; color: var(--granite); }
.team-lead { margin: 0; font-weight: 700; }
.team-lead span { display: table; margin-bottom: 3px; padding: 1px 7px; border-radius: 3px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: 2px; }
.team-crew { list-style: none; margin: 6px 0 0; padding: 0; font-size: .95rem; line-height: 1.5; }
@media (max-width: 420px) { .team-logo, .team-logo img { width: 56px; height: 56px; flex-basis: 56px; } }
.teams + .board-note { margin-top: 18px; }

/* ---------- Bilder (gallery tab) ---------- */
.gal-group { margin-bottom: 40px; }
h2.gal-h { display: block; padding: 0; margin: 0 0 4px; font: italic 900 clamp(1.6rem, 5vw, 2.2rem)/1.1 var(--display); color: var(--navy); }
h2.gal-h::before { display: none; }
.gal-link { margin: 0 0 14px; font-size: .95rem; }
.gal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
@media (max-width: 760px) { .gal-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; } }
.gal-grid button { display: block; width: 100%; padding: 0; border: 0; background: #e8eef6; cursor: zoom-in; border-radius: 4px; overflow: hidden; aspect-ratio: 1; }
.gal-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gal-grid button:hover img { transform: scale(1.04); }
.gal-grid button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .gal-grid img { transition: none; } }

dialog.lb { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #050f23; color: #e6ecf7; }
dialog.lb::backdrop { background: #050f23; }
.lb figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 12px 16px; }
.lb img { max-width: 100%; max-height: calc(100dvh - 150px); object-fit: contain; border-radius: 4px; }
.lb figcaption { max-width: 72ch; text-align: center; margin-top: 12px; font-size: 1rem; line-height: 1.45; }
.lb figcaption a { color: #fff; font-weight: 700; }
.lb-credit, .lb-count { color: #9fb2d6; font-size: .9rem; }
.lb-count { display: block; margin-top: 4px; }
.lb-x, .lb-nav { position: absolute; border: 0; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .12); border-radius: 50%; display: grid; place-items: center; line-height: 1; }
.lb-x { top: 12px; right: 12px; width: 44px; height: 44px; font-size: 1.8rem; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 2.2rem; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-x:hover, .lb-nav:hover { background: var(--red); }
.lb-x:focus-visible, .lb-nav:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
@media (max-width: 760px) { .lb-nav { top: auto; bottom: 14px; transform: none; width: 44px; height: 44px; } }
