/* ==========================================================================
   Svalbard Polar Bear Tour Guide - Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500&display=swap');

:root {
  --color-bg:         #080E1A;
  --color-surface:    #101826;
  --color-surface-2:  #182234;
  --color-border:     #243348;
  --color-text:       #EBF2FA;
  --color-muted:      #7C95B2;
  --color-accent:     #9DCFEA;
  --color-accent-bg:  #0C1E2E;
  --color-white-ice:  #E8F4F8;
  --color-amber:      #D4920A;
  --color-amber-bg:   #1C1200;
  --color-brand:      #1F6FEB;
  --color-brand-bg:   #0D1926;
  --color-reg:        #E05C3A;
  --color-reg-bg:     #1E0C06;
  --color-verified:   #3FB950;
  --radius:           8px;
  --font-sans:        'Space Grotesk', 'Inter', sans-serif;
  --font-body:        'Inter', sans-serif;
  --max-width:        1180px;
  --shadow-card:      0 1px 2px rgba(0,0,0,0.3), 0 10px 30px -14px rgba(0,0,0,0.55);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 85% -8%, rgba(31,111,235,0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 15%, rgba(157,207,234,0.06), transparent 55%),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; color: var(--color-white-ice); margin: 0 0 0.6em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 2.2em 0 0.6em; }
.article > section:first-child > h2:first-child { margin-top: 0; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: 0.5em; }
table { border-collapse: collapse; width: 100%; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
em { color: var(--color-muted); font-style: italic; }

/* ---- Header ---- */
.site-header {
  background: rgba(8,14,26,0.86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-white-ice);
  letter-spacing: -0.01em;
}
.site-logo:hover { text-decoration: none; color: var(--color-accent); }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.site-nav a {
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--color-accent); text-decoration: none; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
}
.nav-toggle-bars {
  position: relative;
  width: 18px;
  height: 14px;
}
.nav-toggle-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 6px; }
.nav-toggle-bars span:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

.independence-bar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-muted);
  padding: 8px 0;
  text-align: center;
  letter-spacing: 0.01em;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 520px at 78% 0%, rgba(31,111,235,0.18), transparent 62%),
    radial-gradient(700px 420px at 8% 100%, rgba(157,207,234,0.07), transparent 60%),
    linear-gradient(180deg, #0A1220 0%, var(--color-bg) 100%);
  padding: 76px 0 0;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}
.hero-bg {
  position: relative;
  margin-top: 44px;
  width: 100%;
  height: 420px;
  z-index: 0;
  pointer-events: none;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; display: block; }
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--color-bg) 0%, rgba(8,14,26,0) 22%);
  z-index: 1;
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { padding-bottom: 40px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-accent);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 18px;
}
.hero-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-bg);
}
.hero h1 { max-width: 880px; }
.hero-subtitle {
  color: var(--color-muted);
  font-size: 1.18rem;
  max-width: 660px;
  margin-bottom: 30px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}
