/* Shared design system for the Alaska 2026 trip site.
   Direction: field-guide / expedition log. Cold-leaning wilderness palette
   warmed by rust and low-sun accents, on warm paper with topographic texture.
   Used by itinerary.html, options.html, and decisions.html. */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Archivo:wght@500;600;700&family=Spline+Sans:wght@400;500&display=swap");

:root {
  /* Wilderness palette */
  --spruce: #1f3329;
  --boreal: #3a5547;
  --granite: #5d7079;
  --glacier: #7fb0b8;
  --lowsun: #c9956b;
  --aurora: #8a7ba6;
  --rust: #9a6a44;

  /* Paper + ink */
  --paper: #f4f1ea;
  --paper-2: #f8f6f1;
  --bg: #eceae3;
  --card: #f8f6f1;
  --ink: #1c2620;
  --ink-soft: #42514a;
  --ink-faint: #6b7d72;
  --muted: #6b7d72;
  --line: #ddd6c8;

  /* Per-day route colors (match the map) */
  --c-jul2: #2563EB;
  --c-jul3: #0D9488;
  --c-jul5: #EA580C;
  --c-jul6: #16A34A;
  --c-jul7: #DC2626;
  --c-jul8: #7C3AED;
  --c-jul9: #B45309;

  /* Semantic accents */
  --accent: #9a6a44;       /* rust, for links/buttons */
  --rec: #3a5547;          /* recommended, boreal */
  --rec-bg: #e7efe9;
  --info: #5d7079;

  /* Urgency (kept functionally distinct for the decisions page) */
  --now: #b1442c;
  --now-bg: #f4e6df;
  --soon: #b9852f;
  --soon-bg: #f5edda;
  --later: #6b7d72;
  --later-bg: #e8eae2;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-label: 'Archivo', system-ui, -apple-system, sans-serif;
  --font-body: 'Spline Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(127, 176, 184, 0.12), transparent 60%),
    var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
/* faint topographic wash over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><g fill='none' stroke='%233a5547' stroke-width='1' opacity='0.06'><path d='M-40 120 Q 60 40 160 120 T 360 120'/><path d='M-40 170 Q 60 90 160 170 T 360 170'/><path d='M-40 70 Q 60 -10 160 70 T 360 70'/></g></svg>");
}
body > * { position: relative; z-index: 1; }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 22px 80px;
}

/* ---------- Top navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(244, 241, 234, 0.9);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 11px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--spruce);
}
.site-links { display: flex; gap: 4px; flex-wrap: wrap; }
.site-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 8px 13px;
  border-radius: 999px;
  line-height: 1;
}
.site-links a:hover { background: rgba(31, 51, 41, 0.07); color: var(--spruce); }
.site-links a.active { background: var(--spruce); color: var(--paper); }

/* ---------- Page header ---------- */
.page-head { padding: 26px 0 6px; }
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.0;
  font-weight: 600;
  color: var(--spruce);
}
.page-head .sub { color: var(--ink-soft); margin: 0; font-size: 1.02rem; max-width: 60ch; }

.lead {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 20px 0 6px;
  color: var(--ink-soft);
}
.lead p { margin: 0; }
.lead p + p { margin-top: 10px; }

/* ---------- Sections ---------- */
.section { margin: 40px 0; scroll-margin-top: 74px; }
.section-title {
  font-family: var(--font-label);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin: 0 0 6px;
  font-weight: 700;
}
.section-intro { color: var(--ink-soft); margin: 0 0 16px; }
.section h3.block-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 6px;
  letter-spacing: -0.015em;
  color: var(--spruce);
}

