/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.hero__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 80% 40%;
}

.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__shade--side {
  background: linear-gradient(90deg, var(--bg-96) 0%, var(--bg-85) 34%, var(--bg-30) 62%, var(--bg-0) 82%);
}

.hero__shade--bottom {
  background: linear-gradient(180deg, var(--bg-35) 0%, var(--bg-0) 16%, var(--bg-0) 46%, var(--bg-80) 80%, var(--bg) 100%);
}

.hero__body {
  position: relative;
  padding-top: 28px;
  padding-bottom: 72px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.hero__intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 640px;
  padding-top: 48px;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(52px, 6vw, 84px);
  line-height: .9;
  color: var(--gold-title);
  text-shadow: 0 2px 40px var(--shade-60);
}

.hero__lead {
  margin: 0;
  max-width: 580px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
  text-shadow: 0 1px 12px var(--shade-70);
}

.contents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 12px 24px;
  padding-top: 24px;
}

.contents__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 44px;
  padding: 4px 0 4px 16px;
  border-left: 1px solid var(--gold-line-50);
  transition: border-color 150ms ease;
}

.contents__summary {
  font-size: 14px;
  color: var(--muted-2);
}

.contents__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 23px;
  line-height: 1.1;
  letter-spacing: .02em;
  color: var(--gold-text);
  transition: color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .contents__link:hover {
    border-color: var(--aether-70);
  }

  .contents__link:hover .contents__title {
    color: var(--white);
  }
}

.contents__link:focus-visible {
  outline: 2px solid var(--aether);
  outline-offset: 4px;
}

/* Chapter */

.chapter {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chapter__picture {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 14px;
  outline: 1px solid var(--gold-line-34);
  outline-offset: -1px;
  background: var(--bg-deep);
}

.chapter__title {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 3.4vw, 44px);
  line-height: 1;
  color: var(--gold-title);
}

.chapter__feel {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-2);
  text-wrap: pretty;
}

.chapter__lead {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* Points */

.points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.points__item {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

.points__item::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 6px;
  height: 6px;
  background: var(--aether);
  transform: rotate(45deg);
}

/* Additions */

.additions {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 22px 32px;
}

.addition {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 4px;
}

.addition__icon {
  grid-row: 1 / 3;
  display: flex;
  color: var(--aether);
}

.addition__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: .03em;
  color: var(--gold-text);
}

.addition__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

/* Client */

.client {
  padding: 24px 0 64px;
}

.client__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: 36px 72px;
}

.client__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.client__title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1;
  color: var(--gold-title);
}

.client__feel {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-2);
  text-wrap: pretty;
}

.client__lead {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}

