/* Learn to Surf Field Guide
   Ocean-themed extension of Hovercraft design tokens */

:root {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --secondary-color: #94a3b8;
  --accent-color: #38bdf8;
  --surf-teal: #0891b2;
  --surf-teal-dark: #0e7490;
  --surf-teal-soft: rgba(8, 145, 178, 0.15);
  --surf-sand: #d4a574;
  --surf-sand-light: #e8d4b8;
  --surf-foam: #f0fdfa;
  --surf-deep: #164e63;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-light: #94a3b8;
  --bg-primary: #0a0f1a;
  --bg-secondary: #0f172a;
  --bg-accent: #1e293b;
  --inverse-bg: #f1f5f9;
  --footer-bg: #020617;
  --success-color: #34d399;
  --warning-color: #fbbf24;
  --error-color: #f87171;
  --border-color: #334155;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --max-width: 1100px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

a { color: var(--surf-teal); text-decoration: none; }
a:hover { color: #22d3ee; text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Header */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.home-mark {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.home-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-mark:hover { opacity: 0.9; }

.brand {
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--text-primary); }
.brand-name { font-weight: 700; font-size: 1.05rem; color: var(--surf-teal); }
.brand-sub { font-size: 0.75rem; color: var(--text-light); }

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.35rem 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--surf-teal);
}

.btn-nav-cta {
  background: var(--surf-teal) !important;
  color: #fff !important;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem !important;
}
.btn-nav-cta:hover {
  background: var(--surf-teal-dark) !important;
  text-decoration: none !important;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 0.75rem;
  }
  .nav-links.is-open { display: flex; }
}

/* Disclaimer */
.disclaimer-bar {
  background: #1c1a16;
  border-bottom: 1px solid #3f3a32;
  padding: 0.45rem 0;
  font-size: 0.85rem;
  color: #c4b8a4;
}
.disclaimer-bar details { margin: 0; }
.disclaimer-bar summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #e4d4b8;
  user-select: none;
  min-height: 1.75rem;
}
.disclaimer-bar summary::-webkit-details-marker { display: none; }
.disclaimer-bar summary::marker { content: ""; }
.disclaimer-bar summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s;
  flex-shrink: 0;
  margin-top: -0.12rem;
}
.disclaimer-bar details[open] summary::after {
  transform: rotate(225deg);
  margin-top: 0.12rem;
}
.disclaimer-bar details p {
  margin: 0.55rem 0 0.15rem;
  max-width: 72ch;
  line-height: 1.5;
}

/* Hero */
.hero {
  padding: var(--spacing-lg) 0 var(--spacing-md);
  background:
    radial-gradient(ellipse at top left, rgba(8, 145, 178, 0.18), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(14, 116, 144, 0.12), transparent 60%),
    var(--bg-primary);
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--success-color);
  background: rgba(52, 211, 153, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.date-line {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.teaching-context {
  max-width: 40rem;
  margin: 0 0 1rem;
  padding: 0.85rem 1.1rem;
  background: var(--bg-accent);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.teaching-context p + p {
  margin-top: 0.5rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0 0 1rem;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.85rem 1.1rem;
  min-width: 110px;
}
.stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--surf-teal);
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
}

.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--surf-teal);
  color: #fff;
}
.btn-primary:hover { background: var(--surf-teal-dark); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  border-color: var(--surf-teal);
  color: var(--surf-teal);
}

/* Sections */
.section { padding: var(--spacing-md) 0; }
.section-alt { background: var(--bg-secondary); }
.section-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--surf-teal);
  margin-bottom: 0.5rem;
}
.section h2 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
}

/* Jump Nav */
.jump-nav {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: var(--spacing-md);
}
.jump-nav-title {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin: 0 0 0.65rem;
}
.jump-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.jump-nav-list li a {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  background: var(--bg-accent);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
}
.jump-nav-list li a:hover {
  border-color: var(--surf-teal);
  color: var(--surf-teal);
  text-decoration: none;
}

