/* =========================================================
   Nordic Navigators — shared styles
   A calm, modern Nordic aesthetic: fjord navy, ice blue,
   snow white, with a soft aurora accent.
   ========================================================= */

:root {
  /* Palette */
  --fjord:        #0d1b2a;   /* deep navy */
  --fjord-2:      #14263a;
  --slate:        #1b2a3a;
  --ice:          #cce3de;   /* pale ice */
  --ice-blue:     #a8dadc;
  --frost:        #e8f0f2;
  --snow:         #f7f9fa;
  --mist:         #9bb0bf;
  --aurora-1:     #4ade80;   /* green */
  --aurora-2:     #38bdf8;   /* sky */
  --aurora-3:     #818cf8;   /* indigo */
  --gold:         #e9c46a;

  /* Type */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --maxw: 1080px;
  --radius: 18px;
  --shadow: 0 24px 60px -24px rgba(8, 18, 30, 0.55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--frost);
  background: var(--fjord);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

a { color: inherit; }

/* ---------- Aurora backdrop ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(900px 500px at 15% 0%, rgba(74, 222, 128, 0.14), transparent 55%),
    radial-gradient(1000px 700px at 50% 120%, rgba(129, 140, 248, 0.16), transparent 60%),
    linear-gradient(180deg, #0a1622 0%, var(--fjord) 45%, #0a1320 100%);
}
.aurora::after {
  /* subtle drifting ribbon */
  content: "";
  position: absolute;
  inset: -20%;
  background:
    conic-gradient(from 200deg at 60% 30%,
      transparent 0deg,
      rgba(74, 222, 128, 0.10) 60deg,
      rgba(56, 189, 248, 0.12) 140deg,
      transparent 220deg);
  filter: blur(40px);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translateX(-4%) translateY(-2%) rotate(0deg); }
  to   { transform: translateX(4%) translateY(2%) rotate(6deg); }
}
@media (prefers-reduced-motion: reduce) {
  .aurora::after { animation: none; }
}

/* ---------- Shell ---------- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--frost);
}
.brand .mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  color: var(--fjord);
  background: linear-gradient(135deg, var(--ice-blue), var(--aurora-1));
  border-radius: 10px;
  box-shadow: 0 8px 20px -8px rgba(56,189,248,0.6);
}
.brand .mark svg { width: 20px; height: 20px; }
.brand small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist);
}

.topbar nav a {
  text-decoration: none;
  color: var(--mist);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.topbar nav a:hover { color: var(--frost); }
.topbar nav a + a { margin-left: 20px; }

/* ---------- Hero ---------- */
.hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0 72px;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ice-blue);
  margin-bottom: 18px;
}
.hero .eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--ice-blue);
  opacity: 0.7;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.02;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--aurora-1), var(--aurora-2) 55%, var(--aurora-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lede {
  font-size: 1.12rem;
  color: var(--ice);
  max-width: 46ch;
  margin: 0 0 28px;
}
.hero .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 30px;
  color: var(--mist);
  font-size: 0.9rem;
}
.hero .meta div { display: flex; align-items: center; gap: 8px; }
.hero .meta svg { width: 16px; height: 16px; color: var(--ice-blue); }

/* ---------- Lockbox ---------- */
.lockbox {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(168, 218, 220, 0.18);
  border-radius: var(--radius);
  padding: 34px 30px 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.lockbox .lock-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  margin: 0 auto 16px;
  color: var(--fjord);
  background: linear-gradient(135deg, var(--ice-blue), var(--aurora-1));
  transition: transform 0.4s ease, background 0.4s ease;
}
.lockbox.unlocked .lock-icon {
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2));
  transform: rotate(-8deg) scale(1.05);
}
.lockbox h2 {
  text-align: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 6px;
}
.lockbox .hint {
  text-align: center;
  color: var(--mist);
  font-size: 0.92rem;
  margin: 0 0 26px;
}

.code-inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.code-inputs input {
  width: 48px;
  height: 60px;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--frost);
  background: rgba(13, 27, 42, 0.55);
  border: 1.5px solid rgba(168, 218, 220, 0.28);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}
.code-inputs input:focus {
  border-color: var(--aurora-2);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}
.code-inputs input.filled {
  border-color: var(--ice-blue);
}
@media (max-width: 420px) {
  .code-inputs input { width: 42px; height: 54px; font-size: 1.4rem; }
}

.lockbox.error .code-inputs { animation: shake 0.4s ease; }
.lockbox.error .code-inputs input {
  border-color: #ef6f6f;
  box-shadow: 0 0 0 3px rgba(239, 111, 111, 0.18);
}
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

.lock-msg {
  text-align: center;
  min-height: 20px;
  font-size: 0.86rem;
  color: #ef9a9a;
  margin-bottom: 10px;
}
.lockbox.unlocked .lock-msg { color: var(--aurora-1); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--fjord);
  background: linear-gradient(120deg, var(--ice-blue), var(--aurora-1));
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 14px 30px -14px rgba(74, 222, 128, 0.7);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- Footer ---------- */
.footer {
  padding: 28px 0 36px;
  color: var(--mist);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer a { color: var(--ice-blue); text-decoration: none; }

/* ---------- Newsletters gallery ---------- */
.section-head {
  padding: 40px 0 8px;
}
.section-head .eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ice-blue);
}
.section-head h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 10px 0 6px;
}
.section-head p { color: var(--ice); max-width: 60ch; margin: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  padding: 30px 0 60px;
}
.card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(168, 218, 220, 0.16);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 218, 220, 0.4);
  box-shadow: var(--shadow);
}
.card .thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--fjord-2), var(--slate));
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.card .thumb .pin {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fjord);
  background: var(--ice-blue);
  padding: 5px 10px;
  border-radius: 999px;
  position: absolute;
  top: 14px; left: 14px;
  font-weight: 600;
}
.card .thumb .pin.draft {
  left: auto; right: 14px;
  letter-spacing: 0.1em;
  background: var(--gold);
  color: var(--fjord);
}
/* keep cover thumbnails legible behind the pills */
.card .thumb[style*="background-image"]::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,27,42,0.28), rgba(13,27,42,0.05) 40%, rgba(13,27,42,0.45));
}
.card .body { padding: 20px 22px 24px; }
.card .body .date {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
}
.card .body h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin: 6px 0 8px;
}
.card .body p { color: var(--ice); font-size: 0.92rem; margin: 0; }
.card .body .read {
  margin-top: 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--aurora-1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 24px; }
  .lockbox { max-width: 420px; }
}
