/*
Theme Name: Protecht Health
Theme URI: https://protecht.health
Author: Protecht Health
Description: Custom theme for Protecht Health - HIPAA-compliant sexual health platform
Version: 1.2.0
License: Proprietary
Text Domain: protecht
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --coral-warm: #E8825C;
  --coral-light: #F2A88A;
  --coral-deep: #D4643E;
  --teal-trust: #2A9D8F;
  --teal-light: #5BC0B5;
  --teal-deep: #1A7A6E;
  --charcoal: #2D2D2D;
  --slate: #4A5568;
  --warm-gray: #8B8680;
  --sand: #F5F0EB;
  --cream: #FBF8F5;
  --white: #FFFFFF;
  --amber-accent: #E6A94D;
  --sage-accent: #7BA38C;
  --gradient-hero: linear-gradient(135deg, #E8825C 0%, #D4643E 50%, #1A7A6E 100%);
  --gradient-coral: linear-gradient(135deg, #E8825C, #D4643E);
  --gradient-teal: linear-gradient(135deg, #2A9D8F, #1A7A6E);
  --font-display: 'Playfair Display', serif;
  --font-body: 'DM Sans', sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.07);
  --shadow-nav: 0 2px 12px rgba(0, 0, 0, 0.08);
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
}

/* ============================================================
   SKIP LINK
   ============================================================ */
.ptb-skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--coral-warm);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.ptb-skip-link:focus { top: 0; }

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.ptb-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ptb-header.scrolled {
  border-color: var(--sand);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.ptb-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.ptb-header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.ptb-header-logo img {
  height: 36px;
  width: auto;
  display: block;
}

.ptb-header-wordmark {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: 0.2px;
}

/* Desktop nav */
.ptb-nav { display: flex; align-items: center; }

.ptb-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ptb-nav-list .menu-item > a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  display: block;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.ptb-nav-list .menu-item > a:hover,
.ptb-nav-list .current-menu-item > a,
.ptb-nav-list .current-page-ancestor > a {
  color: var(--coral-warm);
  background: rgba(232,130,92,0.07);
}

/* Dropdown */
.ptb-nav-list .menu-item-has-children { position: relative; }

.ptb-nav-list .menu-item-has-children > a::after {
  content: ' ↓';
  font-size: 0.7rem;
  opacity: 0.6;
}

.ptb-nav-list .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  list-style: none;
  padding: 8px;
  margin: 0;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  min-width: 200px;
  z-index: 100;
}

.ptb-nav-list .menu-item-has-children:hover .sub-menu,
.ptb-nav-list .menu-item-has-children:focus-within .sub-menu { display: block; }

.ptb-nav-list .sub-menu .menu-item > a {
  font-size: 0.88rem;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--slate);
  white-space: nowrap;
}

.ptb-nav-list .sub-menu .menu-item > a:hover {
  color: var(--coral-warm);
  background: rgba(232,130,92,0.07);
}

/* Hamburger button */
.ptb-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}

.ptb-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: all 0.2s;
}

.ptb-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ptb-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ptb-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.ptb-mobile-nav {
  background: var(--white);
  border-top: 1px solid var(--sand);
  padding: 16px 24px 24px;
}
.ptb-mobile-nav[hidden] { display: none; }

.ptb-mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ptb-mobile-nav-list .menu-item > a {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--sand);
}

.ptb-mobile-nav-list .sub-menu {
  list-style: none;
  padding: 0 0 0 16px;
  margin: 0;
}

.ptb-mobile-nav-list .sub-menu .menu-item > a {
  font-size: 0.9rem;
  color: var(--slate);
  padding: 8px 0;
}

