/* XPlus Technology — teaser landing page
   Token warna dari README bagian 6.2; logo dari aset resmi XPlus. */

:root {
  --color-bg: #070B14;
  --color-surface: #101827;
  --color-primary: #5B8CFF;
  --color-secondary: #42E8E0;
  --color-text: #F4F7FB;
  --color-muted: #A8B3C7;
  --color-line: rgba(168, 179, 199, 0.14);
  --color-line-strong: rgba(168, 179, 199, 0.28);
  --gradient-accent: linear-gradient(100deg, var(--color-primary) 0%, var(--color-secondary) 100%);

  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --container: 76rem;
  --container-narrow: 54rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 1rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Tekstur noise halus agar latar gelap tidak terasa datar */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, p {
  margin: 0;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

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

::selection {
  background: rgba(91, 140, 255, 0.4);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: var(--color-bg);
  font-weight: 600;
  border-radius: 0 0 0.5rem 0.5rem;
}

.skip-link:focus {
  top: 0;
}

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

.container--narrow {
  max-width: var(--container-narrow);
}

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  padding-block: 1.25rem;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  text-decoration: none;
}

.brand img {
  width: auto;
  height: 28px;
}

.brand__sub {
  padding-left: 0.75rem;
  border-left: 1px solid var(--color-line-strong);
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hud-tag {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: rgba(16, 24, 39, 0.5);
  backdrop-filter: blur(8px);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hud-tag__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-secondary);
  box-shadow: 0 0 10px var(--color-secondary);
  animation: blink 2s ease-in-out infinite;
}

@media (min-width: 40rem) {
  .hud-tag {
    display: inline-flex;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: 6rem 4rem;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

.hero__aurora {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(40% 35% at 70% 40%, rgba(91, 140, 255, 0.28), transparent 70%),
    radial-gradient(30% 30% at 85% 70%, rgba(66, 232, 224, 0.14), transparent 70%),
    radial-gradient(35% 40% at 15% 20%, rgba(91, 140, 255, 0.10), transparent 70%);
  filter: blur(30px);
  animation: aurora 18s ease-in-out infinite alternate;
}

.hero__grid {
  position: absolute;
  inset: 58% -30% -20%;
  background-image:
    linear-gradient(var(--color-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-line) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(500px) rotateX(62deg);
  transform-origin: top;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, transparent 85%);
  mask-image: linear-gradient(to bottom, transparent, #000 25%, transparent 85%);
  animation: grid-flow 6s linear infinite;
}

.hero__spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--sx, 70%) var(--sy, 40%), rgba(91, 140, 255, 0.12), transparent 70%);
  transition: background 0.2s;
}

.hero__layout {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  color: var(--color-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  animation: fade-up 0.8s var(--ease-out) 0.1s both;
}

.eyebrow__line {
  flex: none;
  width: 2rem;
  height: 1px;
  background: var(--gradient-accent);
  box-shadow: 0 0 8px var(--color-secondary);
}

.hero__title {
  font-size: clamp(2.4rem, 6.4vw, 5.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.word {
  display: inline-block;
  animation: word-in 0.8s var(--ease-out) both;
}

.word:nth-child(1) { animation-delay: 0.15s; }
.word:nth-child(2) { animation-delay: 0.21s; }
.word:nth-child(3) { animation-delay: 0.27s; }
.word:nth-child(4) { animation-delay: 0.33s; }
.word:nth-child(5) { animation-delay: 0.39s; }
.word:nth-child(6) { animation-delay: 0.45s; }
.word:nth-child(7) { animation-delay: 0.51s; }

.word--accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(66, 232, 224, 0.25));
}

.hero__lead {
  max-width: 36rem;
  margin-top: 1.5rem;
  color: var(--color-muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.7;
  animation: fade-up 0.8s var(--ease-out) 0.6s both;
}

.status-panel {
  max-width: 30rem;
  margin-top: 2rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--color-line);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, rgba(16, 24, 39, 0.75), rgba(16, 24, 39, 0.4));
  backdrop-filter: blur(10px);
  animation: fade-up 0.8s var(--ease-out) 0.75s both;
}

.status-panel__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
}

