/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  height: var(--nav-height);
  background-color: var(--color-white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: box-shadow var(--transition-base);
}

.nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-sm);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 0;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
  min-width: 0;
}

.nav-logo-name {
  font-size: 1.3rem;
  font-weight: var(--fw-bold);
  color: var(--color-sage);
}

.nav-logo-tagline {
  font-size: var(--text-xs);
  color: var(--color-charcoal-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--color-charcoal);
  transition: color var(--transition-fast);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-sage);
  border-bottom-color: var(--color-sage);
}

.nav-cta {
  margin-right: var(--space-sm);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--space-xs);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-charcoal);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  right: 0;
  left: 0;
  background-color: var(--color-white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-md);
  z-index: 999;
  padding: var(--space-sm) 0;
  flex-direction: column;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav-link {
  display: block;
  padding: 14px var(--space-md);
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
  color: var(--color-charcoal);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background-color: var(--color-sand-light);
  color: var(--color-sage);
}

.mobile-nav-cta {
  margin: var(--space-sm) var(--space-md);
  text-align: center;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-block;
  background-color: var(--color-sage);
  color: var(--color-white);
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-base);
  font-family: var(--font-primary);
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  text-align: center;
}

.btn-primary:hover {
  background-color: var(--color-sage-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: var(--color-sage);
  padding: 12px 32px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-base);
  font-family: var(--font-primary);
  border: 2px solid var(--color-sage);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

.btn-secondary:hover {
  background-color: var(--color-sage);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-base);
  font-family: var(--font-primary);
  border: 1px solid var(--color-white);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  display: block;
}

/* ============================================================
   SECTION LABEL
   ============================================================ */
.section-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  color: var(--color-sage);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background-color: var(--color-sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  font-size: 1.5rem;
}

/* ============================================================
   VALUE PILLS
   ============================================================ */
.pill {
  display: inline-block;
  background-color: var(--color-sage-light);
  color: var(--color-sage-dark);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

/* ============================================================
   FOOTER PLACEHOLDER
   ============================================================ */
/* Reserves footer height to avoid CLS. footer-loader.js removes this element
   outright on success. If the fetch fails it stays — so give it the footer's
   own colour: worst case it reads as an empty footer rather than a slab of
   body-coloured off-white at the end of the page. */
.footer-placeholder {
  min-height: 240px;
  background-color: var(--color-charcoal);
}

/* ============================================================
   SKIP LINK
   ============================================================ */
/* NOTE (RTL): never hide with `left: -9999px` here.
   The document is dir="rtl", so the LEFT edge is the inline-END edge —
   an element parked 9999px to the left is real, scrollable overflow and
   produced a ~9999px horizontal scroll on every page. The 1px clip
   technique below occupies zero space and cannot overflow. */
.skip-link {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  z-index: 10000;
  background: var(--color-sage);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  text-decoration: none;
}
.skip-link:focus {
  position: fixed;
  width: auto;
  height: auto;
  padding: 0.5rem 1.5rem;
  overflow: visible;
  clip: auto;
  clip-path: none;
}
.skip-link:focus-visible {
  outline: 3px solid var(--color-white);
  outline-offset: 3px;
}

#main-content {
  scroll-margin-top: var(--nav-height, 72px);
}
#main-content:focus {
  outline: 2px solid var(--color-sage);
  outline-offset: 4px;
}

/* ============================================================
   FOCUS VISIBLE — scoped to main layout areas
   ============================================================ */
main a:focus-visible,
main button:focus-visible,
main input:focus-visible,
main textarea:focus-visible,
main select:focus-visible,
.nav a:focus-visible,
.nav button:focus-visible,
.mobile-nav a:focus-visible,
.footer a:focus-visible {
  outline: 3px solid var(--color-sage);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   WHATSAPP FLOATING BUTTON
   ============================================================ */
/* Anchored to the LEFT edge (both desktop and mobile — no media query, so
   the two stay aligned at every width). On the right they collided with
   mobile system gestures / browser UI. */
.whatsapp-float {
  position: fixed;
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  right: auto;
  left: 24px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  animation: wa-pulse 2.5s ease-out 1s 3;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: var(--color-white);
}

@keyframes wa-pulse {
  0% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4), 0 0 0 10px rgba(37, 211, 102, 0.1); }
  100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background-color: var(--color-charcoal);
  color: var(--color-white);
  padding: var(--space-2xl) var(--space-sm) var(--space-sm);
  /* Adds the iPhone home-indicator inset on top of the existing --space-sm.
     DORMANT by design: env(safe-area-inset-*) resolves to 0 without
     viewport-fit=cover in the viewport meta, and that was reverted because it
     made iOS Safari render a huge white slab below the footer. The 0px
     fallback means this line is a no-op today and costs nothing; it is kept so
     the spacing is already correct if edge-to-edge is ever revisited. */
  padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom, 0px));
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo-name {
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  color: var(--color-white);
  margin-bottom: var(--space-xs);
}

.footer-logo-tagline {
  color: var(--color-sand);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.footer-col h4 {
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--color-sand);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--color-sand);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.75);
}

