/* =========================================================================
   ARCW Visual Polish Layer (additive, calm-coded, YMYL-appropriate)
   Loaded AFTER /css/styles.css.  Never overrides Tier A urgency components
   (crisis-bar, foot__legal-emerg, phi-warn, hipaa-crisis).
   2026-04-28
   ========================================================================= */

:root {
  /* Soft elevation system — composed entirely from existing brand-teal hue */
  --shadow-soft:    0 1px 2px rgba(21, 68, 87, 0.04), 0 2px 4px rgba(21, 68, 87, 0.04);
  --shadow-medium:  0 2px 4px rgba(21, 68, 87, 0.05), 0 6px 14px rgba(21, 68, 87, 0.06);
  --shadow-elevated:0 4px 8px rgba(21, 68, 87, 0.06), 0 12px 28px rgba(21, 68, 87, 0.08);
  --shadow-floating:0 6px 14px rgba(21, 68, 87, 0.10), 0 20px 44px rgba(21, 68, 87, 0.12);

  /* Radius tokens */
  --r-card: 12px;
  --r-pill: 999px;
  --r-portrait: 12px;
  --r-input: 6px;
  --r-tight: 4px;

  /* Easing */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* =========================================================================
   E1.  TYPOGRAPHIC RHYTHM
   ========================================================================= */

.prose p,
.prose li,
.svc__desc,
.audience__desc,
.section-head__right p,
.foot__brand-desc {
  line-height: 1.65;
}
.prose p { letter-spacing: 0.005em; }

h1, h2, h3, .page-hero__title, .hero__title, .founder__visual-name {
  letter-spacing: -0.011em;
}
.eyebrow,
.foot__legal-title,
.crumbs,
.last-reviewed {
  letter-spacing: 0.08em;
}

/* Refined italic emphasis in display headings — a touch of warmth */
.page-hero__title em,
.hero__title em,
.section-head h2 em,
.founder__visual-name em {
  color: var(--brand-gold);
  font-style: italic;
  font-feature-settings: "ss01", "ss02";
}

/* =========================================================================
   E2 + E3.  SHADOW + RADIUS REFINEMENT (cards / portraits / inputs / buttons)
   Tier A urgency components excluded by selector specificity below.
   ========================================================================= */

.svc,
.team__member,
.audience,
.loc,
.price-card,
.recognition__list li,
.gfe-notice {
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.32s var(--ease-out), transform 0.32s var(--ease-out);
}

.svc:hover,
.audience:hover,
.loc:hover,
.team__member:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.team__portrait,
.profile__portrait {
  border-radius: var(--r-portrait);
}

.founder__visual {
  border-radius: var(--r-portrait);
  box-shadow: var(--shadow-elevated);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
textarea,
select {
  border-radius: var(--r-input);
}

/* Buttons -> pill where appropriate (NOT crisis CTAs) */
.btn,
.btn--outline,
.btn--ghost,
.cta-pill,
.nav__cta {
  border-radius: var(--r-pill);
  transition: background 0.24s var(--ease-out), color 0.24s var(--ease-out),
              border-color 0.24s var(--ease-out), box-shadow 0.32s var(--ease-out),
              transform 0.32s var(--ease-out);
}
.btn:hover,
.btn--outline:hover,
.nav__cta:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-1px);
}
.btn:focus-visible,
.btn--outline:focus-visible,
.nav__cta:focus-visible,
.cta-pill:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 3px;
}

/* Cards: subtle gold top accent on hover (signals interactivity calmly) */
.svc,
.audience,
.loc {
  position: relative;
  overflow: hidden;
}
.svc::before,
.audience::before,
.loc::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--brand-gold) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.32s var(--ease-out);
  pointer-events: none;
}
.svc:hover::before,
.audience:hover::before,
.loc:hover::before { opacity: 1; }

/* Animated underline on Learn-More links */
.svc__link,
.audience__link {
  background-image: linear-gradient(var(--brand-gold), var(--brand-gold));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.32s var(--ease-out);
  padding-bottom: 1px;
}
.svc:hover .svc__link,
.audience:hover .audience__link { background-size: 100% 1px; }

