/* Base Variables - Luxury & Glassmorphism */
:root {
    --primary-color: #010101; /* Black */
    --primary-light: #151515; /* Dark Gray */
    --accent-color: #008ed8; /* Blue */
    --accent-hover: #007bbd;
    --purple-color: #8a38d8; /* Purple */
    --text-dark: #1a1a1a;
    --text-muted: #64748b;
    --bg-light: #eef3f8;
    --border-color: rgba(0, 0, 0, 0.08); /* Referenced by .verified-badge and .site-footer */
    --focus-ring: 0 0 0 3px rgba(0, 142, 216, 0.45);
    --font-heading: 'Lora', serif;
    --font-body: 'Montserrat', sans-serif;
    color-scheme: light;
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scroll for internal anchor links (#product-guides, etc.) */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 30px;
}

/* Respect users who prefer reduced motion (WCAG accessibility) */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    /* Space for the mobile floating bar + iOS safe-area */
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    position: relative;
    background-color: var(--bg-light); /* Fallback */
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

/* Two-tone Background */
.bg-split {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-light) 40%, var(--bg-light) 40%, var(--bg-light) 100%);
}

/* Main Container */
.page-wrapper {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Header */
.hero {
    color: white;
    text-align: center;
    padding: 30px 0 90px;
}

.hero-logo {
    width: 300px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.hero-name {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 0px;
}

.hero-title {
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 6px;
}

.hero-microcopy {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    max-width: 500px;
    margin: 0 auto;
}

.availability-pill-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.availability-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.08);
    color: var(--text-dark);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    backdrop-filter: blur(4px);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16,185,129,0.6);
}

/* Glassmorphism Main Card */
.main-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    margin-top: -60px;
    margin-bottom: 40px;
    position: relative;
    z-index: 20;
}

.card-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Photo Section */
.photo-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-wrapper {
    position: relative;
    display: inline-block;
}

.headshot {
    width: 230px;
    height: 230px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 35% 10%;
    border: 5px solid white;
    box-shadow: 0 25px 70px rgba(0,0,0,0.18), 0 0 0 2px var(--accent-color);
    position: relative;
    z-index: 2;
}

/* Halo Effect */
.halo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(138,56,216,0.2) 0%, rgba(138,56,216,0) 70%);
    z-index: 1;
    filter: blur(15px);
}

.verified-badge {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    z-index: 3;
}

.verified-badge i {
    color: #10b981; /* Trust green */
}

/* Actions Section (Hierarchy) */
.actions-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    justify-content: center;
}

/* Primary Button */
.btn-primary {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--accent-color);
    color: white;
    padding: 18px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 12px 30px rgba(0, 142, 216, 0.25);
}

.btn-primary i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 142, 216, 0.35);
}