/* Content Cards */
.callout {
  border-radius: var(--border-radius-lg);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-color);
  background: var(--bg-accent);
  margin: 1rem 0;
}
.callout h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.callout p { margin: 0.4rem 0; color: var(--text-secondary); }
.callout.warn {
  border-color: #0e7490;
  background: rgba(8, 145, 178, 0.08);
}
.callout.info {
  border-color: #1d4ed8;
  background: rgba(59, 130, 246, 0.08);
}
.callout.tip {
  border-color: #059669;
  background: rgba(52, 211, 153, 0.08);
}
.callout.danger {
  border-color: #dc2626;
  background: rgba(248, 113, 113, 0.08);
}

/* Topic Cards */
.topic-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  scroll-margin-top: 5rem;
}
.topic-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  color: var(--surf-teal);
}
.topic-card h4 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  color: var(--text-primary);
}
.topic-card p { margin: 0.5rem 0; }
.topic-card ul, .topic-card ol {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
}
.topic-card li { margin: 0.35rem 0; }

/* Numbered Steps */
.step-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.step-list li {
  counter-increment: step;
  position: relative;
  padding: 1rem 1rem 1rem 3.5rem;
  margin-bottom: 0.75rem;
  background: var(--bg-accent);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}
.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.75rem;
  height: 1.75rem;
  background: var(--surf-teal);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}
.checklist li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.75rem;
  border-bottom: 1px solid var(--border-color);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--surf-teal);
  border-radius: 3px;
}

/* Mistakes / Common Fails */
.mistake-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.mistake-card {
  background: var(--bg-accent);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  border-left: 4px solid var(--error-color);
}
.mistake-card h5 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--error-color);
}
.mistake-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.15rem;
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.card p { margin: 0.4rem 0; color: var(--text-secondary); font-size: 0.95rem; }
.card-eyebrow {
  font-size: 0.75rem;
  color: var(--surf-teal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.35rem;
}

a.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
a.card:hover {
  border-color: var(--surf-teal);
  text-decoration: none;
  transform: translateY(-2px);
}
a.card:hover h3 { color: var(--surf-teal); }
a.card .card-meta {
  margin-top: auto;
  padding-top: 0.75rem;
  color: var(--surf-teal);
  font-weight: 600;
  font-size: 0.875rem;
}

/* SVG Diagrams */
.diagram-wrap {
  background: var(--bg-accent);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1rem;
  margin: 1rem 0;
  text-align: center;
}
.diagram-wrap svg {
  max-width: 100%;
  height: auto;
}
.diagram-caption {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* Sources Table */
.sources-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0;
}
.sources-table th,
.sources-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}
.sources-table th {
  background: var(--bg-accent);
  color: var(--surf-teal);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.sources-table a { word-break: break-word; }

/* Footer */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-md) 0 var(--spacing-sm);
  margin-top: var(--spacing-lg);
  font-size: 0.9rem;
}
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.footer-col h4 { margin: 0 0 0.5rem; color: var(--surf-teal); font-size: 0.95rem; }
.footer-col p, .footer-col li { color: var(--text-light); margin: 0.3rem 0; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col a { color: var(--text-secondary); }
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  color: var(--text-light);
  font-size: 0.8rem;
}
.footer-bottom p { margin: 0.35rem 0; }

/* Mobile Responsive */
@media (max-width: 800px) {
  .hero {
    padding: 1.5rem 0 1.15rem;
  }
  .hero h1 {
    font-size: 1.75rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .section {
    padding: 1.25rem 0;
  }
  .section h2 {
    font-size: 1.35rem;
  }
  .topic-card {
    padding: 1.15rem;
  }
  .topic-card h3 {
    font-size: 1.15rem;
  }
  .callout {
    padding: 1rem 1.1rem;
  }
  .stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin: 1rem 0;
  }
  .stat {
    min-width: 0;
    padding: 0.7rem 0.85rem;
  }
  .btn-group {
    flex-direction: column;
  }
  .btn-group .btn {
    width: 100%;
    text-align: center;
    min-height: 44px;
  }
  .step-list li {
    padding: 0.85rem 0.85rem 0.85rem 3rem;
  }
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem;
  }
}

@media (max-width: 420px) {
  .container {
    padding: 0 0.85rem;
  }
  .jump-nav-list li a {
    font-size: 0.75rem;
    padding: 0.3rem 0.55rem;
  }
}
