/* =============================================================
   VIVAS LLC — Main Stylesheet
   Brand green: #44AA00 (sampled from Vivas Logo v2.png)
   Note: #44AA00 on white is ~3:1 — fine for the logo, accents, borders
   and large brand moments, but FAILS WCAG AA for body/UI text. So all
   text links and button backgrounds use the darker --green-dark (#2E8006,
   ~5:1 on white) while --green stays the true brand mark colour.
   Design: clean, scientific, mobile-first, WCAG AA
   ============================================================= */

/* ---------------------------------------------------------
   CSS Custom Properties
--------------------------------------------------------- */
:root {
  /* Brand palette */
  --green:        #44AA00;   /* True brand green (logo) — decorative/accents/large only */
  --green-dark:   #2E8006;   /* Interactive: button bg + text links — AA on white (~5:1) */
  --green-darker: #246404;   /* Hover for buttons/links */
  --green-light:  #EBF5E0;   /* Tint for IND callout background */
  --green-border: #B8DFA0;   /* Tint for IND callout border */

  /* Neutrals */
  --charcoal:     #1A1A1A;   /* Body text */
  --charcoal-mid: #3D3D3D;   /* Secondary text / labels */
  --mid-grey:     #6B6B6B;   /* Muted text */
  --rule:         #E2E4DE;   /* Dividers */

  /* Backgrounds — alternating bands */
  --bg-white:     #FFFFFF;
  --bg-off-white: #F6F7F4;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif,
               "Apple Color Emoji", "Segoe UI Emoji";

  /* Spacing scale */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   1.5rem;
  --space-lg:   2.5rem;
  --space-xl:   4rem;
  --space-2xl:  6rem;

  /* Layout */
  --max-width:  1100px;
  --nav-height: 64px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur:  200ms;
}


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

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

body {
  font-family: var(--font-sans);
  color: var(--charcoal);
  background-color: var(--bg-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Anchor offset for sticky nav */
:target {
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

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

a {
  color: var(--green-dark);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--green-darker);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

ul {
  list-style: none;
}

/* ---------------------------------------------------------
   Container
--------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 2rem;
  }
}

@media (min-width: 1100px) {
  .container {
    padding-inline: 2.5rem;
  }
}


/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
  min-height: 44px;        /* tap-target minimum */
  text-align: center;
  text-decoration: none;
}

/* Primary CTA — white text on --green-dark. Contrast: #FFFFFF on #2E8006 = ~5:1 ✓ */
.btn-primary {
  background-color: var(--green-dark);
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--green-darker);
  color: #FFFFFF;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(46,128,6,0.30);
}

/* Nav "Get in touch" button */
.btn-nav {
  background-color: var(--green-dark);
  color: #FFFFFF;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

.btn-nav:hover,
.btn-nav:focus-visible {
  background-color: var(--green-darker);
  color: #FFFFFF;
  text-decoration: none;
}

/* Mobile menu CTA */
.btn-mobile {
  background-color: var(--green-dark);
  color: #FFFFFF;
  display: block;
  text-align: center;
  margin-top: var(--space-sm);
  padding: 0.875rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
}

.btn-mobile:hover,
.btn-mobile:focus-visible {
  background-color: var(--green-darker);
  color: #FFFFFF;
  text-decoration: none;
}

/* Focus ring for all buttons */
.btn:focus-visible {
  outline: 2px solid var(--green-dark);
  outline-offset: 3px;
}


/* ---------------------------------------------------------
   Section shared
--------------------------------------------------------- */
.section-header {
  margin-bottom: var(--space-lg);
  text-align: center;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-subhead {
  margin-top: 0.625rem;
  font-size: 1rem;
  color: var(--mid-grey);
  max-width: 56ch;
  margin-inline: auto;
  line-height: 1.6;
}

/* ---------------------------------------------------------
   Logo image sizes (real Vivas mark, assets/vivas-logo.png)
   Sized by height; intrinsic aspect ratio ~1.245 (651×523).
--------------------------------------------------------- */
.logo-img {
  display: block;
  flex-shrink: 0;
  width: auto;
}

.logo-img--nav {
  height: 30px;
}

.logo-img--hero {
  height: 88px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .logo-img--hero {
    height: 104px;
  }
}


/* Reveal animation base state — JS adds .is-visible */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}


/* =============================================================
   NAV
============================================================= */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  height: var(--nav-height);
  /* Animate shadow on scroll — JS adds .scrolled */
  transition: box-shadow var(--dur) var(--ease);
}

.site-nav.scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 768px) {
  .nav-inner { padding-inline: 2rem; }
}

