/* ============================================================================
   style.css — SHARED STYLESHEET FOR JOS WILLARD COACHING

   SINGLE RULE: Every color, font, and size comes from brand-tokens.css.
   No hard-coded hex values or font names. Only var(--*) references.
   ========================================================================== */

/* ---- RESET & BASE ---- */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--line-body);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---- BUTTONS ---- */

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  font-weight: var(--weight-bold);
  padding: 0.85em 1.5em;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-invert);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  background: var(--color-accent-active);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--color-text-invert);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

/* ---- HEADER ---- */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 22px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

header.scrolled {
  background: rgba(var(--rgb-brand), 0.96);
  backdrop-filter: saturate(140%) blur(6px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 14px 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  max-height: 44px;
  width: auto;
}

/* Default: white logo shown, color logo hidden (used on hero/dark pages) */
.logo-color { display: none; }
.logo-white { display: block; }

/* Light header: shown on pages without a dark hero image.
   Before scrolling, switch to the color logo and dark nav links.
   Once scrolled, the dark .scrolled background takes over and whites apply naturally. */
header.light-header:not(.scrolled) .logo-white { display: none; }
header.light-header:not(.scrolled) .logo-color { display: block; }

header.light-header:not(.scrolled) #navLinks a:not(.btn-primary) {
  color: var(--color-brand);
}

header.light-header:not(.scrolled) #navLinks a:not(.btn-primary):hover {
  color: var(--color-accent-active);
}

header.light-header:not(.scrolled) .menu-toggle {
  color: var(--color-brand);
}

#navLinks {
  display: flex;
  align-items: center;
  gap: 30px;
}

#navLinks a {
  font-family: var(--font-secondary);
  font-size: var(--size-nav);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease;
}

#navLinks a:hover {
  color: var(--color-text-invert);
}

#navLinks .btn-primary {
  margin-left: 10px;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--color-text-invert);
  cursor: pointer;
  padding: 6px;
  z-index: 60;
}

.menu-toggle svg {
  display: block;
  width: 26px;
  height: 26px;
}

/* ---- HERO SECTION ---- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(
      180deg,
      rgba(var(--rgb-brand), 0.55) 0%,
      rgba(var(--rgb-brand), 0.80) 100%
    ),
    url('/assets/img/sunset-sailboat.png') center 38% / cover no-repeat;
  color: var(--color-text-invert);
  padding: 140px 0 90px;
}

.hero-inner {
  max-width: 760px;
}

.hero h1 {
  font-family: var(--font-secondary);
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  font-weight: var(--weight-normal);
  line-height: 1.1;
  margin-bottom: 26px;
  text-wrap: balance;
}

.hero .lead {
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: var(--line-body);
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin-bottom: 14px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 34px;
}

.scrollcue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scrollcue .dot {
  width: 1px;
  height: 34px;
  background: linear-gradient(rgba(255, 255, 255, 0.6), transparent);
}

/* ---- SECTION WRAPPERS ---- */

.section-light {
  background: var(--color-bg);
  padding: clamp(70px, 9vw, 120px) 0;
}

.section-alt {
  background: var(--color-bg-alt);
  padding: clamp(70px, 9vw, 120px) 0;
}

.section-dark {
  background: var(--color-brand);
  color: var(--color-text-invert);
  padding: clamp(70px, 9vw, 120px) 0;
}

/* ---- HEADINGS & TEXT ---- */

h1 {
  font-family: var(--font-secondary);
  font-size: var(--size-h1);
  font-weight: var(--weight-normal);
  line-height: var(--line-heading);
}

h2 {
  font-family: var(--font-secondary);
  font-size: var(--size-h2);
  font-weight: var(--weight-normal);
  line-height: var(--line-heading);
}

h3 {
  font-family: var(--font-secondary);
  font-size: var(--size-h3);
  font-weight: var(--weight-normal);
  line-height: var(--line-heading);
}

h4 {
  font-family: var(--font-secondary);
  font-size: var(--size-h4);
  font-weight: var(--weight-bold);
  line-height: var(--line-heading);
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: inline-block;
  margin-bottom: 18px;
}

.section-dark .eyebrow {
  color: var(--color-text-invert);
  opacity: 0.85;
}

