/* ==========================================================================
   Antarctica Polar Plunge Guide - Design System
   ========================================================================== */

:root {
  --color-bg:         #F0F5FA;
  --color-surface:    #FFFFFF;
  --color-surface-2:  #E8F1F8;
  --color-border:     #C8D8E8;
  --color-text:       #0D1E2C;
  --color-muted:      #5A7A95;
  --color-accent:     #0066CC;
  --color-accent-bg:  #E5F0FF;
  --color-cold:       #00A8CC;
  --color-cold-bg:    #E0F7FC;
  --color-warning:    #7B5C00;
  --color-warning-bg: #FFF8E6;
  --color-ok:         #1A5C38;
  --color-ok-bg:      #EDFAF3;
  --color-brand:      #0066CC;
  --color-brand-bg:   #E5F0FF;
  --radius:           8px;
  --font-sans:        'Inter', sans-serif;
  --font-display:     'Space Grotesk', 'Inter', sans-serif;
  --font-size-base:   16px;
  --line-height:      1.7;
  --max-width:        1120px;
}

/* -------------------------------------------------------------------------
   Reset
   ------------------------------------------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body, div, span, h1, h2, h3, h4, p, ol, ul, li, table, thead, tbody,
tr, th, td, figure, figcaption, nav, header, footer, section, article, a,
img, details, summary {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: rgba(0,102,204,0.35);
}

a:hover {
  text-decoration-color: var(--color-accent);
}

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* -------------------------------------------------------------------------
   Layout helpers
   ------------------------------------------------------------------------- */

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

section {
  padding: 56px 0;
}

section + section {
  border-top: 1px solid var(--color-border);
}

/* -------------------------------------------------------------------------
   Typography
   ------------------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
}

h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 20px;
}

h2 {
  font-size: 1.85rem;
  margin-bottom: 18px;
}

h3 {
  font-size: 1.4rem;
  margin-bottom: 14px;
}

h4 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

p {
  margin-bottom: 16px;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
}

.lede {
  font-size: 1.2rem;
  color: var(--color-muted);
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--color-accent);
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  appearance: none;
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-muted);
  text-decoration: none;
  cursor: pointer;
}

.nav-dropdown .dropdown-toggle::after {
  content: "\25BE";
  font-size: 0.7rem;
  line-height: 1;
}

.nav-dropdown .dropdown-toggle:hover,
.nav-dropdown.is-open .dropdown-toggle {
  color: var(--color-accent);
}

.nav-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  /* no gap between toggle and menu: a real gap here breaks :hover
     continuity and makes the menu vanish when the cursor moves down to it */
  padding-top: 10px;
  z-index: 60;
}

.nav-dropdown .dropdown-menu-inner {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(13, 30, 44, 0.12);
  padding: 8px;
  min-width: 220px;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.is-open .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.dropdown-menu a:hover {
  background: var(--color-accent-bg);
  color: var(--color-accent);
}

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

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */

.hero {
  background: linear-gradient(180deg, var(--color-bg) 0%, #E4EFF9 100%);
  padding: 56px 0 40px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-media img,
.hero-media svg {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  display: block;
}

.hero-text .lede {
  margin-top: 8px;
}

@media (max-width: 800px) {
  .hero .container {
    grid-template-columns: 1fr;
  }
  .hero-media {
    order: -1;
  }
  .hero-media img,
  .hero-media svg {
    max-width: 320px;
  }
}

/* -------------------------------------------------------------------------
   Key Takeaways
   ------------------------------------------------------------------------- */

.key-takeaways {
  padding: 8px 0 8px;
}

.takeaways-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.takeaway-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
}

.takeaway-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 8px;
}

.takeaway-item strong {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 6px;
  color: var(--color-text);
}

.takeaway-item p {
  font-size: 0.92rem;
  color: var(--color-muted);
  margin-bottom: 0;
}

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

@media (max-width: 480px) {
  .takeaways-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------
   Anchor nav
   ------------------------------------------------------------------------- */

.anchor-nav {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  margin: 24px 0 0;
}

.anchor-nav a {
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}

.anchor-nav a:hover,
.anchor-nav a.is-active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* -------------------------------------------------------------------------
   Step list
   ------------------------------------------------------------------------- */

.step-list {
  counter-reset: step-counter;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-list li {
  counter-increment: step-counter;
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 20px 18px 68px;
}

.step-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 20px;
  top: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent-bg);
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-list strong {
  display: block;
  margin-bottom: 4px;
  color: var(--color-text);
}

.step-list span {
  display: block;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* -------------------------------------------------------------------------
   Warning / OK checklists
   ------------------------------------------------------------------------- */

.warning-list,
.ok-list,
.checklist-prep {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: var(--radius);
  padding: 20px 20px 20px 20px;
}

.warning-list {
  background: var(--color-warning-bg);
  border: 1px solid #EBD9A0;
}

.ok-list {
  background: var(--color-ok-bg);
  border: 1px solid #B7E3CB;
}

.checklist-prep {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.warning-list li,
.ok-list li,
.checklist-prep li {
  position: relative;
  padding-left: 28px;
  font-size: 0.96rem;
}

.warning-list li::before {
  content: "!";
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-warning);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ok-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-ok);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checklist-prep li::before {
  content: "\2022";
  position: absolute;
  left: 6px;
  top: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.checklist-block-title {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 1.02rem;
}

.checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 800px) {
  .checklist-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------
   Tables
   ------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin: 20px 0;
}

.data-table {
  min-width: 640px;
  background: var(--color-surface);
}

.data-table caption {
  text-align: left;
  font-size: 0.85rem;
  color: var(--color-muted);
  padding: 12px 16px 0;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--color-border);
}

.data-table thead th {
  background: var(--color-surface-2);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.data-table thead th:hover {
  color: var(--color-accent);
}

.data-table thead th[data-sort-dir]::after {
  content: " \2195";
  color: var(--color-muted);
  font-size: 0.8rem;
}

.data-table thead th[data-sort-dir="asc"]::after {
  content: " \2191";
  color: var(--color-accent);
}

.data-table thead th[data-sort-dir="desc"]::after {
  content: " \2193";
  color: var(--color-accent);
}

.data-table tbody tr:hover {
  background: var(--color-accent-bg);
}

.table-note {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-style: italic;
}

/* -------------------------------------------------------------------------
   Infographic
   ------------------------------------------------------------------------- */

.infographic-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0;
}

.infographic-caption {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--color-muted);
}

/* -------------------------------------------------------------------------
   Article photos
   ------------------------------------------------------------------------- */

.article-photo {
  margin: 24px 0;
}

.article-photo img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--color-border);
}