.hero-ctas a {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.hero-ctas a:hover { border-color: var(--color-accent); color: var(--color-accent); text-decoration: none; transform: translateY(-1px); }
.hero-ctas a:first-child {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #071019;
  font-weight: 600;
}
.hero-ctas a:first-child:hover { background: #b7dcf0; color: #071019; }

.stat-chips {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.stat-chip {
  background: linear-gradient(180deg, var(--color-surface-2), var(--color-surface));
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.stat-chip strong {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  color: var(--color-white-ice);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.stat-chip span { font-size: 0.76rem; color: var(--color-muted); }

@media (max-width: 900px) {
  .stat-chips { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Anchor nav ---- */
.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: rgba(16,24,38,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 8px;
  margin: 32px 0;
  position: sticky;
  top: 66px;
  z-index: 40;
}
.anchor-nav a {
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.anchor-nav a:hover, .anchor-nav a.is-active {
  background: var(--color-accent-bg);
  color: var(--color-accent);
  text-decoration: none;
}

/* ---- Main content layout ---- */
main { padding: 20px 0 60px; }
.article { max-width: 860px; margin: 0 auto; }

/* ---- Section headers with numbered kicker badges ---- */
.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 3.4em;
  padding-top: 2.2em;
  border-top: 1px solid var(--color-border);
  margin-bottom: 1em;
}
.article > section:first-of-type .section-head,
.article > section:first-of-type > .section-head {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.section-head .index-badge {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, var(--color-surface-2), var(--color-surface));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-accent);
  box-shadow: var(--shadow-card);
}
.section-head .kicker {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-muted);
}
.section-head + h2 { margin-top: 0; }

/* ---- Callouts ---- */
.callout {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-surface));
  padding: 22px 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-card);
  position: relative;
}
.callout::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 3px;
  background: var(--color-accent);
}
.callout h3 { margin-top: 0; }
.callout ul { margin-bottom: 0; }
.callout--ice::before { background: var(--color-accent); }
.callout--regulatory {
  background: linear-gradient(160deg, #241009, var(--color-reg-bg));
  border-color: #3a1c10;
}
.callout--regulatory::before { background: var(--color-reg); }
.callout--regulatory h3 { color: var(--color-reg); display: flex; align-items: center; gap: 8px; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; margin: 20px 0; border-radius: var(--radius); }
table.regulations-table,
table.operators-table,
table.cost-table,
table.comparison-table {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.92rem;
  box-shadow: var(--shadow-card);
}
table th, table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
table th {
  background: var(--color-surface-2);
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-white-ice);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
}
table tr:last-child td { border-bottom: none; }
table td { color: var(--color-text); vertical-align: top; }
table tbody tr:hover td { background: rgba(157,207,234,0.04); }

.operators-table th[data-sort] { cursor: pointer; user-select: none; }
.operators-table th[data-sort]:hover { color: var(--color-accent); }
.operators-table th.sorted-asc::after { content: " \25B2"; font-size: 0.7em; color: var(--color-accent); }
.operators-table th.sorted-desc::after { content: " \25BC"; font-size: 0.7em; color: var(--color-accent); }

/* ---- Season breakdown ---- */
.season-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.season-breakdown .season {
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-surface));
  border: 1px solid var(--color-border);
  border-top-width: 3px;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.season.spring { border-top-color: #6FA8DC; }
.season.summer { border-top-color: var(--color-accent); }
.season.autumn { border-top-color: var(--color-amber); }
.sighting-rating {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-accent);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-accent-bg);
}
@media (max-width: 800px) {
  .season-breakdown { grid-template-columns: 1fr; }
}

/* ---- Ship categories ---- */
.ship-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.ship-cat {
  border: 1px solid var(--color-border);
  border-top-width: 3px;
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-surface));
  box-shadow: var(--shadow-card);
}
.ship-small { border-top-color: var(--color-verified); }
.ship-mid { border-top-color: var(--color-amber); }
.ship-large { border-top-color: var(--color-reg); }
@media (max-width: 800px) {
  .ship-categories { grid-template-columns: 1fr; }
}

/* ---- Lists ---- */
.criteria-list li,
.wildlife-list li,
.tips-list li,
.checklist li,
.impact-list li,
.location-list li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  list-style: none;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
}
.criteria-list, .wildlife-list, .tips-list, .checklist, .impact-list, .location-list {
  padding-left: 0;
}
.location-list strong { display: block; color: var(--color-white-ice); margin-bottom: 4px; }

/* ---- Operator cards ---- */
.operator-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

