:root {
  --workspace-green: #2e6450;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --light-angle: 135deg;
  --glare-x: 50%;
  --glare-y: 50%;
  --edge-opacity: 0.32;
  --hero-scale: 1;
  --glass-alpha: 0.76;
  --glass-soft-alpha: 0.64;
  --glass-veil: 0.36;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #161616;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.56), rgba(221, 235, 229, 0.24)),
    #e8ece6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: -1.5%;
  z-index: -2;
  background-image: url("https://sicnu.pics.tchirek.top/img/kwxtCtxLEt75?v=web");
  background-size: cover;
  background-position: center;
  transform: scale(1.025);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(250, 250, 248, 0.54), rgba(246, 246, 240, 0.72));
  backdrop-filter: blur(3px) saturate(105%);
  -webkit-backdrop-filter: blur(3px) saturate(105%);
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  perspective: 1100px;
}

.tilt-hitbox {
  width: min(86vw, 430px);
  perspective: 1100px;
}

.workspace-hero {
  position: relative;
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 34px 28px 26px;
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at var(--glare-x) var(--glare-y), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08) 34%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(var(--light-angle), rgba(255, 255, 255, var(--glass-alpha)), rgba(233, 242, 238, var(--glass-soft-alpha))),
    rgba(255, 255, 255, var(--glass-veil));
  box-shadow:
    0 22px 80px rgba(13, 30, 24, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.86) inset,
    0 0 0 1px rgba(255, 255, 255, 0.48) inset,
    0 0 26px rgba(174, 216, 255, 0.12) inset,
    0 18px 54px rgba(255, 255, 255, 0.12) inset;
  transform: perspective(1000px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) scale(var(--hero-scale)) translateZ(0);
  transform-style: preserve-3d;
  transition:
    transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1),
    background 220ms ease,
    box-shadow 220ms ease;
  will-change: transform;
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
}

.workspace-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.08) 38%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(circle at var(--glare-x) var(--glare-y), rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 44%);
  opacity: 0.78;
  pointer-events: none;
  transform: translateZ(18px);
}

.workspace-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: 1.5px;
  border-radius: inherit;
  background:
    linear-gradient(135deg,
      rgba(178, 216, 255, 0.66),
      rgba(255, 255, 255, 0.32) 31%,
      rgba(255, 202, 224, 0.54) 63%,
      rgba(255, 255, 255, 0.30)
    );
  opacity: var(--edge-opacity);
  pointer-events: none;
  transform: translateZ(28px);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.workspace-hero.is-active {
  transition:
    transform 34ms linear,
    background 160ms ease,
    box-shadow 160ms ease;
  box-shadow:
    0 26px 92px rgba(13, 30, 24, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 0 0 1px rgba(255, 255, 255, 0.56) inset,
    0 0 34px rgba(184, 219, 255, 0.16) inset;
}

.title-stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.02em;
  font-family: "Bungee", system-ui, sans-serif;
  font-size: clamp(38px, 11vw, 62px);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.045em;
  opacity: 0;
  user-select: none;
  transform: translateZ(62px);
  transition: opacity 180ms ease;
}

.fonts-ready .title-stack {
  opacity: 1;
}

.title-normal {
  color: #161616;
  text-shadow: 0 1px 24px rgba(255, 255, 255, 0.72);
}

.title-workspace {
  color: var(--workspace-green);
  letter-spacing: -0.078em;
  text-shadow: 0 1px 20px rgba(255, 255, 255, 0.56);
}

.workspace-card {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 312px);
  gap: 8px;
  transform: translateZ(44px);
}

.workspace-link {
  display: grid;
  min-height: 46px;
  place-items: center;
  border-radius: 999px;
  color: rgba(22, 27, 24, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(245, 248, 246, 0.34)),
    rgba(255, 255, 255, 0.28);
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.035em;
  box-shadow:
    0 10px 28px rgba(14, 30, 24, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.52) inset,
    0 0 0 1px rgba(255, 255, 255, 0.34) inset;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.service-name {
  display: inline-flex;
  font-family: "Bungee", "DM Sans", system-ui, sans-serif;
  line-height: 1;
}

.service-accent {
  color: var(--workspace-green);
  letter-spacing: -0.055em;
  transition: color 180ms ease;
}

.workspace-link:hover,
.workspace-link:focus-visible {
  color: rgba(255, 255, 255, 0.95);
  background:
    linear-gradient(180deg, rgba(42, 42, 42, 0.86), rgba(24, 24, 24, 0.92)),
    rgba(28, 28, 28, 0.88);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  transform: translateY(-1px);
  outline: none;
}

.workspace-link:hover .service-accent,
.workspace-link:focus-visible .service-accent {
  color: #78b197;
}

.workspace-link:active {
  transform: translateY(0) scale(0.99);
}

@media (max-width: 520px) {
  .tilt-hitbox {
    width: min(90vw, 390px);
  }

  .workspace-hero {
    gap: 26px;
    padding: 32px 22px 24px;
    border-radius: 26px;
  }

  .title-stack {
    font-size: clamp(36px, 12.5vw, 52px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  .workspace-hero,
  .workspace-hero.is-active {
    transition-duration: 1ms !important;
  }
}
