/* ==========================================================================
 * Shared section styles for the Vilvik homepage and standalone marketing
 * pages. Loaded by:
 *   - homeapp/templates/home/default.html     (homepage)
 *   - homeapp/templates/home/contact_us.html  (standalone /contact)
 *
 * Anything that styles a class used in home/contact_us_section.html or
 * home/footer_section.html must live here so both pages render the same.
 * Hero, feature, stats, and newsletter rules also live here — they're
 * class-scoped, so they remain inert on pages that don't use them.
 *
 * Theme-aware via Phoenix CSS variables (--phoenix-primary, etc.) and
 * `prefers-reduced-motion`-safe (every non-trivial keyframe has a
 * fallback at the bottom of its section).
 * ========================================================================== */

/* Flow-field canvas, fully transparent, spans the entire hero
   section behind all content. Theme aware via Phoenix CSS variables
   that the JS reads each frame (--phoenix-primary-rgb, etc.). */
.hero-flow-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* Pointer events stay on so taps in the empty column area drop a
     ring; the JS itself attaches mousemove / click on the section
     element so the cursor is also tracked when hovering text. */
}
/* Lift the hero content above the canvas. */
#home > .container-small { position: relative; z-index: 1; }

/* ============================================================
   Scroll-reveal. Every element with .reveal starts faded out
   and slid 20 px down; the IntersectionObserver in
   home_animations.js adds .is-revealed to fade it in.
   Honours prefers-reduced-motion. */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   How-it-works, gentle hover lift + breathing icon circles. */
.step-card {
  transition: transform 0.25s ease;
}
.step-card:hover { transform: translateY(-4px); }
.step-icon {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.step-card:hover .step-icon {
  transform: scale(1.08);
  box-shadow: 0 0.5rem 1.25rem rgba(var(--phoenix-primary-rgb), 0.25);
}
@keyframes vilvik-step-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--phoenix-primary-rgb), 0.18); }
  50%      { box-shadow: 0 0 0 10px rgba(var(--phoenix-primary-rgb), 0); }
}
.step-icon { animation: vilvik-step-pulse 3.5s ease-in-out infinite; }

/* ============================================================
   Feature illustrations, inline-SVG animations replacing the
   old stock Phoenix images. All colours come from Phoenix CSS
   variables so they adapt to dark/light theme. */
