:root {
  color-scheme: light;
  --red: #d51e25;
  --red-dark: #ad151a;
  --grey: #8d9299;
  --ink: #33363b;
  --muted: #7d8288;
  --line: #e4e5e8;
  --soft: #f6f7f8;
  --white: #ffffff;
  --focus: #d51e25;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--white);
  color: var(--ink);
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
}

.brand-arc {
  position: fixed;
  z-index: 0;
  top: -320px;
  right: -350px;
  width: 980px;
  height: 680px;
  border-bottom-left-radius: 90% 72%;
  background: var(--red);
  pointer-events: none;
}

.site-header,
.page-shell,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  width: min(1260px, calc(100vw - 48px));
  margin: 0 auto;
  padding-top: 34px;
}

.top-line {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  gap: 18px;
}

.social-link {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid #5279c6;
  border-radius: 50%;
  color: #5279c6;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--red);
  text-decoration: none;
}

.phone-icon {
  position: relative;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
}

.phone-icon img {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.phone-link small {
  display: block;
  color: var(--grey);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.phone-link strong {
  display: block;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0;
}

.main-nav {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: center;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
}

.brand img {
  width: 202px;
  height: auto;
  display: block;
}

.mobile-menu-toggle {
  display: none;
}

.nav-links {
  display: flex;
  min-height: 58px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  color: #898f96;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links a:hover {
  color: var(--red);
}

.nav-links a:last-child {
  border-right: 0;
}

.page-shell {
  width: min(1260px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 118px 0 64px;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(540px, 1fr);
  align-items: start;
  gap: 70px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-top: 38px;
}

.section-label {
  margin: 0 0 14px;
  color: var(--grey);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 590px;
  margin: 0;
  color: var(--red);
  font-size: 52px;
  font-weight: 300;
  line-height: 1.16;
  letter-spacing: 0;
}

.lead {
  max-width: 540px;
  margin: 28px 0 0;
  color: var(--grey);
  font-size: 16px;
  line-height: 1.7;
  text-align: justify;
}

.cable-backdrop {
  position: fixed;
  z-index: 0;
  top: clamp(300px, 43vh, 390px);
  left: 0;
  width: min(1066px, 78vw);
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  pointer-events: none;
}

.cable-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scaleX(-1);
  animation: none;
  will-change: opacity;
}

.cable-frame:first-child {
  opacity: 1;
}

.cable-backdrop.is-ready .cable-frame {
  animation: cableCrossfade 18s infinite ease-in-out;
}

.cable-backdrop.is-ready .cable-frame:nth-child(1) {
  animation-delay: 0s;
}

.cable-backdrop.is-ready .cable-frame:nth-child(2) {
  animation-delay: 6s;
}

.cable-backdrop.is-ready .cable-frame:nth-child(3) {
  animation-delay: 12s;
}

@keyframes cableCrossfade {
  0%,
  34% {
    opacity: 1;
  }

  42%,
  92% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.license-form {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 28px 70px rgba(51, 54, 59, 0.12);
  padding: 34px;
}

.form-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.form-heading.compact {
  padding-bottom: 4px;
}

.form-kicker {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 400;
}

.field-grid {
  display: grid;
  gap: 18px;
}

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid.lookup-row {
  grid-template-columns: 1fr;
}

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  min-width: 0;
  gap: 7px;
}

label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.lookup-control {
  display: grid;
  grid-template-columns: minmax(210px, 230px) minmax(250px, 1fr);
  gap: 10px;
  max-width: 560px;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d9dbe0;
  border-radius: 0;
  background: var(--soft);
  color: var(--ink);
  padding: 10px 13px;
  font: inherit;
}

input:focus {
  border-color: var(--focus);
  background: var(--white);
  outline: 2px solid rgba(213, 30, 37, 0.14);
  outline-offset: 0;
}

input.invalid {
  border-color: var(--red-dark);
  background: #fff6f6;
}

input::placeholder {
  color: #a5a9af;
}

.company-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: max-height 320ms ease, opacity 220ms ease, transform 220ms ease;
}

.license-form.is-expanded .company-details {
  max-height: 360px;
  opacity: 1;
  transform: translateY(0);
}

.company-details-inner {
  display: grid;
  gap: 18px;
  padding-top: 2px;
}

input[readonly] {
  color: #555b62;
  background: #fbfbfc;
}

.lookup-note {
  min-height: 20px;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.lookup-note.success {
  color: #217247;
  font-weight: 700;
}

.lookup-note.error {
  color: var(--red-dark);
  font-weight: 700;
}

.actions {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.action-buttons {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

button {
  min-height: 46px;
  border: 2px solid var(--red);
  border-radius: 999px;
  background: var(--white);
  color: var(--red);
  cursor: pointer;
  padding: 0 28px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

button:hover {
  background: var(--red);
  color: var(--white);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.download-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--red);
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  padding: 0 28px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.download-button:hover {
  border-color: var(--red-dark);
  background: var(--red-dark);
}

.download-button[hidden] {
  display: none;
}

.lookup-button {
  min-height: 48px;
  white-space: nowrap;
  padding: 0 14px;
  background: var(--red);
  color: var(--white);
}

.lookup-button:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.status:empty {
  display: none;
}

.status.success {
  color: #217247;
  font-weight: 700;
}

.status.error {
  color: var(--red-dark);
  font-weight: 700;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 22px;
  min-height: 64px;
  align-items: center;
  background: var(--red);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 1160px) {
  .brand-arc {
    right: -520px;
  }

  .main-nav {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .nav-links {
    border-radius: 999px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero-copy {
    padding-top: 10px;
  }

  .cable-backdrop {
    top: 48vh;
    left: max(12px, calc(50vw - 460px));
    width: min(920px, 92vw);
  }

  .cable-frame {
    transform: none;
  }
}

@media (max-width: 820px) {
  .site-header,
  .page-shell {
    width: min(100vw - 24px, 680px);
  }

  .site-header {
    padding-top: 18px;
  }

  .brand-arc {
    display: none;
  }

  .top-line {
    justify-content: flex-start;
    min-height: 56px;
  }

  .social-link {
    display: none;
  }

  .phone-icon {
    width: 40px;
    height: 40px;
  }

  .phone-icon img {
    width: 40px;
    height: 40px;
  }

  .phone-link strong {
    font-size: 20px;
  }

  .main-nav {
    grid-template-columns: 1fr auto;
    gap: 16px;
  }

  .brand img {
    width: 184px;
  }

  .mobile-menu-toggle {
    display: grid;
    width: 44px;
    height: 36px;
    min-height: 36px;
    align-self: center;
    place-items: center;
    gap: 4px;
    border: 0;
    border-radius: 7px;
    background: var(--red);
    padding: 8px 10px;
  }

  .mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: var(--white);
  }

  .nav-links {
    display: none;
    grid-column: 1 / -1;
    min-height: auto;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 6px 0 10px;
  }

  .main-nav.is-open .nav-links {
    display: flex;
  }

  .nav-links a {
    min-width: 0;
    min-height: 38px;
    justify-content: center;
    border-right: 0;
    padding: 0 10px;
    color: #858b92;
  }

  .page-shell {
    padding: 42px 0 44px;
  }

  h1 {
    font-size: 38px;
  }

  .lead {
    text-align: left;
  }

  .cable-backdrop {
    top: 52vh;
    left: -96px;
    width: 480px;
    opacity: 0.82;
  }

  .license-form {
    border-radius: 22px;
    padding: 22px;
  }

  .form-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .field-grid.two,
  .field-grid.three {
    grid-template-columns: 1fr;
  }

  .lookup-control {
    grid-template-columns: 1fr;
  }

  .license-form.is-expanded .company-details {
    max-height: 520px;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    align-items: stretch;
  }

  button {
    width: 100%;
  }

  .download-button {
    display: none;
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cable-backdrop.is-ready .cable-frame,
  .cable-frame {
    animation: none;
    opacity: 0;
  }

  .cable-frame:first-child {
    opacity: 1;
  }
}
