/* Home page. */

/* Hero: copy on the left, the phosphor emblem on the right, faint column
   lines behind, and the service areas as a strip along the bottom. */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 3.75rem);
  /* The bottom padding keeps the strip clear of the dock. */
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--gutter) 4.5rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / 6));
  background-position: var(--gutter) 0;
  background-size: calc(100% - 2 * var(--gutter)) 100%;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 25%, #000 70%, transparent);
  opacity: 0.6;
}

.hero__inner {
  flex: 1;
  display: grid;
  align-items: center;
  gap: 2.5rem;
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
}

.hero__copy {
  position: relative;
  z-index: 1;
}

/* The boot line: a command is typed, then the answer appears. */
.hero__boot {
  display: grid;
  gap: 0.2rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.hero__line {
  width: fit-content;
  white-space: nowrap;
}

.hero__prompt {
  color: var(--violet);
}

.hero__line--ok {
  color: var(--accent);
}

.hero__title {
  max-width: 16ch;
  font-size: clamp(2.5rem, 6.4vw, 6.25rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero__lead {
  max-width: 36rem;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--text-muted);
}

.hero .cta {
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

/* The emblem: a canvas drawn by phosphor.js, the plain emblem until then. */
.hero__visual {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: min(100%, 26rem);
  aspect-ratio: 1338 / 2178;
  max-height: 64svh;
}

/* A violet haze behind the emblem. */
.hero__visual::before {
  content: '';
  position: absolute;
  inset: -20% -30%;
  z-index: -1;
  background: radial-gradient(closest-side, rgb(124 58 237 / 0.22), transparent);
}

.hero__canvas {
  --phosphor-lit: #0affff;
  --phosphor-dim: rgb(167 139 250 / 0.24);
  --phosphor-dust: rgb(167 139 250 / 0.3);
}

.hero__canvas,
.hero__emblem {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__emblem {
  color: var(--accent);
  opacity: 0.85;
  filter: drop-shadow(0 0 40px var(--accent-glow));
}

.phosphor-on .hero__emblem {
  display: none;
}

.hero__corner {
  position: absolute;
  width: 1rem;
  height: 1rem;
  border-color: var(--text-dim);
  border-style: solid;
  border-width: 0;
}

.hero__corner--tl {
  top: -1rem;
  left: -1rem;
  border-top-width: 1px;
  border-left-width: 1px;
}

.hero__corner--br {
  right: -1rem;
  bottom: -1rem;
  border-right-width: 1px;
  border-bottom-width: 1px;
}

.hero__strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: var(--page-max);
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  padding-block: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.hero__strip ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero__strip li + li::before {
  content: '/';
  margin-inline: 0.85rem;
  color: var(--text-dim);
}

.hero__strip a {
  display: inline-block;
  padding-block: 0.25rem;
  color: var(--text-muted);
  text-decoration: none;
}

.hero__strip a:hover {
  color: var(--text);
}

.hero__next {
  flex: none;
}

/* From tablets up: the copy and the emblem side by side. On phones the
   emblem follows the buttons, centred, in its own space. */
@media (min-width: 48rem) {
  .hero__inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .hero__visual {
    justify-self: end;
  }
}

/* Phones: the emblem sits between the boot line and the headline. The copy's
   box steps aside (display: contents) so its parts and the emblem share one
   column and can be ordered. */
@media (max-width: 47.99rem) {
  .hero__inner {
    gap: 0;
  }

  .hero__copy {
    display: contents;
  }

  .hero__boot {
    order: 1;
    margin-bottom: 1.25rem;
  }

  /* A band across the whole width: the lion in the middle, dust either side. */
  .hero__visual {
    order: 2;
    justify-self: stretch;
    width: auto;
    height: clamp(15rem, 78vw, 21rem);
    aspect-ratio: auto;
    margin: 0 calc(-1 * var(--gutter)) 1.75rem;
  }

  .hero__corner {
    display: none;
  }

  .hero__title {
    order: 3;
  }

  .hero__lead {
    order: 4;
  }

  .hero .cta {
    order: 5;
  }
}

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

@media (prefers-reduced-motion: no-preference) {
  .hero__line--cmd {
    animation: hero-type 1s steps(20, end) 0.3s both;
  }

  .hero__line--ok {
    animation: hero-show 0.01s linear 1.6s both;
  }

  .hero__line--ok::after {
    content: '';
    display: inline-block;
    width: 0.55em;
    height: 1.05em;
    margin-left: 0.35em;
    vertical-align: -0.15em;
    background: currentColor;
    animation: hero-blink 1.1s steps(1, end) 1.6s 4;
  }

  .hero__title,
  .hero__lead,
  .hero .cta,
  .hero__strip {
    animation: hero-rise 1s var(--ease) both;
  }

  .hero__title {
    animation-delay: 0.15s;
  }

  .hero__lead {
    animation-delay: 0.3s;
  }

  .hero .cta {
    animation-delay: 0.45s;
  }

  .hero__strip {
    animation-delay: 0.7s;
  }

  .hero__visual {
    animation: hero-show 1.2s ease-out 0.2s both;
  }
}

@keyframes hero-type {
  from {
    clip-path: inset(0 100% 0 0);
  }

  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes hero-blink {
  50% {
    opacity: 0;
  }
}

@keyframes hero-show {
  from {
    opacity: 0;
  }
}

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

/* What we do: one row per area, its services as linked lines with a summary
   and an arrow. */
.areas {
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
}

.area {
  display: grid;
  gap: 1rem 1.5rem;
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  border-top: 1px solid var(--line);
}

.area__num {
  padding-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.area__title {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 560;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.area__best {
  max-width: 26rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.area__label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

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

.area__services a {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.area__services li:first-child a {
  border-top: 0;
}

.area__service {
  font-size: 1.125rem;
  font-weight: 560;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 0.2s ease;
}

.area__summary {
  grid-column: 1;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.area__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--font-mono);
  color: var(--text-dim);
  transition:
    transform 0.3s var(--ease),
    color 0.2s ease;
}

.area__services a:hover .area__service,
.area__services a:hover .area__arrow {
  color: var(--accent);
}

.area__services a:hover .area__arrow {
  transform: translateX(4px);
}

@media (min-width: 60rem) {
  .area {
    grid-template-columns: 4rem minmax(0, 5fr) minmax(0, 7fr);
    gap: 2.5rem;
  }

  .area__num {
    padding-top: 0.6rem;
  }

  .area__services li:first-child a {
    padding-top: 0.5rem;
  }
}

/* Why PlugTrust: boxed cells sharing their borders. */
.edge {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.edge li {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.02), transparent 60%);
}

.edge__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.edge strong {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
  color: var(--text);
}

.edge li > span:last-child {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* How we work: numbered stages in a row, joined by a line that fills in: a
   faint track with a cyan fill over it (full unless the motion plugin runs it). */
.steps {
  position: relative;
  display: grid;
  gap: 0;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.6rem;
  padding: 1.5rem 0 1.5rem 2.75rem;
}

.steps li::before {
  content: '';
  position: absolute;
  left: 0.3rem;
  top: 1.85rem;
  width: 0.6rem;
  height: 0.6rem;
  border: 1px solid var(--accent);
  background: var(--bg);
  transform: rotate(45deg);
  transition:
    background-color 0.4s ease,
    box-shadow 0.4s ease;
}

.steps li::after {
  content: '';
  position: absolute;
  left: 0.6rem;
  top: 2.6rem;
  bottom: -1.85rem;
  width: 1px;
  background: linear-gradient(var(--accent), var(--accent)) 0 0 / 100% 100% no-repeat, var(--line-strong);
}

.steps li:last-child::after {
  display: none;
}

.steps__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.steps strong {
  font-size: 1.1875rem;
  font-weight: 560;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.steps__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

@media (min-width: 60rem) {
  .steps {
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 1.5rem;
  }

  .steps li {
    padding: 2.5rem 0 0;
  }

  .steps li::before {
    left: 0;
    top: 0;
  }

  .steps li::after {
    left: 1.1rem;
    right: -1.1rem;
    top: 0.3rem;
    bottom: auto;
    width: auto;
    height: 1px;
  }
}

/* Who we work with: sectors as boxed tags, then the note on remote work. */
.who {
  display: grid;
  gap: 2rem 4rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.sectors {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sectors li {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.who__remote {
  max-width: 34rem;
  color: var(--text-muted);
}

@media (min-width: 60rem) {
  .who {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

/* Closing call: a terminal window. */
.close {
  padding-bottom: clamp(5rem, 10vw, 8rem);
}

.terminal {
  position: relative;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, var(--violet-glow), transparent 70%),
    var(--bg-raised);
  box-shadow: 0 30px 80px -40px rgb(0 0 0 / 0.9);
}

.terminal__bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.terminal__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal__status::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.terminal__body {
  display: grid;
  justify-items: start;
  gap: 1.5rem;
  padding: clamp(2rem, 6vw, 4.5rem);
}

.close__text {
  max-width: 40rem;
  color: var(--text-muted);
}

.close .cta {
  margin-top: 0.5rem;
}