.vfx-svg {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 991.98px) {
  .vfx-svg { margin-bottom: 2rem; }
}
.vfx-line     { fill: none; stroke: var(--phoenix-primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vfx-line-soft{ fill: none; stroke: var(--phoenix-primary); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.35; }
.vfx-axis     { stroke: var(--phoenix-border-color); stroke-width: 1; }
.vfx-grid     { stroke: var(--phoenix-border-color-translucent); stroke-width: 0.8; }
.vfx-dot      { fill: var(--phoenix-primary); }
.vfx-dot-soft { fill: var(--phoenix-info); opacity: 0.55; }
.vfx-text     { fill: var(--phoenix-body-emphasis-color); font-family: inherit; font-weight: 700; }
.vfx-label    { fill: var(--phoenix-body-tertiary-color); font-size: 10px; font-family: inherit; }

/* Feature 1, Optimization Hub: sparkline draws in, counter ticks. */
.vfx-spark {
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
  animation: vfx-spark-draw 4.5s ease-in-out infinite;
}
@keyframes vfx-spark-draw {
  0%   { stroke-dashoffset: 360; }
  55%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
.vfx-spark-fill {
  fill: var(--phoenix-primary);
  opacity: 0;
  animation: vfx-spark-fill-fade 4.5s ease-in-out infinite;
}
@keyframes vfx-spark-fill-fade {
  0%, 50% { opacity: 0; }
  70%, 100% { opacity: 0.18; }
}

/* Feature 2, Machine Learning: pulsing neural network connections. */
.vfx-nn-link {
  fill: none;
  stroke: var(--phoenix-primary);
  stroke-width: 1.2;
  opacity: 0.18;
}
.vfx-nn-link.active {
  animation: vfx-nn-pulse 1.6s ease-in-out infinite;
}
@keyframes vfx-nn-pulse {
  0%, 100% { opacity: 0.15; stroke-width: 1; }
  50%      { opacity: 0.95; stroke-width: 2; }
}
.vfx-nn-node {
  fill: var(--phoenix-primary);
  stroke: var(--phoenix-body-bg);
  stroke-width: 1.5;
}
.vfx-nn-node.glow {
  animation: vfx-nn-glow 2.4s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes vfx-nn-glow {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.35); }
}

/* Feature 3, Interactive Visualizations: fitness curve drawing. */
.vfx-curve {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: vfx-curve-draw 6s linear infinite;
}
@keyframes vfx-curve-draw {
  0%   { stroke-dashoffset: 600; }
  80%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
.vfx-curve-soft {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}
.vfx-curve-soft.s1 { animation: vfx-curve-draw 6s linear infinite; animation-delay: 0.6s; }
.vfx-curve-soft.s2 { animation: vfx-curve-draw 6s linear infinite; animation-delay: 1.2s; }

/* Feature 4, Multi-Objective: dots and Pareto front draw together. */
.vfx-pareto-dot {
  fill: var(--phoenix-primary);
  opacity: 0;
  animation: vfx-pareto-fade 5s ease-in-out infinite;
}
@keyframes vfx-pareto-fade {
  0%, 30% { opacity: 0; }
  60%, 100% { opacity: 0.6; }
}
.vfx-pareto-front {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: vfx-pareto-draw 5s ease-in-out infinite;
}
@keyframes vfx-pareto-draw {
  0%, 35% { stroke-dashoffset: 320; }
  75%, 100% { stroke-dashoffset: 0; }
}

/* Feature 5, Isolated Sandbox: bouncing experiment particles. */
.vfx-sandbox-frame {
  fill: none;
  stroke: var(--phoenix-primary);
  stroke-width: 2;
  stroke-dasharray: 4 6;
  animation: vfx-sandbox-march 18s linear infinite;
}
@keyframes vfx-sandbox-march {
  to { stroke-dashoffset: -200; }
}
.vfx-sandbox-particle {
  fill: var(--phoenix-primary);
}
.vfx-sandbox-particle.p1 { animation: vfx-sandbox-bounce-1 4s ease-in-out infinite; }
.vfx-sandbox-particle.p2 { animation: vfx-sandbox-bounce-2 5.5s ease-in-out infinite; }
.vfx-sandbox-particle.p3 { animation: vfx-sandbox-bounce-3 4.8s ease-in-out infinite; }
@keyframes vfx-sandbox-bounce-1 {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(60px, -30px); }
  50%      { transform: translate(110px, 20px); }
  75%      { transform: translate(40px, 40px); }
}
@keyframes vfx-sandbox-bounce-2 {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(-50px, 40px); }
  66%      { transform: translate(70px, -10px); }
}
@keyframes vfx-sandbox-bounce-3 {
  0%, 100% { transform: translate(0, 0); }
  40%      { transform: translate(80px, 30px); }
  80%      { transform: translate(-30px, -25px); }
}
.vfx-sandbox-lock {
  fill: var(--phoenix-success);
}

/* Stats strip, countUp targets, theme-aware big numbers. */
.vilvik-stat-num {
  color: var(--phoenix-primary);
  line-height: 1;
}
.vilvik-stat-card {
  transition: transform 0.25s ease;
}
.vilvik-stat-card:hover { transform: translateY(-3px); }

@media (prefers-reduced-motion: reduce) {
  .vfx-spark, .vfx-spark-fill,
  .vfx-nn-link.active, .vfx-nn-node.glow,
  .vfx-curve, .vfx-curve-soft.s1, .vfx-curve-soft.s2,
  .vfx-pareto-dot, .vfx-pareto-front,
  .vfx-sandbox-frame, .vfx-sandbox-particle.p1, .vfx-sandbox-particle.p2, .vfx-sandbox-particle.p3,
  .step-icon {
    animation: none !important;
  }
  .vfx-spark, .vfx-curve, .vfx-curve-soft, .vfx-pareto-front {
    stroke-dashoffset: 0 !important;
  }
}

/* ============================================================
   Footer
   ============================================================ */

/* The .reveal observer in home_animations.js sets opacity:0 +
   translateY(20px) on every .reveal element until it scrolls in.
   For the seam SVG that initial transform shifts the curve out of
   place, neutralise it. The seam still gets .is-revealed when
   the observer fires, which is what triggers the dash-draw. */
.footer-seam.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

.footer-shell {
  isolation: isolate;
}

.footer-seam {
  display: block;
  width: 100%;
  height: 7rem;
  margin-bottom: -1px;
}
.footer-seam-fill-above { fill: var(--phoenix-emphasis-bg); }
.footer-seam-curve {
  fill: none;
  stroke: var(--phoenix-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  transition: stroke-dashoffset 1.6s ease-out;
}
.footer-seam.is-revealed .footer-seam-curve {
  stroke-dashoffset: 0;
}
.footer-seam-dots circle {
  fill: var(--phoenix-primary);
  opacity: 0;
  transition: opacity 0.5s ease-out var(--d, 0s);
}
.footer-seam.is-revealed .footer-seam-dots circle {
  opacity: 0.65;
}
.footer-seam-best {
  fill: var(--phoenix-primary);
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
  transform: scale(0.4);
  transition: opacity 0.5s ease-out 1.05s,
              transform 0.6s cubic-bezier(.34,1.56,.64,1) 1.05s,
              filter 0.5s ease-out 1.05s;
}
.footer-seam.is-revealed .footer-seam-best {
  opacity: 1;
  transform: scale(1);
  filter: drop-shadow(0 0 6px rgba(var(--phoenix-primary-rgb), 0.65));
}

.footer-body {
  position: relative;
  overflow: hidden;
}

/* Ambient evolution canvas, wired up in footer_evolution.js. Draws
   a calm 1D fitness landscape with a small population of candidates
   jumping once per generation. Transparent overlay layered behind
   the CTA band, link columns, and footnote bar. */
.footer-evolution-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* pointer-events stay on so taps in empty footer area still
     ripple through to the cursor handler, interactive controls
     (links, buttons) sit on a higher z-index and shadow this. */
}

.footer-cta-band {
  position: relative;
  z-index: 1;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--phoenix-border-color-translucent);
}