/* ---- CARD GRID ---- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 54px 0;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 30px 26px;
}

.card h3 {
  font-family: var(--font-secondary);
  font-size: 1.25rem;
  font-weight: var(--weight-normal);
  line-height: 1.25;
  margin-bottom: 10px;
  color: var(--color-text);
}

.card p {
  font-size: 0.97rem;
  color: var(--color-text);
  line-height: var(--line-body);
}

/* ---- CTA BAND ---- */

.band {
  background: var(--color-brand);
  color: var(--color-text-invert);
  padding: clamp(64px, 8vw, 100px) 0;
  text-align: center;
}

.band h2 {
  font-family: var(--font-secondary);
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-weight: var(--weight-normal);
  line-height: 1.2;
  max-width: 680px;
  margin: 0 auto 18px;
  color: var(--color-text-invert);
}

.band p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 540px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
  line-height: var(--line-body);
}

/* ---- FOOTER ---- */

footer {
  background: var(--color-brand);
  color: rgba(255, 255, 255, 0.8);
  padding: 64px 0 36px;
}

.foot-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 36px;
  align-items: flex-start;
}

.foot-logo {
  max-height: 52px;
  width: auto;
}

.foot-col h4 {
  font-family: var(--font-secondary);
  font-size: 0.72rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-invert);
  opacity: 0.85;
  margin-bottom: 14px;
}

.foot-col a,
.foot-col p {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.96rem;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.foot-col a:hover {
  color: var(--color-text-invert);
}

.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 48px;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.5);
}

.foot-bottom a {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
}

.foot-bottom a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ---- MOBILE NAV DRAWER ---- */

@media (max-width: 780px) {
  #navLinks {
    position: fixed;
    inset: 0 0 auto 0;
    top: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: rgba(var(--rgb-brand), 0.98);
    padding: 90px 28px 30px;
    transform: translateY(-100%);
    transition: transform 0.35s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  }

  #navLinks.open {
    transform: translateY(0);
  }

  #navLinks a {
    font-size: 1.1rem;
    padding: 10px 0;
    width: 100%;
  }

  #navLinks .btn-primary {
    margin-left: 0;
    margin-top: 10px;
    /* Restore the button's own horizontal padding — the #navLinks a rule
       above zeroes it out, which jams the label against the left edge. */
    padding: 0.85em 1.5em;
    width: auto;
  }

  .menu-toggle {
    display: block;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 36px 0;
  }

  .hero {
    min-height: 92svh;
  }
}

/* ---- ABOUT / JOS PAGE ---- */

/* Extra top padding on inner pages that have no full-height hero — clears the fixed nav */
.page-top {
  padding-top: 140px;
}

/* Two-column layout: photo left, text right */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.55fr;
  gap: 60px;
  align-items: start;
}

.about-photo {
  width: 100%;
  border-radius: var(--radius);
  display: block;
}

/* Mission subheading — the "I believe…" line */
.about-sub {
  font-size: 0.78rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Long-form prose container */
.prose {
  max-width: 700px;
}

.prose p {
  font-size: 1.04rem;
  line-height: var(--line-body);
  margin-bottom: 20px;
  color: var(--color-text);
}

/* Standalone emphasis line — "THEY GET STUCK", "AND THEN THE BUSINESS DIES" */
.emph-block {
  font-family: var(--font-secondary);
  font-size: 1.22rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin: 36px 0 20px;
  display: block;
}

/* Short pivot word — "OR" */
.accent-word {
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin: 28px 0;
}

@media (max-width: 860px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Crop the landscape photo to a portrait-friendly height on small screens */
  .about-photo {
    max-height: 400px;
    object-fit: cover;
    object-position: center 20%;
  }

  .page-top {
    padding-top: 110px;
  }
}

/* ---- RESULTS PAGE: VIDEOS ---- */

/* Four videos sit in a 2x2 grid (3 YouTube + 1 Vimeo). */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 54px 0;
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 600px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ---- RESULTS PAGE: TESTIMONIALS (interleaved banners + text) ----
   One grid holds both: each .testimonial-banner image spans the full width
   (both columns), and the two .testimonial cards after it fill the columns. */

/* Trim the white section's top padding so the first banner sits just 40px below
   the videos — matching the 40px gap between items inside the grid (rather than
   the section's default ~70-120px). */
.results-testimonials {
  padding-top: 40px;
}

.testimonials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin: 0 0 54px;   /* no top margin; the 40px section padding owns the top gap */
}

