/* ===========================================================
   PECS HEALTH — SHARED STYLES
   Per Brand Guidelines v1.0, Section 2 + 3 + 7
   =========================================================== */

:root {
  --brand-ink: #0E1A24;
  --brand-charcoal: #2B3A47;
  --brand-slate: #6B7682;
  --brand-gold: #D4A84B;
  --brand-paper: #FAFAF7;
  --brand-slogan-gray: #9AA3AD;

  /* Surface colors — used for environmental tones on the page */
  --surface-dark: #3B5A6B;

  --type-display: "Inter Tight", system-ui, sans-serif;
  --type-body: "Inter Tight", system-ui, sans-serif;

  --max-content: 760px;
  --max-legal: 720px;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
}

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

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

body {
  font-family: var(--type-body);
  font-weight: 400;
  color: var(--brand-charcoal);
  background-color: var(--brand-paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================== LAYOUT ============================== */
.site-header {
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.site-header a {
  display: inline-block;
  text-decoration: none;
}

.site-header img {
  height: 32px;
  width: auto;
  display: block;
}

.site-main {
  flex: 1;
  padding: var(--space-md) var(--space-md) var(--space-xl);
}

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

.container--legal {
  max-width: var(--max-legal);
}

/* ============================== HOMEPAGE LOCKUP ============================== */
.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 480px;
  margin: var(--space-lg) auto var(--space-xl);
  padding: var(--space-md);
}

.brand-lockup svg,
.brand-lockup img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================== HERO ILLUSTRATION ============================== */
.hero-illustration {
  width: 100%;
  max-width: 720px;
  margin: var(--space-md) auto var(--space-lg);
  padding: 0 var(--space-sm);
}

.hero-illustration img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* ============================== SECTION ILLUSTRATIONS ============================== */
.section-illustration {
  width: 100%;
  max-width: 640px;
  margin: var(--space-lg) auto;
}

.section-illustration img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.section-illustration figcaption {
  margin-top: var(--space-xs);
  font-size: 0.8125rem;
  color: var(--brand-slate);
  font-style: italic;
  text-align: center;
  letter-spacing: -0.1px;
}

/* ============================== TYPOGRAPHY ============================== */
.tagline-es {
  font-family: var(--type-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--brand-slate);
  letter-spacing: -0.25px;
  text-align: center;
  margin-bottom: var(--space-lg);
}

.rule {
  width: 48px;
  height: 1px;
  background-color: var(--brand-gold);
  margin: 0 auto var(--space-lg);
  border: none;
}

.eyebrow {
  font-family: var(--type-display);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-slate);
  margin-bottom: var(--space-xs);
}

.section-title {
  font-family: var(--type-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  color: var(--brand-charcoal);
  letter-spacing: -0.5px;
  margin-bottom: var(--space-sm);
}

.page-title {
  font-family: var(--type-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--brand-charcoal);
  letter-spacing: -0.5px;
  margin-bottom: var(--space-xs);
  text-align: center;
}

.page-subtitle {
  text-align: center;
  color: var(--brand-slate);
  font-size: 0.9rem;
  margin-bottom: var(--space-xl);
}

.body-text {
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  line-height: 1.7;
  color: var(--brand-charcoal);
}

.body-text + .body-text {
  margin-top: var(--space-sm);
}

.body-text strong {
  font-weight: 600;
  color: var(--brand-charcoal);
}

.body-text a,
.legal a {
  color: var(--brand-charcoal);
  text-decoration: underline;
  text-decoration-color: var(--brand-gold);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color 0.15s ease;
}

.body-text a:hover,
.legal a:hover {
  color: var(--brand-gold);
}

/* ============================== SECTIONS ============================== */
.section {
  margin-bottom: var(--space-xl);
}

.section:last-of-type {
  margin-bottom: 0;
}

/* ============================== LEGAL PAGES ============================== */
.legal {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--brand-charcoal);
}

.legal h2 {
  font-family: var(--type-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--brand-charcoal);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.25px;
}

.legal h2:first-of-type {
  margin-top: var(--space-md);
}

.legal p {
  margin-bottom: var(--space-sm);
}

.legal ul {
  margin-bottom: var(--space-sm);
  padding-left: 1.5rem;
}

.legal li {
  margin-bottom: 0.375rem;
}

.legal .effective-date,
.effective-date {
  display: block;
  color: var(--brand-slate);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: var(--space-xl);
  margin-top: 0;
}

/* ============================== FOOTER ============================== */
.site-footer {
  padding: var(--space-md);
  border-top: 1px solid rgba(154, 163, 173, 0.25);
  color: var(--brand-slate);
  font-size: 0.8125rem;
  line-height: 1.6;
  text-align: center;
}

.footer-disclaimer {
  max-width: 620px;
  margin: 0 auto var(--space-sm);
  font-size: 0.75rem;
  color: var(--brand-slogan-gray);
}

.footer-disclaimer + .footer-disclaimer {
  margin-top: -0.5rem;
}

.footer-links {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--brand-slate);
  text-decoration: none;
  margin: 0 0.625rem;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.footer-links a:hover {
  color: var(--brand-charcoal);
  border-color: var(--brand-gold);
}

.footer-meta {
  letter-spacing: 0.05em;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--brand-slogan-gray);
}