.footer-default {
  position: relative;
  z-index: 1;
  padding: 3rem 0 1.5rem;
}

/* [C] Living V-mark, perspective for parallax tilt; the white
   silhouette sits on top of the colored logo, fading on hover so
   the V's brand colors are revealed. Breathing pulse runs forever
   on the white silhouette. */
.footer-vmark {
  position: relative;
  display: inline-block;
  width: 64px;
  height: 64px;
  line-height: 0;
  will-change: transform;
  transition: transform 0.35s ease-out;
}
.footer-vmark-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.4s ease, filter 0.4s ease;
}
.footer-vmark-img--colored {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.footer-vmark-img--white {
  position: relative;
  filter: drop-shadow(0 0 14px rgba(var(--phoenix-primary-rgb), 0.18));
  animation: footer-vmark-breathe 4.5s ease-in-out infinite;
  transform-origin: center;
}
@keyframes footer-vmark-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
.footer-vmark:hover .footer-vmark-img--white,
.footer-vmark:focus-visible .footer-vmark-img--white,
.footer-vmark:active .footer-vmark-img--white {
  opacity: 0;
}
.footer-vmark:hover .footer-vmark-img--colored,
.footer-vmark:focus-visible .footer-vmark-img--colored,
.footer-vmark:active .footer-vmark-img--colored {
  opacity: 1;
  filter: drop-shadow(0 0 22px rgba(var(--phoenix-primary-rgb), 0.45));
}

.footer-tagline {
  min-height: 1.5em; /* prevent layout jitter while typed.js mutates */
}

.footer-status-pill {
  background: rgba(var(--phoenix-success-rgb), 0.12);
  border: 1px solid rgba(var(--phoenix-success-rgb), 0.35);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}
.footer-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--phoenix-success);
  box-shadow: 0 0 0 0 rgba(var(--phoenix-success-rgb), 0.6);
  animation: footer-status-pulse 1.8s ease-out infinite;
}
@keyframes footer-status-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(var(--phoenix-success-rgb), 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(var(--phoenix-success-rgb), 0); }
  100% { box-shadow: 0 0 0 0   rgba(var(--phoenix-success-rgb), 0); }
}

/* [D] Link columns. */
.footer-col-heading {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  color: var(--phoenix-tertiary-color);
  margin-bottom: 1rem;
}
.footer-link-list li { margin-bottom: 0.4rem; }
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--phoenix-secondary-color);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer-link span[class*="fa-"] {
  font-size: 0.85em;
  color: var(--phoenix-tertiary-color);
  transition: color 0.2s ease;
  width: 1em;
  text-align: center;
}
.footer-link::after {
  content: '';
  position: absolute;
  left: 1.45rem;
  bottom: -2px;
  height: 1px;
  width: 0;
  background: var(--phoenix-primary);
  transition: width 0.25s ease;
}
.footer-link:hover {
  color: var(--phoenix-emphasis-color);
  transform: translateX(3px);
}
.footer-link:hover span[class*="fa-"] {
  color: var(--phoenix-primary);
}
.footer-link:hover::after {
  width: calc(100% - 1.45rem);
}

/* [E] Social chip row, chips reveal brand colors only on hover so
   the resting state stays clean; the data-handle attribute renders
   as a tooltip via ::after. */