/* Direct Contact Column */
.quick-actions-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-contact {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    background-color: rgba(1, 1, 1, 0.03);
    border: 1px solid rgba(1, 1, 1, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    padding: 14px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.btn-contact i {
    font-size: 1.2rem;
    color: var(--accent-color);
    width: 24px;
    text-align: center;
    flex-shrink: 0; /* icon does not shrink when text wraps */
}

/* Allow button text to wrap (Rob@celestralife.com under high zoom)
   without overflowing the container on very narrow viewports */
.btn-contact span {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.btn-contact:hover {
    border-color: var(--primary-color);
    background-color: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

/* Tertiary Button */
.btn-tertiary {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 14px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.btn-tertiary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

/* Fourth Link */
.btn-text {
    text-align: center;
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px;
    transition: all 0.2s;
    margin-top: 5px;
}

.btn-text i {
    margin-right: 5px;
}

.btn-text:hover {
    color: var(--primary-color);
}

/* Trust Section */
.trust-section {
    margin-bottom: 40px;
    /* Performance: deferred render for off-viewport sections */
    content-visibility: auto;
    contain-intrinsic-size: 1px 320px;
}

.trust-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.trust-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    padding: 28px 24px 22px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(15, 38, 60, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trust-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 38, 60, 0.09);
}

.trust-card-icon {
    font-size: 1.7rem;
    color: var(--accent-color);
    margin-bottom: 14px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.trust-card:hover .trust-card-icon {
    transform: scale(1.08);
}

.trust-card h3 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.trust-card-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
    width: 100%;
}

.trust-card-row--simple {
    min-height: 38px;
    gap: 0;
}

.trust-card-value {
    font-size: 0.88rem;
    /* Mejor contraste WCAG AA (antes #64748b ≈ 4:1, ahora ≥4.5:1) */
    color: #475569;
    font-weight: 500;
}

.trust-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--accent-color);
    background: #ffffff;
    border: 1.5px solid var(--accent-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
    white-space: nowrap;
    /* Touch target WCAG 2.5.5 — minimum 44×44 px */
    min-height: 44px;
    padding: 8px 14px;
}

.trust-copy-btn:hover {
    background: var(--accent-color);
    color: #ffffff;
}

.trust-copy-btn:active {
    transform: scale(0.96);
}

.trust-copy-btn i {
    font-size: 0.85rem;
}

.trust-copy-btn.copied {
    /* Darker green to meet AA contrast with white text */
    background: #166534;
    border-color: #166534;
    color: #ffffff;
}

.trust-card-divider {
    width: 80%;
    height: 1px;
    background: rgba(15, 38, 60, 0.08);
    margin: 4px 0 16px;
}

.trust-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    padding: 6px 4px;
    transition: gap 0.2s ease, color 0.2s ease;
    margin-top: auto;
}

.trust-card-link:hover {
    gap: 12px;
    color: var(--primary-color);
}

.trust-card-link i {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.trust-card-link:hover i {
    transform: translateX(2px);
}

@media (max-width: 480px) {
    .trust-card { padding: 24px 18px 20px; }
    .trust-card-row { gap: 10px; }
    .trust-card-value { font-size: 0.85rem; }
}

/* Resources Section */
.resources-section {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.6);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.resources-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.4rem;
    font-family: var(--font-heading);
}

.resources-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid rgba(1,1,1,0.08);
    transition: all 0.25s ease;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
}

.resource-item i {
    font-size: 1.4rem;
    color: #e74c3c; /* PDF Red */
}

.resource-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: var(--accent-color);
}

/* Hidden Utility */
.hidden { display: none !important; }

/* Visually hidden but accessible to screen readers */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.footer-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 10px;
}

.site-footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Floating Action Bar (Mobile Only - Glassmorphism) */
.floating-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    justify-content: space-between;
    /* iOS safe-area: respect the home indicator on modern iPhones */
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -5px 20px rgba(0,0,0,0.08);
    z-index: 100;
    border-top: 1px solid rgba(255,255,255,0.6);
}

.fab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
    padding: 5px 15px;
    /* Accessible minimum touch target (WCAG 2.5.5) */
    min-height: 44px;
    min-width: 44px;
}

