/* The demo's start page in gateway.one's corporate design: blue and orange
   lead, beige supports, IBM Plex Sans throughout. Its figure is the gateway:
   arches in the brand colours, and a dotted route that links the four stops. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* The site ships no heavier cut: titles take the SemiBold for every bold weight. */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
  font-weight: 600 700;
  font-display: swap;
}

:root {
  --blue: #002da5;
  --orange: #fab400;
  --beige: #e6d2b4;
  --ink: #14171f;
  --white: #fff;
  --beige-light: color-mix(in srgb, var(--beige) 38%, var(--white));
  --rule: color-mix(in srgb, var(--blue) 14%, var(--white));
  --font: "IBM Plex Sans", Inter, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --max: 74rem;
  --gutter: clamp(1.25rem, 4.5vw, 3.5rem);
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

body.locked {
  background: var(--blue);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.08;
  color: var(--blue);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
}

h3 {
  font-size: 1.35rem;
  line-height: 1.2;
}

p {
  margin: 0;
}

a {
  color: var(--blue);
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.noscript {
  margin: 0;
  padding: 2rem var(--gutter);
  color: var(--white);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

.eyebrow--light {
  color: var(--white);
}

.lead {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
}

.pill {
  padding: 0.3rem 0.75rem;
  border: 1.5px solid var(--blue);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.link-button {
  padding: 0.25rem 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.cta {
  display: inline-block;
  margin-top: 1.75rem;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  background: var(--blue);
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 0 -0.15rem var(--orange);
}

/* --- the gateway: three arches and a sun ---------------------------------- */

.arch,
.gate__arch {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 999px 999px 0 0;
}

.arch span,
.gate__arch span {
  position: absolute;
  border-radius: inherit;
}

.arch span:nth-child(1),
.gate__arch span:nth-child(1) {
  inset: 13% 13% 0;
}

.arch span:nth-child(2),
.gate__arch span:nth-child(2) {
  inset: 29% 29% 0;
}

.arch i,
.gate__arch i {
  position: absolute;
  top: -7%;
  right: -5%;
  width: 24%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--orange);
}

.arch {
  justify-self: end;
  width: min(100%, 23rem);
  background: var(--beige);
}

.arch span:nth-child(1) {
  background: var(--blue);
}

.arch span:nth-child(2) {
  background: var(--white);
}

/* --- the gate --------------------------------------------------------------- */

.gate {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100dvh;
  padding: var(--gutter) var(--edge);
  overflow: hidden;
  color: var(--white);
}

.gate__arch {
  position: absolute;
  right: max(-4rem, calc(var(--edge) - 6rem));
  bottom: 0;
  width: min(42vw, 34rem);
  background: color-mix(in srgb, var(--white) 9%, transparent);
}

.gate__arch span:nth-child(1) {
  background: var(--orange);
}

.gate__arch span:nth-child(2) {
  background: var(--blue);
}

.gate__arch i {
  background: var(--beige);
}

.gate__panel {
  position: relative;
  max-width: 35rem;
}

.gate__panel > * {
  animation: rise 0.7s var(--ease) both;
}

.gate__panel > :nth-child(2) {
  animation-delay: 0.06s;
}

.gate__panel > :nth-child(3) {
  animation-delay: 0.12s;
}

.gate__panel > :nth-child(4) {
  animation-delay: 0.18s;
}

.gate__panel > :nth-child(5) {
  animation-delay: 0.24s;
}

.gate__panel > :nth-child(6) {
  animation-delay: 0.3s;
}

.gate__arch {
  animation: lift 1s var(--ease) both;
}

.gate__logo {
  display: block;
  width: 11.75rem;
  height: auto;
  margin-bottom: clamp(2.5rem, 8vh, 5rem);
}

.gate__title {
  font-size: clamp(2.25rem, 4.6vw, 3.6rem);
  color: var(--white);
}

.gate__lead {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  color: color-mix(in srgb, var(--white) 88%, var(--blue));
}

.gate__form {
  margin-top: 2.25rem;
}

.gate__form label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gate__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gate__row input {
  flex: 1 1 14rem;
  min-width: 0;
  height: 3.5rem;
  padding: 0 1.1rem;
  border: 2px solid var(--white);
  border-radius: 14px;
  background: var(--white);
  font: inherit;
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.gate__row button {
  flex: 0 0 auto;
  height: 3.5rem;
  padding: 0 1.6rem;
  border: 0;
  border-radius: 14px;
  background: var(--orange);
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}

.gate__row button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.gate__row button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.gate__message {
  min-height: 1.6rem;
  margin-top: 0.9rem;
  font-weight: 500;
}

.gate__message:not(:empty) {
  padding-left: 0.85rem;
  border-left: 3px solid var(--orange);
}

.gate__note {
  margin-top: 2.5rem;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--white) 72%, var(--blue));
}

/* --- the page --------------------------------------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.9rem var(--edge);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--white) 92%, transparent);
  backdrop-filter: blur(10px);
}

.top__brand img {
  display: block;
  width: 10.5rem;
  height: auto;
}

.top__nav {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
  font-size: 0.9375rem;
  font-weight: 500;
}

.top__nav a {
  padding: 0.25rem 0;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(var(--orange), var(--orange)) no-repeat 0 100% / 0 2px;
  transition: background-size 0.25s var(--ease);
}

.top__nav a:hover {
  background-size: 100% 2px;
}

.top__state {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* The route: a dotted line in the left margin, a numbered stop per section. */
.route {
  position: relative;
}

.route::before {
  content: "";
  position: absolute;
  top: 7rem;
  bottom: 7rem;
  left: calc(var(--edge) + 1rem - 1px);
  width: 2px;
  background: repeating-linear-gradient(var(--orange) 0 6px, transparent 6px 14px);
}

.stop__no {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--orange);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--white);
}

.hero,
.plain {
  position: relative;
  padding: clamp(3.5rem, 9vw, 7.5rem) var(--edge);
}

/* The stop's number stays on the route; everything else stands clear of it. */
.hero__text > :not(.eyebrow),
.plain > :not(.eyebrow) {
  margin-left: clamp(0rem, 4vw, 3.75rem);
}

.plain > h2 {
  max-width: 22ch;
  margin-bottom: 2.5rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(transparent 64%, var(--orange) 64% 92%, transparent 92%);
}

.hero .lead {
  max-width: 38rem;
  margin-top: 1.5rem;
}

.hero__search {
  max-width: 38rem;
  min-height: 3.5rem;
  margin-top: 2.25rem;
}

.hint {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: color-mix(in srgb, var(--ink) 70%, var(--white));
}

.band {
  position: relative;
  background: var(--blue);
  color: var(--white);
}

.band__inner {
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--edge);
}

