.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: var(--bg);
  animation: loader-exit 0.75s var(--ease-out) 1.1s forwards;
}

body.is-loaded .loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__mark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.24em;
}

.loader__bracket {
  color: var(--accent-bright);
  opacity: 0;
  animation: bracket-in 0.6s var(--ease-out) forwards;
}

.loader__bracket:last-child {
  animation-delay: 0.18s;
}

.loader__text {
  background: linear-gradient(110deg, var(--text), var(--accent-bright), var(--text));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: text-shift 1.4s ease-in-out infinite;
}

.loader__bar {
  width: 160px;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.loader__bar span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-violet));
  transform: translateX(-100%);
  animation: bar-load 1.1s var(--ease-out) forwards;
}

.page-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 140, 255, 0.13), transparent 65%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: transform;
}

body.has-pointer .page-glow {
  opacity: 1;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  will-change: transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--accent-bright);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(126, 165, 255, 0.55);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out), margin 0.3s var(--ease-out), background 0.3s ease;
}

body.has-pointer .cursor-dot,
body.has-pointer .cursor-ring {
  opacity: 1;
}

body.cursor-hover .cursor-ring {
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  background: rgba(91, 140, 255, 0.08);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 56px;
  min-height: 100svh;
  padding-top: calc(var(--header-height) + 56px);
  padding-bottom: 80px;
  overflow: hidden;
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(91, 140, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 140, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 25% 45%, #000 10%, transparent 72%);
}

.code-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  pointer-events: none;
  mask-image: radial-gradient(circle at 38% 42%, #000 8%, rgba(0, 0, 0, 0.5) 58%, transparent 84%);
}

body[data-page='home'] .code-field {
  opacity: 0.8;
}

main#main,
#site-footer {
  position: relative;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__title {
  margin: 24px 0 0;
  max-width: 720px;
  font-size: clamp(2.8rem, 6.4vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 600;
}

.hero__title .word {
  display: inline-block;
  /* Room for the tails of ş, ç, y and g inside the clipped box. */
  padding: 0.06em 0.04em 0.2em 0;
  margin: -0.06em -0.04em -0.2em 0;
  overflow: hidden;
  vertical-align: top;
}

.hero__title .word > span {
  display: inline-block;
  padding-bottom: 0.2em;
  margin-bottom: -0.2em;
  transform: translateY(110%);
  opacity: 0;
  animation: word-in 0.9s var(--ease-out) forwards;
}

.hero__title .word:nth-child(3n) > span {
  background: linear-gradient(110deg, var(--accent-bright), var(--accent-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__copy {
  margin: 26px 0 0;
  max-width: 610px;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero__meta {
  display: flex;
  gap: 36px;
  margin-top: 54px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero__meta-value {
  display: block;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
}

.hero__meta-label {
  display: block;
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 11px;
}

.hero__visual {
  position: relative;
  min-height: 480px;
  display: grid;
  place-items: center;
}

.hero-canvas {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.hero-canvas__glow {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 140, 255, 0.28), rgba(168, 85, 247, 0.08) 55%, transparent 72%);
  filter: blur(34px);
  animation: canvas-pulse 6s ease-in-out infinite;
}

.hero-console {
  position: relative;
  z-index: 1;
  width: 100%;
  border: 1px solid rgba(126, 165, 255, 0.26);
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(21, 25, 35, 0.96), rgba(9, 11, 16, 0.97));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transform: rotate(-2deg);
  animation: console-float 7s ease-in-out infinite;
}

.hero-console__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.hero-console__dots {
  display: flex;
  gap: 5px;
  margin-right: 4px;
}

.hero-console__dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #39404f;
}

.hero-console__dots i:first-child {
  background: rgba(248, 113, 113, 0.75);
}

.hero-console__dots i:nth-child(2) {
  background: rgba(251, 191, 36, 0.75);
}

.hero-console__dots i:nth-child(3) {
  background: rgba(74, 222, 128, 0.75);
}

.hero-console__live {
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: var(--radius-pill);
  color: var(--success);
  font-size: 9px;
}

.hero-console__body {
  padding: 22px 20px 18px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 2;
}

.hero-console__line {
  white-space: nowrap;
  opacity: 0;
  animation: line-in 0.5s var(--ease-out) forwards;
}

.hero-console__line:nth-child(2) { animation-delay: 0.15s; }
.hero-console__line:nth-child(3) { animation-delay: 0.3s; }
.hero-console__line:nth-child(4) { animation-delay: 0.45s; }
.hero-console__line:nth-child(5) { animation-delay: 0.6s; }

.hero-console__line--indent {
  padding-left: 18px;
}

.tok-key { color: var(--accent-violet); }
.tok-fn { color: var(--accent-bright); }
.tok-prop { color: #8fb8ff; }
.tok-str { color: var(--success); }
.tok-bool { color: var(--warning); }

.hero-console__meter {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.hero-console__meter i {
  display: block;
  width: var(--w);
  height: 4px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-violet));
  transform-origin: left center;
  animation: meter-in 1.2s var(--ease-out) both;
}

.hero-console__meter i:nth-child(2) { animation-delay: 0.15s; opacity: 0.75; }
.hero-console__meter i:nth-child(3) { animation-delay: 0.3s; opacity: 0.5; }

.hero-console__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.hero-console__foot span:last-child {
  margin-left: auto;
}

.hero-console__dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.1);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.hero-float {
  position: absolute;
  z-index: 2;
  padding: 12px 14px;
  border: 1px solid rgba(126, 165, 255, 0.22);
  border-radius: 14px;
  background: rgba(10, 12, 18, 0.9);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  animation: float-card 6s ease-in-out infinite;
}

.hero-float--latency {
  top: 4%;
  left: -4%;
}

.hero-float--deploy {
  right: -4%;
  bottom: 10%;
  display: flex;
  align-items: center;
  gap: 10px;
  animation-delay: -2s;
}

.hero-float--uptime {
  bottom: -3%;
  left: 4%;
  text-align: center;
  animation-delay: -4s;
}

.hero-float__label {
  display: block;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.hero-float strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.hero-float strong i {
  color: var(--accent-bright);
  font-size: 10px;
  font-style: normal;
}

.hero-float__bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
  margin-top: 8px;
}

.hero-float__bars i {
  flex: 1;
  height: 40%;
  border-radius: 2px;
  background: var(--accent-bright);
  opacity: 0.5;
  animation: bar-jump 1.6s ease-in-out infinite alternate;
}

.hero-float__bars i:nth-child(2) { animation-delay: -0.2s; }
.hero-float__bars i:nth-child(3) { animation-delay: -0.4s; }
.hero-float__bars i:nth-child(4) { animation-delay: -0.6s; }
.hero-float__bars i:nth-child(5) { animation-delay: -0.8s; }
.hero-float__bars i:nth-child(6) { animation-delay: -1s; }
.hero-float__bars i:nth-child(7) { animation-delay: -1.2s; }

.hero-float__check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.12);
  color: var(--success);
  font-size: 13px;
}

.hero-float--deploy strong {
  font-size: 11px;
  letter-spacing: 0.02em;
}

.hero-float--deploy div span {
  display: block;
  margin-top: 2px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 8px;
}

.hero-float__ring {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-bright) 0 88%, rgba(255, 255, 255, 0.06) 88% 100%);
}

.hero-float__ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #0b0e14;
}

.hero-float__ring span {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 12px;
}
.page-transition {
  animation: page-in 0.7s var(--ease-out) both;
}

body.page-leaving .page-transition {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-section] [data-reveal]:nth-child(2) {
  transition-delay: 0.08s;
}

[data-reveal-section] [data-reveal]:nth-child(3) {
  transition-delay: 0.16s;
}

.grid [data-reveal],
.grid > .card {
  transition-delay: var(--stagger, 0s);
}

.animated-border {
  position: relative;
}

.animated-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, transparent 20%, var(--accent) 45%, var(--accent-violet) 55%, transparent 80%);
  background-size: 250% 100%;
  animation: border-travel 4s linear infinite;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes loader-exit {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

@keyframes bracket-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes text-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes bar-load {
  to { transform: translateX(0); }
}

@keyframes word-in {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes canvas-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes console-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(-1deg); }
}

@keyframes line-in {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes meter-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes bar-jump {
  from { height: 25%; opacity: 0.35; }
  to { height: 100%; opacity: 0.85; }
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.12); }
  50% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0.03); }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes border-travel {
  to { background-position: -250% 0; }
}


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