/* Full-width banner images interleaved between the text cards */
.testimonial-banner {
  grid-column: 1 / -1;   /* span both columns */
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

/* Light cards: a soft grey card sits on the white section background, with a
   large serif quote mark watermarked in the top-left corner. */
.testimonial {
  position: relative;                 /* anchors the decorative quote mark */
  background: var(--color-bg-alt);    /* light grey card on the white section */
  border-radius: var(--radius);
  /* Generous top padding clears the enlarged quote mark; the 30px gap above
     the quote (its `top` below) matches the 30px bottom padding. */
  padding: 82px 30px 30px;
  overflow: hidden;
}

/* Decorative opening quote mark, drawn in CSS so the quote text itself stays
   clean (no literal quotation marks needed in the copy). A serif face gives the
   classic curly quote — rounder bottoms and skinnier tails than the sans-serif
   heading font. */
.testimonial::before {
  content: "\201C";                   /* left double quotation mark */
  position: absolute;
  top: 30px;                          /* gap above quote matches bottom padding */
  left: 26px;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: var(--weight-bold);
  font-size: 5.85rem;                 /* 30% larger than the previous 4.5rem */
  line-height: 1;
  color: var(--color-brand);
  opacity: 0.2;
  pointer-events: none;
}

/* Quote body — bold + italic, matching the live site. */
.testimonial p {
  font-size: 1rem;
  line-height: var(--line-body);
  color: var(--color-text);
  font-style: italic;
  font-weight: var(--weight-bold);
  margin-bottom: 16px;
}

.testimonial p:last-child {
  margin-bottom: 0;
}

/* Attribution sits on two lines: name (ink) above, company/title (aqua) below.
   Reset the italic/bold inherited from .testimonial p. */
.testimonial .attribution {
  margin-top: 18px;
  font-style: normal;
  font-weight: var(--weight-normal);
}

.testimonial .t-name {
  display: block;
  color: var(--color-ink);
  font-weight: var(--weight-bold);
  font-size: 0.98rem;
}

.testimonial .t-org {
  display: block;
  color: var(--color-accent-active);  /* deeper aqua for legibility on the light card */
  font-size: 0.84rem;
  margin-top: 3px;
}

@media (max-width: 860px) {
  .testimonials {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ---- CONTACT PAGE ---- */

/* Light blue section wrapping the whole contact page */
.contact-section {
  background: rgba(var(--rgb-tertiary), 0.20);
  padding: clamp(100px, 12vw, 140px) 0 clamp(60px, 8vw, 100px);
}

/* Two-column layout: intro text left, form right */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-heading {
  font-family: var(--font-secondary);
  font-weight: var(--weight-normal);
  font-size: clamp(2rem, 4vw, var(--size-h1));
  line-height: var(--line-heading);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 18px;
}

/* First + last name sit side by side on desktop */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: block;
  font-family: var(--font-secondary);
  font-weight: var(--weight-bold);
  font-size: 0.875rem;
  color: var(--color-ink);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 9px 11px;
  font-family: var(--font-primary);
  font-size: 0.93rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--rgb-accent), 0.12);
}

textarea {
  resize: vertical;
  line-height: var(--line-body);
}

.form-submit {
  margin-top: 24px;
}

/* Hidden honeypot field for spam protection */
input[name="netlify-honeypot"] {
  display: none;
}

@media (max-width: 860px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---- PRIVACY & COOKIES PAGE ---- */

.policy-section {
  padding-top: 140px;
}

.policy-section h1 {
  font-size: var(--size-h1);
  margin-bottom: 8px;
}

.policy-section .last-updated {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 32px;
  display: block;
}

.policy-section h2 {
  font-size: var(--size-h3);
  margin-top: 36px;
  margin-bottom: 16px;
}

.policy-section ul {
  margin-left: 24px;
  margin-bottom: 28px;
}

.policy-section li {
  font-size: 1.04rem;
  line-height: var(--line-body);
  margin-bottom: 8px;
  color: var(--color-text);
}

/* ---- ACCESSIBILITY & MOTION ---- */

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

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}