/* Logo + wordmark */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--charcoal);
  flex-shrink: 0;
}

.nav-logo:hover,
.nav-logo:focus-visible {
  text-decoration: none;
  color: var(--green-dark);
}

/* nav logo sizing handled by .logo-img--nav above */

.nav-wordmark {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: inherit;
}

/* Desktop nav links */
.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a:not(.btn) {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--charcoal-mid);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.nav-links a:not(.btn):hover,
.nav-links a:not(.btn):focus-visible {
  color: var(--green-dark);
  text-decoration: none;
}

/* Hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 6px;
  transition: background-color var(--dur) var(--ease);
}

.nav-hamburger:hover,
.nav-hamburger:focus-visible {
  background-color: var(--bg-off-white);
}

.nav-hamburger:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--charcoal);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

/* Hamburger → X when open */
.nav-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 768px) {
  .nav-hamburger {
    display: none;
  }
}

/* Mobile menu drawer */
.nav-mobile {
  background-color: var(--bg-white);
  border-top: 1px solid var(--rule);
  padding: var(--space-sm) 1.25rem var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-mobile[hidden] {
  display: none;
}

.mobile-link {
  display: block;
  padding: 0.75rem 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  min-height: 44px;
  transition: color var(--dur) var(--ease);
}

.mobile-link:hover,
.mobile-link:focus-visible {
  color: var(--green-dark);
  text-decoration: none;
}


/* =============================================================
   HERO
============================================================= */
.hero {
  background-color: var(--bg-white);
  padding-block: var(--space-2xl) var(--space-xl);
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.hero-logo-wrap {
  margin-bottom: 0.5rem;
}

/* hero logo sizing handled by .logo-img--hero above */

.hero-headline {
  font-size: clamp(1.875rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--charcoal);
  max-width: 22ch;
}

.hero-subhead {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: var(--mid-grey);
  max-width: 52ch;
  line-height: 1.65;
  margin-top: -0.25rem;
}

.hero .btn-primary {
  margin-top: 0.5rem;
  font-size: 1rem;
  padding: 0.875rem 2rem;
}


/* =============================================================
   THROUGHLINE
============================================================= */
.throughline {
  background-color: var(--bg-off-white);
  padding-block: var(--space-xl);
}

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

.throughline-text {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.75;
  color: var(--charcoal-mid);
  font-weight: 400;
  border-left: 4px solid var(--green);
  padding-left: var(--space-md);
}


/* =============================================================
   SERVICES
============================================================= */
.services {
  background-color: var(--bg-white);
  padding-block: var(--space-xl) var(--space-2xl);
}

/* 3-column on wide screens, 1-column on mobile */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.09);
  transform: translateY(-2px);
}

/* Top accent bar */
.card-accent {
  height: 4px;
  background-color: var(--green);
  flex-shrink: 0;
}

.card-body {
  padding: var(--space-md) var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.card-promise {
  font-size: 0.9375rem;
  color: var(--mid-grey);
  font-style: italic;
  margin-bottom: var(--space-sm);
  line-height: 1.55;
}

.card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-list li {
  font-size: 0.9375rem;
  color: var(--charcoal-mid);
  line-height: 1.55;
  padding-left: 1.125rem;
  position: relative;
}

.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--green);
  flex-shrink: 0;
}