.fab-btn i {
    font-size: 1.2rem;
    margin-bottom: 4px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.fab-btn.active i, .fab-btn:hover i {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.fab-btn.active span, .fab-btn:hover span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-stagger {
    opacity: 0;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Fade-on-scroll — activated via IntersectionObserver in script.js */
.fade-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.fade-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Accessibility: users with "reduce motion" see the content without animation */
@media (prefers-reduced-motion: reduce) {
    .fade-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Responsive */
@media (min-width: 768px) {
    .floating-action-bar { display: none; }
    body { padding-bottom: 40px; }
    /* Kept default column layout to center photo on desktop */
    .headshot {
        width: 280px;
        height: 280px;
    }

    .halo {
        width: 300px;
        height: 300px;
    }

    .trust-grid { grid-template-columns: repeat(3, 1fr); }
    .hero { padding: 40px 0 110px; }
    .bg-split { background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-light) 45%, var(--bg-light) 45%, var(--bg-light) 100%); }
}

/* Email copy toast notification */
.email-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(1, 1, 1, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-body);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    /* Allow long messages to wrap instead of being clipped */
    white-space: normal;
    word-break: break-word;
    max-width: min(90vw, 480px);
    line-height: 1.4;
    text-align: center;
}

.email-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (min-width: 768px) {
    .email-toast {
        bottom: 40px;
    }
}

/* ═════════════════════════════════════════════════════════════════════════════
   CELESTRA LIFE — RESOURCES / PRODUCT GUIDES PAGE
   Brand-strict: #008FD7 blue · #8939D8 purple · #000 black · #FFF white
   Typography: SF UI Display (system stack) · clean outline icons
   ═════════════════════════════════════════════════════════════════════════════ */

/* Tokens strictly aligned with the brand guidelines */
.resources-page {
  --cl-blue: #008fd7;
  --cl-blue-600: #007abe;
  --cl-blue-50: #e6f4fb;
  --cl-purple: #8939d8;
  --cl-purple-600: #7129bb;
  --cl-purple-50: #f2e8fb;
  --cl-black: #000000;
  --cl-white: #ffffff;

  /* Brand gray support scale */
  --cl-gray-50: #f7f9fb;
  --cl-gray-100: #eef2f6;
  --cl-gray-200: #e2e8ee;
  --cl-gray-300: #cbd3db;
  --cl-gray-400: #9aa4af;
  --cl-gray-500: #6b7480;
  --cl-gray-700: #364049;
  --cl-gray-900: #0e141b;

  --cl-radius: 14px;
  --cl-radius-sm: 10px;
  --cl-shadow-sm: 0 1px 2px rgba(14, 20, 27, 0.04);
  --cl-shadow-md: 0 6px 18px rgba(14, 20, 27, 0.06);
  --cl-shadow-lg: 0 14px 36px rgba(14, 20, 27, 0.08);

  /* SF UI Display via system stack (Apple devices) + premium fallback */
  --cl-font:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF UI Display",
    "Helvetica Neue", "Segoe UI", "Inter", Arial, sans-serif;

  /* Black background behind the grid — the blocks (nav, hero, cards,
     empty, help and footer) keep their own white backgrounds */
  background: var(--cl-black);
  color: var(--cl-gray-900);
  font-family: var(--cl-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 0;
}

/* Isolate this page from the homepage styles */
.resources-page .bg-split {
  display: none;
}
.resources-page .floating-action-bar {
  display: none;
}

.resources-page * {
  box-sizing: border-box;
}

.resources-page a {
  color: inherit;
  text-decoration: none;
}

.resources-page h1,
.resources-page h2,
.resources-page h3 {
  font-family: var(--cl-font);
  color: var(--cl-gray-900);
  letter-spacing: -0.01em;
  font-weight: 700;
}

/* ── Top Navigation ─────────────────────────────────────────────────────── */
.rp-nav {
  background: var(--cl-white);
  border-bottom: 1px solid var(--cl-gray-200);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}

.rp-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rp-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--cl-black);
  letter-spacing: -0.01em;
}

.rp-nav-brand img {
  width: auto;
  height: 72px;
  object-fit: contain;
}

/* Slightly smaller on mobile to keep the nav layout intact */
@media (max-width: 600px) {
  .rp-nav-brand img {
    height: 56px;
  }
}

.rp-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cl-gray-700);
  padding: 8px 12px;
  border-radius: var(--cl-radius-sm);
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.rp-nav-back:hover {
  color: var(--cl-blue);
  background: var(--cl-blue-50);
}

.rp-nav-back i {
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.rp-nav-back:hover i {
  transform: translateX(-2px);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.rp-hero {
  background: var(--cl-white);
  border-bottom: 1px solid var(--cl-gray-200);
  padding: 56px 24px 48px;
  position: relative;
  overflow: hidden;
}

.rp-hero::before {
  /* Subtle brand accent: very light blue → purple drop in the corner */
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 360px;
  height: 360px;
  background: radial-gradient(
    circle at center,
    rgba(0, 143, 215, 0.1) 0%,
    rgba(137, 57, 216, 0.06) 45%,
    rgba(255, 255, 255, 0) 70%
  );
  pointer-events: none;
  z-index: 0;
}

.rp-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.rp-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem; /* Increased for readability */
  color: var(--cl-gray-700); /* Higher contrast */
  margin-bottom: 18px;
  font-weight: 500;
}

.rp-breadcrumb a {
  color: var(--cl-gray-700);
  transition: color 0.2s ease;
  text-decoration: underline; /* Clearer link indicator */
}

.rp-breadcrumb a:hover {
  color: var(--cl-blue-600);
}

.rp-breadcrumb i {
  font-size: 0.75rem;
  color: var(--cl-gray-500);
}

.rp-breadcrumb span[aria-current] {
  color: var(--cl-gray-900);
  font-weight: 600;
  text-decoration: none;
}

.rp-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem; /* Increased */
  font-weight: 700;
  color: var(--cl-blue-600); /* Higher contrast text */
  background: var(--cl-blue-50);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.rp-eyebrow--purple {
  color: var(--cl-purple-600); /* Higher contrast text */
  background: var(--cl-purple-50);
}

.rp-hero-title {
  font-size: clamp(2rem, 3.8vw, 3rem); /* Increased slightly */
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  max-width: 760px;
}

.rp-hero-subtitle {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem); /* Much larger for easier reading */
  color: var(--cl-gray-900); /* Maximum contrast */
  line-height: 1.6;
  max-width: 680px;
  font-weight: 400;
}

