/* =====================================================================
   The Polar Bear Club 3D — Landing Page Stylesheet
   --------------------------------------------------------------------
   Sections:
     1. Tokens (PALETTE, type, spacing)
     2. Reset & base
     3. Layout helpers
     4. Header / nav
     5. Hero
     6. Sections (products, different, giving, funnel)
     7. Footer
     8. Buttons & utilities
     9. Responsive
    10. Dark mode (prefers-color-scheme)
    11. Reduced motion
   ===================================================================== */

/* ---------- 1. TOKENS ------------------------------------------------ */
:root {
  /* PALETTE — brand colors (edit here to re-skin) */
  --glacier-white:  #F4F1EA;   /* primary background — warm off-white */
  --glacier-soft:   #EFEBE2;   /* alt surface */
  --arctic-blue:    #295C7E;   /* primary CTA / accent */
  --arctic-blue-2:  #1F4A66;   /* hover */
  --arctic-blue-tint:#D9E3EB;  /* tinted backgrounds */
  --charcoal:       #1F2326;   /* primary text */
  --charcoal-soft:  #4A5258;   /* secondary text */
  --charcoal-faint: #8A8F93;   /* meta text */
  --moss:           #5B7A4A;   /* sustainability accent */
  --moss-deep:      #3F5832;
  --sandstone:      #C7A37A;   /* warm accent */
  --sandstone-soft: #E8D9C2;
  --ice-panel:      rgba(217,227,235,0.45); /* translucent ice */
  --ice-border:     rgba(31,35,38,0.08);
  --ice-border-2:   rgba(31,35,38,0.14);

  /* Type */
  --font-display: "Cabinet Grotesk", "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-full: 999px;

  /* Container */
  --container-w: 1180px;
  --container-pad: 24px;

  /* Easing */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 2. RESET & BASE ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--charcoal);
  background: var(--glacier-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02";
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--charcoal);
  margin: 0 0 var(--sp-4);
  line-height: 1.1;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -0.02em; }
h3 { font-size: 1.18rem; letter-spacing: -0.01em; }
p { margin: 0 0 var(--sp-4); color: var(--charcoal-soft); }
a { color: var(--arctic-blue); text-decoration: none; transition: color 160ms var(--ease); }
a:hover { color: var(--arctic-blue-2); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--arctic-blue);
  outline-offset: 3px;
  border-radius: 4px;
}
ul, ol { margin: 0; padding: 0; }

/* skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  background: var(--charcoal);
  color: var(--glacier-white);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  z-index: 100;
}
.skip-link:focus { top: 8px; color: var(--glacier-white); }

/* ---------- 3. LAYOUT HELPERS --------------------------------------- */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}
.section { padding: var(--sp-10) 0; }
.section + .section { border-top: 1px solid var(--ice-border); }
.section-head { max-width: 720px; margin-bottom: var(--sp-8); }
.section-lede {
  font-size: 1.1rem;
  color: var(--charcoal-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  margin: 0 0 var(--sp-4);
}
.eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--arctic-blue);
  display: inline-block;
}
.eyebrow-moss { color: var(--moss-deep); }

