/* Avanza AI Studio v86 — launch detail polish
   A precision pass for controls, form behavior, footer finish, and resilient scaling.
   The accepted hero and demo compositions remain intact. */

:root {
  --v86-ink: #0d0e10;
  --v86-paper: #f5f5f3;
  --v86-line: rgba(15, 17, 20, .11);
  --v86-ease: cubic-bezier(.16, 1, .3, 1);
  --v86-focus: 0 0 0 3px rgba(255, 255, 255, .92), 0 0 0 5px rgba(12, 14, 17, .34);
  --v86-safe-inline: max(clamp(16px, 3vw, 48px), env(safe-area-inset-left));
}

html {
  min-width: 320px;
  overflow-x: clip;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: clip;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
[role="button"],
[role="combobox"],
[role="option"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  color: #fff;
  background: rgba(13, 14, 16, .86);
}

.site-shell :where(a, button):focus-visible,
.request-dialog :where(a, button, input, textarea, select):focus-visible,
.legal-page :where(a, button):focus-visible,
.thanks-page :where(a, button):focus-visible {
  outline: 0;
  box-shadow: var(--v86-focus);
}

/* --------------------------------------------------------------------------
   Header and shared controls
   -------------------------------------------------------------------------- */
.site-header .nav-wrap {
  isolation: isolate;
  border-color: rgba(255,255,255,.82);
  box-shadow:
    0 18px 48px rgba(25, 28, 32, .085),
    0 2px 8px rgba(25, 28, 32, .025),
    inset 0 1px 0 rgba(255,255,255,.9);
}

.brand,
.main-nav > a,
.button {
  transition:
    transform .3s var(--v86-ease),
    border-color .22s ease,
    background-color .22s ease,
    color .22s ease,
    box-shadow .3s var(--v86-ease),
    opacity .2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .brand:hover {
    transform: translateY(-1px);
  }

  .main-nav .nav-cta:hover,
  .hero-actions .button:hover,
  .demo-launch-actions .button:hover {
    transform: translateY(-2px);
  }
}

.main-nav .nav-cta:active,
.hero-actions .button:active,
.demo-launch-actions .button:active {
  transform: translateY(0) scale(.985);
}

/* Keep the fixed header comfortable around phone notches and browser zoom. */
.site-header {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* --------------------------------------------------------------------------
   Footer — a deliberate final chapter rather than a utility strip
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  overflow: hidden;
  padding: 0 0 max(24px, env(safe-area-inset-bottom));
  color: #fff;
  background:
    radial-gradient(circle at 13% -10%, rgba(255,255,255,.075), transparent 33%),
    linear-gradient(145deg, #141619 0%, #090a0c 60%, #07080a 100%);
}

.site-footer::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 100% 44px;
  content: "";
  opacity: .32;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 62%);
  mask-image: linear-gradient(to bottom, #000, transparent 62%);
}

.footer-cta,
.footer-wrap,
.footer-meta {
  position: relative;
  z-index: 1;
}

.footer-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
  padding-block: clamp(66px, 8vw, 118px) clamp(54px, 6vw, 88px);
  border-bottom: 1px solid rgba(255,255,255,.105);
}

.footer-cta-copy {
  max-width: 870px;
}

.footer-cta-copy > small {
  display: flex;
  gap: 12px;
  align-items: center;
  color: rgba(255,255,255,.42);
  font-size: clamp(.57rem, .56vw, .66rem);
  font-weight: 750;
  letter-spacing: .16em;
}

.footer-cta-copy > small::after {
  width: 34px;
  height: 1px;
  background: rgba(255,255,255,.22);
  content: "";
}

.footer-cta-copy h2 {
  max-width: 850px;
  margin: clamp(19px, 2vw, 30px) 0 0;
  color: #fff;
  font-size: clamp(2.55rem, 5.15vw, 5.35rem);
  font-weight: 650;
  line-height: .98;
  letter-spacing: -.07em;
}

.footer-cta-copy p {
  max-width: 660px;
  margin: clamp(22px, 2.2vw, 34px) 0 0;
  color: rgba(255,255,255,.48);
  font-size: clamp(.86rem, .86vw, 1rem);
  line-height: 1.72;
}