/* ── Main wrapper ───────────────────────────────────────────────────────── */
.rp-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}

/* ── Toolbar / Filter chips ─────────────────────────────────────────────── */
.rp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.rp-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rp-chip {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--cl-gray-300); /* Thicker border for better visibility */
  background: var(--cl-white);
  color: var(--cl-gray-900); /* Higher contrast */
  font-family: var(--cl-font);
  font-size: 1rem; /* Larger text */
  font-weight: 600;
  padding: 10px 20px; /* Larger click target */
  border-radius: 999px;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
  line-height: 1.2;
}

.rp-chip:hover,
.rp-chip:focus {
  color: var(--cl-blue-600);
  border-color: var(--cl-blue-600);
  background: var(--cl-blue-50);
  outline: none;
}

.rp-chip.is-active {
  background: var(--cl-blue-600);
  border-color: var(--cl-blue-600);
  color: var(--cl-white);
}

.rp-chip.is-active:hover {
  background: var(--cl-blue);
  border-color: var(--cl-blue);
}

.rp-count {
  font-size: 1rem; /* Larger */
  /* Light text on the black background of the guides area */
  color: var(--cl-gray-300);
  font-weight: 500;
}

/* ── Cards Grid ─────────────────────────────────────────────────────────── */
/* 12 cards → 4×3 layout on desktop, scaling down to 3, 2 and 1 columns */
.rp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

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

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

@media (min-width: 1200px) {
  .rp-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.rp-card {
  display: flex;
  flex-direction: column;
  background: var(--cl-white);
  border: 1px solid var(--cl-gray-300); /* Darker border for contrast */
  border-radius: var(--cl-radius);
  padding: 28px 26px 24px; /* More padding */
  box-shadow: var(--cl-shadow-sm);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  color: var(--cl-gray-900);
  position: relative;
  overflow: hidden;
}

.rp-card::before {
  /* Top accent line, blue by default */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cl-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.rp-card[data-type="gdoc"]::before {
  background: var(--cl-purple);
}
.rp-card[data-type="link"]::before {
  background: var(--cl-purple);
}

.rp-card:hover {
  transform: translateY(-3px);
  border-color: var(--cl-gray-300);
  box-shadow: var(--cl-shadow-md);
}

.rp-card:hover::before {
  transform: scaleX(1);
}

.rp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}

.rp-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cl-blue-50);
  color: var(--cl-blue);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.rp-card[data-type="gdoc"] .rp-card-icon,
.rp-card[data-type="link"] .rp-card-icon {
  background: var(--cl-purple-50);
  color: var(--cl-purple);
}

.rp-card-tag {
  font-size: 0.8rem; /* Increased */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cl-gray-700); /* Higher contrast */
  padding: 6px 12px;
  border: 1px solid var(--cl-gray-300);
  border-radius: 999px;
  background: var(--cl-gray-50);
  white-space: nowrap;
}

.rp-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rp-card-category {
  font-size: 0.85rem; /* Increased */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cl-blue-600); /* Darker text */
  margin-bottom: 4px;
}

.rp-card[data-type="gdoc"] .rp-card-category,
.rp-card[data-type="link"] .rp-card-category {
  color: var(--cl-purple-600); /* Darker text */
}

.rp-card-title {
  font-size: 1.25rem; /* Much larger */
  font-weight: 700;
  line-height: 1.35;
  color: var(--cl-gray-900);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.rp-card-description {
  font-size: 1.05rem; /* Larger */
  line-height: 1.6;
  color: var(--cl-gray-700); /* Higher contrast */
  font-weight: 400;
  /* Justified text for even alignment on both edges */
  text-align: justify;
  text-justify: inter-word;
  /* Allow soft word breaks to avoid "rivers" of whitespace */
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

.rp-card-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--cl-gray-100);
}

.rp-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cl-blue-600); /* Darker blue */
  font-weight: 700;
  font-size: 1.05rem; /* Larger */
  text-decoration: underline; /* Always underlined for clarity */
  transition:
    gap 0.2s ease,
    color 0.2s ease;
}

.rp-card[data-type="gdoc"] .rp-card-cta,
.rp-card[data-type="link"] .rp-card-cta {
  color: var(--cl-purple-600); /* Darker purple */
}

.rp-card-cta i {
  font-size: 0.78rem;
  transition: transform 0.2s ease;
}

