:root {
  --ui-blue: #2155d9;
  --ui-blue-dark: #163fae;
  --ui-ink: #111a27;
  --ui-paper: #fffdf8;
  --ui-line: #d5d1c8;
  --ui-shadow-sm: 0 5px 16px rgba(17, 26, 39, .07);
  --ui-shadow-md: 0 16px 42px rgba(17, 26, 39, .11);
  --ui-ease: cubic-bezier(.2, .75, .25, 1);
}

html { scroll-behavior: smooth; }
body { text-rendering: optimizeLegibility; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 7%, rgba(33, 85, 217, .055), transparent 25rem),
    radial-gradient(circle at 88% 22%, rgba(255, 107, 44, .035), transparent 22rem);
}

a, button, input, select, textarea, summary {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(33, 85, 217, .25);
  outline-offset: 3px;
}

.site-header,
.portal-header {
  transition: background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.site-header.is-scrolled,
.portal-header.is-scrolled {
  border-color: rgba(17, 26, 39, .13);
  background: rgba(245, 241, 232, .91);
  box-shadow: 0 10px 28px rgba(17, 26, 39, .08);
  backdrop-filter: blur(16px) saturate(130%);
}

.site-header nav a,
.portal-header nav a,
.info-footer nav a,
.footer-links a {
  position: relative;
  transition: color .18s ease;
}

.site-header nav a::after,
.portal-header nav a:not(.header-action)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--ui-blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .22s var(--ui-ease);
}

.site-header nav a:hover::after,
.site-header nav a.is-current::after,
.portal-header nav a:hover::after,
.portal-header nav a.is-current::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-header nav a.is-current,
.portal-header nav a.is-current,
.info-footer nav a.is-current {
  color: var(--ui-blue);
}

.header-repair-btn,
.header-action,
.primary-action,
.primary-btn,
.info-cta a,
.launch-banner > a,
.success-actions a {
  box-shadow: 0 8px 20px rgba(33, 85, 217, .19);
  transition:
    transform .18s var(--ui-ease),
    box-shadow .18s ease,
    background-color .18s ease;
}

.header-repair-btn:hover,
.header-action:hover,
.primary-action:hover,
.primary-btn:hover,
.info-cta a:hover,
.launch-banner > a:hover,
.success-actions a:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 28px rgba(33, 85, 217, .25);
}

.header-repair-btn:active,
.header-action:active,
.primary-action:active,
.primary-btn:active,
.info-cta a:active,
.launch-banner > a:active,
.success-actions a:active {
  transform: translateY(1px) scale(.985);
  box-shadow: 0 4px 10px rgba(33, 85, 217, .18);
}

.header-repair-btn span,
.primary-action span,
.price-preview-heading a span,
.knowledge-preview a span {
  display: inline-block;
  transition: transform .18s var(--ui-ease);
}

.header-repair-btn:hover span,
.primary-action:hover span,
.price-preview-heading a:hover span,
.knowledge-preview a:hover span {
  transform: translateX(4px);
}

.secondary-action,
.secondary-btn,
.status-pill,
.topic-nav a,
.source-list a {
  transition:
    transform .18s var(--ui-ease),
    color .18s ease,
    border-color .18s ease,
    background-color .18s ease,
    box-shadow .18s ease;
}

.secondary-action:hover,
.secondary-btn:hover,
.status-pill:hover,
.source-list a:hover {
  transform: translateY(-1px);
  border-color: rgba(33, 85, 217, .55);
  box-shadow: var(--ui-shadow-sm);
}

.secondary-action:active,
.secondary-btn:active,
.status-pill:active,
.topic-nav a:active,
.source-list a:active {
  transform: translateY(1px) scale(.99);
}

.service-card,
.capability-grid article,
.price-preview-grid article,
.launch-metrics article,
.price-card,
.bundle,
.build-card,
.custom-estimate article,
.about-service-grid article,
.knowledge-article,
.watch-grid article,
.hero-note {
  transition:
    transform .24s var(--ui-ease),
    border-color .24s ease,
    box-shadow .24s ease;
}

.service-card:hover,
.capability-grid article:hover,
.price-preview-grid article:hover,
.launch-metrics article:hover,
.price-card:hover,
.custom-estimate article:hover,
.about-service-grid article:hover,
.knowledge-article:hover,
.watch-grid article:hover {
  transform: translateY(-4px);
  border-color: rgba(33, 85, 217, .42);
  box-shadow: var(--ui-shadow-md);
}

.bundle:hover,
.build-card:hover,
.hero-note:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(17, 26, 39, .22);
}

.trust-rail > div,
.steps li,
.about-principles article,
.about-mailin li,
.rate-row {
  transition: background-color .18s ease, transform .18s var(--ui-ease);
}

.trust-rail > div:hover,
.steps li:hover,
.about-principles article:hover,
.rate-row:hover {
  background-color: rgba(255, 255, 255, .46);
}