/* ============================== MOTION ============================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in--1 { animation-delay: 0.05s; }
.fade-in--2 { animation-delay: 0.2s; }
.fade-in--3 { animation-delay: 0.35s; }
.fade-in--4 { animation-delay: 0.5s; }
.fade-in--5 { animation-delay: 0.65s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; }
}

/* ============================== RESPONSIVE ============================== */
@media (max-width: 640px) {
  .site-main {
    padding: var(--space-sm) var(--space-sm) var(--space-lg);
  }
  .brand-lockup {
    margin-bottom: var(--space-lg);
  }
}

/* ============================================================
   BANDED LAYOUT (homepage only — Wellframe-inspired)
   Adds horizontal color bands without breaking legal pages.
   ============================================================ */

body.banded-layout {
  background-color: var(--brand-paper);
}

body.banded-layout main {
  flex: 1;
}

/* Header variant that sits over the dark hero band */
.site-header--over-dark {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: transparent;
  padding: 1.5rem var(--space-md) 1rem;
}

.site-header--over-dark img {
  height: 96px;
  width: auto;
}

@media (max-width: 880px) {
  .site-header--over-dark img {
    height: 64px;
  }
}

/* Band base */
.band {
  width: 100%;
  position: relative;
}

.band--dark {
  background-color: var(--surface-dark);
  color: #FAFAF7;
}

.band--light {
  background-color: var(--brand-paper);
  color: var(--brand-charcoal);
}

.band--hero {
  padding: 10.5rem var(--space-md) 4rem;
}

.band--contact {
  padding: 5rem var(--space-md);
}

.band--light {
  padding: 5rem var(--space-md);
}

/* Wave dividers — soft transitions between dark and light bands */
.wave-divider {
  display: block;
  width: 100%;
  line-height: 0;
  margin: 0;
  padding: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 80px;
}

.wave-divider--down {
  /* dark band above, light band below: tile is part of dark continuing into light area */
  background-color: var(--brand-paper);
  margin-top: -1px;
}

.wave-divider--up {
  /* light band above, dark band below: tile shape brings dark up into the light area */
  background-color: var(--brand-paper);
  margin-bottom: -1px;
}

.band-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

/* Split: hero copy + illustration side-by-side */
.band-inner--split {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-xl);
  align-items: center;
}

/* Single centered content (App section) */
.band-inner--single {
  max-width: 760px;
}

.content-card--centered {
  text-align: center;
}

.content-card--centered .card-body {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* Reversed split: image left, copy right */
.band-inner--reverse-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.band--no-pad-top {
  padding-top: 0;
}

/* Hero eyebrow (small label above headline) */
.hero-eyebrow {
  font-family: var(--type-display);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin-bottom: var(--space-sm);
}

/* Section eyebrow + h2 */
.section-eyebrow {
  font-family: var(--type-display);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-slate);
  margin-bottom: var(--space-sm);
  text-align: center;
}

.section-eyebrow--on-dark {
  color: var(--brand-gold);
}

.section-h2 {
  font-family: var(--type-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: var(--brand-charcoal);
  margin-bottom: var(--space-lg);
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Pillars (three-column "how it works") */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.pillar {
  text-align: left;
}

.pillar-num {
  font-family: var(--type-display);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--brand-gold);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.pillar-title {
  font-family: var(--type-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--brand-charcoal);
  margin-bottom: var(--space-xs);
  letter-spacing: -0.25px;
}

.pillar-body {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--brand-charcoal);
}

/* Boundary note — calm clinical disclaimer beneath the pillars */
.boundary-note {
  margin: var(--space-lg) auto 0;
  max-width: 800px;
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--brand-gold);
  background: rgba(212, 168, 75, 0.06);
  border-radius: 0;
}

.boundary-note p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--brand-charcoal);
  margin: 0;
}

.boundary-note strong {
  font-weight: 600;
  color: var(--brand-charcoal);
  display: inline;
}

@media (max-width: 880px) {
  .boundary-note {
    padding: var(--space-sm) var(--space-md);
    margin-top: var(--space-md);
  }
}

/* Body paragraph (used in reversed-split section) */
.body-paragraph {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--brand-charcoal);
  margin-bottom: var(--space-sm);
}

.body-paragraph:last-child {
  margin-bottom: 0;
}

.body-paragraph em {
  font-style: italic;
  color: var(--brand-charcoal);
  font-weight: 500;
}