.footer-cta-button {
  display: inline-flex;
  min-width: clamp(190px, 16vw, 228px);
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 18px 0 23px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 999px;
  color: #111214;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0,0,0,.25), inset 0 1px 0 #fff;
  font-size: .76rem;
  font-weight: 750;
  transition: transform .3s var(--v86-ease), box-shadow .3s var(--v86-ease), background .2s ease;
}

.footer-cta-button i {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #111214;
}

.footer-cta-button i::before,
.footer-cta-button i::after {
  position: absolute;
  content: "";
}

.footer-cta-button i::before {
  width: 8px;
  height: 1px;
  background: #fff;
}

.footer-cta-button i::after {
  width: 5px;
  height: 5px;
  border-top: 1px solid #fff;
  border-right: 1px solid #fff;
  transform: translateX(1px) rotate(45deg);
}

@media (hover: hover) and (pointer: fine) {
  .footer-cta-button:hover {
    color: #111214;
    background: #f3f3f1;
    box-shadow: 0 24px 58px rgba(0,0,0,.34), inset 0 1px 0 #fff;
    transform: translateY(-3px);
  }

  .footer-links a:hover,
  .footer-contact a:hover {
    color: #fff;
  }
}

.footer-cta-button:active {
  transform: translateY(0) scale(.985);
}

.site-footer .footer-wrap {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  gap: clamp(34px, 5vw, 82px);
  align-items: start;
  padding-block: clamp(38px, 4vw, 58px);
}

.site-footer .footer-brand-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 14px;
}

.site-footer .footer-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 13px;
  background: rgba(255,255,255,.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.site-footer .footer-brand-link strong {
  font-size: .82rem;
  font-weight: 720;
  letter-spacing: -.025em;
}

.site-footer .footer-brand-link small {
  max-width: 310px;
  margin-top: 5px;
  color: rgba(255,255,255,.37);
  font-size: .63rem;
  line-height: 1.45;
}

.site-footer .footer-contact {
  min-width: 220px;
  text-align: left;
}

.site-footer .footer-contact small,
.site-footer .footer-links::before {
  color: rgba(255,255,255,.32);
  font-size: .56rem;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.site-footer .footer-contact a {
  display: inline-block;
  margin-top: 11px;
  color: rgba(255,255,255,.78);
  font-size: .72rem;
  font-weight: 650;
  text-underline-offset: 4px;
}

.site-footer .footer-links {
  grid-column: auto;
  display: grid;
  min-width: 150px;
  gap: 11px;
  padding: 0;
  border: 0;
}

.site-footer .footer-links::before {
  margin-bottom: 4px;
  content: "Explore";
}

.site-footer .footer-links a {
  width: fit-content;
  color: rgba(255,255,255,.5);
  font-size: .66rem;
  font-weight: 620;
  line-height: 1.55;
}

.site-footer .footer-links a span {
  margin-left: 3px;
  color: rgba(255,255,255,.28);
}

.site-footer .footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  padding-top: 21px;
  border-top: 1px solid rgba(255,255,255,.075);
  color: rgba(255,255,255,.25);
  font-size: .54rem;
  letter-spacing: .025em;
}

/* --------------------------------------------------------------------------
   Request dialog — precise geometry and resilient viewport behavior
   -------------------------------------------------------------------------- */
.request-dialog {
  width: min(1220px, calc(100vw - max(24px, env(safe-area-inset-left) + env(safe-area-inset-right) + 20px)));
  max-height: calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 20px));
  border-color: rgba(255,255,255,.14);
  border-radius: clamp(24px, 2.35vw, 36px);
  box-shadow: 0 55px 150px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.09);
}

.request-dialog-shell {
  max-height: calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 20px));
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}

.request-dialog-shell::-webkit-scrollbar {
  width: 9px;
}

.request-dialog-shell::-webkit-scrollbar-track {
  background: transparent;
}

.request-dialog-shell::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
  background-clip: padding-box;
}

.request-dialog-close {
  isolation: isolate;
  width: 44px;
  height: 44px;
  border-color: rgba(255,255,255,.15);
  background: rgba(255,255,255,.075);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 8px 24px rgba(0,0,0,.16);
}

.request-dialog-close span {
  position: absolute;
  inset: 0;
  display: block;
  font-size: 0;
  transform: none;
}

.request-dialog-close span::before,
.request-dialog-close span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 1.25px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform-origin: center;
}

.request-dialog-close span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.request-dialog-close span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.request-dialog-close:hover,
.request-dialog-close:focus-visible {
  transform: translateY(-1px) rotate(0deg);
}

