/* Euclid Q1 Webinar Series — landing page styles */

:root {
  --bg: #ffffff;
  --bg-muted: #f6f7f9;
  --text: #1a1a1a;
  --text-muted: #4a4a4a;
  --border: #e2e4e8;
  --accent: #2a3a8c;       /* deep Euclid-style blue */
  --accent-hover: #1f2d70;
  --max-width: 860px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 4.5rem;
}

* {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-md) var(--space-sm);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  padding-top: var(--space-lg);
  padding-bottom: var(--space-md);
}

.site-header h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-header .intro {
  color: var(--text-muted);
  margin: 0 0 var(--space-sm);
}

/* Table of contents */

.toc {
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
  font-size: 0.95rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.5rem;
}

.toc li {
  margin: 0.25rem 0;
}

.toc a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.toc a:hover,
.toc a:focus {
  border-bottom-color: var(--accent);
}

/* Sections */

main {
  padding-top: var(--space-md);
}

.video-section {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: var(--space-sm);
}

.video-section:last-of-type {
  border-bottom: none;
}

.video-section h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 0 0 var(--space-xs);
  font-weight: 600;
  color: var(--text);
}

.video-section .section-intro {
  margin: 0 0 var(--space-md);
}

/* Responsive 16:9 video container */

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  margin: 0 0 var(--space-md);
  overflow: hidden;
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 16 / 9) {
  .video-wrap {
    height: 0;
    padding-bottom: 56.25%;
  }
}

.video-wrap iframe,
.video-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-label {
  font-weight: 600;
  font-size: 1rem;
  margin: var(--space-md) 0 var(--space-xs);
  color: var(--text);
}

/* Note / compatibility caveat */

.note {
  background: var(--bg-muted);
  border-left: 3px solid #d97706;
  padding: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-md);
  font-size: 0.95rem;
}

.note-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  color: #92400e;
  margin-right: 0.4rem;
}

.note p {
  margin: 0 0 var(--space-xs);
}

.note ul {
  margin: var(--space-xs) 0 0;
  padding-left: 1.25rem;
}

.note li {
  margin: 0.2rem 0;
}

/* Related resources */

.related {
  background: var(--bg-muted);
  border-left: 3px solid var(--accent);
  padding: var(--space-sm) var(--space-md);
  margin: 0;
}

.related h3 {
  margin: 0 0 var(--space-xs);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.related ul {
  margin: 0;
  padding-left: 1.25rem;
}

.related li {
  margin: 0.2rem 0;
}

/* Links */

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--accent-hover);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0;
  margin-top: var(--space-md);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0 0 var(--space-xs);
}

/* Placeholder marker — visually subtle but greppable */

.tbd {
  color: #8a6a00;
  background: #fff7d6;
  padding: 0 0.25rem;
  border-radius: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

/* Dark mode — automatic via OS preference */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141c;
    --bg-muted: #181f2b;
    --text: #e6e9ef;
    --text-muted: #9aa3b2;
    --border: #2a313d;
    --accent: #8ea8ff;
    --accent-hover: #b6c6ff;
  }

  .site-header h1 {
    color: var(--accent);
  }

  .video-wrap {
    background: #000;
  }

  .tbd {
    color: #f0d27a;
    background: #2e2710;
  }

  .note {
    border-left-color: #f59e0b;
  }

  .note-label {
    color: #fbbf24;
  }
}

/* Narrow screens */

@media (max-width: 540px) {
  .container {
    padding: var(--space-sm);
  }
  .site-header {
    padding-top: var(--space-md);
  }
  .site-header h1 {
    font-size: 1.6rem;
  }
  .video-section {
    padding: var(--space-md) 0;
  }
  .related {
    padding: var(--space-sm);
  }
}
