@font-face {
  font-family: "Capy closing serif";
  src: url("/assets/fonts/capy-studio-spectral-500italic-cyr-v1.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

/* Data routes */
.home-page #control-and-security {
  --guard-cream: #eff2f9;
  --guard-secondary: #c9d3db;
  --guard-rule: #47596A;
  padding-block: clamp(3.6rem, 6vw, 6.4rem);
  color: var(--guard-cream);
  background: radial-gradient(ellipse at top right, #334656 0, transparent 60%), #182a39;
}
.home-page #control-and-security > .guard-layout {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 6rem);
}
.home-page #control-and-security h2,
.home-page #first-task h2 {
  margin: 0;
  font-weight: 660;
  letter-spacing: -.065em;
}
.home-page #control-and-security h2 {
  max-inline-size: 13ch;
  color: var(--guard-cream);
  font-size: clamp(2.6rem, 4.55vw, 4.7rem);
  line-height: .99;
}
.guard-intro > p {
  max-width: 39ch;
  margin: 1.2rem 0;
  color: var(--guard-secondary);
  font-size: clamp(1rem,.94rem + .4vw,1.17rem);
  line-height: 1.5;
}
.guard-tabs {
  display: grid;
  margin-block: 1.6rem 1.2rem;
  border-top: 1px solid var(--guard-rule);
}
.guard-tabs[hidden] { display: none; }
.guard-tabs button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.1rem;
  padding: .48rem .65rem .48rem .25rem;
  border: 0;
  border-bottom: 1px solid var(--guard-rule);
  color: #d6dde6;
  background: transparent;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.guard-tabs button > span:first-child,
