/**
 * WalkWise Base — global typography, reset, universal utilities
 */

/* ── Body ─────────────────────────────────────────────────── */
body {
  font-family:    var(--ww-font-body);
  font-weight:    var(--ww-weight-light);
  font-size:      var(--ww-text-base);
  line-height:    var(--ww-lh-body);
  color:          var(--ww-body);
  letter-spacing: var(--ww-ls-body);
  background:     var(--ww-white);
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Headings ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family:    var(--ww-font-heading);
  font-weight:    var(--ww-weight-semibold);
  line-height:    var(--ww-lh-heading);
  color:          var(--ww-text);
  letter-spacing: var(--ww-ls-heading);
  margin-bottom:  var(--ww-space-4);
}

h1, .h1 { font-size: var(--ww-text-hero); letter-spacing: var(--ww-ls-hero); font-weight: var(--ww-weight-bold); }
h2, .h2 { font-size: var(--ww-text-5xl); letter-spacing: -0.012em; }
h3, .h3 { font-size: var(--ww-text-4xl); }
h4, .h4 { font-size: var(--ww-text-2xl); }
h5, .h5 { font-size: var(--ww-text-xl);  }
h6, .h6 { font-size: var(--ww-text-lg);  }

@media (max-width: 1024px) {
  h1, .h1 { font-size: 2.875rem; }   /* ~46px */
  h2, .h2 { font-size: 2.5rem;   }
}
@media (max-width: 768px) {
  h1, .h1 { font-size: 2.0625rem; }  /* ~33px */
  h2, .h2 { font-size: 1.75rem;   }
  h3, .h3 { font-size: 1.5rem;    }
}

/* ── Paragraphs & text ────────────────────────────────────── */
p, li, td, th {
  font-family: var(--ww-font-body);
  font-size:   var(--ww-text-base);
  line-height: var(--ww-lh-body);
  color:       var(--ww-body);
}

.lead, .ww-lead {
  font-size:   var(--ww-text-lg);
  font-weight: var(--ww-weight-regular);
  line-height: var(--ww-lh-sub);
}

strong, b { font-weight: var(--ww-weight-semibold); }
em, i     { font-style: italic; }

/* ── Links ───────────────────────────────────────────────── */
a {
  color:           var(--ww-primary);
  text-decoration: none;
  transition:      color var(--ww-transition);
}
a:hover, a:focus {
  color:           var(--ww-amber);
  text-decoration: underline;
}
a:focus-visible {
  outline: 3px solid var(--ww-primary);
  outline-offset: 2px;
  border-radius: var(--ww-radius-sm);
}

/* ── Buttons (universal pill style) ──────────────────────── */
/* NOTE: .wp-block-button__link is intentionally excluded here so Gutenberg
   button blocks keep their own inline colors (text/background) set in the
   editor. Forcing color/background on every block button caused white-on-white
   invisible CTAs (QA #1, #4). Theme CTAs use .ww-btn / .button instead. */
.ww-btn,
.button,
input[type="submit"],
button[type="submit"] {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  gap:             var(--ww-space-2);
  font-family:     var(--ww-font-heading);
  font-weight:     var(--ww-weight-semibold);
  font-size:       var(--ww-text-base);
  letter-spacing:  var(--ww-ls-upper);
  text-transform:  uppercase;
  padding:         var(--ww-space-3) var(--ww-space-8);
  border-radius:   var(--ww-radius-pill);
  border:          none;
  cursor:          pointer;
  transition:      opacity var(--ww-transition), transform var(--ww-transition), box-shadow var(--ww-transition);
  white-space:     nowrap;
  text-decoration: none;
}

/* Primary — orange gradient */
.ww-btn,
.ww-btn-primary,
.button,
input[type="submit"] {
  background: var(--ww-gradient);
  color:      var(--ww-white) !important;
  box-shadow: var(--ww-shadow-sm);
}
.ww-btn:hover, .ww-btn-primary:hover,
.button:hover,
input[type="submit"]:hover {
  opacity:   .88;
  transform: translateY(-1px);
  box-shadow: var(--ww-shadow-md);
  color:      var(--ww-white) !important;
}

