/* =====================================================
   The Cruising Kiwis — Custom CSS
   ===================================================== */

:root {
  --navy:      #0B2545;
  --navy-mid:  #133A6B;
  --teal:      #0EA5E9;
  --teal-dark: #0284C7;
  --white:     #ffffff;
  --off-white: #F8FAFC;
  --light:     #F1F5F9;
  --text:      #1E293B;
  --muted:     #64748B;
  --border:    #E2E8F0;
  --shadow:    0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --radius:    8px;
  --nav-h:     68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- Layout ---- */
.container { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }

/* ---- Navigation ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--navy);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
  transition: background .35s ease, box-shadow .35s ease;
}
.site-header.transparent {
  background: transparent;
  box-shadow: none;
}
.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.logo img { height: 44px; width: auto; }
.nav-links {
  list-style: none;
  display: flex;
  gap: 0;
}
.nav-links a {
  display: block;
  padding: .5rem .9rem;
  color: rgba(255,255,255,.8);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: color .2s, background .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); background: rgba(255,255,255,.1); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ---- Video Background (homepage) ---- */
#yt-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
#yt-bg iframe {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 177.78vh; min-width: 100%;
  height: 56.25vw; min-height: 100%;
  border: none;
}
#yt-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    160deg,
    rgba(11,37,69,.72) 0%,
    rgba(0,0,0,.55) 60%,
    rgba(11,37,69,.8) 100%
  );
  pointer-events: none;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 0 1.5rem;
}
.hero-content {
  max-width: 780px;
  background: rgba(11, 37, 69, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 2.5rem 3rem;
}
.hero-eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 5.5rem);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.hero p {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 300;
  opacity: .88;
  max-width: 600px;
  margin: 0 auto 2.25rem;
  text-shadow: 0 1px 6px rgba(0,0,0,.4);
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  color: rgba(255,255,255,.5);
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero-scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.3);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .01em;
  transition: transform .18s, box-shadow .18s, background .18s, border-color .18s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--teal);
  color: var(--white);
  border: 2px solid var(--teal);
}
.btn-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14,165,233,.35);
}
.btn-outline-white {
  border: 2px solid rgba(255,255,255,.65);
  color: var(--white);
  background: transparent;
}
.btn-outline-white:hover {
  border-color: var(--white);
  background: rgba(255,255,255,.12);
}
.btn-navy {
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--navy);
}
.btn-navy:hover { background: var(--navy-mid); transform: translateY(-2px); }

/* ---- Sections ---- */
.section { padding: 5rem 0; }
.bg-light  { background: var(--off-white); }
.bg-navy   { background: var(--navy); color: var(--white); }
.text-center { text-align: center; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2.5rem; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: .6rem;
  color: var(--navy);
}
.bg-navy .section-header h2 { color: var(--white); }
.section-header p { font-size: 1.05rem; color: var(--muted); max-width: 520px; margin: 0 auto; }
.bg-navy .section-header p { color: rgba(255,255,255,.65); }

/* ---- Video Grid ---- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.video-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform .22s, box-shadow .22s;
}
.video-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--navy);
}
.video-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.video-card:hover .video-thumb img { transform: scale(1.05); }
.play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.28);
  opacity: 0;
  transition: opacity .22s;
}
.play-icon svg { width: 56px; height: 56px; fill: #FF0000; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.video-card:hover .play-icon { opacity: 1; }
.video-card h3 {
  padding: .85rem 1rem 1rem;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Blog Post Grid ---- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.post-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--teal);
  transition: transform .22s, box-shadow .22s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-card time {
  font-size: .78rem;
  color: var(--teal);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.post-card h3 { margin: .6rem 0 .85rem; font-size: 1.1rem; line-height: 1.4; color: var(--navy); }
.post-card p { font-size: .9rem; color: var(--muted); line-height: 1.65; flex: 1; }
.post-card .read-more {
  margin-top: 1.2rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--teal);
}

/* ---- Page Hero (non-homepage) ---- */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: calc(var(--nav-h) + 3.5rem) 1.5rem 3.5rem;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: .6rem;
}
.page-hero p {
  font-size: 1.1rem;
  opacity: .75;
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Prose (about, gear, route, etc.) ---- */
.prose {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}
.prose h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 3rem 0 1rem;
  color: var(--navy);
  border-bottom: 2px solid var(--border);
  padding-bottom: .5rem;
}
.prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2.5rem 0 .75rem;
  color: var(--navy);
  clear: both;
}
.prose p { margin-bottom: 1.3rem; }
.prose a { color: var(--teal); text-decoration: underline; text-decoration-color: rgba(14,165,233,.4); }
.prose a:hover { text-decoration-color: var(--teal); }
.prose img {
  float: right;
  margin: 0 0 1.5rem 2rem;
  max-width: 200px;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1;
  object-fit: cover;
}
.post-content img {
  float: none;
  display: block;
  margin: 1.5rem auto;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  aspect-ratio: auto;
  object-fit: initial;
}
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; clear: both; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose li { margin-bottom: .45rem; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: .95rem; }
.prose th { background: var(--navy); color: white; padding: .75rem 1rem; text-align: left; font-weight: 600; }
.prose td { padding: .65rem 1rem; border-bottom: 1px solid var(--border); }
.prose tr:nth-child(even) td { background: var(--off-white); }
.prose strong { font-weight: 600; }

