:root {
  --bg: #08090d;
  --panel: #10141b;
  --panel-strong: #151b25;
  --text: #f5f7fb;
  --muted: #a8b4c3;
  --soft: #d8e4ef;
  --line: rgba(216, 228, 239, 0.14);
  --logo-light: #5897ea;
  --logo-cool: #7bafc5;
  --logo-dark: #004388;
  --green: #75d6b6;
  --rose: #e59aaa;
  --shadow: rgba(0, 0, 0, 0.42);
}

@property --ripple-radius {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(115deg, rgba(88, 151, 234, 0.14), transparent 28%),
    linear-gradient(245deg, rgba(117, 214, 182, 0.08), transparent 34%),
    linear-gradient(135deg, #08090d 0%, #0c1017 52%, #101019 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  border-bottom: 1px solid transparent;
  background: rgba(8, 9, 13, 0);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    backdrop-filter 180ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: rgba(216, 228, 239, 0.09);
  background: rgba(8, 9, 13, 0.78);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
}

.brand-link {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-link img {
  width: clamp(150px, 18vw, 220px);
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(8, 9, 13, 0);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.site-header.is-scrolled .nav-links {
  border-color: rgba(216, 228, 239, 0.16);
  background: rgba(8, 9, 13, 0.68);
  box-shadow: 0 14px 40px var(--shadow);
}

.nav-links a {
  min-width: 74px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.section-band {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.58fr);
  gap: clamp(28px, 6vw, 84px);
  align-items: center;
  min-height: calc(100vh - 84px);
  padding: 64px 0 88px;
  isolation: isolate;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-outline {
  position: relative;
  z-index: 1;
  justify-self: end;
  width: min(34vw, 420px);
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  --outline-x: 50%;
  --outline-y: 50%;
}

.outline-ripple {
  position: absolute;
  inset: 0;
  background: #d9ecff;
  -webkit-mask-image:
      url("assets/logo-outline-icon.svg"),
    radial-gradient(
      circle at var(--ripple-x) var(--ripple-y),
      transparent 0 calc(var(--ripple-radius) - var(--ripple-inner-fade)),
      rgba(0, 0, 0, 0.34) calc(var(--ripple-radius) - var(--ripple-inner-solid)),
      #000 var(--ripple-radius),
      rgba(0, 0, 0, 0.34) calc(var(--ripple-radius) + var(--ripple-outer-solid)),
      transparent calc(var(--ripple-radius) + var(--ripple-outer-fade))
    );
  -webkit-mask-position:
    center,
    0 0;
  -webkit-mask-repeat:
    no-repeat,
    no-repeat;
  -webkit-mask-size:
    contain,
    100% 100%;
  -webkit-mask-composite: source-in;
  mask-image:
      url("assets/logo-outline-icon.svg"),
    radial-gradient(
      circle at var(--ripple-x) var(--ripple-y),
      transparent 0 calc(var(--ripple-radius) - var(--ripple-inner-fade)),
      rgba(0, 0, 0, 0.34) calc(var(--ripple-radius) - var(--ripple-inner-solid)),
      #000 var(--ripple-radius),
      rgba(0, 0, 0, 0.34) calc(var(--ripple-radius) + var(--ripple-outer-solid)),
      transparent calc(var(--ripple-radius) + var(--ripple-outer-fade))
    );
  mask-composite: intersect;
  mask-position:
    center,
    0 0;
  mask-repeat:
    no-repeat,
    no-repeat;
  mask-size:
    contain,
    100% 100%;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  visibility: hidden;
  --ripple-x: 50%;
  --ripple-y: 50%;
  --ripple-radius: 0%;
  --ripple-inner-fade: 5%;
  --ripple-inner-solid: 3%;
  --ripple-outer-solid: 3%;
  --ripple-outer-fade: 7%;
}

.outline-ripple.is-ready {
  visibility: visible;
  animation: outline-ripple 560ms ease-out forwards;
}

.outline-ripple.is-click {
  background: #ffffff;
}

.outline-ripple.is-click.is-ready {
  animation-duration: 760ms;
}

.outline-ripple.is-auto {
  background: #ffffff;
  --ripple-inner-fade: 9%;
  --ripple-inner-solid: 5%;
  --ripple-outer-solid: 5%;
  --ripple-outer-fade: 12%;
}

.outline-ripple.is-auto.is-ready {
  animation-duration: 940ms;
}

.hero-outline img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: screen;
  transform: translate3d(0, 0, 0);
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
}

@keyframes outline-ripple {
  0% {
    opacity: 0;
    --ripple-radius: 0%;
  }

  12% {
    opacity: 1;
  }

  38% {
    opacity: 0.86;
  }

  100% {
    opacity: 0;
    --ripple-radius: 82%;
  }
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 760;
  line-height: 1.02;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3.6rem, 9.5vw, 7.4rem);
}

h2 {
  max-width: 780px;
  font-size: clamp(2.15rem, 5.5vw, 5rem);
}

h3 {
  color: var(--soft);
  font-size: 1.05rem;
}

.hero-line {
  max-width: 680px;
  margin: 26px 0 34px;
  color: var(--soft);
  font-size: clamp(1.12rem, 2.2vw, 1.55rem);
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(88, 151, 234, 0.5);
  border-radius: 6px;
  background: linear-gradient(135deg, var(--logo-dark), var(--logo-light));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 18px 54px rgba(88, 151, 234, 0.24);
}

.primary-action:hover,
.primary-action:focus-visible {
  border-color: rgba(117, 214, 182, 0.68);
  box-shadow: 0 18px 54px rgba(88, 151, 234, 0.32);
  outline: 2px solid rgba(117, 214, 182, 0.5);
  outline-offset: 0;
}

.work,
.projects {
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 34px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.work-grid article {
  min-height: 220px;
  padding: clamp(22px, 4vw, 36px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent),
    var(--panel);
}

.work-grid p,
.project-card p,
.site-footer p {
  color: var(--muted);
}

.project-card {
  display: grid;
  grid-template-columns: minmax(86px, 132px) minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid rgba(123, 175, 197, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(88, 151, 234, 0.16), transparent 46%),
    linear-gradient(315deg, rgba(117, 214, 182, 0.1), transparent 52%),
    var(--panel-strong);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: rgba(117, 214, 182, 0.42);
  box-shadow: 0 18px 54px rgba(31, 124, 255, 0.14);
  outline: none;
  transform: translateY(-2px);
}

.project-logo-shell {
  position: relative;
  display: block;
  overflow: hidden;
  width: min(100%, 132px);
  border-radius: 8px;
}

.project-logo-shell::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(
    135deg,
    transparent 45%,
    rgba(255, 255, 255, 0.78) 50%,
    transparent 55%
  );
  background-position: 135% 135%;
  background-repeat: no-repeat;
  background-size: 220% 220%;
  -webkit-mask-image: url("assets/apertum-app-logo.png");
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-image: url("assets/apertum-app-logo.png");
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  opacity: 0;
  pointer-events: none;
}

.project-card:hover .project-logo-shell::after,
.project-card:focus-visible .project-logo-shell::after {
  animation: project-logo-sheen 760ms ease-out;
}

.project-logo {
  width: min(100%, 132px);
  height: auto;
  display: block;
}

@keyframes project-logo-sheen {
  0% {
    background-position: 135% 135%;
    opacity: 0;
  }

  18% {
    opacity: 1;
  }

  100% {
    background-position: -35% -35%;
    opacity: 0;
  }
}

.project-card p {
  max-width: 760px;
  margin: 12px 0 0;
  font-size: 1.05rem;
}

.project-kicker {
  color: var(--green) !important;
  font-size: 0.82rem !important;
  font-weight: 800;
  text-transform: uppercase;
}

.project-status {
  justify-self: end;
  min-width: 132px;
  padding: 8px 12px;
  border: 1px solid rgba(117, 214, 182, 0.32);
  border-radius: 999px;
  color: var(--text) !important;
  font-size: 0.86rem !important;
  font-weight: 800;
  text-align: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0 0 6px;
}

.footer-brand {
  color: var(--text) !important;
  font-weight: 800;
}

.site-footer a {
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 820px) {
  .site-header-inner {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links a {
    min-width: 0;
    flex: 1;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 34px;
    overflow: hidden;
  }

  .hero-outline {
    justify-self: center;
    width: min(72vw, 280px);
    margin-top: 4px;
    opacity: 0.72;
  }

  h1 {
    max-width: 10ch;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-grid article {
    min-height: 160px;
  }

  .project-card,
  .site-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .project-status {
    justify-self: start;
  }
}

@media (max-width: 480px) {
  .section-band,
  .site-header-inner,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .brand-link img {
    width: 156px;
  }

  .nav-links {
    gap: 4px;
    padding: 4px;
  }

  .nav-links a {
    padding: 7px 8px;
    font-size: 0.82rem;
  }

  h1 {
    font-size: 3.9rem;
  }
}
