/* EOSDFW.com — Ray Myers, Professional EOS Implementer®
   Built to align with EOS Worldwide branding guidelines.
   No EOS logos, badges, or licensed brand assets are used.
   Color palette inferred from EOS visual identity: navy + warm accent on cream/white. */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Fonts */
  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;

  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 680px;
  --content-default: 1040px;
  --content-wide: 1240px;
}

/* Light mode (default) — EOS-inspired navy on warm off-white */
:root,
[data-theme='light'] {
  --color-bg: #fbfaf7;
  --color-surface: #ffffff;
  --color-surface-2: #f4f1ec;
  --color-surface-offset: #ece8e0;
  --color-divider: #e3ddd1;
  --color-border: #cfc8b8;

  --color-text: #1b2436;
  --color-text-muted: #5b6479;
  --color-text-faint: #95a0b3;
  --color-text-inverse: #fbfaf7;

  /* EOS-style navy as primary */
  --color-primary: #0f2e52;
  --color-primary-hover: #1a4178;
  --color-primary-active: #081e3a;
  --color-primary-highlight: #d6e0ee;

  /* Warm accent (rust/orange) — used sparingly for CTAs */
  --color-accent: #c45a2b;
  --color-accent-hover: #a3441c;
  --color-accent-highlight: #f3dac9;

  --shadow-sm: 0 1px 2px rgba(15, 46, 82, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 46, 82, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 46, 82, 0.12);
}

[data-theme='dark'] {
  --color-bg: #0c1422;
  --color-surface: #131c2e;
  --color-surface-2: #1a253a;
  --color-surface-offset: #213049;
  --color-divider: #1f2a40;
  --color-border: #2c3a55;

  --color-text: #e6e8ee;
  --color-text-muted: #98a1b5;
  --color-text-faint: #6c7588;
  --color-text-inverse: #0c1422;

  --color-primary: #6fa3e0;
  --color-primary-hover: #95bdec;
  --color-primary-active: #4a87cf;
  --color-primary-highlight: #1f3658;

  --color-accent: #e08252;
  --color-accent-hover: #ec9c70;
  --color-accent-highlight: #3a2418;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0c1422;
    --color-surface: #131c2e;
    --color-surface-2: #1a253a;
    --color-surface-offset: #213049;
    --color-divider: #1f2a40;
    --color-border: #2c3a55;
    --color-text: #e6e8ee;
    --color-text-muted: #98a1b5;
    --color-text-faint: #6c7588;
    --color-text-inverse: #0c1422;
    --color-primary: #6fa3e0;
    --color-primary-hover: #95bdec;
    --color-primary-active: #4a87cf;
    --color-primary-highlight: #1f3658;
    --color-accent: #e08252;
    --color-accent-hover: #ec9c70;
    --color-accent-highlight: #3a2418;
  }
}

/* ===== Base reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-20);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

p,
li {
  text-wrap: pretty;
  max-width: 68ch;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--transition);
}
a:hover {
  color: var(--color-primary-hover);
}

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--color-primary-highlight);
  color: var(--color-text);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 5vw, var(--space-8));
}
.container--wide {
  max-width: var(--content-wide);
}
.container--narrow {
  max-width: var(--content-narrow);
}

section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-divider);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover {
  color: var(--color-primary);
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  font-size: var(--text-sm);
}
.nav-links a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}
.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--color-primary);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.theme-toggle:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  border-radius: var(--radius-sm);
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-4);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-divider);
    box-shadow: var(--shadow-md);
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-links li {
    padding-block: var(--space-3);
    border-bottom: 1px solid var(--color-divider);
  }
  .nav-links li:last-child {
    border-bottom: 0;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .nav-cta .btn {
    display: none;
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--secondary {
  background: var(--color-primary);
  color: #fff;
}
.btn--secondary:hover {
  background: var(--color-primary-hover);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* ===== Hero ===== */
.hero {
  padding-block: clamp(var(--space-12), 8vw, var(--space-20));
  background:
    radial-gradient(
      ellipse at 80% 20%,
      var(--color-primary-highlight) 0%,
      transparent 55%
    ),
    var(--color-bg);
}
/* The home hero is the only one that gets full theatre */
.hero--home {
  padding-block: clamp(var(--space-16), 12vw, var(--space-32));
}

.hero__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.hero__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-6);
  max-width: 18ch;
}

.hero__lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-bottom: var(--space-8);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ===== Section headings ===== */
.section-eyebrow {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
  max-width: 22ch;
}

.section-lede {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-bottom: var(--space-10);
}

/* ===== Three-promise grid (Vision / Traction® / Healthy) ===== */
.promise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}