.request-dialog .request-dialog-content,
.request-dialog .contact-wrap {
  grid-template-columns: minmax(0, .92fr) minmax(470px, 1.08fr);
  gap: clamp(42px, 6vw, 86px);
  padding: clamp(54px, 5vw, 72px);
  padding-top: clamp(66px, 5.5vw, 82px);
  background:
    radial-gradient(circle at 8% 0%, rgba(255,255,255,.08), transparent 35%),
    linear-gradient(145deg, #1b1d21 0%, #0b0c0e 68%);
}

.request-dialog .contact-copy {
  align-self: center;
}

.request-dialog .contact-copy h2 {
  max-width: 610px;
  font-size: clamp(2.65rem, 4.1vw, 4.25rem);
  font-weight: 650;
  line-height: .98;
  letter-spacing: -.066em;
}

.request-dialog .contact-copy > p:not(.chapter-label) {
  max-width: 560px;
  color: rgba(255,255,255,.48);
  line-height: 1.72;
}

.request-dialog .contact-trust {
  gap: 11px;
}

.request-dialog .contact-trust span {
  color: rgba(255,255,255,.6);
  font-size: .66rem;
}

.request-dialog .contact-trust i {
  position: relative;
  width: 20px;
  height: 20px;
  border-color: rgba(255,255,255,.18);
  border-radius: 7px;
  background: rgba(255,255,255,.035);
}

.request-dialog .contact-trust i::before {
  position: absolute;
  top: 5px;
  left: 7px;
  width: 4px;
  height: 7px;
  border-right: 1.25px solid rgba(255,255,255,.9);
  border-bottom: 1.25px solid rgba(255,255,255,.9);
  content: "";
  transform: rotate(42deg);
}

.request-dialog .contact-call {
  min-height: 42px;
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055);
}

.request-dialog .contact-email {
  width: fit-content;
  color: rgba(255,255,255,.86);
  text-underline-offset: 4px;
}

.request-dialog .contact-form {
  position: relative;
  overflow: visible;
  gap: 14px;
  padding: clamp(20px, 2vw, 28px);
  border-color: rgba(255,255,255,.105);
  border-radius: 22px;
  background: rgba(255,255,255,.043);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 22px 70px rgba(0,0,0,.14);
}

.request-dialog .contact-form label,
.request-dialog .form-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.request-dialog .contact-form label > span,
.request-dialog .form-field > label {
  color: rgba(255,255,255,.58);
  font-size: .61rem;
  font-weight: 650;
  line-height: 1.3;
}

.request-dialog .contact-form input,
.request-dialog .contact-form select,
.request-dialog .contact-form textarea,
.request-dialog .custom-select-button {
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  color: #fff;
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.028);
  outline: 0;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.request-dialog .contact-form input,
.request-dialog .contact-form select,
.request-dialog .custom-select-button {
  min-height: 52px;
  padding: 0 14px;
}

.request-dialog .contact-form textarea {
  min-height: clamp(150px, 18dvh, 188px);
  padding: 14px;
  resize: none;
  line-height: 1.55;
}

.request-dialog .contact-form input::placeholder,
.request-dialog .contact-form textarea::placeholder {
  color: rgba(255,255,255,.27);
  opacity: 1;
}

.request-dialog .contact-form input:hover,
.request-dialog .contact-form textarea:hover,
.request-dialog .custom-select-button:hover {
  border-color: rgba(255,255,255,.19);
  background: rgba(255,255,255,.065);
}

.request-dialog .contact-form input:focus,
.request-dialog .contact-form textarea:focus,
.request-dialog .custom-select-button:focus-visible,
.request-dialog .custom-select.is-open .custom-select-button {
  border-color: rgba(255,255,255,.36);
  background: rgba(255,255,255,.075);
  box-shadow: 0 0 0 3px rgba(255,255,255,.055), inset 0 1px 0 rgba(255,255,255,.04);
}

.request-dialog .contact-form input:-webkit-autofill,
.request-dialog .contact-form input:-webkit-autofill:hover,
.request-dialog .contact-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  box-shadow: 0 0 0 1000px #222428 inset, 0 0 0 3px rgba(255,255,255,.045);
  transition: background-color 9999s ease-out;
}