.rp-card:hover .rp-card-cta {
  gap: 12px;
}

.rp-card:hover .rp-card-cta i {
  transform: translateX(2px);
}

/* ── Empty State ────────────────────────────────────────────────────────── */
.rp-empty {
  background: var(--cl-white);
  border: 1px solid var(--cl-gray-200);
  border-radius: var(--cl-radius);
  padding: 56px 32px;
  text-align: center;
  box-shadow: var(--cl-shadow-sm);
}

.rp-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--cl-blue-50);
  color: var(--cl-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.rp-empty h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.rp-empty p {
  color: var(--cl-gray-700); /* Higher contrast */
  max-width: 480px;
  margin: 0 auto 22px;
  line-height: 1.6;
  font-size: 1.1rem; /* Larger */
}

.rp-empty-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.rp-btn-primary,
.rp-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px; /* Larger click target */
  border-radius: 10px;
  font-family: var(--cl-font);
  font-weight: 700; /* Bolder text */
  font-size: 1.05rem; /* Larger text */
  line-height: 1.2;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
  cursor: pointer;
  border: 2px solid transparent; /* Thicker border */
  text-decoration: none !important;
}

.rp-btn-primary {
  background: var(--cl-blue);
  color: var(--cl-white);
}

.rp-btn-primary:hover {
  background: var(--cl-blue-600);
  transform: translateY(-1px);
}

/* ── "CTA" modifier: Apply for Coverage with balanced prominence ──────── */
.resources-page .rp-btn-cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cl-white);
  background: var(--cl-blue);
  border: 0;
  /* Subtle blue shadow — prominence without enlarging the button too much */
  box-shadow: 0 8px 20px rgba(0, 142, 216, 0.22);
  transition:
    background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.resources-page .rp-btn-cta i {
  font-size: 1rem;
}

.resources-page .rp-btn-cta:hover {
  background: var(--cl-blue-600);
  color: var(--cl-white);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 142, 216, 0.32);
}

.resources-page .rp-btn-cta:focus-visible {
  outline: 2px solid var(--cl-white);
  outline-offset: 3px;
  box-shadow: 0 8px 20px rgba(0, 142, 216, 0.22),
              0 0 0 4px rgba(0, 142, 216, 0.55);
}

.rp-btn-secondary {
  background: var(--cl-white);
  color: var(--cl-gray-900);
  border-color: var(--cl-gray-300);
}

.rp-btn-secondary:hover {
  border-color: var(--cl-blue);
  color: var(--cl-blue);
  background: var(--cl-blue-50);
}

/* ── Help / Contact CTA Block ───────────────────────────────────────────── */
.rp-help {
  margin-top: 56px;
  background: var(--cl-white);
  border: 1px solid var(--cl-gray-200);
  border-radius: var(--cl-radius);
  overflow: hidden;
  position: relative;
}

.rp-help::before {
  /* Subtle brand gradient as section accent */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 143, 215, 0.04) 0%,
    rgba(137, 57, 216, 0.05) 100%
  );
  pointer-events: none;
}

.rp-help-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 36px 32px;
}

@media (min-width: 768px) {
  .rp-help-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 44px 40px;
  }
}

.rp-help-text {
  max-width: 560px;
}

.rp-help-text h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  margin: 4px 0 8px;
}

.rp-help-text p {
  color: var(--cl-gray-700); /* Higher contrast */
  font-size: 1.1rem; /* Larger */
  line-height: 1.6;
}

.rp-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.rp-footer {
  background: var(--cl-white);
  border-top: 1px solid var(--cl-gray-200);
  margin-top: 24px;
}

.rp-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .rp-footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.rp-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--cl-black);
  font-size: 0.95rem;
}

.rp-footer-brand img {
  width: auto;
  height: 110px;
  object-fit: contain;
}

@media (max-width: 600px) {
  .rp-footer-brand img {
    height: 80px;
  }
}

.rp-footer-meta {
  text-align: left;
}

@media (min-width: 768px) {
  .rp-footer-meta {
    text-align: right;
  }
}

.rp-footer-meta p {
  font-size: 0.95rem; /* Larger */
  color: var(--cl-gray-700); /* Higher contrast */
  line-height: 1.5;
}

.rp-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 12px;
  font-weight: 600;
}

@media (min-width: 768px) {
  .rp-footer-links {
    justify-content: flex-end;
  }
}

.rp-footer-disclaimer {
  margin-top: 4px;
  max-width: 520px;
}

