/* nunito-cyrillic-ext-wght-normal */
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(./nunito/nunito-cyrillic-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* nunito-cyrillic-wght-normal */
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(./nunito/nunito-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* nunito-vietnamese-wght-normal */
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(./nunito/nunito-vietnamese-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* nunito-latin-ext-wght-normal */
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(./nunito/nunito-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* nunito-latin-wght-normal */
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(./nunito/nunito-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  color-scheme: dark;
  --font-sans: "Nunito Variable", system-ui, sans-serif;
  --color-canvas: #101114;
  --color-ink: #f3f5f8;
  --color-muted: #b3b5bf;
  --color-line: #3b3f4a;
  --color-focus: #aabfff;
  --color-silver: #e9ebf0;
  --color-graphite: #15171c;
  --radius-control: 8px;
  --radius-card: 14px;
  --container-page: 85.5rem;
  --spacing-gutter: clamp(1rem, 4vw, 2.75rem);
  --header-height: 5.0625rem;
  --brand-gap: 0.6875rem;
}

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

body,
h1,
h2,
p,
figure {
  margin: 0;
}

body {
  background: var(--color-canvas);
  color: var(--color-ink);
  font: 1rem/1.5 var(--font-sans);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

.skip-link {
  position: absolute;
  z-index: 4;
  top: 0.5rem;
  left: var(--spacing-gutter);
  padding: 0.625rem 1rem;
  border-radius: var(--radius-control);
  background: var(--color-silver);
  color: var(--color-graphite);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.shell {
  width: 100%;
  max-width: var(--container-page);
  margin-inline: auto;
  padding-inline: var(--spacing-gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: var(--brand-gap);
  min-height: 2.75rem;
  color: var(--color-ink);
  font-size: 1.5rem;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-mark {
  flex: none;
  width: 1.625rem;
  height: 1.7rem;
  background: linear-gradient(135deg, #fff, #c8cdd6);
  mask: url("/assets/rexeus-x.svg") center / contain no-repeat;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-control);
  font-size: 0.9375rem;
  font-weight: 850;
  line-height: 1.3;
}

.icon {
  display: block;
  flex: none;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  margin-top: calc(-1 * var(--header-height));
  border-bottom: 1px solid var(--color-line);
  background: radial-gradient(
    ellipse 68% 105% at 91% 40%,
    #414958,
    #1b2028 68%,
    #111317 95%
  );
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      #111317 0%,
      #111317eb 28%,
      #1113174d 65%,
      transparent 88%
    ),
    linear-gradient(0deg, #111317a6, transparent 47%);
  content: "";
}

.hero-inner {
  display: flex;
  align-items: end;
  min-height: 35.875rem;
  padding-block: calc(var(--header-height) + 1.5rem) 3.5625rem;
}

.hero-art {
  position: absolute;
  z-index: -2;
  top: -7.1875rem;
  right: clamp(-12.94rem, -15vw, -8.375rem);
  width: clamp(37.8125rem, 78vw, 70rem);
  pointer-events: none;
  transform: rotate(-14deg);
}

.hero-art img {
  width: 100%;
  filter: drop-shadow(-1.75rem 1.75rem 2.875rem #08090bb0);
}

.hero h1,
.app-card h2 {
  font-weight: 850;
  line-height: 0.99;
  letter-spacing: -0.052em;
}

.hero h1 {
  font-size: clamp(3.125rem, 8vw, 6.4375rem);
  font-weight: 870;
}

.hero h1 span {
  display: block;
}

.hero h1 span + span {
  color: #d2d4db;
}

.lead {
  max-width: 28rem;
  margin-top: 1.5rem;
  color: #d1d4dc;
  font-size: 1.1875rem;
  line-height: 1.47;
  text-wrap: balance;
}

.hero-button {
  margin-top: 1.5rem;
  background: var(--color-silver);
  color: var(--color-graphite);
}

.hero-button:hover {
  background: #fff;
}

.apps {
  padding-block: 1.5625rem clamp(2.5rem, 6vw, 5rem);
}

.app-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  isolation: isolate;
  overflow: clip;
  border: 1px solid #f2d6bf;
  border-radius: var(--radius-card);
  background: #f0d1ba;
  color: #291a19;
}

.app-card :focus-visible {
  outline-color: #291a19;
}

.app-copy {
  z-index: 1;
  padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(1.5rem, 4vw, 3rem)
    clamp(1.5rem, 5vw, 4.625rem);
}

.app-name {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.6875rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.app-card h2 {
  margin-block: 1.375rem 1rem;
  font-size: clamp(2.5rem, 5.3vw, 4.8125rem);
  text-wrap: balance;
}

.app-detail {
  max-width: 26rem;
  color: #4f3430;
  font-size: 1.0625rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.app-button {
  margin-top: 1.375rem;
  background: #291a19;
  color: #fff3ea;
}

.app-button:hover {
  background: #492d2a;
}

.app-art {
  display: grid;
  place-items: center;
  min-width: 0;
  background: radial-gradient(ellipse at 50% 42%, #f7e6cd, transparent 72%);
}

.app-art img {
  width: min(86%, 28rem);
  filter: drop-shadow(0.375rem 1.3125rem 1.25rem #70301855);
  transform: rotate(13deg);
}

@media (max-width: 41rem) {
  .hero-inner {
    min-height: 32.875rem;
    padding-block: 13.125rem 2.125rem;
  }

  .hero::before {
    background: linear-gradient(
      0deg,
      #111317 2%,
      #111317eb 30%,
      #1113173d 75%,
      #11131764 100%
    );
  }

  .hero-art {
    top: -6.125rem;
    right: -10.5625rem;
    width: 28.875rem;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 11vw, 4.375rem);
  }

  .lead {
    margin-top: 1.0625rem;
    font-size: 1.0625rem;
  }

  .app-card {
    grid-template-columns: 1fr;
  }

  .app-copy {
    padding: 1.5rem clamp(1rem, 5.6vw, 1.5rem) 0;
  }

  .app-card h2 {
    margin-block: 1rem 0.875rem;
    font-size: clamp(2.125rem, 9vw, 2.5rem);
  }

  .app-art img {
    width: min(80%, 17rem);
  }
}

.site-header {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.625rem;
  min-height: var(--header-height);
}

.site-nav {
  --nav-control-size: 2rem;
  --nav-padding: 0.1875rem;
  --nav-border: 1px;
  anchor-name: --site-nav;
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: var(--nav-padding);
  border: var(--nav-border) solid #565b66;
  border-radius: 2rem;
  background: #121419ec;
}

.site-nav a,
.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: var(--nav-control-size);
  padding-inline: 0.625rem;
  border-radius: 2rem;
  color: #d6d9df;
  font-size: 0.8125rem;
  font-weight: 800;
}

.site-nav .icon {
  width: 0.875rem;
  height: 0.875rem;
}

.language-menu [aria-current="page"] {
  background: #343944;
  color: #fff;
}

.site-nav a:hover,
.language-toggle:hover,
.site-nav:has(:popover-open) .language-toggle {
  color: #fff;
  background: #464b56;
}

.language-toggle {
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  interest-delay: 160ms 260ms;
}

.language-menu {
  --menu-top: calc(
    (var(--header-height) + var(--nav-control-size)) / 2 + var(--nav-padding) +
      var(--nav-border)
  );
  --menu-right: max(
    var(--spacing-gutter),
    calc((100% - var(--container-page)) / 2 + var(--spacing-gutter))
  );
  position-anchor: --site-nav;
  inset: var(--menu-top) var(--menu-right) auto auto;
  top: anchor(bottom, var(--menu-top));
  right: anchor(right, var(--menu-right));
  min-width: 9rem;
  margin: 0.25rem 0 0;
  padding: 0.25rem;
  border: 1px solid #565b66;
  border-radius: var(--radius-control);
  background: #181b21;
  box-shadow: 0 12px 28px #0006;
}

.language-menu a {
  display: flex;
  justify-content: space-between;
  border-radius: 5px;
}

.language-menu a:not([aria-current="page"]) .icon {
  visibility: hidden;
}

@supports not selector(:popover-open) {
  .language-toggle,
  .language-menu [aria-current="page"] {
    display: none;
  }

  .language-menu {
    min-width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .language-menu .icon {
    display: none;
  }
}

.site-footer {
  border-top: 1px solid var(--color-line);
  background: #171a1e;
}

.footer-inner {
  padding-block: clamp(2rem, 5vw, 3rem) 1.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 1.5rem;
}

.footer-brand {
  grid-column: 1 / -1;
}

.footer-slogan {
  margin-top: 0.625rem;
  font-weight: 800;
}

.footer-description,
.footer-column a,
.legal-bar {
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.footer-description {
  margin-top: 0.25rem;
}

.footer-icons {
  display: flex;
  gap: 0.625rem;
  margin-top: 1.25rem;
}

.footer-icons a {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-control);
  color: var(--color-muted);
}

.footer-icons svg {
  width: 1rem;
  height: 1rem;
}

.footer-column h2 {
  font-size: 0.9375rem;
  font-weight: 800;
}

.footer-column ul {
  display: grid;
  gap: 0.5rem;
  margin: 0.625rem 0 0;
  padding: 0;
  list-style: none;
}

.footer-column a,
.legal-bar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}

.legal-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.625rem 1.5rem;
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-line);
}

.legal-bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.legal-bar nav a,
.footer-column a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.site-footer a:hover {
  color: var(--color-ink);
}

.footer-icons a:hover {
  border-color: var(--color-muted);
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }

  .footer-brand {
    grid-column: auto;
  }
}

@media (pointer: coarse) {
  .footer-icons a {
    width: 2.75rem;
    height: 2.75rem;
  }

  .footer-column a,
  .legal-bar nav a {
    min-height: 2.75rem;
  }
}

@media (max-width: 41rem) {
  :root {
    --header-height: 4.5rem;
  }
}

@media (pointer: coarse) {
  .site-nav {
    --nav-control-size: 2.75rem;
  }

  .site-nav a,
  .language-toggle {
    min-width: var(--nav-control-size);
  }
}

@media (max-width: 23rem) {
  .site-header {
    gap: 0.375rem;
  }

  .site-header .brand {
    font-size: 1.375rem;
  }

  .site-nav a,
  .language-toggle {
    padding-inline: 0.4375rem;
  }

  .site-nav > a > .icon {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 240ms;
  }

  .language-menu:popover-open {
    animation: reveal-language 150ms ease-out both;
  }

  .hero-art {
    animation: settle-mark 950ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-mark {
    position: relative;
  }

  .hero-mark::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 42%,
        #eef4ff78 50%,
        transparent 58%
      )
      100% 0 / 300% 100%;
    mask: url("/assets/rexeus-x-silver.svg") center / contain no-repeat;
    content: "";
    animation: catch-light 1150ms ease-out 160ms both;
  }

  .hero-copy {
    animation: settle-copy 640ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
  }

  .button {
    transition: background-color 150ms ease;
  }

  .button .icon {
    transition: transform 180ms ease-out;
  }

  .hero-button:hover .icon,
  .hero-button:focus-visible .icon {
    transform: translateY(0.1875rem);
  }

  .app-button:hover .icon,
  .app-button:focus-visible .icon {
    transform: translate(0.125rem, -0.125rem);
  }

  @supports (animation-timeline: view()) {
    .app-art img {
      animation: settle-knot linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }

    .hero {
      view-timeline-name: --hero-exit;
    }

    .hero-mark {
      animation: silver-exit linear both;
      animation-timeline: --hero-exit;
      animation-range: exit 0% exit 95%;
    }

    .apps {
      position: relative;
      isolation: isolate;
      view-timeline-name: --stichweise-entry;
    }

    .apps::before {
      position: absolute;
      z-index: -1;
      inset: -2.5rem 0 1rem;
      pointer-events: none;
      background: radial-gradient(
        ellipse at center,
        #f0be9c70 0%,
        #e3a2832e 40%,
        transparent 71%
      );
      content: "";
      animation: thread-light ease-out both;
      animation-timeline: --stichweise-entry;
      animation-range: entry 15% cover 47%;
    }

    .app-card {
      animation: card-arrival ease-out both;
      animation-timeline: --stichweise-entry;
      animation-range: entry 20% cover 42%;
    }
  }
}

@keyframes reveal-language {
  from {
    opacity: 0;
    transform: translateY(-0.25rem);
  }
}

@keyframes settle-mark {
  from {
    opacity: 0.55;
    transform: translate(2.25rem, 0.75rem) rotate(-19deg);
  }
  to {
    opacity: 1;
    transform: rotate(-14deg);
  }
}

@keyframes catch-light {
  0% {
    background-position-x: 100%;
    opacity: 0;
  }
  45% {
    opacity: 0.48;
  }
  100% {
    background-position-x: 0%;
    opacity: 0;
  }
}

@keyframes settle-copy {
  from {
    opacity: 0.75;
    transform: translateY(0.625rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes settle-knot {
  from {
    transform: translateY(1.25rem) rotate(8deg);
  }
  to {
    transform: rotate(13deg);
  }
}

@keyframes silver-exit {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(3.5rem);
    opacity: 0.57;
  }
}

@keyframes thread-light {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.66;
  }
}

@keyframes card-arrival {
  from {
    transform: translateY(1.375rem);
  }
  to {
    transform: translateY(0);
  }
}