.footer-contact-item a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.75);
  transition: color var(--transition-fast);
}

.footer-contact-item a:hover {
  color: var(--color-sand);
}

.footer-contact-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.social-row {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: var(--text-lg);
  transition: background-color var(--transition-fast);
  text-decoration: none;
  overflow: hidden;
}

.social-icon-img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: var(--radius-full);
}

/* ── data-contact-icon ─────────────────────────────────────────────────────
   20px inline icons: footer contact list
   44px block icons:  footer social row
   Hover handled by parent <a>:hover so the whole clickable area reacts.    */

[data-contact-icon] {
  transition: opacity 0.2s;
}

.footer-contact-item [data-contact-icon] {
  display: inline-block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
}

.social-row [data-contact-icon] {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: var(--radius-full);
}

a:hover [data-contact-icon] {
  opacity: 0.8;
}

.social-link:hover {
  background-color: var(--color-sage);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: var(--space-sm) auto 0;
  text-align: center;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
}

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

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  text-align: center;
  padding: var(--space-md);
}

.stat-number {
  font-size: var(--text-4xl);
  font-weight: var(--fw-bold);
  color: var(--color-sage);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-charcoal-light);
}

/* ============================================================
   TESTIMONIAL CARDS
   ============================================================ */
.testimonial-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-lg) var(--space-md);
  position: relative;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.testimonial-quote {
  font-size: 5rem;
  line-height: 0.5;
  color: var(--color-sage-light);
  margin-bottom: var(--space-sm);
  font-family: Georgia, serif;
}

.testimonial-text {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--color-charcoal);
  margin-bottom: var(--space-sm);
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background-color: var(--color-sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  color: var(--color-sage-dark);
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.testimonial-name {
  font-weight: var(--fw-medium);
  color: var(--color-charcoal);
}

.testimonial-stars {
  color: #F6B73C;
  font-size: var(--text-sm);
  margin-top: 2px;
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: right;
  padding: var(--space-sm) 0;
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
  color: var(--color-charcoal);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--color-sage);
}

.faq-icon {
  font-size: 1.25rem;
  color: var(--color-sage);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding-bottom: var(--space-sm);
  color: var(--color-charcoal-light);
  line-height: 1.8;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ============================================================
   FORMS
   ============================================================ */
/* Honeypot wrapper — invisible to humans, still filled by naive bots.
   Same RTL rule as .skip-link: no `left: -9999px`, it would create
   9999px of horizontal scroll. 1px clipped box = zero overflow. */
.hp-field {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.form-group {
  margin-bottom: var(--space-sm);
  position: relative;
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--color-charcoal);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px var(--space-sm);
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  color: var(--color-charcoal);
  background-color: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  direction: rtl;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-sage);
  box-shadow: 0 0 0 3px rgba(122, 158, 126, 0.15);
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
  border-color: #e05555;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.field-error {
  display: block;
  font-size: var(--text-xs);
  color: #e05555;
  margin-top: 4px;
  min-height: 18px;
}

.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  text-align: center;
  gap: var(--space-sm);
}

.form-success-icon {
  font-size: 3rem;
}

.form-success p {
  font-size: var(--text-lg);
  color: var(--color-charcoal);
  font-weight: var(--fw-medium);
}

/* Form on dark bg (workshop / contact dark variant) */
.form-dark .form-group label {
  color: rgba(255, 255, 255, 0.9);
}

.form-dark .form-group input,
.form-dark .form-group textarea,
.form-dark .form-group select {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--color-white);
}

.form-dark .form-group input::placeholder,
.form-dark .form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-dark .form-group input:focus,
.form-dark .form-group textarea:focus,
.form-dark .form-group select:focus {
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-note {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin-top: var(--space-xs);
}

/* ============================================================
   IMG PLACEHOLDER
   ============================================================ */
.img-placeholder {
  background-color: var(--color-sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-sage-dark);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  border-radius: var(--radius-md);
}

.img-placeholder.circle {
  border-radius: var(--radius-full);
}

/* ── Sanity Logo Injection ────────────────────────────────── */
.nav-logo--with-img {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.nav-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ============================================================
   SKELETON LOADERS
   ============================================================ */

@keyframes skeleton-shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* Text stays in DOM for screen readers and Google.
   ::after provides the visual shimmer on top — no aria-hidden needed. */
.skeleton {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  min-height: 1.2em;
  border-radius: var(--radius-sm);
  pointer-events: none;
  user-select: none;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e8e8e8 50%,
    #f0f0f0 75%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after {
    animation: none;
    background: #f0f0f0;
  }
}

/* Inline text placeholder — single line */
.skeleton-text {
  height: 1rem;
  width: 100%;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  display: block;
}

/* Narrower widths for visual variety */
.skeleton-text.w-75 { width: 75%; }
.skeleton-text.w-50 { width: 50%; }
.skeleton-text.w-33 { width: 33%; }

/* Heading-sized skeleton */
.skeleton-heading {
  height: 2rem;
  width: 60%;
  border-radius: 4px;
  margin-bottom: var(--space-xs);
  display: block;
}

/* Image / portrait placeholder */
.skeleton-img {
  height: 220px;
  width: 100%;
  border-radius: var(--radius-md);
  display: block;
}

.skeleton-img.circle {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-full);
  margin: 0 auto;
}