@media (max-width: 900px) {
  .ptb-nav { display: none; }
  .ptb-hamburger { display: flex; }
  .ptb-header-inner { padding: 0 24px; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
  position: relative;
  background: var(--gradient-hero);
  padding: 6rem 2rem;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(255,255,255,0.07) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-inner h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  max-width: 680px;
  margin-bottom: 1.5rem;
}

.hero-inner h1 em {
  font-style: italic;
}

.hero-subtext {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

.btn-primary {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  background: var(--white);
  color: var(--coral-warm);
  padding: 12px 32px;
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   FEATURE CARDS
   ============================================================ */
.features-section {
  padding: 5rem 2rem;
  background: var(--white);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-icon.coral {
  background: rgba(232, 130, 92, 0.12);
}

.feature-icon.teal {
  background: rgba(42, 157, 143, 0.12);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--charcoal);
}

.feature-card p {
  font-family: var(--font-body);
  color: var(--slate);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ============================================================
   RETHINKING SECTION
   ============================================================ */
.rethinking-section {
  padding: 5rem 2rem;
  background: var(--cream);
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--warm-gray);
  margin-bottom: 1rem;
}

.rethinking-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--charcoal);
  max-width: 640px;
  margin-bottom: 1.75rem;
}

.rethinking-section p {
  font-family: var(--font-body);
  color: var(--slate);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 660px;
  margin-bottom: 1.25rem;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-section {
  background: var(--charcoal);
  padding: 4rem 2rem;
}

.stats-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.stat-block {
  text-align: center;
  padding: 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-block:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 700;
  color: var(--coral-warm);
  display: block;
  margin-bottom: 0.75rem;
}

.stat-label {
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  line-height: 1.55;
  margin-bottom: 0.5rem;
}

.stat-source {
  font-family: var(--font-body);
  color: var(--warm-gray);
  font-size: 0.75rem;
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-section {
  padding: 5rem 2rem;
  background: var(--white);
}

.contact-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--charcoal);
  margin-bottom: 2rem;
}

.contact-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

/* CF7 form styles */
.wpcf7-form .wpcf7-form-control-wrap {
  display: block;
  margin-bottom: 1rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--sand);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--charcoal);
  transition: border-color 0.2s;
  outline: none;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
  border-color: var(--teal-trust);
}

.wpcf7-form textarea {
  min-height: 140px;
  resize: vertical;
}

.wpcf7-form input[type="submit"] {
  background: var(--gradient-coral);
  color: var(--white);
  border: none;
  padding: 0.875rem 2.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.wpcf7-form input[type="submit"]:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ============================================================
   PRE-FOOTER CTA BAND
   ============================================================ */
.cta-band {
  background: var(--gradient-hero);
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-band-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.cta-band h2 em {
  font-style: italic;
}

.cta-band p {
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* ============================================================
   GLOBAL FOOTER
   ============================================================ */
.ptb-footer {
  background: #2D2D2D;
  color: #fff;
}

.ptb-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 40px 48px;
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 60px;
  align-items: start;
}

.ptb-footer-wordmark {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}

.ptb-footer-tagline {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  max-width: 360px;
  margin-bottom: 20px;
}

.ptb-footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.ptb-footer-badge {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 4px 12px;
  letter-spacing: 0.3px;
}

.ptb-footer-disclaimer {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.55;
  max-width: 360px;
}

.ptb-footer-col-heading {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 14px;
}

.ptb-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ptb-footer-links li {
  margin-bottom: 8px;
}

.ptb-footer-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  transition: color 0.15s;
}

.ptb-footer-links a:hover {
  color: var(--coral-warm);
}

.ptb-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
}

.ptb-footer-bottom-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.ptb-footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ptb-footer-copyright {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

.ptb-footer-legal-sep {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
}

.ptb-footer-legal-link {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.15s;
}

.ptb-footer-legal-link:hover {
  color: rgba(255,255,255,0.75);
}

/* wp_nav_menu() output for legal links */
.ptb-footer-legal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ptb-footer-legal-list li::before {
  content: '·';
  margin-right: 6px;
  color: rgba(255,255,255,0.25);
  font-size: 0.78rem;
}

.ptb-footer-legal-list a {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.15s;
}

.ptb-footer-legal-list a:hover {
  color: rgba(255,255,255,0.75);
}

.ptb-footer-social {
  display: flex;
  gap: 14px;
  align-items: center;
}

.ptb-footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  transition: color 0.15s;
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.ptb-footer-social-link:hover {
  color: #fff;
}

.ptb-footer-social-placeholder {
  opacity: 0.4;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1023px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-block:nth-child(2) {
    border-right: none;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 767px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-block {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 2rem;
    margin-bottom: 1rem;
  }

  .stat-block:last-child {
    border-bottom: none;
  }

  .ptb-footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px 24px 40px;
  }

  .ptb-footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 12px;
  }

  .ptb-footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .ptb-footer-legal-sep { display: none; }
  .ptb-footer-social { margin-top: 4px; }

  .hero-section {
    padding: 4rem 1.5rem;
    min-height: auto;
  }
}

/* ============================================================
   FOCUS STATES (ACCESSIBILITY)
   ============================================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--teal-trust);
  outline-offset: 2px;
  border-radius: 2px;
}