.band__head {
  max-width: 44rem;
  margin-bottom: 2.5rem;
}

.band__head h2 {
  margin-bottom: 1rem;
  color: var(--white);
}

.band .stop__no {
  background: var(--white);
  box-shadow: 0 0 0 3px var(--blue), 0 0 0 5px var(--orange);
  color: var(--blue);
}

.modes {
  display: grid;
  grid-template-columns: minmax(15rem, 21rem) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}

.modes__list {
  display: grid;
  gap: 0.75rem;
}

.mode {
  display: grid;
  gap: 0.35rem;
  padding: 1.05rem 1.2rem 1.15rem;
  border: 1.5px solid color-mix(in srgb, var(--white) 38%, transparent);
  border-radius: 16px;
  background: transparent;
  font: inherit;
  text-align: left;
  color: var(--white);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.mode:hover {
  border-color: var(--white);
  transform: translateX(4px);
}

.mode__name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.mode__text {
  font-size: 0.9375rem;
  line-height: 1.45;
  opacity: 0.86;
}

.mode[aria-pressed="true"] {
  border-color: var(--white);
  background: var(--white);
  box-shadow: inset 6px 0 0 var(--orange);
  color: var(--ink);
  transform: none;
}

.mode[aria-pressed="true"] .mode__name {
  color: var(--blue);
}

.modes__chat {
  height: min(44rem, 80vh);
  min-height: 34rem;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 2.5rem 4rem -2rem rgb(0 0 0 / 55%);
  overflow: hidden;
}

.modes__chat iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.forms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.form-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.6rem;
  padding: 1.5rem;
  border-radius: 18px;
  background: var(--beige-light);
}