/* ---------- 4. HEADER / NAV ----------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--glacier-white) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--ice-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  padding-top: var(--sp-4);
  padding-bottom: var(--sp-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--charcoal);
}
.brand:hover { color: var(--arctic-blue); }
.logo-mark {
  width: 36px;
  height: 36px;
  color: var(--arctic-blue);
  flex-shrink: 0;
}
.brand-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-line-1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: -0.005em;
}
.brand-line-2 {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal-faint);
  margin-top: 2px;
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}
.primary-nav a {
  color: var(--charcoal-soft);
  font-size: 0.95rem;
  font-weight: 500;
}
.primary-nav a:hover { color: var(--charcoal); }
.nav-cta {
  background: var(--charcoal);
  color: var(--glacier-white) !important;
  padding: 9px 16px;
  border-radius: var(--r-full);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 160ms var(--ease);
}
.nav-cta:hover { background: var(--arctic-blue); }

/* ---------- 5. HERO ------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 12vw, 160px) 0 clamp(72px, 11vw, 140px);
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(199,163,122,0.10), transparent 60%),
    radial-gradient(ellipse 70% 60% at 0% 100%, rgba(41,92,126,0.08), transparent 60%),
    var(--glacier-white);
}
.topo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
}
.hero-title {
  font-size: clamp(2.5rem, 6.2vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-5);
}
.hero-em {
  display: inline;
  color: var(--arctic-blue);
  font-style: italic;
  font-weight: 500;
  font-family: "Cabinet Grotesk", serif;
}
.hero-lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  max-width: 640px;
  color: var(--charcoal-soft);
  margin-bottom: var(--sp-6);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-7);
}
.hero-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
}
.hero-tags li {
  font-size: 0.85rem;
  color: var(--charcoal-soft);
  background: var(--ice-panel);
  border: 1px solid var(--ice-border-2);
  padding: 6px 12px;
  border-radius: var(--r-full);
  backdrop-filter: blur(4px);
}

/* ---------- 6. SECTIONS --------------------------------------------- */

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
}
.product-card {
  background: var(--glacier-soft);
  border: 1px solid var(--ice-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease), border-color 240ms var(--ease);
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--ice-border-2);
  box-shadow: 0 24px 48px -28px rgba(31,35,38,0.18);
}
.product-art {
  aspect-ratio: 5/4;
  background: linear-gradient(180deg, rgba(217,227,235,0.6) 0%, rgba(217,227,235,0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
  border-bottom: 1px solid var(--ice-border);
}
.product-art svg { width: 100%; height: auto; }
.product-body {
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
}
.product-body h3 {
  font-size: 1.3rem;
  margin-bottom: var(--sp-3);
}
.product-body p { font-size: 0.98rem; }
.product-meta {
  font-size: 0.78rem !important;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--moss-deep);
  margin-top: var(--sp-4);
  margin-bottom: 0 !important;
}

/* Different / commitments */
.different { background: var(--glacier-soft); }
.commitment-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-7) var(--sp-8);
  counter-reset: commitment;
}
.commitment-list li {
  display: flex;
  gap: var(--sp-5);
  align-items: flex-start;
}
.commitment-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glacier-white);
  border: 1px solid var(--ice-border-2);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--arctic-blue);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.commitment-list h3 {
  margin-bottom: var(--sp-2);
  font-size: 1.2rem;
}
.commitment-list p {
  font-size: 0.98rem;
  margin: 0;
}

/* Giving */
.giving {
  background:
    radial-gradient(ellipse 60% 80% at 90% 50%, rgba(91,122,74,0.08), transparent 60%),
    var(--glacier-white);
}
.giving-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--sp-8);
  align-items: start;
}
.giving-copy h2 { max-width: 14ch; }
.giving-copy p { font-size: 1.05rem; }
.giving-fine {
  font-size: 0.95rem;
  color: var(--charcoal-faint);
  font-style: italic;
}
.giving-card {
  background: var(--ice-panel);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--ice-border-2);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.giving-card-row {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--ice-border);
}
.giving-card-row:last-child { border-bottom: none; padding-bottom: 0; }
.giving-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--charcoal-faint);
  flex-shrink: 0;
  align-self: center;
}
.giving-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-align: right;
  color: var(--charcoal);
  line-height: 1.25;
}
.giving-sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--charcoal-soft);
}

