/* Avanza AI Studio v68 — Phase 1 focused-site reduction
   Scope: header simplification, request dialog, and compact footer only.
   The accepted hero and current demo compositions are intentionally untouched. */

body[data-phase="focused-site-phase-1"] .nav-toggle {
  display: none !important;
}

body[data-phase="focused-site-phase-1"] .main-nav,
body[data-phase="focused-site-phase-1"] .site-header.on-dark .main-nav {
  position: static !important;
  display: flex !important;
  align-items: center;
  gap: 20px !important;
  width: auto;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: inherit;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body[data-phase="focused-site-phase-1"] .main-nav .nav-cta {
  margin: 0;
}

/* The legacy sliding tracker was built for the former multi-tab navigation.
   The focused header uses a local underline that can never drift beneath the brand. */
body[data-phase="focused-site-phase-1"] .nav-tracker {
  display: none !important;
}

body[data-phase="focused-site-phase-1"] .main-nav > a[data-demo-nav] {
  position: relative;
}

body[data-phase="focused-site-phase-1"] .main-nav > a[data-demo-nav]::after {
  display: block !important;
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .26s cubic-bezier(.16,1,.3,1), opacity .18s ease;
  pointer-events: none;
}

body[data-phase="focused-site-phase-1"] .main-nav > a[data-demo-nav]:hover::after,
body[data-phase="focused-site-phase-1"] .main-nav > a[data-demo-nav]:focus-visible::after {
  opacity: 0;
  transform: scaleX(0);
}

body[data-phase="focused-site-phase-1"] .main-nav > a[data-demo-nav].active::after,
body[data-phase="focused-site-phase-1"] .main-nav > a[data-demo-nav][aria-current="location"]::after {
  opacity: 1;
  transform: scaleX(1);
}

body[data-phase="focused-site-phase-1"] .footer-links {
  gap: 13px 28px;
}

body[data-phase="focused-site-phase-1"] .footer-meta {
  justify-content: flex-start;
}

body.request-dialog-open {
  overflow: hidden;
}

.request-dialog {
  width: min(1180px, calc(100vw - 34px));
  max-width: none;
  max-height: calc(100dvh - 34px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 34px;
  color: #fff;
  background: #090a0c;
  box-shadow: 0 48px 140px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.08);
}

.request-dialog[open] {
  animation: request-dialog-enter .34s cubic-bezier(.2,.75,.2,1) both;
}

.request-dialog::backdrop {
  background: rgba(5,6,8,.62);
  backdrop-filter: blur(18px) saturate(.8);
  -webkit-backdrop-filter: blur(18px) saturate(.8);
  animation: request-backdrop-enter .26s ease both;
}

.request-dialog-shell {
  position: relative;
  max-height: calc(100dvh - 34px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}

.request-dialog-close {
  position: sticky;
  z-index: 8;
  top: 15px;
  float: right;
  display: grid;
  width: 44px;
  height: 44px;
  margin: 15px 15px -59px 0;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.075);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.request-dialog-close:hover,
.request-dialog-close:focus-visible {
  border-color: rgba(255,255,255,.26);
  background: rgba(255,255,255,.14);
  transform: translateY(-1px);
}

.request-dialog-close span {
  font-size: 1.45rem;
  font-weight: 300;
  line-height: 1;
  transform: translateY(-1px);
}

.request-dialog .request-dialog-content,
.request-dialog .contact-wrap {
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: clamp(34px, 4.4vw, 64px);
  padding-top: clamp(58px, 5vw, 76px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background:
    radial-gradient(circle at 10% 0%, rgba(255,255,255,.075), transparent 34%),
    linear-gradient(145deg,#191b1f,#090a0c 70%);
}

.request-dialog .contact-wrap::after {
  display: none;
}

.request-dialog .contact-copy h2 {
  max-width: 690px;
  font-size: clamp(2.55rem, 4.15vw, 4.45rem);
}

.request-dialog .contact-copy > p:not(.chapter-label) {
  max-width: 620px;
}

.request-dialog .contact-form {
  align-self: start;
}

@keyframes request-dialog-enter {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: none; }
}

@keyframes request-backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 980px) {
  body[data-phase="focused-site-phase-1"] .main-nav,
  body[data-phase="focused-site-phase-1"] .site-header.on-dark .main-nav {
    margin-left: auto;
  }

  body[data-phase="focused-site-phase-1"] .main-nav > a:not(.nav-cta),
  body[data-phase="focused-site-phase-1"] .main-nav .nav-tracker {
    display: none !important;
  }

  body[data-phase="focused-site-phase-1"] .main-nav .nav-cta {
    min-height: 44px;
    padding-inline: 16px;
    font-size: .75rem;
  }

  .request-dialog .request-dialog-content,
  .request-dialog .contact-wrap {
    grid-template-columns: 1fr;
    gap: 38px;
  }
}

@media (max-width: 640px) {
  body[data-phase="focused-site-phase-1"] .brand-copy strong {
    font-size: .78rem;
  }

  body[data-phase="focused-site-phase-1"] .main-nav .nav-cta {
    min-height: 42px;
    padding-inline: 13px;
    font-size: .7rem;
  }

  .request-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 25px;
  }

  .request-dialog-shell {
    max-height: calc(100dvh - 16px);
  }

  .request-dialog-close {
    top: 10px;
    width: 40px;
    height: 40px;
    margin: 10px 10px -50px 0;
  }

  .request-dialog .request-dialog-content,
  .request-dialog .contact-wrap {
    width: 100%;
    gap: 30px;
    padding: 58px 18px 22px;
  }

  .request-dialog .contact-copy h2 {
    font-size: clamp(2.35rem, 11.5vw, 3.25rem);
  }

  .request-dialog .contact-copy > p:not(.chapter-label) {
    margin-top: 19px;
    font-size: .85rem;
  }

  .request-dialog .contact-direct {
    margin-top: 30px;
  }

  .request-dialog .contact-form {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .request-dialog .contact-form label,
  .request-dialog .wide-field,
  .request-dialog .message-field,
  .request-dialog .contact-form > .button,
  .request-dialog .form-note,
  .request-dialog .form-status {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .request-dialog[open],
  .request-dialog::backdrop {
    animation: none;
  }
}