.card-cta-text {
  margin-top: var(--space-sm);
  font-size: 0.9rem;
  color: var(--mid-grey);
}


/* ---------------------------------------------------------
   IND Callout — hard requirement: visually prominent
--------------------------------------------------------- */
.ind-callout {
  background-color: var(--green-light);
  border-left: 4px solid var(--green);
  border-radius: 0 6px 6px 0;
  padding: 0.875rem 1rem;
  margin-block: var(--space-sm) var(--space-sm);
}

.ind-callout p {
  font-size: 0.9375rem;
  color: var(--charcoal);
  line-height: 1.6;
}

.ind-callout strong {
  color: var(--charcoal);
  font-weight: 700;
}


/* =============================================================
   ABOUT
============================================================= */
.about {
  background-color: var(--bg-off-white);
  padding-block: var(--space-xl) var(--space-2xl);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .about-inner {
    grid-template-columns: 200px 1fr;
    gap: var(--space-lg) var(--space-xl);
    align-items: start;
  }
}

.about-founder-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.founder-name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--charcoal);
}

.founder-title {
  font-size: 0.875rem;
  color: var(--green-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.about-bio p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--charcoal-mid);
}


/* =============================================================
   TRACK RECORD
============================================================= */
.track-record {
  background-color: var(--bg-white);
  padding-block: var(--space-xl) var(--space-2xl);
}

.track-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}

.track-item {
  display: grid;
  grid-template-columns: 1fr;
  padding: var(--space-md) var(--space-md);
  border-bottom: 1px solid var(--rule);
  transition: background-color var(--dur) var(--ease);
}

.track-item:last-child {
  border-bottom: none;
}

.track-item:hover {
  background-color: var(--bg-off-white);
}

@media (min-width: 640px) {
  .track-item {
    grid-template-columns: 160px 1fr;
    gap: var(--space-md);
    align-items: start;
  }
}

.track-program {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: 0.01em;
  padding-bottom: 0.375rem;
}

@media (min-width: 640px) {
  .track-program {
    padding-bottom: 0;
    padding-top: 0.125rem;
  }
}

.track-desc {
  font-size: 0.9375rem;
  color: var(--charcoal-mid);
  line-height: 1.6;
}

.track-contribution {
  font-size: 0.9rem;
  color: var(--mid-grey);
  margin-top: 0.25rem;
  line-height: 1.55;
}


/* =============================================================
   CONTACT
============================================================= */
.contact {
  background-color: var(--bg-off-white);
  padding-block: var(--space-xl) var(--space-2xl);
  text-align: center;
}

.contact-inner {
  max-width: 600px;
}

.contact h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.contact-invitation {
  font-size: 1.0625rem;
  color: var(--mid-grey);
  margin-bottom: var(--space-lg);
  line-height: 1.65;
}

.contact-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-dark);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  min-height: 44px;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}

.contact-link:hover,
.contact-link:focus-visible {
  background-color: var(--green-light);
  color: var(--green-dark);
  text-decoration: none;
}

.contact-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--mid-grey);
  padding: 0.5rem 0.75rem;
}

.contact-icon {
  flex-shrink: 0;
  color: var(--green);
}


/* =============================================================
   FOOTER
============================================================= */
.site-footer {
  background-color: var(--charcoal);
  color: rgba(255,255,255,0.7);
  padding-block: var(--space-lg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-copy {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .footer-nav {
    justify-content: flex-end;
  }
}

.footer-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
  padding: 0.25rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #FFFFFF;
  text-decoration: none;
}

.footer-nav a:focus-visible {
  outline: 2px solid rgba(255,255,255,0.5);
  outline-offset: 3px;
  border-radius: 2px;
}


/* =============================================================
   PRINT
============================================================= */
@media print {
  .site-nav,
  .nav-hamburger,
  .nav-mobile {
    display: none !important;
  }
  .hero,
  .throughline,
  .services,
  .about,
  .track-record,
  .contact {
    padding-block: 1.5rem;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