.status-panel__label {
  color: var(--color-secondary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.status-panel__value {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-panel__bar {
  position: relative;
  height: 2px;
  margin-top: 0.85rem;
  overflow: hidden;
  border-radius: 2px;
  background: var(--color-line);
}

.status-panel__bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 35%;
  background: var(--gradient-accent);
  box-shadow: 0 0 12px var(--color-secondary);
  animation: scan 2.4s ease-in-out infinite;
}

.link-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  margin-top: 1.25rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
  animation: fade-up 0.8s var(--ease-out) 0.9s both;
}

.link-scroll svg {
  animation: nudge 2s ease-in-out infinite;
}

.link-scroll:hover {
  color: var(--color-text);
}

/* Logo mark */
.core {
  order: -1;
  width: min(62vw, 15rem);
  margin-inline: auto;
  perspective: 900px;
}

.core__inner {
  position: relative;
  aspect-ratio: 1;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease-out);
}

.core__rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: fade-in 1.2s ease-out 0.2s both;
}

.ring {
  fill: none;
  stroke: var(--color-line-strong);
  stroke-width: 1;
  transform-origin: 200px 200px;
}

.ring--outer {
  stroke: rgba(91, 140, 255, 0.35);
}

.ring--dash {
  stroke-dasharray: 2 10;
  stroke: rgba(66, 232, 224, 0.45);
  animation: spin 50s linear infinite;
}

.ring--inner {
  stroke-dasharray: 90 30 10 30;
  stroke: rgba(91, 140, 255, 0.4);
  animation: spin 30s linear infinite reverse;
}

.ring--ticks {
  stroke: rgba(244, 247, 251, 0.5);
  animation: spin 80s linear infinite;
}

.ring__node {
  fill: var(--color-secondary);
  filter: drop-shadow(0 0 6px var(--color-secondary));
  transform-origin: 200px 200px;
  animation: spin 14s linear infinite;
}

.core__glow {
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(66, 232, 224, 0.35), rgba(91, 140, 255, 0.18) 45%, transparent 70%);
  filter: blur(20px);
  animation: glow-in 1.6s ease-out 1.1s both, breathe 5s ease-in-out 2.7s infinite;
}

.core__mark {
  position: absolute;
  inset: 25%;
  width: 50%;
  height: 50%;
  overflow: visible;
  transform: translateZ(40px);
  filter: drop-shadow(0 0 22px rgba(91, 140, 255, 0.45));
}

.piece {
  transform-box: fill-box;
  animation: piece-in 1.2s var(--ease-out) both;
}

.piece--tl { --from: -70px, -70px; animation-delay: 0.25s; }
.piece--tr { --from: 70px, -70px; animation-delay: 0.35s; }
.piece--bl { --from: -70px, 70px; animation-delay: 0.45s; }
.piece--br { --from: 70px, 70px; animation-delay: 0.55s; }

.core__plus {
  fill: var(--color-secondary);
  filter: drop-shadow(0 0 8px var(--color-secondary)) drop-shadow(0 0 22px rgba(66, 232, 224, 0.7));
  transform-box: fill-box;
  transform-origin: center;
  animation: plus-in 0.9s var(--ease-out) 1.3s both, plus-pulse 4s ease-in-out 2.4s infinite;
}

.hud-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(66, 232, 224, 0.6);
  border-style: solid;
  border-width: 0;
  animation: fade-in 0.6s ease-out 1.6s both;
}

.hud-corner--tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.hud-corner--tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.hud-corner--bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.hud-corner--br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

@media (min-width: 60rem) {
  .hero {
    padding-block: 7rem 5rem;
  }

  .hero__layout {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
  }

  .core {
    order: 0;
    width: 100%;
    max-width: 30rem;
  }
}

