/* =========================================================
   nordi — daily tech dispatch for internationals in Denmark
   Design system: Nordic "daily dispatch", olive-forward.
   ========================================================= */

:root {
  /* ---- Palette ---- */
  --paper:      #ECEEE4;  /* pale sage-oat background */
  --surface:    #F6F7F0;  /* card / panel surface (slight lift) */
  --ink:        #23261C;  /* warm near-black text */
  --fog:        #6B6F5E;  /* muted text, captions */
  --line:       #D5D8C6;  /* hairline borders */

  --moss:       #4E5836;  /* deep olive: wordmark, headings */
  --olive:      #6E7B45;  /* interactive olive: links, active */
  --olive-soft: #8A9560;  /* hover */
  --lichen:     #DBE0C9;  /* soft olive tint surfaces */

  --ochre:      #B67D33;  /* job-alert accent (used sparingly) */
  --slate:      #5C6B7A;  /* government / visa accent */

  /* ---- Type ---- */
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;

  /* ---- Metrics ---- */
  --wrap: 1060px;
  --radius: 10px;
  --radius-sm: 7px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--olive); text-decoration: none; }
a:hover { color: var(--moss); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Focus visibility (accessibility floor) ---- */
:focus-visible {
  outline: 2.5px solid var(--olive);
  outline-offset: 2px;
  border-radius: 3px;
}

/* =========================================================
   Masthead
   ========================================================= */
.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.masthead__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 26px 24px 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.03em;
  color: var(--moss);
  line-height: 1;
}
.wordmark__dot { color: var(--ochre); }
.wordmark--sm { font-size: 22px; }

.masthead__tagline {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--fog);
  max-width: 42ch;
}
.masthead__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-family: var(--display);
  text-align: right;
}
.issue {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--moss);
  text-transform: uppercase;
}
.issue__date {
  font-size: 13px;
  color: var(--fog);
  font-family: var(--body);
}
.rss {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fog);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 100px;
}
.rss:hover { color: var(--ochre); border-color: var(--ochre); }

/* =========================================================
   Tabs
   ========================================================= */
.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.tabs__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
}
.tab {
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  color: var(--fog);
  padding: 15px 6px;
  margin-right: 18px;
  position: relative;
  transition: color 0.15s ease;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--moss); }
.tab.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2.5px;
  background: var(--olive);
  border-radius: 2px;
}

/* =========================================================
   Layout wrapper + views
   ========================================================= */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 34px 24px 60px;
}
.view { display: none; }
.view.is-active { display: block; }

/* =========================================================
   Status line (signature countdown)
   ========================================================= */
.status {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--fog);
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.status strong { color: var(--moss); font-weight: 600; }
.status__timer strong {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.status__sep { color: var(--line); }

/* =========================================================
   Story grid + cards
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--olive) 40%, var(--line));
  box-shadow: 0 8px 24px -14px rgba(35, 38, 28, 0.35);
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card__idx {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  color: var(--fog);
  font-variant-numeric: tabular-nums;
}
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--lichen);
  color: var(--moss);
}
.tag--job    { background: #F1E4CB; color: #8A5A1B; }
.tag--visa   { background: #DEE5EB; color: #3E5162; }
.tag--cyber  { background: #D6DFCE; color: #3C5236; }
.tag--gov    { background: #DEE5EB; color: #3E5162; }
.tag--startup{ background: var(--lichen); color: var(--moss); }
.tag--event  { background: #E4E8D5; color: #566234; }

.card__title {
  margin: 0;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.01em;
}
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--olive); }

.card__desc {
  margin: 0;
  font-size: 14.5px;
  color: var(--fog);
  line-height: 1.55;
}

.card__tldr {
  margin: 2px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--olive);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
}
.card__tldr b {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--olive);
  display: block;
  margin-bottom: 2px;
}

.card__link {
  margin-top: auto;
  padding-top: 4px;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.card__link::after { content: "→"; transition: transform 0.15s ease; }
.card__link:hover::after { transform: translateX(3px); }

/* =========================================================
   Archive (compact rows)
   ========================================================= */
.archive { margin-top: 46px; }
.archive__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 4px;
}
.archive__title {
  margin: 0;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--moss);
}
.archive__hint { font-size: 13px; color: var(--fog); }

.archive__list { list-style: none; margin: 0; padding: 0; }
.archive__row {
  display: grid;
  grid-template-columns: 92px 96px 1fr;
  align-items: baseline;
  gap: 14px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}