/* =========================================================================
   E5.  HERO SECTION ELEVATION (subtle, reads as quiet confidence)
   ========================================================================= */

.page-hero,
.hero {
  position: relative;
  isolation: isolate;
}

/* Ambient brand-teal radial wash behind hero content — almost imperceptible */
.page-hero::after,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 88% 28%, rgba(192, 143, 48, 0.045), transparent 50%),
    radial-gradient(circle at 12% 78%, rgba(29, 93, 120, 0.04), transparent 55%);
}

/* =========================================================================
   E6.  ANSWER CAPSULE TREATMENT
   ========================================================================= */

.answer-capsule {
  position: relative;
  background: var(--brand-panel);
  border-left: 4px solid var(--brand-gold);
  padding: 1.4rem 1.6rem 1.4rem 4.2rem;
  border-radius: 0 var(--r-card) var(--r-card) 0;
  margin: var(--s-5) 0;
  box-shadow: var(--shadow-soft);
}
.answer-capsule::before {
  content: "Quick answer";
  position: absolute;
  top: 1.4rem;
  left: 1.6rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--brand-gold);
  letter-spacing: 0.06em;
  font-feature-settings: "ss01", "ss02";
  text-transform: uppercase;
}
html[lang^="es"] .answer-capsule::before { content: "Respuesta rápida"; }
@media (max-width: 700px) {
  .answer-capsule { padding-left: 1.6rem; padding-top: 2.6rem; }
  .answer-capsule::before { top: 0.7rem; }
}

/* =========================================================================
   E10.  PULL QUOTE TREATMENT (about page Burton quote)
   ========================================================================= */

.founder__pullquote,
blockquote.pullquote,
.prose blockquote {
  position: relative;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.45;
  color: var(--brand-teal-deep);
  padding: 2rem 0 1.6rem 4.5rem;
  margin: var(--s-6) 0;
  border-left: 3px solid var(--brand-gold);
  padding-left: 4.5rem;
  letter-spacing: -0.01em;
}
.founder__pullquote::before,
blockquote.pullquote::before,
.prose blockquote::before {
  content: "\201C";   /* curly opening quote */
  position: absolute;
  left: 1rem;
  top: 0.4rem;
  font-size: 5rem;
  color: var(--brand-gold);
  line-height: 1;
  font-family: var(--font-display);
  opacity: 0.55;
}

/* =========================================================================
   E9.  CREDENTIAL CONSTELLATION (above footer legal block)
   ========================================================================= */

.credential-constellation {
  margin-top: var(--s-7);
  padding: var(--s-6) 0 var(--s-4);
  border-top: 1px solid rgba(255,255,255,0.14);
}
.credential-constellation__title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--brand-gold);
  text-align: center;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--s-4);
  opacity: 0.9;
}
.credential-constellation__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.2rem 1.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.credential-constellation__list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.84);
  background: rgba(255,255,255,0.03);
  transition: border-color 0.24s var(--ease-out), color 0.24s var(--ease-out), background 0.24s var(--ease-out);
}
.credential-constellation__list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-gold);
  display: inline-block;
  opacity: 0.85;
}
.credential-constellation__list li:hover {
  border-color: rgba(192, 143, 48, 0.6);
  color: #fff;
  background: rgba(192, 143, 48, 0.08);
}

/* =========================================================================
   E11.  AMBIENT FLORAL WATERMARK (decorative, hero only, paused offscreen)
   ========================================================================= */

.floral-watermark {
  position: absolute;
  right: -3vw;
  bottom: -2vw;
  width: clamp(180px, 22vw, 320px);
  height: auto;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
  color: var(--brand-gold);
  animation: floral-drift 22s ease-in-out infinite alternate;
}
.page-hero,
.hero { position: relative; }
@media (max-width: 700px) { .floral-watermark { display: none; } }

@keyframes floral-drift {
  0%   { transform: translate(0,0) rotate(0deg); }
  100% { transform: translate(-12px,-8px) rotate(3deg); }
}

/* =========================================================================
   E12.  LANGUAGE SWITCHER POLISH (pill active state, smoother transition)
   ========================================================================= */