@media (max-width: 960px) {
  .client__inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Mesh diagram */

.mesh {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mesh__map {
  position: relative;
}

.mesh__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.mesh__links line {
  stroke: var(--gold-line-34);
  stroke-width: 1.5;
}

.mesh__path {
  fill: none;
  stroke: var(--aether);
  stroke-width: 2.5;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px var(--aether-60));
}

.mesh__route {
  opacity: 0;
}

.mesh__route--1 {
  opacity: 1;
}

.mesh__packet {
  fill: var(--white);
  filter: drop-shadow(0 0 4px var(--aether));
  animation: packet-1 2s linear infinite;
}

.mesh__packet--late {
  animation-delay: -1s;
}

.mesh__route--1 {
  animation: route-1 12s linear infinite;
}

.mesh__route--2 {
  animation: route-2 12s linear infinite;
}

.mesh__route--3 {
  animation: route-3 12s linear infinite;
}

.mesh__route--2 .mesh__packet {
  animation-name: packet-2;
}

.mesh__route--3 .mesh__packet {
  animation-name: packet-3;
}

.mesh__node {
  fill: var(--surface-2);
  stroke: var(--gold-line-55);
  stroke-width: 1.5;
}

.mesh__you {
  fill: var(--surface);
  stroke: var(--aether);
  stroke-width: 2;
}

.mesh__you-core {
  fill: var(--aether);
}

.mesh__server {
  fill: var(--gold);
  stroke: var(--gold-title);
  stroke-width: 1.5;
}

.mesh__label {
  position: absolute;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 14px;
  color: var(--muted-2);
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.legend__item::before {
  content: "";
  width: 22px;
  height: 2px;
}

.legend__item--route::before {
  background: var(--aether);
}

.legend__item--spare::before {
  background: var(--gold-line-55);
}

@keyframes route-1 {
  0%, 30% {
    opacity: 1;
  }

  34%, 96% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes route-2 {
  0%, 30% {
    opacity: 0;
  }

  34%, 63% {
    opacity: 1;
  }

  67%, 100% {
    opacity: 0;
  }
}

@keyframes route-3 {
  0%, 63% {
    opacity: 0;
  }

  67%, 96% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes packet-1 {
  0% {
    transform: translate(64px, 210px);
  }

  27.7% {
    transform: translate(190px, 110px);
  }

  71.5% {
    transform: translate(444px, 96px);
  }

  100% {
    transform: translate(580px, 190px);
  }
}

@keyframes packet-2 {
  0% {
    transform: translate(64px, 210px);
  }

  26.3% {
    transform: translate(200px, 290px);
  }

  51% {
    transform: translate(318px, 200px);
  }

  76.1% {
    transform: translate(456px, 262px);
  }

  100% {
    transform: translate(580px, 190px);
  }
}

@keyframes packet-3 {
  0% {
    transform: translate(64px, 210px);
  }

  27.2% {
    transform: translate(200px, 290px);
  }

  50.6% {
    transform: translate(330px, 330px);
  }

  75.3% {
    transform: translate(456px, 262px);
  }

  100% {
    transform: translate(580px, 190px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mesh__route,
  .mesh__packet {
    animation: none;
  }

  .mesh__packet {
    display: none;
  }
}

.mesh__label--you {
  left: 10%;
  top: calc(48.387096% + 24px);
}

.mesh__label--server {
  left: 90.625%;
  top: calc(41.935483% + 28px);
}

/* Network */

.network-section {
  padding: 24px 0;
}

.network {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: 40px 56px;
  padding: 48px 52px;
}

.network__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.network__title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1;
  color: var(--gold-title);
}

.network__feel {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-2);
  text-wrap: pretty;
}

.network__lead {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}

@media (max-width: 960px) {
  .network {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .network {
    padding: 32px 20px;
  }
}

/* Chronicle */

.chronicle__title {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 3.4vw, 44px);
  line-height: 1;
  color: var(--gold-title);
}

.chronicle__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.period {
  position: relative;
  padding: 0 0 28px 28px;
  border-left: 1px solid var(--gold-line-50);
}

.period:last-child {
  padding-bottom: 0;
}

.period::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 9px;
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
}

.period__when {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
  color: var(--gold-text);
}

.period__when::first-letter {
  text-transform: uppercase;
}

.period__events {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.period__event {
  font-size: 16px;
  line-height: 1.45;
  color: var(--muted);
  text-wrap: pretty;
}

.period__event--milestone {
  font-weight: 700;
  color: var(--ink);
}

/* FAQ */

.faq__title {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 3.4vw, 44px);
  line-height: 1;
  color: var(--gold-title);
}

.qa__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: var(--aether-soft);
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qa {
  background: var(--surface-3);
}

.qa__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 20px;
  box-sizing: border-box;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: color 150ms ease;
}

.qa__q::-webkit-details-marker {
  display: none;
}

.qa__q:focus-visible {
  outline: 2px solid var(--aether);
  outline-offset: -2px;
}

.qa__chevron {
  flex: none;
  color: var(--aether-soft);
  transition: transform 200ms var(--ease-out);
}

.qa[open] .qa__chevron {
  transform: rotate(180deg);
}

.qa__a {
  padding: 0 20px 20px;
  max-width: 640px;
}

.qa__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.qa[open] .qa__a {
  animation: answer 220ms var(--ease-out) both;
}

@keyframes answer {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .qa__q:hover {
    color: var(--white);
  }
}

@media (prefers-reduced-motion: reduce) {
  .qa__chevron {
    transition: none;
  }

  .qa[open] .qa__a {
    animation: fade 200ms ease both;
  }
}

/* Pair */

.pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  align-items: start;
  gap: 56px;
  padding-top: 72px;
}

/* Reference */

.reference {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: 56px 72px;
  padding-top: 64px;
  padding-bottom: 32px;
}

@media (max-width: 960px) {
  .reference {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Call to action */

.cta {
  position: relative;
  overflow: hidden;
}

.cta__art {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 66%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, var(--black) 40%);
  mask-image: linear-gradient(90deg, transparent 0%, var(--black) 40%);
}

.cta__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 45%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, var(--black) 20%, var(--black) 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, var(--black) 20%, var(--black) 78%, transparent 100%);
}

.cta__body {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 480px;
  padding-top: 72px;
  padding-bottom: 88px;
}

.cta__text {
  min-width: 0;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cta__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1;
  color: var(--gold-title);
  text-shadow: 0 2px 24px var(--shade-60);
}

.cta__lead {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  padding-top: 12px;
}

.cta__meta {
  font-size: 14px;
  color: var(--muted-2);
}

@media (max-width: 760px) {
  .cta__art {
    position: relative;
    width: 100%;
    height: 240px;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .cta__img {
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, var(--black) 20%, var(--black) 55%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, var(--black) 20%, var(--black) 55%, transparent 100%);
  }

  .cta__body {
    min-height: 0;
    margin-top: -40px;
    padding-top: 0;
    padding-bottom: 64px;
  }
}