/* ---------- Grids and cards ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 26px rgba(31, 51, 41, 0.06);
}
.card.is-rec {
  border-color: color-mix(in srgb, var(--rec) 50%, var(--line));
  box-shadow: 0 0 0 3px var(--rec-bg), 0 8px 26px rgba(31, 51, 41, 0.06);
}
.card h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 2px; font-size: 1.25rem; letter-spacing: -0.01em; color: var(--spruce); }
.card .card-sub { color: var(--ink-faint); font-size: 0.9rem; margin: 0 0 12px; }
.card .price { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; margin: 4px 0 2px; color: var(--spruce); }
.card .price small { font-family: var(--font-body); font-size: 0.78rem; font-weight: 500; color: var(--ink-faint); }
.card .price-note { font-size: 0.85rem; color: var(--ink-faint); margin: 0 0 12px; }
.card ul { margin: 8px 0 0; padding-left: 18px; }
.card li { margin: 5px 0; }
.card .spacer { flex: 1; }

/* ---------- Pills / tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.tag-rec { background: var(--rec-bg); color: var(--rec); }
.tag-info { background: #e7eef0; color: var(--granite); }
.tag-muted { background: var(--later-bg); color: var(--ink-faint); }

/* ---------- Comparison tables ---------- */
.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 0 8px 26px rgba(31, 51, 41, 0.06); }
table.cmp { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 0.95rem; }
table.cmp th, table.cmp td { text-align: left; padding: 13px 15px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.cmp thead th { background: rgba(31, 51, 41, 0.04); font-family: var(--font-label); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; }
table.cmp th[scope="row"] { font-family: var(--font-label); font-weight: 700; color: var(--ink); }
table.cmp tr:last-child td, table.cmp tr:last-child th { border-bottom: none; }
table.cmp .is-rec { background: var(--rec-bg); }

/* ---------- Pros / cons ---------- */
.pros, .cons { list-style: none; margin: 8px 0 0; padding: 0; }
.pros li, .cons li { position: relative; padding-left: 24px; margin: 6px 0; }
.pros li::before { content: "+"; position: absolute; left: 4px; color: var(--rec); font-weight: 800; }
.cons li::before { content: "\2013"; position: absolute; left: 4px; color: var(--now); font-weight: 800; }

/* ---------- Callouts ---------- */
/* Notecard: squared, ruled at the top. No rounded corners, no left sliver. */
.note {
  border: 1px solid var(--line);
  border-top: 3px solid var(--granite);
  background: var(--paper);
  border-radius: 0;
  padding: 13px 16px;
  margin: 14px 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}
.note.warn { border-top-color: var(--soon); background: var(--soon-bg); }
.note.danger { border-top-color: var(--now); background: var(--now-bg); }
.note strong { color: var(--ink); }

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 15px;
  border-radius: 10px;
  margin-top: 6px;
}
.btn:hover { filter: brightness(0.94); }
.btn.ghost { background: transparent; color: var(--rust); border: 1px solid color-mix(in srgb, var(--rust) 45%, var(--line)); }
a.inline { color: var(--rust); }

/* ---------- Urgency badges ---------- */
.urg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 11px;
  border-radius: 999px;
}
.urg.now { background: var(--now); color: #fff; }
.urg.soon { background: var(--soon); color: #fff; }
.urg.later { background: var(--later-bg); color: var(--ink-soft); }

/* ---------- Decision items ---------- */
/* Decision plate: squared ledger entry, ruled at the top by urgency. */
.decision {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--later);
  border-radius: 0;
  padding: 18px 20px;
  margin: 14px 0;
  box-shadow: 0 8px 26px rgba(31, 51, 41, 0.06);
}
.decision.now { border-top-color: var(--now); }
.decision.soon { border-top-color: var(--soon); }
.decision.later { border-top-color: var(--later); }
.decision .d-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.decision .d-num { font-family: var(--font-label); font-size: 0.85rem; font-weight: 700; color: var(--rust); }
.decision .d-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin: 0; letter-spacing: -0.01em; color: var(--spruce); flex: 1; min-width: 220px; }
.decision .d-body { color: var(--ink-soft); }
.decision .d-body p { margin: 6px 0; }
.decision .d-rec { margin-top: 8px; }
.decision .d-rec b { color: var(--ink); }
.decision .deadline {
  display: inline-block;
  font-family: var(--font-label);
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--now);
}
.decision.soon .deadline { color: var(--soon); }
.decision.later .deadline { color: var(--ink-faint); }
.decision .d-links { margin-top: 10px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.9rem; }

.tier-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 8px;
}
.tier-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin: 0; letter-spacing: -0.01em; color: var(--spruce); }

.muted { color: var(--ink-faint); }
.accent { color: var(--rust); }

.site-foot {
  margin-top: 50px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.88rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

/* ---------- Print ---------- */
@media print {
  .site-nav { display: none; }
  body { background: #fff; }
  body::before { display: none; }
  .card, .decision, .cmp-wrap, .note { break-inside: avoid; }
  .btn { display: none; }
}