/* ---- Single post ---- */
.post-full-header {
  background: var(--navy);
  color: var(--white);
  padding: calc(var(--nav-h) + 3.5rem) 1.5rem 3.5rem;
  text-align: center;
}
.post-full-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  max-width: 760px;
  margin: 0 auto .8rem;
  line-height: 1.25;
}
.post-meta {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  font-weight: 500;
}
.post-body {
  padding: 3.5rem 0 5rem;
}

/* ---- Post navigation ---- */
.post-nav {
  max-width: 820px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ---- Back to top button ---- */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  transform: translateY(8px);
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#back-to-top:hover { background: var(--navy-mid); }

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 5rem 1.5rem;
  color: var(--muted);
}
.empty-state p { font-size: 1.1rem; margin-bottom: 1.5rem; }

/* ---- Footer ---- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.6);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.footer-logo img { height: 32px; filter: brightness(0) invert(1); opacity: .7; }
.footer-links { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.footer-links a {
  color: rgba(255,255,255,.6);
  font-size: .85rem;
  transition: color .2s;
}
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: .82rem; }

/* ---- Press card grid (press page) ---- */
.press-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.press-card-item {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .22s, box-shadow .22s;
}
.press-card-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.press-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem 1rem;
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
  min-height: 90px;
}
.press-card-logo img {
  max-height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}
.press-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.press-card-date {
  font-size: .75rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .5rem;
}
.press-card-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: .75rem;
}
.press-card-body p {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

/* ---- Press / As Featured In ---- */
.press-block {
  padding: 0 1.5rem 3rem;
}
.press-block-inner {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1.5rem 2.5rem 2rem;
  text-align: center;
}
.press-block-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.press-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
}
.press-logos img {
  height: 36px;
  width: auto;
  opacity: .75;
  transition: opacity .2s;
}
.press-logos a:hover img { opacity: 1; }

/* ---- Homepage glass effects ---- */
body.home { background: transparent; }
.glass-section {
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ---- Gear list ---- */
.gear-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 3rem;
}
.gear-nav-pill {
  padding: .35rem .95rem;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--navy);
  font-size: .85rem;
  font-weight: 500;
  transition: background .15s, border-color .15s, color .15s;
}
.gear-nav-pill:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}
.gear-category { margin-bottom: 3.5rem; scroll-margin-top: calc(var(--nav-h) + 1.5rem); }
.gear-category h2 {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--navy);
  border-left: 4px solid var(--teal);
  padding-left: .85rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}
.gear-count {
  font-size: .75rem;
  font-weight: 500;
  color: var(--white);
  background: var(--teal);
  border-radius: 999px;
  padding: .1rem .55rem;
  line-height: 1.6;
}
.gear-list { display: flex; flex-direction: column; }
.gear-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr;
  gap: 1rem;
  align-items: center;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.gear-row:first-child { border-top: 1px solid var(--border); }
.gear-row--nodetails { grid-template-columns: 1fr; }
.gear-row--hasimg { grid-template-columns: 52px minmax(180px, 1fr) 2fr; }
.gear-row--hasimg.gear-row--nodetails { grid-template-columns: 52px 1fr; }
.gear-row:has(a):hover { background: var(--off-white); }
.gear-img { flex-shrink: 0; }
.gear-img img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: opacity .15s;
}
.gear-img img:hover { opacity: .85; }
.gear-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
}
.gear-lightbox.open { display: flex; }
.gear-lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
}
.gear-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
  transition: opacity .15s;
}
.gear-lightbox-close:hover { opacity: 1; }
#gear-lightbox-caption {
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  text-align: center;
}
.gear-name { font-weight: 600; color: var(--navy); }
.gear-name a { color: var(--teal); display: inline-flex; align-items: center; gap: .3rem; }
.gear-name a:hover { text-decoration: underline; }
.ext-icon { width: .8em; height: .8em; opacity: .7; flex-shrink: 0; }
.gear-details { display: flex; flex-direction: column; gap: .25rem; }
.gear-desc { color: var(--muted); font-size: .92rem; line-height: 1.55; }
.gear-promo {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--teal-dark);
}
.gear-promo:hover { text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .nav-links.open { max-height: 480px; }
  .nav-links li { border-bottom: 1px solid rgba(255,255,255,.07); }
  .nav-links a {
    padding: .9rem 1.5rem;
    font-size: .95rem;
    border-radius: 0;
  }
  .hero h1 { font-size: 2.4rem; }
  .hero-content { padding: 2rem 1.5rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; max-width: 280px; text-align: center; }
  .gear-row,
  .gear-row--hasimg,
  .gear-row--hasimg.gear-row--nodetails { grid-template-columns: 1fr; }
  .gear-nav { gap: .4rem; }
  .prose img { float: none; max-width: 160px; margin: 1rem auto 1.5rem; }
  .post-content img { max-width: 100%; margin: 1rem auto; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