.footer-social-band {
  position: relative;
  z-index: 1;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--phoenix-border-color-translucent);
}
.footer-social-row { row-gap: 1.4rem; }
.footer-social-chip {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--phoenix-tertiary-bg);
  color: var(--phoenix-emphasis-color);
  font-size: 18px;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.footer-social-chip:hover,
.footer-social-chip:focus-visible {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 0 8px rgba(var(--phoenix-primary-rgb), 0.18);
  outline: none;
}
.footer-social-chip--x:hover,
.footer-social-chip--x:focus-visible        { color: #ffffff; background: #000000; }
.footer-social-chip--facebook:hover,
.footer-social-chip--facebook:focus-visible { color: #ffffff; background: #1877F2; }
.footer-social-chip--linkedin:hover,
.footer-social-chip--linkedin:focus-visible { color: #ffffff; background: #0A66C2; }
.footer-social-chip--github:hover,
.footer-social-chip--github:focus-visible   { color: #0d1117; background: #ffffff; }
.footer-social-chip::after {
  content: attr(data-handle);
  position: absolute;
  bottom: -1.6rem;
  left: 50%;
  transform: translate(-50%, 4px);
  font-size: 0.72rem;
  color: var(--phoenix-tertiary-color);
  background: var(--phoenix-emphasis-bg);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--phoenix-border-color-translucent);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.footer-social-chip:hover::after,
.footer-social-chip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* [F] Footnote. */
.footer-footnote {
  position: relative;
  z-index: 1;
  padding: 1rem 0 1.5rem;
  border-top: 1px solid var(--phoenix-border-color-translucent);
}
.footer-mini-spark {
  width: 60px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
}
.footer-mini-spark polyline {
  fill: none;
  stroke: var(--phoenix-primary);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footer-mini-spark circle {
  fill: var(--phoenix-primary);
  filter: drop-shadow(0 0 4px rgba(var(--phoenix-primary-rgb), 0.7));
}

/* [G] Back-to-top button. Appears below ~1.2vh of scroll; SVG ring
   traces page-scroll progress (driven from JS by setting
   stroke-dashoffset). The icon sits on top of the ring.

   Stacked above the site-wide feedback launcher (home/feedback_widget.html)
   which sits at right:1rem; bottom:1rem and is ~2.5rem tall. So we
   offset 4.5rem from the bottom and align to the same right edge so
   the two buttons read as a vertical pair in the corner. */
.footer-back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 4.5rem;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  background: var(--phoenix-emphasis-bg);
  color: var(--phoenix-emphasis-color);
  border-radius: 50%;
  z-index: 1080;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease, color 0.2s ease;
}
.footer-back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.footer-back-to-top:hover,
.footer-back-to-top:focus-visible {
  background: var(--phoenix-primary);
  color: #ffffff;
  outline: none;
}
.footer-back-to-top .footer-bt-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); /* start ring from 12 o'clock */
}
.footer-bt-track {
  fill: none;
  stroke: var(--phoenix-border-color-translucent);
  stroke-width: 3;
}
.footer-bt-progress {
  fill: none;
  stroke: var(--phoenix-primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 125.66; /* 2 * pi * 20 */
  stroke-dashoffset: 125.66;
  transition: stroke-dashoffset 0.1s linear;
}
.footer-bt-icon {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .footer-vmark-img--white,
  .footer-status-dot,
  .footer-seam-best {
    animation: none !important;
  }
  .footer-seam-curve { stroke-dashoffset: 0 !important; transition: none; }
  .footer-seam-dots circle { opacity: 0.65; transition: none; }
  .footer-seam-best { opacity: 1; transform: scale(1); transition: none; }
}

/* ============================================================
   Newsletter strip, compact horizontal band, replaces the old
   oversized cta-card. See home/newsletter_section.html for the
   markup contract.
   ============================================================ */
.newsletter-strip {
  padding: 2.5rem 0 1rem;
}
.newsletter-card {
  background: linear-gradient(135deg,
    rgba(var(--phoenix-primary-rgb), 0.07),
    rgba(var(--phoenix-info-rgb),    0.07));
  border: 1px solid var(--phoenix-border-color-translucent);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  min-height: 7rem;
}
@media (min-width: 992px) {
  .newsletter-card { padding: 1.5rem 2rem; }
}

/* Decorative dashed flight trail across the card. */
.newsletter-trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.5;
}
.newsletter-trail path {
  fill: none;
  stroke: var(--phoenix-primary);
  stroke-width: 1;
  stroke-dasharray: 3 6;
  opacity: 0.35;
}

/* Paper plane gliding left-to-right across the strip. The
   normal-flight loop runs forever; on submit success the
   wrapper gets .is-submitted and the keyframe is replaced with
   a one-shot takeoff that sends the plane up-and-out. */
.newsletter-plane {
  position: absolute;
  top: 60%;
  left: -3rem;
  font-size: 16px;
  color: var(--phoenix-primary);
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 0 5px rgba(var(--phoenix-primary-rgb), 0.45));
  animation: newsletter-plane-fly 22s linear infinite 2.5s;
  z-index: 1;
}
@keyframes newsletter-plane-fly {
  0%   { left: -3rem;  top: 60%; opacity: 0;    transform: rotate(-6deg); }
  10%  {               top: 56%; opacity: 0.85; }
  35%  { left: 32%;    top: 36%;                transform: rotate(3deg); }
  60%  { left: 60%;    top: 52%;                transform: rotate(-4deg); }
  85%  { left: 86%;    top: 42%; opacity: 0.85; transform: rotate(2deg); }
  100% { left: 105%;   top: 48%; opacity: 0;    transform: rotate(-3deg); }
}

.newsletter-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(var(--phoenix-primary-rgb), 0.12);
  color: var(--phoenix-primary);
  align-items: center;
  justify-content: center;
  font-size: 18px;
  animation: newsletter-icon-pulse 2.4s ease-out infinite;
}
@keyframes newsletter-icon-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(var(--phoenix-primary-rgb), 0.45); }
  70%  { box-shadow: 0 0 0 12px rgba(var(--phoenix-primary-rgb), 0); }
  100% { box-shadow: 0 0 0 0   rgba(var(--phoenix-primary-rgb), 0); }
}