/* Focused single contact panel */
.contact-focused {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-focused .section-eyebrow {
  margin-bottom: var(--space-sm);
}

.contact-focused .panel-title {
  margin-bottom: var(--space-md);
}

.panel-meta {
  margin-top: var(--space-md);
  font-size: 0.8125rem;
  color: rgba(250, 250, 247, 0.7);
}

.panel-meta-link {
  color: rgba(250, 250, 247, 0.9);
  text-decoration: underline;
  text-decoration-color: var(--brand-gold);
  text-underline-offset: 3px;
}

/* Solid gold button (primary CTA) */
.button--solid-gold {
  color: var(--brand-charcoal);
  background: var(--brand-gold);
  border: 1.5px solid var(--brand-gold);
  font-weight: 600;
}

.button--solid-gold:hover {
  background: #C99938;
  border-color: #C99938;
}

/* Hero typography */
.hero-title {
  font-family: var(--type-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: #FAFAF7;
  margin-bottom: var(--space-md);
}

.hero-lead {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.65;
  color: rgba(250, 250, 247, 0.85);
  margin-bottom: var(--space-md);
  max-width: 540px;
}

.hero-tagline {
  font-family: var(--type-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--brand-gold);
  margin: 3rem auto 0;
  line-height: 1.4;
  text-align: center;
  max-width: 1120px;
  letter-spacing: -0.25px;
}

.hero-tagline em {
  font-style: italic;
}

.hero-tagline--es {
  margin-top: 0.25rem;
  opacity: 0.75;
}

.hero-art img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Two-column body cards */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.two-col--with-divider {
  position: relative;
}

.two-col--with-divider::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: rgba(212, 168, 75, 0.25);
  transform: translateX(-50%);
  pointer-events: none;
}

.content-card .eyebrow {
  font-family: var(--type-display);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-slate);
  margin-bottom: var(--space-xs);
}

.content-card .card-title {
  font-family: var(--type-display);
  font-weight: 600;
  font-size: clamp(1.375rem, 2.2vw, 1.625rem);
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: var(--brand-charcoal);
  margin-bottom: var(--space-sm);
}

.content-card .card-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--brand-charcoal);
  margin-bottom: var(--space-sm);
}

.content-card .card-body:last-child {
  margin-bottom: 0;
}

.content-card .card-body strong {
  font-weight: 600;
}

/* Contact band panels */
.contact-panel {
  text-align: center;
  padding: 0 var(--space-md);
}

.panel-title {
  font-family: var(--type-display);
  font-weight: 600;
  font-size: clamp(1.375rem, 2.2vw, 1.625rem);
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: #FAFAF7;
  margin-bottom: var(--space-md);
}

.panel-body {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(250, 250, 247, 0.8);
  margin-bottom: var(--space-md);
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.panel-cta {
  margin-top: var(--space-md);
}

/* Buttons */
.button {
  display: inline-block;
  font-family: var(--type-display);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  padding: 0.875rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.button--outline-light {
  color: #FAFAF7;
  border: 1.5px solid rgba(250, 250, 247, 0.4);
  background: transparent;
}

.button--outline-light:hover {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--brand-charcoal);
}

/* Mobile responsive for banded layout */
@media (max-width: 880px) {
  .band-inner--split,
  .band-inner--reverse-split {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: left;
  }

  .hero-art {
    order: 2;
  }

  .band-inner--reverse-split .hero-art {
    order: 1;
  }

  .band-inner--reverse-split .hero-copy {
    order: 2;
  }

  .pillars {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .two-col--with-divider::before {
    display: none;
  }

  .two-col--with-divider {
    gap: var(--space-lg);
  }

  .band--hero {
    padding: 5.5rem var(--space-md) 3rem;
  }

  .band--light,
  .band--contact {
    padding: 3rem var(--space-md);
  }
}

/* ============================== CONTACT FORM ============================== */

.contact-form {
  margin: var(--space-lg) auto 0;
  text-align: left;
  max-width: 560px;
}

.contact-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.contact-form__field {
  margin-bottom: var(--space-sm);
  display: flex;
  flex-direction: column;
}

.contact-form__field label {
  font-family: var(--type-display);
  font-weight: 500;
  font-size: 0.8125rem;
  color: rgba(250, 250, 247, 0.85);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.contact-form__field label span {
  color: var(--brand-gold);
  margin-left: 2px;
}

.contact-form__field input,
.contact-form__field select,
.contact-form__field textarea {
  font-family: var(--type-body);
  font-size: 0.9375rem;
  color: var(--brand-charcoal);
  background: rgba(250, 250, 247, 0.96);
  border: 1.5px solid rgba(250, 250, 247, 0.2);
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  line-height: 1.4;
}

.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder {
  color: var(--brand-slate);
  opacity: 0.7;
}

.contact-form__field input:focus,
.contact-form__field select:focus,
.contact-form__field textarea:focus {
  outline: none;
  border-color: var(--brand-gold);
  background: #FFFFFF;
}

.contact-form__field textarea {
  resize: vertical;
  min-height: 110px;
  font-family: var(--type-body);
}

.contact-form__field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7682' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
  cursor: pointer;
}

.contact-form__hint {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: rgba(250, 250, 247, 0.6);
  font-style: italic;
  line-height: 1.45;
}

.contact-form__actions {
  margin-top: var(--space-md);
  text-align: center;
}

.contact-form button[type="submit"] {
  border: none;
  cursor: pointer;
  font-family: var(--type-display);
}

@media (max-width: 640px) {
  .contact-form__row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