.request-dialog .contact-form :where(input, textarea, select):user-invalid,
.request-dialog .custom-select.is-invalid .custom-select-button {
  border-color: rgba(255, 130, 130, .58);
  box-shadow: 0 0 0 3px rgba(255, 96, 96, .075);
}

.request-dialog .button-light-submit {
  min-height: 55px;
  border-radius: 999px;
  box-shadow: 0 16px 38px rgba(0,0,0,.22), inset 0 1px 0 #fff;
}

.request-dialog .button-light-submit:disabled {
  cursor: wait;
  opacity: .68;
}

.request-dialog .form-note {
  line-height: 1.5;
}

.request-dialog .form-status {
  display: flex;
  min-height: 0;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.55;
}

.request-dialog .form-status:empty {
  display: none;
}

.request-dialog .form-status.is-success::before {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 43%, #fff 43% 51%, transparent 51%) 4px 7px / 5px 5px no-repeat,
    linear-gradient(45deg, transparent 47%, #fff 47% 55%, transparent 55%) 7px 4px / 5px 8px no-repeat;
  content: "";
}

/* Custom combobox. The native select remains in place until JS enhances it. */
.custom-select-field {
  position: relative;
}

.custom-select {
  position: relative;
  min-width: 0;
}

.custom-select.is-enhanced .custom-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}

.custom-select-button {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 12px;
  padding-right: 10px !important;
  text-align: left;
  cursor: pointer;
}

.custom-select-value {
  overflow: hidden;
  color: #fff;
  font-size: .88rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-button.is-placeholder .custom-select-value {
  color: rgba(255,255,255,.42);
}

.custom-select-chevron {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px;
  background: rgba(255,255,255,.035);
}

.custom-select-chevron::before {
  width: 6px;
  height: 6px;
  border-right: 1.25px solid rgba(255,255,255,.56);
  border-bottom: 1.25px solid rgba(255,255,255,.56);
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform .25s var(--v86-ease);
}

.custom-select.is-open .custom-select-chevron::before {
  transform: translateY(2px) rotate(225deg);
}

.custom-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  max-height: min(330px, 42dvh);
  padding: 7px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  background: #1d1f23;
  box-shadow: 0 26px 70px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.065);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.985);
  transform-origin: top;
  transition: opacity .16s ease, visibility .16s ease, transform .24s var(--v86-ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}

.custom-select.is-dropup .custom-select-menu {
  top: auto;
  bottom: calc(100% + 8px);
  transform-origin: bottom;
}

.custom-select.is-open .custom-select-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.custom-select-option {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  padding: 9px 10px 9px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,.68);
  font-size: .76rem;
  font-weight: 570;
  line-height: 1.35;
  cursor: pointer;
}

.custom-select-option + .custom-select-option {
  margin-top: 2px;
}

.custom-select-option:hover,
.custom-select-option.is-active {
  color: #fff;
  background: rgba(255,255,255,.075);
}

.custom-select-option[aria-selected="true"] {
  color: #fff;
  background: rgba(255,255,255,.095);
}

.custom-select-option::after {
  justify-self: center;
  width: 5px;
  height: 9px;
  border-right: 1.4px solid transparent;
  border-bottom: 1.4px solid transparent;
  content: "";
  transform: rotate(42deg);
}

.custom-select-option[aria-selected="true"]::after {
  border-color: rgba(255,255,255,.92);
}

/* --------------------------------------------------------------------------
   Demo micro-controls — one exact close-glyph system
   -------------------------------------------------------------------------- */
.demo-experience-back > span:last-child {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  color: currentColor;
  font-size: 0 !important;
}

.demo-experience-back > span:last-child::before,
.demo-experience-back > span:last-child::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 1px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.demo-experience-back > span:last-child::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.demo-experience-back > span:last-child::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.agent-apps-close span,
.agent-apps-close span::after,
.demo-experience .agent-close-glyph::before,
.demo-experience .agent-close-glyph::after {
  height: 1.15px;
  border-radius: 999px;
}

.agent-apps-close,
.demo-experience .agent-action-head > button {
  -webkit-tap-highlight-color: transparent;
}

.demo-experience :where(button, [role="button"]):focus-visible {
  outline: 0;
}

/* --------------------------------------------------------------------------
   Legal and confirmation pages
   -------------------------------------------------------------------------- */