/* Gutenberg button blocks: honor editor-set colors; only style geometry. */
.wp-block-button__link {
  font-family:     var(--ww-font-heading);
  font-weight:     var(--ww-weight-semibold);
  letter-spacing:  var(--ww-ls-upper);
  transition:      opacity var(--ww-transition), transform var(--ww-transition), box-shadow var(--ww-transition);
  text-decoration: none;
}
.wp-block-button__link:hover {
  opacity:   .9;
  transform: translateY(-1px);
}
/* Gutenberg button with no explicit color set → fall back to brand gradient. */
.wp-block-button__link:not(.has-background) {
  background: var(--ww-gradient);
}
.wp-block-button__link:not(.has-text-color) {
  color: var(--ww-white);
}

/* Secondary — green solid */
.ww-btn-secondary {
  background: var(--ww-green);
  color:      var(--ww-white) !important;
}
.ww-btn-secondary:hover { background: #4ca028; color: var(--ww-white) !important; }

/* Ghost / outline */
.ww-btn-outline {
  background:  transparent;
  border:      2px solid var(--ww-primary);
  color:       var(--ww-primary) !important;
}
.ww-btn-outline:hover {
  background: var(--ww-primary);
  color:      var(--ww-white) !important;
}

/* ── Utility classes ─────────────────────────────────────── */
.ww-gradient-bg    { background: var(--ww-gradient) !important; }
.ww-lavender-bg    { background: var(--ww-lavender) !important; }
.ww-navy-bg        { background: var(--ww-navy)     !important; }
.ww-text-white     { color: var(--ww-white)    !important; }
.ww-text-navy      { color: var(--ww-navy)     !important; }
.ww-text-primary   { color: var(--ww-primary)  !important; }
.ww-text-green     { color: var(--ww-green)    !important; }
.ww-font-heading   { font-family: var(--ww-font-heading) !important; }
.ww-font-sub       { font-family: var(--ww-font-sub)     !important; }
.ww-font-label     { font-family: var(--ww-font-label)   !important; }
.ww-pill           { border-radius: var(--ww-radius-pill) !important; }
.ww-card {
  background:    var(--ww-white);
  border-radius: var(--ww-radius-lg);
  box-shadow:    var(--ww-shadow-card);
  padding:       var(--ww-space-8);
  transition:    box-shadow var(--ww-transition), transform var(--ww-transition);
}
.ww-card:hover { box-shadow: var(--ww-shadow-lg); transform: translateY(-3px); }

/* ── Section vertical rhythm ─────────────────────────────── */
.ww-section {
  padding-top:    var(--ww-space-20);
  padding-bottom: var(--ww-space-20);
}
@media (max-width: 768px) {
  .ww-section { padding-top: var(--ww-space-12); padding-bottom: var(--ww-space-12); }
}

/* ── Checklist (green check + Montserrat) ────────────────── */
.ww-checklist { list-style: none; padding: 0; margin: 0; }
.ww-checklist li {
  display:     flex;
  align-items: flex-start;
  gap:         var(--ww-space-3);
  font-family: var(--ww-font-sub);
  font-weight: var(--ww-weight-medium);
  font-size:   var(--ww-text-base);
  padding:     var(--ww-space-2) 0;
}
.ww-checklist li::before {
  content:    '✔';
  color:      var(--ww-green);
  font-size:  1.1em;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Badges / pills ──────────────────────────────────────── */
.ww-badge {
  display:       inline-block;
  background:    var(--ww-gradient);
  color:         var(--ww-white);
  font-family:   var(--ww-font-label);
  font-weight:   var(--ww-weight-bold);
  font-size:     var(--ww-text-xs);
  letter-spacing: var(--ww-ls-upper);
  text-transform: uppercase;
  padding:       var(--ww-space-1) var(--ww-space-3);
  border-radius: var(--ww-radius-pill);
}
