/* Operation Blåtur — styles. Tokens from the "Industry" blueprint system. */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;700&family=Barlow+Condensed:wght@400;600&display=swap');

:root {
  --bg: #f2f2f3;
  --text: #1d1f20;
  --muted: #5d5d60;
  --accent: #5980a6;
  --accent-200: #d6ebff;
  --accent-400: #94bce3;
  --accent-700: #416180;
  --accent-800: #2c455d;
  --accent-900: #1d2d3d;
  --neutral-300: #d4d4d7;
  --neutral-500: #98989b;
  --line: rgba(29, 31, 32, .16);
  --line-inv: rgba(242, 242, 243, .18);
  --font-head: "Barlow Condensed", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
  --pad: clamp(16px, 4vw, 40px);
  --section-gap: clamp(56px, 9vw, 104px);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-700); text-underline-offset: 3px; }
a:hover { color: var(--accent-900); }
img { display: block; max-width: 100%; }
picture { display: contents; }
button { font: inherit; color: inherit; }
::selection { background: rgba(89, 128, 166, .3); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; }
.label {
  font-family: var(--font-head); font-weight: 600; font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase;
}
.muted { color: var(--muted); }

/* Blueprint frame + registration marks */
.blueprint { position: relative; border: 1px solid var(--line); }
.blueprint > .corner {
  position: absolute; width: 11px; height: 11px; z-index: 2;
  color: rgba(29, 31, 32, .55);
  background:
    linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
}
.corner.tl { top: -6px; left: -6px; }
.corner.tr { top: -6px; right: -6px; }
.corner.bl { bottom: -6px; left: -6px; }
.corner.br { bottom: -6px; right: -6px; }

/* Hero */
.hero {
  background: var(--accent-900); color: var(--bg);
  padding: 0 var(--pad) clamp(40px, 7vw, 80px);
  background-image:
    linear-gradient(rgba(242,242,243,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242,242,243,.06) 1px, transparent 1px);
  background-size: 40px 40px;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--line-inv);
}
.topbar .brand { font-size: 17px; letter-spacing: .08em; }
.topbar .file { color: var(--accent-400); }
.hero-body { padding-top: clamp(40px, 8vw, 96px); display: grid; gap: clamp(32px, 5vw, 56px); }
.hero-copy { display: grid; gap: 18px; }
.hero .kicker { color: var(--accent-400); letter-spacing: .16em; }
.hero h1 {
  margin: 0; font-family: var(--font-head); font-weight: 600;
  font-size: clamp(52px, 11vw, 132px); line-height: .9; letter-spacing: -.02em;
  text-transform: uppercase;
  display: flex; flex-wrap: wrap; align-items: center; gap: .18em;
}
.redact {
  all: unset; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.4em; height: .74em;
  background: var(--bg); color: var(--accent-900); transition: background .2s;
}
.redact > span { font-size: .36em; letter-spacing: .08em; line-height: 1; }
.redact:hover { background: var(--accent-400); }
.redact:focus-visible { outline: 2px solid var(--accent-400); outline-offset: 3px; }
.hero .lede {
  margin: 0; max-width: 34em; font-size: clamp(17px, 2.2vw, 21px); line-height: 1.45;
  color: rgba(242, 242, 243, .82); text-wrap: pretty;
}

/* Countdown */
.countdown { border-color: rgba(242,242,243,.28); }
.countdown > .corner { color: rgba(242,242,243,.6); }
.countdown-head {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 12px clamp(14px, 2.5vw, 24px); border-bottom: 1px solid var(--line-inv);
  color: rgba(242,242,243,.6);
}
.countdown-head .status { color: var(--bg); }
.countdown-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line-inv);
}
.unit { padding: clamp(14px, 2.5vw, 24px); background: var(--accent-900); display: grid; gap: 4px; color: rgba(242,242,243,.6); }
.unit .num {
  font-family: var(--font-head); font-weight: 600; color: var(--bg);
  font-size: clamp(44px, 10vw, 112px); line-height: .95; font-variant-numeric: tabular-nums;
}

/* Sections */
main.wrap {
  padding: var(--section-gap) var(--pad);
  display: grid; gap: var(--section-gap);
}
.section { display: grid; gap: 24px; }
.section-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px;
  border-bottom: 1px solid var(--line); padding-bottom: 12px;
}
.section-head .no { font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: .12em; color: var(--accent-700); }
.section-head h2 {
  margin: 0; font-family: var(--font-head); font-weight: 600;
  font-size: clamp(30px, 4.5vw, 44px); line-height: 1; text-transform: uppercase; letter-spacing: -.01em;
}
.section-head .aside { margin-left: auto; color: var(--muted); }
.section-head .aside.accent { color: var(--accent-700); }