.steps li:hover,
.about-principles article:hover {
  transform: translateX(4px);
}

.knowledge-topics span,
.model-chips span,
.service-tag {
  transition: color .18s ease, background-color .18s ease, transform .18s var(--ui-ease);
}

.knowledge-topics span:hover,
.model-chips span:hover,
.service-tag:hover {
  color: var(--ui-blue);
  background: #e7edff;
  transform: translateY(-2px);
}

.form-section,
.side-card,
.tracking-card,
.estimate-card,
.success-card,
.legal-summary,
.legal-section {
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s var(--ui-ease);
}

.form-section:hover,
.side-card:hover,
.tracking-card:hover,
.estimate-card:hover,
.legal-summary:hover {
  border-color: rgba(33, 85, 217, .3);
  box-shadow: var(--ui-shadow-sm);
}

.field input,
.field select,
.field textarea,
.form-section input,
.form-section select,
.form-section textarea,
.tracking-card input,
.estimate-card input {
  transition:
    border-color .17s ease,
    box-shadow .17s ease,
    background-color .17s ease,
    transform .17s ease;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.form-section input:hover,
.form-section select:hover,
.form-section textarea:hover,
.tracking-card input:hover,
.estimate-card input:hover {
  border-color: #9ea8b6;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.form-section input:focus,
.form-section select:focus,
.form-section textarea:focus,
.tracking-card input:focus,
.estimate-card input:focus {
  border-color: var(--ui-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(33, 85, 217, .11);
  outline: 0;
}

.field.is-filled label {
  color: var(--ui-blue);
}

.field.is-filled input:not(:focus),
.field.is-filled select:not(:focus),
.field.is-filled textarea:not(:focus) {
  background-color: #fbfcff;
}

.symptom-picker span {
  transition:
    transform .17s var(--ui-ease),
    border-color .17s ease,
    color .17s ease,
    background-color .17s ease,
    box-shadow .17s ease;
}

.symptom-picker label:hover span {
  transform: translateY(-2px);
  border-color: rgba(33, 85, 217, .52);
  box-shadow: var(--ui-shadow-sm);
}

.symptom-picker label:active span {
  transform: translateY(1px) scale(.985);
}

.symptom-picker input:checked + span {
  box-shadow: inset 0 0 0 1px var(--ui-blue), 0 6px 16px rgba(33, 85, 217, .12);
}

.step-progress {
  position: relative;
}

.step-node {
  overflow: hidden;
  transition: background-color .25s ease, transform .25s var(--ui-ease);
}

.step-node.active {
  transform: scaleY(1.35);
  box-shadow: 0 3px 10px rgba(33, 85, 217, .25);
}

.step-node.active:last-of-type {
  animation: ui-current-step 1.8s ease-in-out infinite;
}

.step-controls {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-inline: -4px;
  padding: 16px 4px 4px;
  background: linear-gradient(to bottom, transparent, var(--ui-paper) 24%);
}

.faq details {
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.faq details:hover,
.faq details[open] {
  border-color: rgba(33, 85, 217, .4);
  background: rgba(255, 255, 255, .58);
}

.faq details[open] {
  box-shadow: var(--ui-shadow-sm);
}

.faq summary span {
  display: inline-grid;
  place-items: center;
  transition: color .2s ease, transform .25s var(--ui-ease);
}

.faq details[open] summary span {
  color: var(--ui-blue);
  transform: rotate(45deg);
}

.topic-nav a:hover {
  box-shadow: var(--ui-shadow-sm);
}

.ui-ready [data-ui-reveal] {
  opacity: 0;
  transform: translateY(18px);
}

.ui-ready [data-ui-reveal].ui-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .55s ease, transform .55s var(--ui-ease);
}

.ui-ready [data-ui-reveal][data-ui-delay="1"] {
  transition-delay: .06s;
}

.ui-ready [data-ui-reveal][data-ui-delay="2"] {
  transition-delay: .12s;
}

@keyframes ui-current-step {
  0%, 100% { box-shadow: 0 3px 10px rgba(33, 85, 217, .2); }
  50% { box-shadow: 0 3px 18px rgba(33, 85, 217, .42); }
}

@media (max-width: 760px) {
  .site-header.is-scrolled,
  .portal-header.is-scrolled {
    backdrop-filter: blur(12px);
  }

  .service-card:hover,
  .capability-grid article:hover,
  .price-preview-grid article:hover,
  .price-card:hover,
  .custom-estimate article:hover,
  .about-service-grid article:hover,
  .knowledge-article:hover,
  .watch-grid article:hover,
  .bundle:hover,
  .build-card:hover,
  .hero-note:hover {
    transform: none;
  }

  .step-controls {
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .ui-ready [data-ui-reveal] {
    opacity: 1;
    transform: none;
  }
}