/* Funnel */
.funnel {
  background: var(--charcoal);
  color: var(--glacier-white);
  position: relative;
  overflow: hidden;
}
.funnel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 20% 30%, rgba(41,92,126,0.35), transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(199,163,122,0.10), transparent 60%);
  pointer-events: none;
}
.funnel-inner {
  position: relative;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.funnel-mark {
  width: 56px;
  height: 56px;
  color: var(--glacier-white);
  margin: 0 auto var(--sp-5);
}
.funnel h2 {
  color: var(--glacier-white);
  font-size: clamp(2rem, 4.2vw, 3rem);
}
.funnel .eyebrow { color: rgba(244,241,234,0.7); }
.funnel-lede {
  font-size: 1.1rem;
  color: rgba(244,241,234,0.78);
  margin-bottom: var(--sp-6);
}

/* ---------- 7. FOOTER ----------------------------------------------- */
.site-footer {
  background: var(--glacier-soft);
  padding: var(--sp-8) 0 var(--sp-6);
  border-top: 1px solid var(--ice-border);
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-5);
  align-items: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--charcoal);
}
.footer-brand .logo-mark { width: 26px; height: 26px; color: var(--arctic-blue); }
.footer-nav {
  display: flex;
  gap: var(--sp-5);
  justify-content: center;
  flex-wrap: wrap;
}
.footer-nav a {
  color: var(--charcoal-soft);
  font-size: 0.9rem;
}
.footer-nav a:hover { color: var(--charcoal); }
.footer-fine {
  grid-column: 1 / -1;
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--ice-border);
  font-size: 0.82rem;
  color: var(--charcoal-faint);
  text-align: center;
}

/* ---------- 8. BUTTONS ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--r-full);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease), border-color 180ms var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--arctic-blue);
  color: var(--glacier-white);
}
.btn-primary:hover {
  background: var(--arctic-blue-2);
  color: var(--glacier-white);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--ice-border-2);
}
.btn-ghost:hover {
  border-color: var(--charcoal);
  color: var(--charcoal);
}
.btn-large {
  padding: 18px 30px;
  font-size: 1.05rem;
}

/* ---------- 9. RESPONSIVE ------------------------------------------- */
@media (max-width: 860px) {
  .primary-nav a:not(.nav-cta) { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .commitment-list { grid-template-columns: 1fr; gap: var(--sp-6); }
  .giving-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .section { padding: var(--sp-9) 0; }
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-brand { justify-content: center; }
}
@media (max-width: 520px) {
  .brand-line-2 { display: none; }
  .hero { padding-top: 64px; padding-bottom: 64px; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

/* ---------- 10. DARK MODE ------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --glacier-white:  #0E1418;
    --glacier-soft:   #141B20;
    --arctic-blue:    #6FA8C8;
    --arctic-blue-2:  #9BC3DA;
    --arctic-blue-tint:#1B2A35;
    --charcoal:       #E8E4DA;
    --charcoal-soft:  #B6B2A8;
    --charcoal-faint: #7B7771;
    --moss:           #88A56B;
    --moss-deep:      #A8C087;
    --sandstone:      #D7B58C;
    --sandstone-soft: #4A3D2A;
    --ice-panel:      rgba(111,168,200,0.08);
    --ice-border:     rgba(232,228,218,0.08);
    --ice-border-2:   rgba(232,228,218,0.14);
  }
  body { background: var(--glacier-white); color: var(--charcoal); }
  .site-header {
    background: color-mix(in srgb, var(--glacier-white) 80%, transparent);
  }
  .hero {
    background:
      radial-gradient(ellipse 60% 50% at 80% 0%, rgba(215,181,140,0.10), transparent 60%),
      radial-gradient(ellipse 70% 60% at 0% 100%, rgba(111,168,200,0.12), transparent 60%),
      var(--glacier-white);
  }
  .product-art {
    background: linear-gradient(180deg, rgba(111,168,200,0.08) 0%, rgba(111,168,200,0.02) 100%);
  }
  .nav-cta { background: var(--arctic-blue); color: var(--glacier-white) !important; }
  .nav-cta:hover { background: var(--arctic-blue-2); }
  .btn-primary { background: var(--arctic-blue); color: #0E1418; }
  .btn-primary:hover { background: var(--arctic-blue-2); color: #0E1418; }
  .funnel { background: #060A0D; }
  .funnel h2, .funnel-mark, .funnel .btn-primary { color: var(--glacier-white); }
  .funnel .btn-primary { background: var(--arctic-blue); color: #0E1418; }
}

/* ---------- 11. REDUCED MOTION -------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