.form-card pre {
  margin: 0.75rem 0 0;
  padding: 1rem;
  border-radius: 12px;
  background: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--white);
  overflow-x: auto;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding-top: 1rem;
  border-top: 3px solid var(--orange);
}

.facts strong {
  display: block;
  font-weight: 700;
  color: var(--blue);
}

.products {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 0 var(--edge) 0 calc(var(--edge) + clamp(0rem, 4vw, 3.75rem));
}

.product {
  display: grid;
  gap: 0.6rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1.5px solid var(--beige);
  border-radius: 22px;
  background: var(--white);
  box-shadow: inset 0 6px 0 var(--orange);
}

.product--blue {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: none;
  color: var(--white);
}

.product--blue h3 {
  color: var(--white);
}

.partner {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.partner__text p + p {
  margin-top: 1rem;
}

/* A glimpse of the partner page: its paper, its red and its serif. */
.partner__card {
  display: grid;
  gap: 0.6rem;
  justify-items: start;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid rgb(197 22 29 / 28%);
  border-radius: 6px;
  background: #f5efe6
    linear-gradient(rgb(197 22 29 / 8%) 1px, transparent 1px) 0 0 / 100% 1.75rem;
  box-shadow: 1.25rem 1.25rem 0 var(--beige-light);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color: #1d1513;
  transform: rotate(-2deg);
}

.partner__mark {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.6rem;
  background: #c5161d;
}

.partner__name {
  font-size: 1.125rem;
  letter-spacing: 0.02em;
}

.partner__line {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.partner__chat {
  margin-top: 0.75rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: #c5161d;
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--white);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2.5rem;
  margin-top: clamp(3rem, 7vw, 6rem);
  padding: 2.5rem var(--edge);
  background: var(--blue);
  font-size: 0.9375rem;
  color: var(--white);
}

.foot img {
  display: block;
  width: 9.5rem;
  height: auto;
}

.foot p {
  flex: 1 1 22rem;
  max-width: 40rem;
}

.foot a {
  color: var(--white);
}

/* --- motion ----------------------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
}

@keyframes lift {
  from {
    opacity: 0;
    transform: translateY(18%);
  }
}

.hero__text > * {
  animation: rise 0.7s var(--ease) both;
}

.hero__text > :nth-child(2) {
  animation-delay: 0.07s;
}

.hero__text > :nth-child(3) {
  animation-delay: 0.14s;
}

.hero__text > :nth-child(4) {
  animation-delay: 0.21s;
}

.hero__text > :nth-child(5) {
  animation-delay: 0.28s;
}

.arch {
  animation: lift 0.9s var(--ease) 0.1s both;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* --- narrow screens --------------------------------------------------------- */

@media (max-width: 60rem) {
  .hero,
  .modes,
  .partner {
    grid-template-columns: minmax(0, 1fr);
  }

  .arch {
    display: none;
  }

  .forms,
  .facts,
  .products {
    grid-template-columns: minmax(0, 1fr);
  }

  .top__nav {
    display: none;
  }

  .top__state {
    margin-left: auto;
  }

  .gate__arch {
    right: -30%;
    width: 80vw;
    opacity: 0.35;
  }

  .partner__card {
    transform: none;
  }
}

@media (max-width: 40rem) {
  .route::before {
    display: none;
  }

  .hero__text > :not(.eyebrow),
  .plain > :not(.eyebrow) {
    margin-left: 0;
  }

  .products {
    padding: 0 var(--edge);
  }

  .modes__chat {
    height: 36rem;
  }
}