.legal-page,
.thanks-page {
  min-height: 100dvh;
  padding:
    max(clamp(22px, 5vw, 64px), env(safe-area-inset-top))
    max(clamp(16px, 4vw, 48px), env(safe-area-inset-right))
    max(clamp(22px, 5vw, 64px), env(safe-area-inset-bottom))
    max(clamp(16px, 4vw, 48px), env(safe-area-inset-left));
}

.legal-card,
.thanks-card {
  border-color: rgba(20,22,25,.1);
  box-shadow: 0 36px 100px rgba(22,25,29,.1), inset 0 1px 0 rgba(255,255,255,.8);
}

.legal-card a,
.thanks-card a {
  text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
   Responsive and zoom resilience
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .footer-cta {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-cta-button {
    min-width: 0;
    width: min(100%, 260px);
  }

  .site-footer .footer-wrap {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-footer .footer-links {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, max-content);
    gap: 12px 24px;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,.075);
  }

  .site-footer .footer-links::before {
    grid-column: 1 / -1;
  }

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

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

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

@media (max-width: 720px) {
  .request-dialog .contact-form {
    grid-template-columns: 1fr;
  }

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

  .site-footer .footer-wrap {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .site-footer .footer-brand-link,
  .site-footer .footer-contact,
  .site-footer .footer-links {
    justify-self: stretch;
  }

  .site-footer .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer .footer-meta {
    align-items: flex-start;
    flex-direction: column;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .footer-cta {
    gap: 30px;
    padding-block: 58px 50px;
  }

  .footer-cta-copy h2 {
    font-size: clamp(2.4rem, 12vw, 3.35rem);
    letter-spacing: -.064em;
  }

  .footer-cta-button {
    width: 100%;
    min-height: 56px;
  }

  .site-footer .footer-wrap {
    gap: 32px;
    padding-block: 38px;
  }

  .site-footer .footer-contact {
    min-width: 0;
  }

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

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

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

  .request-dialog .request-dialog-content,
  .request-dialog .contact-wrap {
    gap: 31px;
    padding: 58px 18px 22px;
  }

  .request-dialog .contact-copy h2 {
    font-size: clamp(2.3rem, 11.6vw, 3.18rem);
    line-height: .98;
  }

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

  .request-dialog .contact-form {
    padding: 15px;
    border-radius: 19px;
  }

  .request-dialog .contact-form input,
  .request-dialog .contact-form select,
  .request-dialog .custom-select-button,
  .request-dialog .contact-form textarea {
    font-size: 16px; /* prevents focus zoom on iOS */
  }

  .request-dialog .contact-form textarea {
    min-height: 164px;
  }

  .custom-select-menu {
    max-height: min(315px, 43dvh);
  }
}

@media (max-width: 355px) {
  body[data-phase="focused-site-phase-1"] .brand-copy {
    display: none;
  }

  body[data-phase="focused-site-phase-1"] .main-nav .nav-cta {
    padding-inline: 12px;
  }

  .footer-cta-copy h2 {
    font-size: 2.25rem;
  }
}

/* Browser zoom and short laptop windows should scroll cleanly instead of compressing. */
@media (max-height: 720px) and (min-width: 821px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
    min-height: 680px !important;
  }

  .request-dialog .request-dialog-content,
  .request-dialog .contact-wrap {
    gap: 42px;
    padding: 44px 52px;
    padding-top: 58px;
  }

  .request-dialog .contact-copy h2 {
    font-size: clamp(2.45rem, 7.5dvh, 3.55rem);
  }

  .request-dialog .contact-copy > p:not(.chapter-label) {
    margin-top: 18px;
    line-height: 1.58;
  }

  .request-dialog .contact-trust {
    margin-top: 20px;
  }

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

  .request-dialog .contact-form textarea {
    min-height: 118px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .custom-select-menu,
  .custom-select-chevron::before,
  .footer-cta-button,
  .brand,
  .main-nav > a,
  .button {
    transition-duration: .001ms !important;
  }
}

@media (forced-colors: active) {
  .request-dialog .contact-trust i,
  .custom-select-chevron,
  .footer-cta-button i {
    forced-color-adjust: none;
  }

  .custom-select-option[aria-selected="true"] {
    outline: 1px solid CanvasText;
  }
}

/* Footer sits on a dark field, so the light mark is the correct identity variant. */
.site-footer .footer-mark .logo-light { display: block; }
.site-footer .footer-mark .logo-dark { display: none; }