.finish-demos a > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
}
.guard-tabs button[aria-selected="true"] {
  color: #9CB3FF;
  background: linear-gradient(90deg, #374a5bb8, transparent);
}
.guard-tabs button[aria-selected="true"] > span:first-child {
  transform: translateX(.25rem);
}
.guard-tabs button svg { width: 1.35rem; height: 1.35rem; color: currentColor; }
.guard-chevron {
  opacity: .6;
  font-size: 1.15rem;
  line-height: 1;
}
.guard-tabs button[aria-selected="true"] .guard-chevron {
  opacity: 1;
  transform: rotate(45deg);
}
.guard-policy {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  color: #e7ecf9;
  text-underline-offset: .26em;
  text-decoration-color: #95a4b3;
  font-size: .9rem;
}
.guard-stage { display: grid; min-width: 0; gap: 1rem; }
.guard-panel {
  overflow: clip;
  position: relative;
  min-width: 0;
  margin: 0;
  border: 1px solid #4e607183;
  border-radius: 1.3rem;
  background: #1e3140;
  box-shadow: 0 20px 50px -38px #12202d;
}
.guard-panel[hidden] { display: none; }
.guard-visual {
  position: relative;
  isolation: isolate;
  padding: clamp(1.7rem, 4.8vw, 4.15rem) clamp(.35rem, 2vw, 1.6rem) clamp(1.6rem, 3vw, 2.8rem);
  overflow: hidden;
  border-bottom: 1px solid #9faebd70;
  background-color: #213443;
  background-image:
    radial-gradient(ellipse at 49% 32%, #46586943, transparent 60%),
    radial-gradient(circle, #c1cdd93b .8px, transparent .95px);
  background-size: auto, 15px 15px;
}
.guard-visual::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 12px;
  z-index: -1;
  background:
    linear-gradient(#B9C8D6, #B9C8D6) left top / 13px 1px no-repeat,
    linear-gradient(#B9C8D6, #B9C8D6) left top / 1px 13px no-repeat,
    linear-gradient(#B9C8D6, #B9C8D6) right top / 13px 1px no-repeat,
    linear-gradient(#B9C8D6, #B9C8D6) right top / 1px 13px no-repeat,
    linear-gradient(#B9C8D6, #B9C8D6) left bottom / 13px 1px no-repeat,
    linear-gradient(#B9C8D6, #B9C8D6) left bottom / 1px 13px no-repeat,
    linear-gradient(#B9C8D6, #B9C8D6) right bottom / 13px 1px no-repeat,
    linear-gradient(#B9C8D6, #B9C8D6) right bottom / 1px 13px no-repeat;
  opacity: .64;
}
.guard-board {
  display: grid;
  grid-template-columns: 25% 50% 25%;
  place-items: center;
  position: relative;
  isolation: isolate;
  aspect-ratio: 600 / 206;
  width: 100%;
}
.guard-wires {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  fill: none;
  stroke-linecap: round;
}
.guard-wires path { vector-effect: non-scaling-stroke; }
.guard-idle-wires { stroke: #b0bfcd; stroke-width: 1.1px; opacity: .37; }
.guard-active-wire { stroke: var(--route-accent); stroke-width: 2px; }
.guard-signal {
  opacity: 0;
  stroke: #f5f7f9;
  stroke-width: 3.9px;
  stroke-dasharray: 5 95;
  filter: drop-shadow(0 0 3px var(--route-accent));
}
.guard-port {
  display: grid;
  place-items: center;
  width: clamp(2.8rem, 4.6vw, 4.4rem);
  aspect-ratio: 1;
  color: #ebf0f9;
  border: 1px solid #8b9baa;
  border-radius: 23%;
  background: linear-gradient(135deg, #425566, #2e4151 68%);
  box-shadow: inset 0 1px 1px #c6d1da51, 0 3px 0 #101C28, 0 8px 18px #17283666;
}
.guard-port svg { width: 53%; height: 53%; }
.guard-core {
  isolation: isolate;
  display: grid;
  place-items: center;
  position: relative;
  width: clamp(4.65rem, 9.3vw, 9.5rem);
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--route-accent);
  background: radial-gradient(circle at 40% 20%, #4e5f70, #101C28 70%);
  box-shadow: 0 0 0 1px #253847, 0 0 0 2px #94a4b3, 0 3px 2px 3px #1627358a, 0 13px 28px -9px #152432bd;
}
.guard-rim,.guard-rotor,.guard-chip { position: absolute; border-radius: 50%; }
.guard-rim {
  inset: 5%;
  border: 1px solid #5f7081;
  background: repeating-conic-gradient(from 1deg, #bfccd852 0deg 1deg, transparent 1deg 8deg);
}
.guard-rotor {
  inset: 14%;
  border: 1.5px solid #aebecc87;
  border-left-color: var(--route-accent);
  border-top-color: var(--route-accent);
  background: linear-gradient(130deg,#314454,#1d303f);
}
.guard-chip {
  display: grid;
  place-items: center;
  inset: 21%;
  border: 1px solid #c1cdd986;
  background: linear-gradient(150deg, #415465, #293c4b 65%);
  box-shadow: inset 0 1px 0 #e8edfa4d;
}
.guard-chip img {
  width: 67%;
  height: auto;
  filter: brightness(0) saturate(100%) invert(86%) sepia(34%) saturate(534%) hue-rotate(327deg) brightness(102%);
}
.guard-keys {
  position: relative;
  display: grid;
  grid-template-columns: 25% 50% 25%;
  align-items: start;
  gap: 0;
  color: #e8edfa;
  text-align: center;
  font-size: clamp(.74rem,.63rem + .43vw,1rem);
  font-weight: 530;
  line-height: 1.22;
}
.guard-keys span { min-width: 0; text-wrap: balance; }
.guard-keys span:nth-child(2) { color: var(--route-accent); }
.guard-explanation {
  min-height: 10rem;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  background: linear-gradient(132deg,#2a3d4d,#192C3B 76%);
}
.home-page #control-and-security .guard-explanation h3 {
  margin: 0;
  color: #f3f5f8;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 2.2rem);
  font-weight: 590;
  letter-spacing: -.045em;
  line-height: 1.13;
}
.guard-explanation p {
  max-width: 56ch;
  margin: .7rem 0 0;
  color: #d7dee7;
  font-size: clamp(.95rem,.92rem + .23vw,1.08rem);
  line-height: 1.52;
}
#control-and-security :focus-visible { outline: 3px solid #ccd5dc; outline-offset: 3px; }

/* The counter at the end of the page */
.home-page #first-task {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(3.2rem,6vw,6.5rem);
  color: #182b3a;
  background-color: #cbd4dc;
  background-image:
    radial-gradient(ellipse at 7% 6%, #e4eaf6 0, transparent 63%),
    linear-gradient(108deg, #d1d9e1 8%, #c5d0da 60%, #afbfcd);
}
#first-task::after {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
  inset: -30% -25% -30% 37%;
  opacity: .31;
  transform: rotate(-19deg);
  background: repeating-radial-gradient(ellipse at 59% 38%, transparent 0 15px, #41546582 15.4px 16px, transparent 16.5px 23px);
  mask-image: linear-gradient(90deg,transparent,#00000088 33%,#000000);
}
.home-page #first-task > .finish-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(14rem, .8fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 5rem);
}
.home-page #first-task h2 {
  position: relative;
  color: #1a2d3c;
  max-width: 13ch;
  font-size: clamp(3rem, 5.2vw, 5.7rem);
  line-height: .98;
  text-wrap: initial;
}
#first-task h2 em {
  font-family: Onest, system-ui, sans-serif;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -.056em;
}
.finish-intro > p {
  max-width: 40ch;
  margin: 1.45rem 0 1.65rem;
  color: #324555;
  font-size: clamp(1.02rem,.91rem + .45vw,1.25rem);
  line-height: 1.52;
}
.finish-demos {
  max-width: 29rem;
  display: grid;
  border-top: 1px solid #3f52635c;
}
.finish-demos a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.3rem;
  padding: .55rem .45rem;
  border-bottom: 1px solid #3f52635c;
  color: #192c3b;
  font-size: clamp(1rem,.94rem + .3vw,1.15rem);
  font-weight: 600;
  text-decoration: none;
}
.finish-demos svg { width: 1.5rem; height: 1.5rem; color: #435566; }
.finish-arr { display: inline-block; line-height: 1; }
.finish-dispenser {
  position: relative;
  justify-self: center;
  width: min(100%, 24.75rem);
  padding: 1rem .95rem .85rem;
  perspective: 900px;
}
.finish-slot {
  z-index: 1;
  position: absolute;
  height: 1.1rem;
  top: .25rem;
  left: 1%;
  right: 1%;
  border: 1px solid #455768;
  border-radius: 100px;
  background: linear-gradient(180deg, #556677 0%, #c3cfd9 21%, #405364 28%, #192c3b 43%, #223544 73%, #4e5f70 85%, #9dadbb);
  box-shadow: 0 1px 1px #f5f7f8b3, 0 4px 8px #4154657a;
}
.finish-paper {
  transform-origin: 50% 0;
  clip-path: inset(0 -24% -24% -24%);
  filter: drop-shadow(0 18px 15px #41546559);
}
.finish-ticket {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  padding: clamp(1.3rem,3vw,2.25rem) clamp(1.2rem,2.8vw,2rem) 1.6rem;
  color: #203342;
  background: linear-gradient(180deg,#d3dae2 0,#f4f6f8 6%,#f3f6f8 53%,#ebeff9 100%);
  clip-path: polygon(0 0,100% 0,100% 100%,98% 98.8%,96% 100%,94% 98.8%,92% 100%,90% 98.8%,88% 100%,86% 98.8%,84% 100%,82% 98.8%,80% 100%,78% 98.8%,76% 100%,74% 98.8%,72% 100%,70% 98.8%,68% 100%,66% 98.8%,64% 100%,62% 98.8%,60% 100%,58% 98.8%,56% 100%,54% 98.8%,52% 100%,50% 98.8%,48% 100%,46% 98.8%,44% 100%,42% 98.8%,40% 100%,38% 98.8%,36% 100%,34% 98.8%,32% 100%,30% 98.8%,28% 100%,26% 98.8%,24% 100%,22% 98.8%,20% 100%,18% 98.8%,16% 100%,14% 98.8%,12% 100%,10% 98.8%,8% 100%,6% 98.8%,4% 100%,2% 98.8%,0 100%);
  border-inline: 1px solid #acbbca;
}
.finish-rose {
  z-index: -1;
  pointer-events: none;
  position: absolute;
  width: 82%;
  right: -36%;
  top: -2.5rem;
  color: #465869;
  opacity: .51;
}
.finish-ticket-head { display: flex; align-items: center; gap: .45rem; }
.finish-ticket-head b { font-size: 1.05rem; letter-spacing: -.035em; }
.finish-ticket-head img { width: 1.8rem; height: auto; }
.finish-value { margin: 1.4rem 0 .55rem; }
.finish-value strong {
  display: block;
  font-size: clamp(4.9rem,8.25vw,8rem);
  font-weight: 700;
  letter-spacing: -.089em;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: .9;
}
.finish-value span { font-size: clamp(1.2rem,1.06rem + .65vw,1.7rem); letter-spacing: -.044em; font-weight: 570; }
#first-task .finish-models { max-width: 24ch; margin: .6rem 0 1.2rem; color: #3b4e5e; font-size: 1rem; line-height: 1.4; }
.finish-stub {
  position: relative;
  margin-inline: calc(0px - clamp(1.2rem,2.8vw,2rem));
  padding: 1.1rem clamp(1.2rem,2.8vw,2rem) 0;
  border-top: 1px dashed #8494a4;
}
.finish-stub::before,.finish-stub::after {
  content: "";
  position: absolute;
  top: -.46rem;
  width: .9rem;
  height: .9rem;
  border-radius: 50%;
  background: #c2ced9;
}
.finish-stub::before { left: -.45rem; }
.finish-stub::after { right: -.45rem; }
.home-page #first-task .finish-stub a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  min-height: 3rem;
  padding: .65rem 1rem;
  border-radius: .38rem;
  color: #f4f6f8;
  background: #2e4151;
  font-weight: 620;
  text-decoration: none;
}
.home-page #first-task .finish-stub a[hidden] { display: none; }
#first-task .finish-stub p { margin: .55rem 0 0; color: #405364; font-size: .85rem; line-height: 1.35; }
.home-page #first-task :focus-visible { outline: 3px solid #314454; outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .guard-tabs button:hover { color: #9CB3FF; }
  .finish-demos a:hover { background: #f5f7f94a; }
  .home-page #first-task .finish-stub a:hover { background: #203343; }
}
@media (prefers-reduced-motion: no-preference) {
  .guard-tabs button > span,.guard-chevron,.finish-arr,.finish-demos a,.finish-stub a {
    transition: transform .28s cubic-bezier(.22,.74,.26,1), background-color .18s, color .18s;
  }
  .guard-panel.is-active .guard-signal { animation: capy-travel 1.4s cubic-bezier(.26,.66,.35,1) 1; }
  .guard-panel.is-active .guard-rotor { animation: capy-dial .92s cubic-bezier(.2,.71,.19,1) 1; }
  .guard-panel.is-active .guard-explanation { animation: capy-note .38s ease-out 1; }
  .finish-dispenser.in-view .finish-ticket { animation: capy-print .95s cubic-bezier(.15,.8,.23,1) 1; }
  .finish-dispenser.in-view .finish-rose { animation: capy-engrave 1.3s ease-out 1; }
  .finish-paper { transition: transform .48s cubic-bezier(.2,.72,.22,1); }
  @media (hover:hover) and (pointer:fine) {
    .finish-dispenser:hover .finish-paper,.finish-dispenser:focus-within .finish-paper {
      transform: rotate(-1deg) rotateX(2deg) translateY(.3rem);
    }
    .finish-demos a:hover .finish-arr,.finish-stub a:hover .finish-arr { transform: translate(2px,-2px); }
  }
}
@keyframes capy-travel {
  0% { opacity: 0; stroke-dashoffset: 6; }
  10% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; stroke-dashoffset: -97; }
}
#control-and-security[data-direction="back"] { --capy-route-turn: 80deg; --capy-note-from: -8px; }
@keyframes capy-dial { from { transform: rotate(var(--capy-route-turn, -80deg)); } to { transform: rotate(0); } }
@keyframes capy-note { from { opacity: .35; transform: translateX(var(--capy-note-from, 8px)); } to { opacity: 1; transform: translateX(0); } }
@keyframes capy-print { from { transform: translateY(-2.7rem); opacity: .7; } to { transform: translateY(0); opacity: 1; } }
@keyframes capy-engrave { from { transform: rotate(-17deg); } to { transform: rotate(0deg); } }
@media (max-width: 49rem) {
  .home-page #control-and-security > .guard-layout { grid-template-columns: 1fr; gap: 1.25rem; }
  .guard-intro h2 { max-inline-size: none; }
  .guard-intro > p { margin: .9rem 0; max-width: 49ch; }
  .guard-intro { display: contents; }
  .guard-tabs {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: .25rem;
    margin: 0;
    border: 0;
  }
  .guard-tabs button {
    padding: .55rem .6rem;
    border: 1px solid #455768;
    border-radius: .38rem;
    font-size: .92rem;
  }
  .guard-tabs button[aria-selected="true"] { border-color: #c1cdd9; background: #384b5b; }
  .guard-tabs button[aria-selected="true"] > span:first-child { transform: none; }
  .guard-tabs .guard-chevron { display: none; }
  .guard-tabs button > span:first-child { gap: .4rem; }
  .guard-policy { order: 1; width: fit-content; min-height: 2.75rem; }
  .guard-stage { order: 0; }
  .guard-explanation { min-height: 0; }
  .home-page #first-task > .finish-layout { grid-template-columns: minmax(0,1fr) minmax(13.5rem,.68fr); gap: 1.5rem; }
  #first-task h2 { font-size: clamp(2.65rem,6vw,3.15rem); }
  .finish-dispenser { padding-inline: .45rem; }
}
@media (max-width: 38rem) {
  .home-page #control-and-security h2 { max-inline-size: 14ch; font-size: clamp(2.45rem,9vw,3.05rem); }
  .home-page #control-and-security > .guard-layout { gap: .88rem; }
  .guard-intro > p { margin: 0 0 .35rem; }
  .guard-visual { padding: 2.15rem .48rem 1.6rem; }
  .guard-explanation { padding: 1.25rem; }
  .home-page #first-task > .finish-layout { grid-template-columns: minmax(0,1fr); gap: 2rem; }
  .home-page #first-task h2 { max-inline-size: 13ch; font-size: clamp(2.8rem,10.3vw,4rem); }
  .finish-intro > p { margin: 1rem 0 1.2rem; }
  #first-task::after { opacity: .16; inset: -6% -55% -10% 35%; }
  .finish-dispenser { width: min(100%,21rem); }
  .finish-value strong { font-size: 5.7rem; }
}
@media (forced-colors: active) {
  .guard-tabs button[aria-selected="true"] { border: 2px solid Highlight; }
  .guard-wires .guard-active-wire { stroke: Highlight; }
  .guard-port,.guard-core,.finish-ticket,.finish-stub a { border: 1px solid ButtonText; }
  .guard-chip img { filter: none; }
}