.article-photo figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--color-muted);
}

.article-photo .photo-credit {
  display: block;
  font-size: 0.78rem;
  margin-top: 2px;
}

.hero-media .article-photo {
  margin: 0;
}

/* -------------------------------------------------------------------------
   Brand spotlight (Poseidon Expeditions)
   ------------------------------------------------------------------------- */

.brand-spotlight {
  background: var(--color-brand-bg);
  border: 1px solid #B8D4F5;
  border-radius: 12px;
  padding: 32px;
  margin: 28px 0;
}

.brand-spotlight__badge {
  display: inline-block;
  background: var(--color-brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.brand-spotlight__header h3 {
  margin-bottom: 4px;
}

.brand-spotlight__sub {
  color: var(--color-muted);
  font-size: 0.98rem;
  margin-bottom: 20px;
}

.brand-spotlight__triplet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.triplet-item {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 18px;
}

.triplet-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 0.98rem;
}

.triplet-item p {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 0;
}

.brand-spotlight__meta-row {
  display: flex;
  gap: 10px 18px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 22px;
  padding-top: 18px;
  border-top: 1px solid #B8D4F5;
}

.brand-spotlight__cta {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius);
}

.brand-spotlight__cta:hover {
  background: #0052A3;
}

@media (max-width: 800px) {
  .brand-spotlight__triplet {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------
   FAQ
   ------------------------------------------------------------------------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 4px 20px;
}

.faq-item summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1.02rem;
  list-style: none;
  position: relative;
  padding-right: 30px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 14px;
  font-size: 1.4rem;
  color: var(--color-accent);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  padding-bottom: 18px;
  color: var(--color-muted);
}

/* -------------------------------------------------------------------------
   Verify note
   ------------------------------------------------------------------------- */

.verify-note {
  display: block;
  font-size: 0.78rem;
  color: var(--color-warning);
  font-style: italic;
}

/* -------------------------------------------------------------------------
   Methodology page
   ------------------------------------------------------------------------- */

.source-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.source-list li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.95rem;
}

.source-list strong {
  color: var(--color-text);
}

.verify-checklist li {
  padding-left: 24px;
  position: relative;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.verify-checklist li::before {
  content: "\25A1";
  position: absolute;
  left: 0;
  color: var(--color-warning);
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-weight: 500;
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */

.site-footer {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  padding: 40px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
}

.footer-nav-title {
  display: block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--color-text);
  margin-bottom: 6px;
}

.footer-grid p {
  color: var(--color-muted);
  font-size: 0.92rem;
  margin-top: 8px;
}

.footer-grid nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-grid nav a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-grid nav a:hover {
  color: var(--color-accent);
}

.footer-legal {
  font-size: 0.8rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}

@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------
   Simple pages (methodology / about / privacy)
   ------------------------------------------------------------------------- */

.page-hero {
  padding: 48px 0 8px;
}

.content-block {
  max-width: 760px;
}

.content-block h2 {
  margin-top: 32px;
}

.content-block ul {
  margin: 0 0 16px;
  padding-left: 4px;
}

.content-block ul li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}

.content-block ul li::before {
  content: "\2022";
  position: absolute;
  left: 4px;
  color: var(--color-accent);
}