/* Modular grid of cells (flight plan, intel) */
/* Fixed column counts so a row never ends with a lone orphan cell: flight plan 1 → 3, intel 1 → 2 → 4 */
.cells {
  display: grid; grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
@media (min-width: 640px) {
  .cells { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cells.small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .cells.small { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.cell {
  padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: grid; gap: 6px; align-content: start;
}
.cell .label { color: var(--accent-700); }
.cell .big { font-family: var(--font-head); font-weight: 600; font-size: 56px; line-height: 1; }
.cells.small .big { font-size: 36px; line-height: 1.05; }
.cell .title { font-weight: 700; font-size: 17px; }
.cell .desc { color: var(--muted); text-wrap: pretty; }
.cells.small .desc { font-size: 14px; }
.cell.hatched { background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(89,128,166,.07) 10px 11px); }

/* Rules */
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 28px; }
.rule-1 { border-color: var(--accent); padding: 26px; display: grid; gap: 10px; align-content: start; }
.rule-1 > .corner { color: var(--accent-700); }
.rule-1 .label { color: var(--accent-700); }
.rule-1 .big { font-family: var(--font-head); font-weight: 600; font-size: clamp(38px, 6vw, 56px); line-height: .95; text-transform: uppercase; }
.bags { border-top: 1px solid var(--line); }
.bag {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.bag strong { display: block; }
.bag small { color: var(--muted); font-size: 14px; }
.tag {
  font-family: var(--font-head); font-weight: 600; font-size: 13px; letter-spacing: .1em;
  text-transform: uppercase; padding: 3px 10px; white-space: nowrap;
  background: var(--accent-200); color: var(--accent-800);
}
.tag.solid { background: var(--accent-900); color: var(--bg); }
.tag.outline { background: none; border: 1px solid var(--accent); color: var(--accent-700); padding: 2px 10px; }

/* Packing */
.progress { height: 3px; background: var(--neutral-300); position: relative; overflow: hidden; }
.progress > span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); transition: width .3s; }
.packing { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); column-gap: 28px; }
.item {
  position: relative; cursor: pointer; display: flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 8px 4px; border-bottom: 1px solid var(--line);
}
.item:hover { background: rgba(89,128,166,.08); }
/* Native checkbox, visually hidden but still focusable and announced by screen readers */
.item input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.item:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.item .box {
  flex: none; width: 22px; height: 22px; border: 1.5px solid var(--accent);
  display: grid; place-items: center; color: var(--bg); font-size: 14px; line-height: 1;
}
.item .text { display: grid; line-height: 1.3; }
.item .name { font-weight: 500; }
.item .note { color: var(--muted); font-size: 13px; }
.item input:checked + .box { background: var(--accent); }
.item input:checked + .box::after { content: "✓"; }
.item input:checked ~ .name { text-decoration: line-through; color: var(--muted); }

/* Crew */
/* 8 agents: 2 or 4 columns so rows stay full */
.crew { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 28px); }
@media (min-width: 760px) { .crew { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.agent { margin: 0; display: grid; gap: 10px; }
.duotone { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--neutral-300); }
.duotone img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.duotone::after { content: ""; position: absolute; inset: 0; background: var(--accent); mix-blend-mode: color; pointer-events: none; }
.badge {
  position: absolute; z-index: 1; top: 10px; left: 10px;
  background: var(--accent-700); color: var(--bg); padding: 3px 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
}
.agent figcaption { display: grid; line-height: 1.2; gap: 2px; }
.agent .name { font-family: var(--font-head); font-weight: 600; font-size: 22px; text-transform: uppercase; }
/* Barlow Condensed's capital Ø has a too-wide advance, leaving a gap ("TORBJØ RN") */
.agent .name .oe { letter-spacing: -.12em; }
.agent .code { color: var(--accent-700); letter-spacing: .12em; }

/* Peter */
.grounded {
  margin-top: 20px; border: 1px dashed var(--neutral-500);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.grounded .photo { position: relative; overflow: hidden; min-height: 260px; background: var(--neutral-300); }
.grounded .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(.9) brightness(1.05); opacity: .55; }
.stamp {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg);
  border: 3px solid var(--text); background: rgba(242,242,243,.7); padding: 6px 14px; white-space: nowrap;
  font-family: var(--font-head); font-weight: 600; font-size: clamp(26px, 4vw, 36px); letter-spacing: .06em; text-transform: uppercase;
}
.grounded .body { padding: clamp(20px, 3vw, 32px); display: grid; gap: 10px; align-content: center; }
.grounded .body .big { font-family: var(--font-head); font-weight: 600; font-size: clamp(34px, 5vw, 48px); line-height: .95; text-transform: uppercase; }
.grounded p { margin: 0; max-width: 36em; text-wrap: pretty; }

/* Footer */
footer { border-top: 1px solid var(--line); }
footer .wrap {
  padding: 28px var(--pad) 40px; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 12px 32px;
}
footer .label { font-size: 15px; letter-spacing: .1em; }