/* ── Responsive Tweaks ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .rp-hero {
    padding: 36px 20px 32px;
  }
  .rp-main {
    padding: 28px 20px 56px;
  }
  .rp-card {
    padding: 24px 20px 20px; /* Better touch-target on mobile */
    min-height: 0;
  }
  .rp-nav-inner {
    padding: 12px 18px;
  }
  .rp-nav-brand span {
    display: none;
  }
  .rp-nav-back span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rp-card,
  .rp-card::before,
  .rp-card-cta,
  .rp-card-cta i,
  .rp-btn-primary,
  .rp-btn-secondary,
  .rp-nav-back i {
    transition: none;
  }
}

/* ═════════════════════════════════════════════════════════════════════════════
   HARDENING, RESPONSIVE AND ACCESSIBILITY
   Does not alter the design; only adds support, focus-visible, safe-area, etc.
   ═════════════════════════════════════════════════════════════════════════════ */

/* Responsive images by default (reinforces width/height from HTML) */
img {
    max-width: 100%;
    height: auto;
}

/* Accessible visible focus for keyboard users (WCAG 2.4.7) */
a:focus-visible,
button:focus-visible,
[role="tab"]:focus-visible,
[role="button"]:focus-visible,
.rp-chip:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 8px;
    box-shadow: var(--focus-ring);
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* Skip link: jump-to-main-content link for keyboard users */
.skip-link {
    position: absolute;
    top: -100px;
    left: 8px;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    z-index: 1000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 8px;
}

/* Animation delays (moved out of inline style for CSP compliance) */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.20s; }
.stagger-4 { animation-delay: 0.25s; }
.stagger-5 { animation-delay: 0.30s; }

/* Support for very small screens (iPhone SE, Galaxy Fold closed) */
@media (max-width: 360px) {
    .hero { padding: 24px 0 80px; }
    .hero-name { font-size: 2rem; }
    .hero-logo { width: 240px; }
    .main-card { padding: 28px 20px; }
    .headshot { width: 200px; height: 200px; }
    .halo { width: 220px; height: 220px; }
    .fab-btn { padding: 5px 8px; font-size: 0.7rem; }
}

/* Standard mobile: safe overflow reinforcement */
@media (max-width: 480px) {
    .headshot { max-width: 70vw; max-height: 70vw; }
    .halo { max-width: 76vw; max-height: 76vw; }
    .verified-badge { font-size: 0.78rem; padding: 7px 13px; }
    .availability-pill { font-size: 0.75rem; }
}

/* Landscape orientation with low height (phones in landscape) */
@media (max-height: 500px) and (orientation: landscape) {
    .floating-action-bar {
        padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
    }
    .hero { padding: 20px 0 60px; }
    .main-card { margin-top: -40px; padding: 28px 32px; }
}

/* Ultra-wide / 4K screens — keeps the layout centered and proportional */
@media (min-width: 1600px) {
    .page-wrapper { max-width: 920px; }
    .rp-nav-inner,
    .rp-hero-inner,
    .rp-main,
    .rp-footer-inner { max-width: 1280px; }
}

@media (min-width: 2200px) {
    .page-wrapper { max-width: 980px; }
    .rp-nav-inner,
    .rp-hero-inner,
    .rp-main,
    .rp-footer-inner { max-width: 1400px; }
}

/* Foldables / very narrow aspect ratio */
@media (max-width: 320px) {
    .page-wrapper { padding: 0 12px; }
    .main-card { padding: 24px 16px; }
}

/* Print mode: hides floating UI and flattens shadows/colors */
@media print {
    .floating-action-bar,
    .bg-split,
    .skip-link,
    .email-toast {
        display: none !important;
    }
    body {
        background: #fff;
        color: #000;
        padding: 0;
    }
    .main-card {
        box-shadow: none;
        border: 1px solid #ccc;
        background: #fff;
    }
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #555;
    }
    .btn-primary,
    .btn-tertiary,
    .btn-contact,
    .rp-btn-primary,
    .rp-btn-secondary {
        color: #000 !important;
        background: transparent !important;
        border: 1px solid #999 !important;
        box-shadow: none !important;
    }
}

/* Respects users with high-contrast system preference */
@media (prefers-contrast: more) {
    .btn-contact,
    .trust-card,
    .rp-card {
        border-width: 2px;
        border-color: var(--primary-color);
    }
    .hero-title,
    .hero-microcopy {
        color: #fff;
    }
}