.newsletter-content { position: relative; z-index: 2; }

.newsletter-form { min-width: 0; }
@media (min-width: 992px) {
  .newsletter-input--name { width: 8.5rem; }
  .newsletter-email-wrap  { width: 14rem;  }
}
.newsletter-input {
  background: var(--phoenix-emphasis-bg);
}
.newsletter-email-wrap { flex: 1; min-width: 0; }
.newsletter-email-wrap .newsletter-input {
  padding-right: 2rem;
  width: 100%;
}

/* :valid-driven inline check. The input is required, so empty
   values count as invalid → the check stays hidden until a
   well-formed email is entered. */
.newsletter-email-check {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%) scale(0.4);
  color: var(--phoenix-success);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
}
.newsletter-email-wrap .newsletter-input:valid + .newsletter-email-check {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.newsletter-submit { white-space: nowrap; }
.newsletter-submit-icon {
  display: inline-block;
  transition: transform 0.2s ease;
}
.newsletter-submit:hover .newsletter-submit-icon { transform: translateX(3px); }

/* Success overlay. Fades in once .is-submitted is set on the
   strip root (added by static/javascript/home/newsletter.js).
   The form, headline column, and icon column fade out; the
   paper plane "takes off" up-and-right; the check draws in. */
.newsletter-success {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg,
    rgba(var(--phoenix-primary-rgb), 0.07),
    rgba(var(--phoenix-info-rgb),    0.07));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease 0.25s;
  z-index: 3;
}
.newsletter-strip.is-submitted .newsletter-success {
  opacity: 1;
  pointer-events: auto;
}
.newsletter-strip.is-submitted .newsletter-content {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.newsletter-strip.is-submitted .newsletter-plane {
  animation: newsletter-plane-takeoff 0.9s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
@keyframes newsletter-plane-takeoff {
  0%   { left: 30%;  top: 40%;  transform: rotate(-25deg) scale(1);   opacity: 1; }
  100% { left: 130%; top: -50%; transform: rotate(-25deg) scale(1.5); opacity: 0; }
}

.newsletter-check { width: 56px; height: 56px; }
.newsletter-check-circle {
  fill: none;
  stroke: var(--phoenix-success);
  stroke-width: 2.5;
  stroke-dasharray: 138;
  stroke-dashoffset: 138;
}
.newsletter-check-mark {
  fill: none;
  stroke: var(--phoenix-success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
}
.newsletter-strip.is-submitted .newsletter-check-circle {
  animation: newsletter-check-circle 0.5s ease-out forwards 0.4s;
}
@keyframes newsletter-check-circle { to { stroke-dashoffset: 0; } }
.newsletter-strip.is-submitted .newsletter-check-mark {
  animation: newsletter-check-mark 0.35s ease-out forwards 0.85s;
}
@keyframes newsletter-check-mark { to { stroke-dashoffset: 0; } }

/* ============================================================
   Contact section
   ============================================================ */
.contact-us-section {
  padding: 4rem 0 1rem;
}

/* Background decoration: subtle dotted grid + two soft gradient
   orbs in opposite corners. All under z-index of content. */
.contact-bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(var(--phoenix-primary-rgb), 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.45;
  pointer-events: none;
}
.contact-bg-orb {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
}
.contact-bg-orb--tl {
  top: -120px;
  left: -120px;
  background: radial-gradient(circle, rgba(var(--phoenix-primary-rgb), 0.45), transparent 70%);
}
.contact-bg-orb--br {
  bottom: -160px;
  right: -160px;
  background: radial-gradient(circle, rgba(var(--phoenix-info-rgb), 0.4), transparent 70%);
}

.contact-side-heading {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--phoenix-tertiary-color);
  margin-bottom: 0.85rem;
}

/* Contact tiles. Each tile is a row of [icon | label+value | action].
   Hover lifts the tile, expands the icon's halo, and slides the
   action arrow. The whole tile is the link target. The action
   span just suggests interaction. */
.contact-tile {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.85rem;
  background: var(--phoenix-emphasis-bg);
  border: 1px solid var(--phoenix-border-color-translucent);
  color: var(--phoenix-emphasis-color);
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.contact-tile:hover,
.contact-tile:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(var(--phoenix-primary-rgb), 0.45);
  box-shadow: 0 6px 20px rgba(var(--phoenix-primary-rgb), 0.10);
  color: var(--phoenix-emphasis-color);
  outline: none;
}
.contact-tile-icon {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(var(--phoenix-primary-rgb), 0.12);
  color: var(--phoenix-primary);
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: box-shadow 0.3s ease, transform 0.25s ease;
  animation: contact-tile-icon-pulse 3.6s ease-out infinite;
}
@keyframes contact-tile-icon-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(var(--phoenix-primary-rgb), 0.35); }
  70%  { box-shadow: 0 0 0 12px rgba(var(--phoenix-primary-rgb), 0); }
  100% { box-shadow: 0 0 0 0   rgba(var(--phoenix-primary-rgb), 0); }
}
.contact-tile:hover .contact-tile-icon {
  transform: scale(1.05);
}
.contact-tile-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.contact-tile-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--phoenix-tertiary-color);
}
.contact-tile-value {
  font-weight: 600;
  color: var(--phoenix-emphasis-color);
  line-height: 1.35;
}
.contact-tile-action {
  color: var(--phoenix-tertiary-color);
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  position: relative;
}
.contact-tile-action:hover {
  color: var(--phoenix-primary);
  background: rgba(var(--phoenix-primary-rgb), 0.08);
}
.contact-tile:hover .contact-tile-action { transform: translateX(2px); }
.contact-tile-action-success {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--phoenix-success);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s, transform 0.2s cubic-bezier(.34,1.56,.64,1);
}
.contact-tile.is-copied .contact-tile-action-default { opacity: 0; }
.contact-tile.is-copied .contact-tile-action-success {
  opacity: 1;
  transform: scale(1);
}