.skeleton-img.portrait {
  height: 340px;
  border-radius: var(--radius-lg);
}

/* Small logo skeleton for nav */
.skeleton-img.nav-logo-size {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
}

/* Full card placeholder */
.skeleton-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-md);
  overflow: hidden;
}

/* ── Fallback error state ─────────────────────────────────── */
.fallback-error {
  background-color: var(--color-sand-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  direction: rtl;
  font-family: var(--font-primary);
  font-size: var(--text-base);
  color: var(--color-charcoal-light);
  line-height: 1.8;
}

.fallback-error::before {
  content: '🌿';
  display: block;
  font-size: 2rem;
  margin-bottom: var(--space-xs);
}

/* ============================================================
   ACCESSIBILITY PANEL
   ============================================================ */
/* accessibility-panel.js appends this wrapper as the last child of <body>.
   Zeroing its geometry guarantees it contributes nothing after the footer.
   Its #a11y-trigger / #a11y-panel children are position: fixed, which an
   absolutely positioned ancestor does not capture, so they keep working. */
#a11y-panel-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

/* bottom offsets carry the home-indicator inset. Dormant while
   viewport-fit=cover is off — env() resolves to the 0px fallback, so these
   evaluate to the original 162px / 230px / 90px. */
#a11y-trigger {
  position: fixed;
  bottom: calc(162px + env(safe-area-inset-bottom, 0px));
  right: auto;
  left: 24px;
  z-index: 9000;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-sand-light);
  color: #0057B8;
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

#a11y-trigger:hover {
  transform: scale(1.08);
  background: var(--color-sand);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}
#a11y-trigger:focus-visible { outline: 3px solid #0057B8; outline-offset: 3px; }

/* Opens above #a11y-trigger — must share its left anchor.
   max-width keeps it inside the screen on a 320px device. */
#a11y-panel {
  position: fixed;
  bottom: calc(230px + env(safe-area-inset-bottom, 0px));
  right: auto;
  left: 24px;
  z-index: 9001;
  background: white;
  border: 1px solid var(--color-sage);
  border-radius: 12px;
  padding: 1.25rem;
  min-width: 210px;
  max-width: calc(100vw - 48px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  direction: rtl;
}

#a11y-panel[hidden] { display: none; }
#a11y-panel h3 { margin: 0 0 0.75rem; font-size: 1rem; }

#a11y-panel button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: var(--font-primary);
  border-radius: 6px;
  color: var(--color-charcoal);
}

#a11y-panel button:hover { background: var(--color-offwhite); }
#a11y-panel button[aria-checked="true"] { color: var(--color-sage); font-weight: 600; }
#a11y-panel button[aria-checked="true"]::after { content: '✓'; margin-right: 0.5rem; }

#a11y-reset {
  color: #999 !important;
  font-size: 0.8rem !important;
  margin-top: 0.75rem;
  border-top: 1px solid #eee;
  padding-top: 0.5rem !important;
}

/* #a11y-announcer carries this class and is the LAST node in <body> —
   after the footer. margin:-1px + clip-path collapse its 1px box so it
   adds no scrollable area below the footer. */
.sr-only {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Preference classes applied to <html> */
html.a11y-large-text { font-size: 120%; }

/* !important is required: applyThemeColors() in sanity-render.js writes the
   CMS palette as INLINE custom properties on <html>, and inline normally beats
   a stylesheet. Without !important a brand-colour change in Sanity would
   silently disable high-contrast mode. */
html.a11y-high-contrast {
  --color-charcoal: #000 !important;
  --color-offwhite: #fff !important;
  --color-sage: #005700 !important;
  --color-sand: #c8a000 !important;
  --color-sage-light: #007a00 !important;
  --color-sage-dark: #003d00 !important;
  --color-sand-light: #e8d98a !important;
  --color-sand-dark: #8a6f00 !important;
  --color-charcoal-light: #333 !important;
}
html.a11y-high-contrast body { background: #fff; color: #000; }
html.a11y-high-contrast svg { fill: currentColor !important; }

/* 0.001ms preserves transitionend JS events while eliminating visible motion */
html.a11y-no-motion *,
html.a11y-no-motion *::before,
html.a11y-no-motion *::after {
  animation-duration: 0.001ms !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* Highlight links in main only — not nav, buttons, or aria-hidden icons */
html.a11y-highlight-links main a:not([class*="btn"]):not([aria-hidden]) {
  outline: 2px solid var(--color-sage) !important;
  outline-offset: 2px;
  text-decoration: underline !important;
}

/* ============================================================
   BLOG CARD — clickable overlay
   ============================================================ */
.blog-card { position: relative; }

.blog-card a.read-more::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.blog-card a:not(.read-more) { position: relative; z-index: 2; }

/* Featured article — same full-card click pattern */
.featured-card { position: relative; }

.featured-card a.read-more::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.featured-card a:not(.read-more) { position: relative; z-index: 2; }