.archive__date {
  font-size: 12.5px;
  color: var(--fog);
  font-variant-numeric: tabular-nums;
}
.archive__row .tag { justify-self: start; font-size: 10px; padding: 2px 7px; }
.archive__row a {
  font-size: 14.5px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
}
.archive__row a:hover { color: var(--olive); }

/* =========================================================
   Signup — inline (bottom of briefing)
   ========================================================= */
.signup--inline {
  margin-top: 48px;
  background: var(--moss);
  border-radius: var(--radius);
  padding: 32px 30px;
  color: #EDEEE2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px 30px;
}
.signup__title {
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  color: #F4F5EC;
  letter-spacing: -0.01em;
}
.signup__lede { margin: 6px 0 0; font-size: 14px; color: #C9CDB6; }
.signup__form { display: flex; gap: 8px; }
.signup__foot {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #AEB399;
}
.signup__foot a { color: #E4E7CF; text-decoration: underline; text-underline-offset: 2px; }
.signup__foot a:hover { color: #fff; }

/* fields + buttons */
.field {
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  width: 100%;
  min-width: 220px;
}
.field::placeholder { color: #9a9d8b; }
.field:focus { border-color: var(--olive); outline: none; box-shadow: 0 0 0 3px rgba(110,123,69,0.18); }

.btn {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: #F4F5EC;
  background: var(--ochre);
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: #A06E29; }
.btn:active { transform: translateY(1px); }
.btn--wide { width: 100%; margin-top: 6px; }

/* =========================================================
   Section intros (events / subscribe)
   ========================================================= */
.section-intro { margin-bottom: 30px; }
.section-intro__title {
  margin: 0;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--moss);
}
.section-intro__lede {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--fog);
  max-width: 56ch;
}

/* =========================================================
   Events
   ========================================================= */
.events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.event {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.event:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--olive) 40%, var(--line)); }
.event__date {
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 16px;
}
.event__day {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  color: var(--moss);
  line-height: 1;
}
.event__mon {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fog);
}
.event__body { min-width: 0; }
.event__name {
  margin: 0 0 3px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.event__name a { color: var(--ink); }
.event__name a:hover { color: var(--olive); }
.event__where { margin: 0; font-size: 13.5px; color: var(--fog); }
.event__where .tag { margin-left: 8px; vertical-align: 1px; }
.event__cta {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.event__cta::after { content: " →"; }

/* =========================================================
   Subscribe page
   ========================================================= */
.subscribe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.subscribe__form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
}
.label {
  display: block;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  color: var(--moss);
  margin: 16px 0 6px;
}
.subscribe__form .label:first-child { margin-top: 0; }
.label__opt { color: var(--fog); font-weight: 400; }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0 4px;
  font-size: 13px;
  color: var(--fog);
  line-height: 1.5;
  cursor: pointer;
}
.consent input {
  margin-top: 2px;
  width: 16px; height: 16px;
  accent-color: var(--olive);
  flex-shrink: 0;
}
.subscribe__msg { font-size: 13.5px; margin: 12px 0 0; min-height: 1.2em; font-weight: 500; }
.subscribe__msg.is-ok { color: var(--moss); }
.subscribe__doubleoptin { font-size: 12.5px; color: var(--fog); margin: 10px 0 0; }

/* privacy block */
.privacy {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 20px;
  background: color-mix(in srgb, var(--lichen) 40%, var(--paper));
}
.privacy__title {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--moss);
}
.privacy__list { margin: 0; }
.privacy__list dt {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--olive);
  margin-top: 14px;
}
.privacy__list dt:first-child { margin-top: 0; }
.privacy__list dd {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.5;
}
.privacy__more {
  display: inline-block;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.footer__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 30px 24px 44px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.footer__note {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--fog);
  max-width: 52ch;
}
.footer__links { display: flex; flex-direction: column; gap: 8px; }
.footer__links a { font-size: 13.5px; color: var(--fog); font-weight: 500; }
.footer__links a:hover { color: var(--olive); }

/* =========================================================
   Motion + entrance
   ========================================================= */
.card, .event {
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.5s ease forwards;
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .card, .event { opacity: 1; transform: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .subscribe { grid-template-columns: 1fr; gap: 24px; }
  .signup--inline { grid-template-columns: 1fr; }
  .signup__form { flex-direction: column; }
  .btn { width: 100%; }
  .masthead__inner { align-items: flex-start; }
  .masthead__meta { align-items: flex-start; text-align: left; }
  .archive__row { grid-template-columns: 74px 1fr; }
  .archive__row .tag { display: none; }
  .event { grid-template-columns: 60px 1fr; gap: 14px; }
  .event__cta { grid-column: 2; justify-self: start; margin-top: 4px; }
  .wordmark { font-size: 30px; }
}