.promise {
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.promise:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-highlight);
}
.promise__num {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-4);
}
.promise__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}
.promise__body {
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* ===== Two-column ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 6vw, var(--space-16));
  align-items: center;
}
.two-col--top {
  align-items: start;
}
@media (max-width: 820px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* ===== Feature list ===== */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.feature-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--space-4);
  align-items: start;
  max-width: none;
}
.feature-list .check {
  color: var(--color-accent);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.2;
}

/* ===== CTA banner ===== */
.cta-banner {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-10), 6vw, var(--space-16));
  text-align: center;
}
.cta-banner h2 {
  color: var(--color-text-inverse);
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}
.cta-banner p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 52ch;
  margin: 0 auto var(--space-8);
  font-size: var(--text-base);
}

/* ===== Article / prose ===== */
.prose {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
}
.prose h2 {
  font-size: var(--text-xl);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
}
.prose h3 {
  font-size: var(--text-lg);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}
.prose p,
.prose ul,
.prose ol {
  margin-bottom: var(--space-5);
}
.prose ul,
.prose ol {
  padding-left: var(--space-6);
}
.prose li {
  margin-bottom: var(--space-2);
}

/* ===== Forms ===== */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 560px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.form input,
.form textarea,
.form select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
}
.form textarea {
  min-height: 140px;
  resize: vertical;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-16);
  margin-top: var(--space-20);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}
@media (max-width: 820px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 540px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}
.site-footer h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  font-weight: 600;
}
.site-footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.site-footer a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--color-primary);
}
.site-footer__legal {
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-6);
  font-size: var(--text-xs);
  line-height: 1.6;
}
.site-footer__legal p {
  margin-bottom: var(--space-3);
  max-width: 90ch;
}

/* ===== Utility ===== */
.text-muted {
  color: var(--color-text-muted);
}
.text-center {
  text-align: center;
}
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

/* ===== Video grid + featured video ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}
.video-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.video-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-highlight);
}
.video-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--color-surface-2);
  overflow: hidden;
}
.video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0);
  transition: background var(--transition);
}
.video-card:hover .video-card__play { background: rgba(0,0,0,0.25); }
.video-card__play::before {
  content: "";
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-accent);
  clip-path: polygon(35% 25%, 35% 75%, 75% 50%);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.video-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.video-card__title {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.35;
}
.video-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.featured-video {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(var(--space-8), 6vw, var(--space-12));
  align-items: center;
}
.featured-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-divider);
  background: var(--color-surface-2);
}
.featured-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 820px) {
  .featured-video { grid-template-columns: 1fr; }
}

/* ===== Headshot card (placeholder until photo is provided) ===== */
.headshot-card {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: clamp(var(--space-6), 4vw, var(--space-10));
  align-items: center;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
}
.headshot {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%,
      var(--color-primary-highlight) 0 22%,
      transparent 22.5%),
    linear-gradient(180deg,
      var(--color-surface-2) 0%,
      var(--color-primary) 100%);
  position: relative;
  overflow: hidden;
  border: 4px solid var(--color-surface);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15), 0 0 0 1px var(--color-divider);
}
.headshot::after {
  /* shoulders silhouette */
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8%;
  width: 110%;
  height: 60%;
  transform: translateX(-50%);
  background: var(--color-primary);
  border-radius: 50% 50% 0 0 / 60% 60% 0 0;
}
.headshot--photo {
  background: var(--color-surface-2);
}
.headshot--photo::after { display: none; }
.headshot--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.headshot-card__meta strong {
  display: block;
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.headshot-card__meta .role {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}
.headshot-card__links {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .headshot-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .headshot { max-width: 200px; }
  .headshot-card__links { justify-content: center; }
}

/* ===== Split hero (Home) with portrait ===== */
.hero--split .hero__split {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(var(--space-8), 6vw, var(--space-12));
  align-items: center;
}
.hero--split .hero__text { text-align: left; }
.hero--split .hero__title,
.hero--split .hero__lede,
.hero--split .hero__cta { margin-left: 0; margin-right: 0; }
.hero--split .hero__cta { justify-content: flex-start; }

.hero__portrait {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__portrait img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 18%;
  background: linear-gradient(180deg, var(--color-surface-2) 0%, rgba(0,0,0,0) 100%);
  box-shadow: 0 24px 48px -16px rgba(15,30,60,0.25), 0 0 0 1px var(--color-divider);
}

@media (max-width: 820px) {
  .hero--split .hero__split {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .hero--split .hero__text { text-align: center; }
  .hero--split .hero__cta { justify-content: center; }
  .hero__portrait { order: -1; }
  .hero__portrait img { max-width: 260px; }
}
