/* MediConsult — design tokens */
:root {
  --ink: #0A1628;
  --ink-soft: #1F2D44;
  --ink-muted: #5A6B85;
  --ink-faint: #8896AB;

  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --surface-sunken: #F4F7FB;

  --line: #E6ECF4;
  --line-strong: #D2DBE8;

  --brand: #1E5CE5;
  --brand-soft: #EAF1FE;
  --brand-tint: #F4F8FF;
  --brand-ink: #0E3FA3;

  --mint: #0E9E8F;
  --amber: #D97706;
  --rose: #E03A5C;
}

[data-theme="dark"] {
  --ink: #F1F5FB;
  --ink-soft: #D8E0EC;
  --ink-muted: #94A2B8;
  --ink-faint: #6B7A92;

  --surface: #0B1220;
  --surface-raised: #111A2E;
  --surface-sunken: #070C18;

  --line: #1B2740;
  --line-strong: #28344F;

  --brand: #4B83FF;
  --brand-soft: #16244A;
  --brand-tint: #0F1A36;
  --brand-ink: #BCD0FF;

  --mint: #3FD3C2;
  --amber: #F59E0B;
  --rose: #F87171;
}

html { scroll-behavior: smooth; }
body { font-feature-settings: 'ss01', 'cv11'; }

/* placeholder fill — striped */
.ph-stripe {
  background-image: repeating-linear-gradient(
    135deg,
    var(--brand-tint) 0px,
    var(--brand-tint) 8px,
    var(--brand-soft) 8px,
    var(--brand-soft) 16px
  );
}
.ph-stripe-neutral {
  background-image: repeating-linear-gradient(
    135deg,
    var(--surface-sunken) 0px,
    var(--surface-sunken) 8px,
    var(--line) 8px,
    var(--line) 16px
  );
}
.ph-grid {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* page transition */
.page-enter {
  animation: pageIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* form validation — :invalid wakes up only after the field is touched, so JS
   adds .field-invalid on the FIRST submit attempt to make the red border show
   even before the user has typed in it. The inline error message lives in the
   sibling [data-field-error] span. */
.field-invalid,
.field-invalid:focus {
  border-color: var(--rose) !important;
  box-shadow: 0 0 0 4px rgba(224, 58, 92, 0.12);
}
.field-invalid::placeholder { color: rgba(224, 58, 92, 0.5); }
[data-field-error] {
  display: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--rose);
  margin-top: 6px;
}
[data-field-error].on { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* hero floating */
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(0.5deg); }
}
.floaty   { animation: floaty 7s ease-in-out infinite; }
.floaty-2 { animation: floaty 9s ease-in-out infinite; animation-delay: -2s; }
.floaty-3 { animation: floaty 8s ease-in-out infinite; animation-delay: -4s; }

/* pulse ring */
@keyframes pulseRing {
  0%   { transform: scale(0.85); opacity: 0.55; }
  100% { transform: scale(1.7); opacity: 0; }
}
.pulse-ring::before,
.pulse-ring::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--brand);
  animation: pulseRing 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.pulse-ring::after { animation-delay: 1.2s; }

/* shimmering line accent */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-line {
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  background-size: 200% 100%;
  animation: shimmer 3.5s linear infinite;
}

/* counter underline */
.tab-underline {
  position: relative;
}
.tab-underline::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.tab-underline.active::after,
.tab-underline:hover::after {
  transform: scaleX(1);
}

/* card hover */
.card-hover {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -16px rgba(10,22,40,0.18), 0 8px 16px -4px rgba(10,22,40,0.08);
  border-color: var(--line-strong);
}

/* button ripple-ish */
.btn-primary {
  background: var(--brand);
  color: white;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 10px 30px -10px rgba(30,92,229,0.55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 36px -10px rgba(30,92,229,0.65); }
.btn-primary:active { transform: translateY(0); }
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 60%);
  pointer-events: none;
}

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

/* hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* dotted bg for hero */
.dot-bg {
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* checkbox/radio replacement */
.tick {
  width: 18px; height: 18px;
  border-radius: 6px;
  border: 1.5px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.tick.on {
  background: var(--brand);
  border-color: var(--brand);
}
.tick.on::after {
  content: '';
  width: 9px; height: 5px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* selection */
::selection { background: var(--brand-soft); color: var(--brand-ink); }

/* keep tweaks panel from being clipped */
#tweaks-root { z-index: 9999; }

/* ─── Trust-logos marquee (Issue #66) ───────────────────────────────────
   The track contains TWO copies of the logo list end-to-end. We animate
   transform: translateX from 0 → -50% (which lines the second copy up
   right where the first started), then repeat. Result: an unbroken
   continuous slide with no visible seam. Pauses on hover so the user
   can actually read the cards. Reduced-motion stops the animation. */
.marquee-track {
  width: max-content;
  animation: marquee-scroll 45s linear infinite;
}
[data-marquee]:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}
