/* Sailing Kiwi — shared stylesheet */
:root {
  --ink: #0b1f33;
  --sea: #0a3d62;
  --sea-deep: #061d2e;
  --foam: #f3f7fb;
  --sand: #f5efe3;
  --port: #e63946;
  --starboard: #00aa44;
  --line: #d6dee6;
  --muted: #6b7a89;
}
*,*::before,*::after { box-sizing: border-box; }
html,body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--foam);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sea); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Top nav (used on inner pages) ---------- */
nav.topnav {
  background: var(--sea-deep);
  color: white;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 0.95rem;
}
nav.topnav a { color: white; opacity: 0.9; }
nav.topnav a:hover { opacity: 1; }
nav.topnav .brand {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
}
nav.topnav .brand img { width: 28px; height: 28px; border-radius: 6px; }
nav.topnav .sep { opacity: 0.4; }

/* ---------- Home hero (index.html only) ---------- */
header.hero {
  background: linear-gradient(180deg, var(--sea) 0%, var(--sea-deep) 100%);
  color: white;
  padding: 20px 24px;
}
header.hero .hero-row {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
}
header.hero .hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
header.hero .hero-logo { flex: 0 0 auto; }
header.hero img.logo {
  height: 132px;
  width: 132px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  display: block;
}
header.hero h1 {
  font-size: 2.1rem;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
header.hero p.tagline {
  font-size: 1.02rem;
  margin: 0 auto;
  max-width: 560px;
  opacity: 0.9;
}
header.hero .cta {
  margin-top: 16px;
  display: inline-block;
  background: var(--port);
  color: white;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
}
header.hero .cta:hover { background: #c92d39; text-decoration: none; }

/* ---------- Generic content wrap ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
main.narrow { max-width: 760px; }
h2 {
  font-size: 1.6rem;
  margin: 0 0 24px;
  border-left: 4px solid var(--starboard);
  padding-left: 12px;
}
section + section { margin-top: 48px; }

/* ---------- Course-area shelves on homepage (compact chips) ---------- */
.shelves {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.shelf-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 13px;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.shelf-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(11,31,51,0.10);
  text-decoration: none;
}
.shelf-card h3 { margin: 0; color: var(--ink); font-size: 0.9rem; font-weight: 600; }
.shelf-card .count { font-size: 0.75rem; color: var(--muted); }
.shelf-card .blurb { display: none; }

/* ---------- Video grid (home + shelves) ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.video-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}
.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(11,31,51,0.10);
  text-decoration: none;
}
.video-card .thumb {
  aspect-ratio: 16 / 9;
  background: #000 center/cover no-repeat;
  position: relative;
}
.video-card .thumb::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  opacity: 0.85;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.video-card .meta { padding: 14px 16px 16px; }
.video-card h3 { font-size: 1rem; line-height: 1.35; margin: 0 0 6px; color: var(--ink); }
.video-card .blurb { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ---------- Per-video page (the 5 layers) ---------- */
article.scenario h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
article.scenario .breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
}
article.scenario .breadcrumb a { color: var(--muted); }
article.scenario .answer {
  background: var(--sand);
  border-left: 4px solid var(--starboard);
  padding: 16px 20px;
  font-size: 1.15rem;
  line-height: 1.5;
  margin: 0 0 28px;
  border-radius: 0 8px 8px 0;
}
article.scenario .answer strong { color: var(--ink); }

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(11,31,51,0.12);
  margin: 0 0 20px;
}
.video-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Grab-it buttons (embed / download / watch on yt) */
.grab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  cursor: pointer;
}
.btn:hover { background: var(--foam); text-decoration: none; }
.btn.primary { background: var(--port); color: white; border-color: var(--port); }
.btn.primary:hover { background: #c92d39; }
.btn.ghost { background: transparent; }

/* Embed code popover */
.embed-box {
  display: none;
  background: #0b1f33;
  color: #cfe1f5;
  padding: 14px 16px;
  border-radius: 8px;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0 0 24px;
}
.embed-box.open { display: block; }

/* Trust stamp */
.trust-stamp {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 32px 0 0;
}
.trust-stamp .badge {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--starboard);
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.trust-stamp .text { font-size: 0.95rem; line-height: 1.45; }
.trust-stamp .text strong { color: var(--ink); }
.trust-stamp .text .who { color: var(--muted); display: block; margin-top: 2px; font-size: 0.85rem; }

/* Next-up cross-sell ("turn 1 view into 5") */
.next-up { margin-top: 48px; }
.next-up h2 { border-color: var(--port); }

/* About block on home */
section.about {
  margin-top: 32px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
}
section.about p { margin: 0 0 12px; }
section.about p:last-child { margin-bottom: 0; }

/* Footer */
footer.site {
  text-align: center;
  padding: 32px 24px 48px;
  color: var(--muted);
  font-size: 0.9rem;
}
footer.site a { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  header.hero .hero-row { flex-direction: column-reverse; gap: 20px; }
  header.hero img.logo { height: 96px; width: 96px; }
  header.hero h1 { font-size: 1.9rem; }
  header.hero p.tagline { font-size: 1rem; }
  article.scenario h1 { font-size: 1.5rem; }
  article.scenario .answer { font-size: 1.05rem; }
  main { padding: 32px 18px; }
}