/* ---------- Ticker ---------- */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--color-line);
  background: rgba(16, 24, 39, 0.6);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.ticker__track span {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  padding: 1.1rem 0 1.1rem 2rem;
  color: var(--color-muted);
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker__track span::after {
  content: "+";
  color: var(--color-secondary);
  font-weight: 700;
}

/* ---------- Section umum ---------- */
.section {
  position: relative;
  padding-block: clamp(5rem, 12vw, 9rem);
}

.section__kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section__kicker span {
  color: var(--color-secondary);
}

.section__kicker::after {
  content: "";
  flex: 0 1 4rem;
  height: 1px;
  background: var(--color-line-strong);
}

.section__title {
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* ---------- Teaser ---------- */
.teaser__statement {
  font-size: clamp(1.6rem, 4.6vw, 3.1rem);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.js .teaser__statement .w {
  opacity: 0.16;
  transition: opacity 0.35s ease, color 0.35s ease;
}

.js .teaser__statement .w.is-lit {
  opacity: 1;
}

/* ---------- Area fokus ---------- */
.focus {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(91, 140, 255, 0.08), transparent 70%),
    var(--color-surface);
  border-block: 1px solid var(--color-line);
}

.focus__head {
  display: grid;
  gap: 1rem;
}

.focus__intro {
  max-width: 28rem;
  color: var(--color-muted);
}

@media (min-width: 60rem) {
  .focus__head {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 3rem;
  }
}

.focus__list {
  display: grid;
  gap: 1rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .focus__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 68rem) {
  .focus__list {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Kartu pertama dibuat lebar agar 7 kartu membentuk grid penuh (2 kolom: 1+3 baris, 4 kolom: 2 baris) */
@media (min-width: 40rem) {
  .card--wide {
    grid-column: span 2;
  }
}

.card {
  position: relative;
  padding: 2rem 1.75rem 1.75rem;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(7, 11, 20, 0.7), rgba(7, 11, 20, 0.35));
  transition: border-color 0.3s, transform 0.4s var(--ease-out);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(91, 140, 255, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover {
  border-color: rgba(91, 140, 255, 0.45);
  transform: translateY(-4px);
}

.card:hover::before {
  opacity: 1;
}

.card__index {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 2.5rem;
  padding: 8px;
  border: 1px solid rgba(66, 232, 224, 0.3);
  border-radius: 10px;
  background: rgba(66, 232, 224, 0.06);
  fill: none;
  stroke: var(--color-secondary);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card p {
  margin-top: 0.5rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* ---------- Follow ---------- */
.follow {
  overflow: hidden;
  text-align: center;
}

.follow__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.follow__signal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
}

.follow__signal span {
  position: absolute;
  top: -18rem;
  left: -18rem;
  width: 36rem;
  height: 36rem;
  border: 1px solid rgba(91, 140, 255, 0.35);
  border-radius: 50%;
  animation: signal 6s ease-out infinite;
}

.follow__signal span:nth-child(2) { animation-delay: 2s; }
.follow__signal span:nth-child(3) { animation-delay: 4s; }

.follow__signal img {
  position: absolute;
  top: -48px;
  left: -48px;
  opacity: 0.06;
  transform: scale(4);
}

.follow__title {
  font-size: clamp(2.25rem, 7vw, 4.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, var(--color-text) 30%, rgba(168, 179, 199, 0.7));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.follow__note {
  max-width: 32rem;
  margin-top: 1.5rem;
  color: var(--color-muted);
  font-size: clamp(1rem, 1.8vw, 1.125rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  margin-top: 2.25rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  background: var(--gradient-accent);
  color: var(--color-bg);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 10px 30px rgba(91, 140, 255, 0.3);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset, 0 14px 40px rgba(66, 232, 224, 0.35);
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 0.875rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer__logo {
  width: auto;
  height: 22px;
}

.site-footer__tagline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.social {
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Reveal on scroll (hanya bila JS aktif) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.js .focus__list [data-reveal]:nth-child(2) { transition-delay: 0.1s; }
.js .focus__list [data-reveal]:nth-child(3) { transition-delay: 0.2s; }
.js .focus__list [data-reveal]:nth-child(4) { transition-delay: 0.3s; }
.js .focus__list [data-reveal]:nth-child(5) { transition-delay: 0.1s; }
.js .focus__list [data-reveal]:nth-child(6) { transition-delay: 0.2s; }
.js .focus__list [data-reveal]:nth-child(7) { transition-delay: 0.3s; }

/* ---------- Keyframes ---------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes word-in {
  from { opacity: 0; transform: translateY(0.45em); filter: blur(10px); }
}

@keyframes piece-in {
  from { opacity: 0; transform: translate(var(--from)) scale(0.9); }
}

@keyframes plus-in {
  from { opacity: 0; transform: scale(0.2) rotate(-90deg); }
}

@keyframes plus-pulse {
  50% { opacity: 0.55; }
}

@keyframes glow-in {
  from { opacity: 0; transform: scale(0.6); }
}

@keyframes breathe {
  50% { opacity: 0.6; transform: scale(1.08); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes blink {
  50% { opacity: 0.3; }
}

@keyframes scan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

@keyframes nudge {
  50% { transform: translateY(3px); }
}

@keyframes aurora {
  to { transform: translate3d(-4%, 3%, 0) scale(1.08); }
}

@keyframes grid-flow {
  to { background-position: 0 56px; }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes signal {
  from { opacity: 0.7; transform: scale(0.15); }
  to { opacity: 0; transform: scale(1); }
}

/* ---------- Reduced motion: tampilkan keadaan akhir tanpa gerak ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .js .teaser__statement .w {
    opacity: 1;
  }

  .hero__canvas {
    display: none;
  }
}