.nav__lang-toggle {
  border-radius: var(--r-pill);
  padding: 0.45rem 0.85rem;
  transition: background 0.24s var(--ease-out), border-color 0.24s var(--ease-out), color 0.24s var(--ease-out);
}
.nav__lang-toggle:hover { background: rgba(29, 93, 120, 0.06); }
.nav__lang-menu { border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-elevated); }
.nav__lang-option { transition: background 0.18s var(--ease-out), color 0.18s var(--ease-out); }
.nav__lang-option.is-active::after {
  content: "•";
  margin-left: auto;
  color: var(--brand-gold);
  font-weight: 700;
}

/* =========================================================================
   E13.  CRISIS BAR — RESTRAINED POLISH
   Adds typographic warmth on "988" and gentle gold underline, NEVER reduces
   prominence, NEVER animates, NEVER becomes dismissable.
   ========================================================================= */

.crisis-bar { position: relative; }
.crisis-bar::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;        /* aligns to existing border-bottom */
  transform: translateX(-50%);
  width: clamp(60px, 8vw, 120px);
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, var(--brand-gold) 50%, transparent 100%);
  pointer-events: none;
  opacity: 0.5;
}
.crisis-bar__text strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05em;
  letter-spacing: 0.01em;
}

/* =========================================================================
   E14.  ACCESSIBILITY WIDGET POLISH
   Softer button shadow + one-time pulse on first page load.
   ========================================================================= */

.a11y-toggle {
  box-shadow: var(--shadow-floating);
  transition: transform 0.32s var(--ease-out), box-shadow 0.32s var(--ease-out), background 0.24s var(--ease-out);
}
.a11y-toggle:hover { box-shadow: 0 8px 22px rgba(21, 68, 87, 0.36); }
.a11y-panel {
  border-radius: var(--r-card);
  box-shadow: var(--shadow-floating);
  border-color: rgba(21, 68, 87, 0.14);
}

.a11y-toggle[data-pulse]::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--brand-gold);
  opacity: 0;
  animation: a11y-pulse 2.4s ease-out 1;
  pointer-events: none;
}
@keyframes a11y-pulse {
  0%   { opacity: 0; transform: scale(1); }
  20%  { opacity: 0.85; }
  100% { opacity: 0; transform: scale(1.55); }
}

/* =========================================================================
   E4.  REVEAL ANIMATION HOOKS
   The .reveal class is set in HTML; visual-polish.js drives ScrollTrigger.
   These rules provide a graceful fallback for non-JS / reduced-motion users:
   the elements simply appear at full visibility.
   ========================================================================= */

.reveal { opacity: 1; }
html[data-polish-motion="on"] .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
html[data-polish-motion="on"] .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Crisis-coded elements never animate, even with motion enabled */
html[data-polish-motion="on"] .crisis-bar,
html[data-polish-motion="on"] .crisis-bar *,
html[data-polish-motion="on"] .phi-warn,
html[data-polish-motion="on"] .phi-warn *,
html[data-polish-motion="on"] .foot__legal-emerg,
html[data-polish-motion="on"] .gfe-notice,
html[data-polish-motion="on"] .hipaa-crisis,
html[data-polish-motion="on"] .foot__legal-block .reveal {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* User accessibility-widget reduce-motion override always wins */
html[data-a11y-motion="reduce"] .reveal,
html[data-a11y-motion="reduce"] .floral-watermark,
html[data-a11y-motion="reduce"] .a11y-toggle[data-pulse]::after {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* prefers-reduced-motion at OS level */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .floral-watermark,
  .a11y-toggle[data-pulse]::after,
  .svc, .audience, .loc, .team__member, .btn, .btn--outline, .nav__cta {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================================
   POLISH NOTES THAT DELIBERATELY DO NOT TOUCH:
   .crisis-bar background/text-color (urgency)
   .phi-warn background/border (warning)
   .hipaa-crisis (warning)
   .foot__legal-emerg background (warning)
   .last-reviewed format (date stamp)
   .skip-link visibility (a11y)
   ========================================================================= */