/* ---- Brand spotlight ---- */
.brand-spotlight {
  background:
    radial-gradient(600px 260px at 100% 0%, rgba(31,111,235,0.25), transparent 60%),
    linear-gradient(160deg, #10233d, var(--color-brand-bg));
  border: 1px solid var(--color-brand);
  border-radius: var(--radius);
  padding: 32px;
  margin: 32px 0;
  box-shadow: 0 20px 50px -24px rgba(31,111,235,0.45);
}
.brand-spotlight__badge {
  display: inline-block;
  background: var(--color-brand);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.brand-spotlight h2 { margin-top: 0; }
.brand-spotlight__tagline {
  color: var(--color-muted);
  font-size: 1.05rem;
}
.brand-spotlight__specs {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px 16px;
  margin: 22px 0;
  padding-top: 20px;
  border-top: 1px solid rgba(31,111,235,0.3);
}
.brand-spotlight__specs dt {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-white-ice);
  font-size: 0.88rem;
}
.brand-spotlight__specs dd {
  margin: 0 0 10px;
  color: var(--color-text);
  font-size: 0.92rem;
}
@media (max-width: 700px) {
  .brand-spotlight__specs { grid-template-columns: 1fr; }
}
.brand-spotlight__cta {
  display: inline-block;
  background: var(--color-brand);
  color: #fff;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-family: var(--font-sans);
  margin-top: 8px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.brand-spotlight__cta:hover { background: #185ac7; text-decoration: none; color: #fff; transform: translateY(-1px); }

/* ---- FAQ ---- */
.faq-list details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  padding: 4px 20px;
  transition: border-color 0.15s ease;
}
.faq-list details[open] { border-color: var(--color-accent); }
.faq-list summary {
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-white-ice);
  padding: 16px 0;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 14px;
  color: var(--color-accent);
  font-size: 1.3rem;
  line-height: 1;
}
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list .faq-answer { padding-bottom: 18px; color: var(--color-muted); overflow: hidden; }

/* ---- Photo banner (full-width editorial photo) ---- */
.photo-banner {
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}
.photo-banner img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.photo-banner figcaption {
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: 0.85rem;
  padding: 12px 18px;
  border-top: 1px solid var(--color-border);
}
.photo-banner figcaption a { color: var(--color-muted); text-decoration: underline; text-underline-offset: 2px; }
.photo-banner figcaption a:hover { color: var(--color-accent); }

/* ---- Photo grid (wildlife thumbnails) ---- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 24px 0;
}
.photo-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}
.photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.photo-grid figure:hover img { transform: scale(1.05); }
.photo-grid figcaption {
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-white-ice);
}
.photo-grid figcaption span {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--color-muted);
  margin-top: 2px;
}
@media (max-width: 800px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Photo credit (hero overlay) ---- */
.photo-credit {
  position: absolute;
  right: 20px;
  bottom: 10px;
  z-index: 2;
  font-size: 0.7rem;
  color: rgba(235,242,250,0.55);
  background: rgba(8,14,26,0.5);
  padding: 3px 9px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.photo-credit:hover { color: var(--color-accent); text-decoration: none; }

/* ---- Footer ---- */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 44px 0 24px;
  margin-top: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
}
.footer-grid p { color: var(--color-muted); font-size: 0.9rem; }
.footer-grid nav { display: flex; flex-direction: column; gap: 8px; }
.footer-grid nav strong, .footer-grid > div strong { color: var(--color-white-ice); font-family: var(--font-sans); }
.footer-legal {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  color: var(--color-muted);
  font-size: 0.8rem;
  margin: 0;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---- Misc pages (methodology, about, privacy) ---- */
.page-hero {
  position: relative;
  padding: 56px 0 24px;
  border-bottom: 1px solid var(--color-border);
  background:
    linear-gradient(180deg, rgba(8,14,26,0.55) 0%, var(--color-bg) 92%),
    radial-gradient(900px 420px at 80% -20%, rgba(31,111,235,0.14), transparent 60%),
    url('/images/landscape-fjord.jpg');
  background-size: cover;
  background-position: center 65%;
}
.page-hero .container { max-width: 860px; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--color-accent); font-size: 0.9rem; }
.independence-statement {
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-surface));
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 20px 0;
  box-shadow: var(--shadow-card);
}
.verify-note {
  color: var(--color-amber);
  background: var(--color-amber-bg);
  border: 1px solid #3a2a06;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.9rem;
  margin: 20px 0;
}

@media (max-width: 640px) {
  .stat-chips { grid-template-columns: repeat(2, 1fr); }

  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    order: 3;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid var(--color-border);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 10px 4px;
    font-size: 0.95rem;
  }

  .anchor-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
  }
  .anchor-nav::-webkit-scrollbar { display: none; }
  .anchor-nav a { flex-shrink: 0; }

  .brand-spotlight__specs { grid-template-columns: 1fr; }
}