/* Contact social chips, same idea as the footer chips with a
   lighter (light-theme) resting state since this section is on
   a light surface. */
.contact-social-chip {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--phoenix-emphasis-bg);
  border: 1px solid var(--phoenix-border-color-translucent);
  color: var(--phoenix-emphasis-color);
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.contact-social-chip:hover,
.contact-social-chip:focus-visible {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 0 6px rgba(var(--phoenix-primary-rgb), 0.15);
  border-color: transparent;
  outline: none;
}
.contact-social-chip--x:hover,
.contact-social-chip--x:focus-visible        { color: #ffffff; background: #000000; }
.contact-social-chip--facebook:hover,
.contact-social-chip--facebook:focus-visible { color: #ffffff; background: #1877F2; }
.contact-social-chip--linkedin:hover,
.contact-social-chip--linkedin:focus-visible { color: #ffffff; background: #0A66C2; }
.contact-social-chip--github:hover,
.contact-social-chip--github:focus-visible   { color: #ffffff; background: #24292f; }
.contact-social-chip::after {
  content: attr(data-handle);
  position: absolute;
  bottom: -1.6rem;
  left: 50%;
  transform: translate(-50%, 4px);
  font-size: 0.72rem;
  color: var(--phoenix-tertiary-color);
  background: var(--phoenix-emphasis-bg);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--phoenix-border-color-translucent);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.contact-social-chip:hover::after,
.contact-social-chip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Status pill, green dot pulse identical in spirit to the
   footer's "All systems operational". */
.contact-status-pill {
  background: rgba(var(--phoenix-success-rgb), 0.10);
  border: 1px solid rgba(var(--phoenix-success-rgb), 0.30);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}
.contact-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--phoenix-success);
  box-shadow: 0 0 0 0 rgba(var(--phoenix-success-rgb), 0.6);
  animation: contact-status-pulse 1.8s ease-out infinite;
}
@keyframes contact-status-pulse {
  0%   { box-shadow: 0 0 0 0    rgba(var(--phoenix-success-rgb), 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(var(--phoenix-success-rgb), 0); }
  100% { box-shadow: 0 0 0 0    rgba(var(--phoenix-success-rgb), 0); }
}

/* Form card, gradient surface to lift it from the section's
   dotted bg, decorative paper plane drifting inside. */
.contact-form-card {
  background: var(--phoenix-emphasis-bg);
  border: 1px solid var(--phoenix-border-color-translucent);
  border-radius: 1.1rem;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}
@media (min-width: 992px) {
  .contact-form-card { padding: 2rem 2rem 1.5rem; }
}

.contact-form-plane {
  position: absolute;
  top: 65%;
  left: -2rem;
  font-size: 18px;
  color: var(--phoenix-primary);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(var(--phoenix-primary-rgb), 0.45));
  animation: contact-plane-fly 26s linear infinite 4s;
  z-index: 1;
}
@keyframes contact-plane-fly {
  0%   { left: -2rem;  top: 70%; opacity: 0;    transform: rotate(-6deg); }
  12%  {               top: 65%; opacity: 0.55; }
  40%  { left: 35%;    top: 30%;                transform: rotate(4deg); }
  65%  { left: 65%;    top: 50%;                transform: rotate(-4deg); }
  88%  { left: 90%;    top: 40%; opacity: 0.55; transform: rotate(2deg); }
  100% { left: 110%;   top: 45%; opacity: 0;    transform: rotate(-3deg); }
}

/* Quick-fill chips. */
.contact-chip {
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(var(--phoenix-primary-rgb), 0.08);
  color: var(--phoenix-primary-text-emphasis);
  border: 1px solid rgba(var(--phoenix-primary-rgb), 0.18);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.contact-chip:hover,
.contact-chip:focus-visible {
  background: var(--phoenix-primary);
  color: #ffffff;
  border-color: var(--phoenix-primary);
  transform: translateY(-1px);
  outline: none;
}

/* Floating-label input. The placeholder is a single space (not
   empty) so :placeholder-shown is true only when the field has
   no user input. That's the trigger for the label to drop down
   into resting position. */
.contact-field {
  position: relative;
}
.contact-field-input {
  width: 100%;
  padding: 1.4rem 0.85rem 0.5rem;
  border: 1px solid var(--phoenix-border-color);
  border-radius: 0.55rem;
  background: var(--phoenix-emphasis-bg);
  color: var(--phoenix-emphasis-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-size: 0.95rem;
  line-height: 1.4;
  font-family: inherit;
}
.contact-field--message .contact-field-input {
  padding-top: 1.6rem;
  padding-right: 4.5rem; /* leave room for the counter */
  resize: vertical;
  min-height: 7rem;
  max-height: 16rem;
}
.contact-field-input::placeholder { color: transparent; }
.contact-field label {
  position: absolute;
  top: 1.0rem;
  left: 0.95rem;
  color: var(--phoenix-tertiary-color);
  pointer-events: none;
  transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease, background 0.2s ease;
  padding: 0 0.3rem;
  line-height: 1;
  margin-bottom: 0;
  font-size: 0.95rem;
}
.contact-field-input:focus + label,
.contact-field-input:not(:placeholder-shown) + label {
  top: -0.5rem;
  left: 0.7rem;
  font-size: 0.72rem;
  color: var(--phoenix-primary);
  background: var(--phoenix-emphasis-bg);
  font-weight: 600;
}
.contact-field-input:focus {
  border-color: var(--phoenix-primary);
  box-shadow: 0 0 0 3px rgba(var(--phoenix-primary-rgb), 0.15);
  outline: none;
}

/* Inline validity check. Appears once the field has content
   AND is valid. :placeholder-shown rules out the empty case
   (which is technically :invalid for required fields, but
   browsers treat empty-required as invalid; we only want the
   check after the user types something). */
.contact-field-feedback {
  position: absolute;
  right: 0.85rem;
  top: 1.1rem;
  color: var(--phoenix-success);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
  font-size: 0.95rem;
}
.contact-field-input:valid:not(:placeholder-shown) ~ .contact-field-feedback {
  opacity: 1;
  transform: scale(1);
}

/* Message char counter. */
.contact-message-counter {
  position: absolute;
  right: 0.85rem;
  bottom: 0.55rem;
  font-size: 0.72rem;
  color: var(--phoenix-tertiary-color);
  background: var(--phoenix-emphasis-bg);
  padding: 0 0.3rem;
  border-radius: 0.3rem;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease;
}
.contact-message-counter.is-warning { color: var(--phoenix-warning); }
.contact-message-counter.is-full    { color: var(--phoenix-danger); font-weight: 700; }

.contact-submit {
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-submit:hover { transform: translateY(-1px); }
.contact-submit-icon {
  display: inline-block;
  transition: transform 0.25s ease;
}
.contact-submit:hover .contact-submit-icon { transform: translateX(3px); }

/* Success overlay, fades over the form once .is-submitted is
   on the section root. The form fades out (Phoenix's existing
   alert-subtle-success dialog also renders inside the card ,
   keep both visible: the alert sits behind the overlay's
   checkmark/title and is reachable if the user scrolls). */
.contact-success {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--phoenix-emphasis-bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease 0.4s;
  z-index: 4;
  padding: 1rem;
}
.contact-us-section.is-submitted .contact-success {
  opacity: 1;
  pointer-events: auto;
}
.contact-us-section.is-submitted .contact-form-plane {
  animation: contact-plane-takeoff 1s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
@keyframes contact-plane-takeoff {
  0%   { left: 30%;  top: 50%;  transform: rotate(-22deg) scale(1);   opacity: 1; }
  100% { left: 130%; top: -60%; transform: rotate(-22deg) scale(1.5); opacity: 0; }
}

.contact-check { width: 56px; height: 56px; }
.contact-check-circle {
  fill: none;
  stroke: var(--phoenix-success);
  stroke-width: 2.5;
  stroke-dasharray: 138;
  stroke-dashoffset: 138;
}
.contact-check-mark {
  fill: none;
  stroke: var(--phoenix-success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
}
.contact-us-section.is-submitted .contact-check-circle {
  animation: contact-check-circle 0.5s ease-out forwards 0.55s;
}
@keyframes contact-check-circle { to { stroke-dashoffset: 0; } }
.contact-us-section.is-submitted .contact-check-mark {
  animation: contact-check-mark 0.35s ease-out forwards 1.0s;
}
@keyframes contact-check-mark { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .contact-tile-icon,
  .contact-form-plane,
  .contact-status-dot,
  .contact-us-section.is-submitted .contact-form-plane,
  .contact-us-section.is-submitted .contact-check-circle,
  .contact-us-section.is-submitted .contact-check-mark {
    animation: none !important;
  }
  .contact-form-plane { display: none; }
  .contact-us-section.is-submitted .contact-check-circle,
  .contact-us-section.is-submitted .contact-check-mark {
    stroke-dashoffset: 0;
  }
}

/* ============================================================
   Map marker pulse, purely decorative overlay above the map
   tiles. Centered on the map's geometric centre, which is also
   where Phoenix anchors the pin. pointer-events: none lets map
   interaction (drag, click marker, info window) still work.
   ============================================================ */
.map-container { position: relative; }
.map-marker-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 5;
}
.map-marker-pulse::before,
.map-marker-pulse::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: rgba(var(--phoenix-primary-rgb), 0.45);
  animation: map-marker-pulse 2.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}
.map-marker-pulse::after { animation-delay: 1.2s; }
@keyframes map-marker-pulse {
  0%   { width: 18px; height: 18px; margin: -9px 0 0 -9px;  opacity: 0.7; }
  100% { width: 90px; height: 90px; margin: -45px 0 0 -45px; opacity: 0; }
}

/* Marker popup, Phoenix renders our innerHTML inside a Google
   InfoWindow; this just gives it sane typography. */
.map-marker-popup {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--phoenix-emphasis-color);
  padding: 0.25rem 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .newsletter-icon,
  .newsletter-plane,
  .map-marker-pulse::before,
  .map-marker-pulse::after,
  .newsletter-strip.is-submitted .newsletter-plane,
  .newsletter-strip.is-submitted .newsletter-check-circle,
  .newsletter-strip.is-submitted .newsletter-check-mark {
    animation: none !important;
  }
  .newsletter-strip.is-submitted .newsletter-check-circle,
  .newsletter-strip.is-submitted .newsletter-check-mark {
    stroke-dashoffset: 0;
  }
  .newsletter-plane { display: none; }
}
