/* ============================================================
   Klyne Creative Universe — custom.css
   Design system tokens, keyframes, glassmorphism, mascot
   ============================================================ */

/* ── Google Fonts — Inter (Geist-equivalent) ─────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;0,14..32,900;1,14..32,400&display=swap');

/* ============================================================
   CSS DESIGN TOKENS
   ============================================================ */
:root {
  /* Light Mode — per KLYNE_CREATIVE_STYLING.md */
  --bg-base: #fafafa;
  --bg-surface: #ffffff;
  --bg-subtle: #f4f4f5;
  --border-default: #e4e4e7;
  --border-subtle: #f0f0f2;
  --text-primary: #09090b;
  --text-muted: #71717a;
  --text-faint: #a1a1aa;
  --shadow-color: rgba(9, 9, 11, 0.08);

  --glass-bg-btn: rgba(250, 250, 250, 0.95);
  --ring-color: #d4d4d4;
  --bubble-outline: #27272a; /* dark zinc for light mode */

  /* Motion */
  --transition-theme: background-color 300ms ease, color 300ms ease,
    border-color 300ms ease, box-shadow 300ms ease;
}

[data-theme="dark"] {
  /* Dark Mode — Zinc palette */
  --bg-base: #09090b;
  /* zinc-950 */
  --bg-surface: #18181b;
  /* zinc-900 */
  --bg-subtle: #27272a;
  /* zinc-800 */
  --border-default: #3f3f46;
  /* zinc-700 */
  --border-subtle: #27272a;
  /* zinc-800 */
  --text-primary: #f4f4f5;
  /* zinc-100 */
  --text-muted: #a1a1aa;
  /* zinc-400 */
  --text-faint: #71717a;
  /* zinc-500 */
  --shadow-color: rgba(0, 0, 0, 0.4);

  --glass-bg-btn: rgba(24, 24, 27, 0.95);
  --bubble-outline: #e4e4e7; /* light zinc for dark mode */
}

/* ============================================================
   BASE RESETS
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::-webkit-scrollbar {
  display: none;
}

* {
  scrollbar-width: none;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-optical-sizing: auto;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-base);
  color: var(--text-primary);
  transition: var(--transition-theme);
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

h1,
h2,
h3 {
  letter-spacing: -0.035em;
}

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

/* ============================================================
   KEYFRAMES
   ============================================================ */

/* Entrance */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale3d(0.9, 0.9, 1);
  }

  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Ambient float */
@keyframes float {
  0%, 100% {
    transform: translate3d(0, 0px, 0) rotate(0deg);
  }
  33% {
    transform: translate3d(0, -9px, 0) rotate(0.5deg);
  }
  66% {
    transform: translate3d(0, -4px, 0) rotate(-0.3deg);
  }
}

@keyframes float-reverse {
  0%, 100% {
    transform: translate3d(0, 0px, 0) rotate(0deg);
  }
  33% {
    transform: translate3d(0, 7px, 0) rotate(-0.4deg);
  }
  66% {
    transform: translate3d(0, 3px, 0) rotate(0.3deg);
  }
}

@keyframes float-slow {
  0%, 100% {
    transform: translate3d(0, 0px, 0) scale3d(1, 1, 1);
  }
  50% {
    transform: translate3d(0, -12px, 0) scale3d(1.02, 1.02, 1);
  }
}

@keyframes orb-drift {
  0% {
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1) rotate(0deg);
  }
  25% {
    transform: translate3d(28px, -18px, 0) scale3d(1.06, 1.06, 1) rotate(15deg);
  }
  50% {
    transform: translate3d(14px, 24px, 0) scale3d(0.96, 0.96, 1) rotate(30deg);
  }
  75% {
    transform: translate3d(-20px, 8px, 0) scale3d(1.03, 1.03, 1) rotate(20deg);
  }
  100% {
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1) rotate(0deg);
  }
}

/* Badge & ring */
@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(1.6);
  }
}

@keyframes ring-pulse {

  0%,
  100% {
    opacity: 0.45;
    transform: scale(1.08);
  }

  50% {
    opacity: 0.15;
    transform: scale(1.22);
  }
}

/* Shimmer on primary card */
@keyframes shimmer {
  0% {
    transform: translate3d(-100%, 0, 0);
  }
  100% {
    transform: translate3d(100%, 0, 0);
  }
}

/* Ripple */
@keyframes ripple-out {
  0% {
    transform: scale3d(0, 0, 1);
    opacity: 0.5;
  }
  100% {
    transform: scale3d(4, 4, 1);
    opacity: 0;
  }
}

/* ── LOGO cross-fade ──────────────────────────────────────── */
@keyframes logo-fade-in {
  from {
    opacity: 0;
    transform: scale3d(0.94, 0.94, 1) translate3d(0, 6px, 0);
  }
  to {
    opacity: 1;
    transform: scale3d(1, 1, 1) translate3d(0, 0, 0);
  }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

/* Gradient headline */
.grad-text {
  background: linear-gradient(140deg, var(--text-primary) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glassmorphism card */
.glass-card {
  background-color: rgb(255 255 255 / 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgb(228 228 231 / 0.6);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 4px 16px var(--shadow-color);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .glass-card {
  background-color: rgb(9 9 11 / 0.8);
  border-color: rgb(39 39 42 / 0.6);
}

.glass-card:hover {
  border-color: var(--text-faint);
  box-shadow: 0 8px 32px var(--shadow-color);
}

/* Primary card subtle accents (overrides glass-card) */
.primary-card {
  position: relative;
  overflow: hidden;
  border-width: 1.5px;
}

.primary-card:hover {
  border-color: var(--text-muted);
  box-shadow: 0 12px 40px var(--shadow-color);
}

.primary-card .shimmer-overlay {
  position: absolute;
  top: 0; left: 0; bottom: 0; width: 100%;
  background: linear-gradient(90deg,
      transparent 0%,
      color-mix(in srgb, var(--text-primary) 6%, transparent) 50%,
      transparent 100%);
  transform: translate3d(-100%, 0, 0);
  animation: shimmer 2.8s infinite;
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}

/* 3D tilt card */
.tilt-card {
  will-change: transform;
}

.tilt-card:active {
  transform: scale(0.955) !important;
  transition-duration: 0.07s !important;
}

/* Noise texture overlay */
.noise::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAGFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/sHxcAAAABnRSTlMAAAAAAABupgeRAAAASUlEQVR4AWNgwAoYwYxMDBwMDLwMDAy8DFiAmYGBh4GBkQELMDEw8DMwMvIwkAUYmBn4GRgZeRgZ0E3EwM/AyMjDwMAA00QQAAA/6gMGK8U+zAAAAABJRU5ErkJggg==");
  background-size: 80px;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

.card-inner {
  position: relative;
  z-index: 2;
}

/* Ripple */
.ripple {
  position: absolute;
  border-radius: 9999px;
  background: rgba(161, 161, 170, 0.28);
  pointer-events: none;
  animation: ripple-out 0.6s ease forwards;
  transform-origin: center;
}

/* Entrance animation helpers */
.anim-fade-in {
  animation: fade-in 0.6s ease both;
}

.anim-scale-in {
  animation: scale-in 0.55s ease both;
}

.anim-slide-up {
  animation: slide-up 0.55s ease both;
}

.d1 {
  animation-delay: 0.04s;
}

.d2 {
  animation-delay: 0.11s;
}

.d3 {
  animation-delay: 0.18s;
}

.d4 {
  animation-delay: 0.25s;
}

.d5 {
  animation-delay: 0.32s;
}

.d6 {
  animation-delay: 0.39s;
}

.d7 {
  animation-delay: 0.46s;
}

.d8 {
  animation-delay: 0.53s;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.page-container {
  max-width: 420px;
  margin: 0 auto;
  padding: 4rem 1rem 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  position: relative;
  z-index: 10;
}

/* ── Header — bare logo, no box ── */
.brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  /* gentle floating applied inline via animation */
}

.brand-logo {
  height: 7rem;
  /* enlarged further */
  width: auto;
  max-width: 16rem;
  object-fit: contain;
  object-position: center;
  animation: logo-fade-in 0.4s ease both;
  transition: opacity 0.22s ease, transform 0.22s ease;
  filter: drop-shadow(0 4px 16px var(--shadow-color));
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  background: var(--glass-bg-btn);
  border: 1px solid var(--border-default);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: var(--transition-theme);
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #18181b;
  /* zinc-900 for light mode */
  animation: pulse-dot 2s ease-in-out infinite;
}

[data-theme="dark"] .status-dot {
  background: #f4f4f5;
  /* zinc-100 for dark mode */
}

.headline {
  font-size: clamp(2.2rem, 9vw, 3rem);
  font-weight: 900;
  text-align: center;
  line-height: 1;
}

.square-dot {
  font-size: 0.4em;
  vertical-align: baseline;
  margin-left: 0.08em;
}

.subline {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 17rem;
  line-height: 1.65;
  transition: var(--transition-theme);
}

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-default), transparent);
  opacity: 0.6;
}

/* ── Link cards ── */
.link-card {
  width: 100%;
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.link-card-icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-default);
  background: var(--bg-subtle);
  transition: var(--transition-theme);
}

.link-card-sublabel {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.125rem;
  transition: var(--transition-theme);
}

.link-card-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: var(--transition-theme);
}

.link-card-chevron {
  flex-shrink: 0;
  color: var(--text-faint);
  transition: color 200ms ease, transform 200ms ease;
}

.link-card:hover .link-card-chevron {
  color: var(--text-muted);
  transform: translateX(2px);
}

.primary-card .link-card-sublabel {
  color: var(--text-faint);
}

.primary-card .link-card-label {
  font-size: 1.05rem;
  font-weight: 800;
}

.primary-card .link-card-icon {
  background: color-mix(in srgb, var(--text-primary) 6%, transparent);
  border-color: color-mix(in srgb, var(--text-primary) 12%, transparent);
}

.primary-card .desc-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

/* ── Theme toggle ── */
#theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  border: 1px solid var(--border-default);
  background: var(--glass-bg-btn);
  color: var(--text-muted);
  transition: var(--transition-theme),
    color 200ms ease,
    transform 200ms ease;
}

#theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--text-faint);
  transform: scale(1.08) rotate(8deg);
}

#theme-toggle:active {
  transform: scale(0.92);
}

/* ── Ambient Background FX ── */
.bg-fx-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  transform: translateZ(0);
}

.bg-fx-layer::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Subtly moving noise overlay */
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAGFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/sHxcAAAABnRSTlMAAAAAAABupgeRAAAASUlEQVR4AWNgwAoYwYxMDBwMDLwMDAy8DFiAmYGBh4GBkQELMDEw8DMwMvIwkAUYmBn4GRgZeRgZ0E3EwM/AyMjDwMAA00QQAAA/6gMGK8U+zAAAAABJRU5ErkJggg==");
  background-size: 100px;
  opacity: 0.15;
  animation: noise-shift 8s steps(10) infinite;
  z-index: 1;
}

@keyframes noise-shift {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 256px 256px;
  }
}

.orb {
  position: absolute;
  border-radius: 9999px;
  opacity: 0.25; /* Ditingkatkan agar efek glass blur pada kartu kembali terlihat */
  transition: var(--transition-theme);
  will-change: transform;
}

.orb-1 {
  width: 28rem;
  height: 28rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--bg-subtle) 90%, transparent) 0%, transparent 65%);
  top: -10rem;
  right: -8rem;
  animation: orb-drift 14s ease-in-out infinite;
}

.orb-2 {
  width: 24rem;
  height: 24rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--border-default) 60%, transparent) 0%, transparent 65%);
  bottom: -8rem;
  left: -8rem;
  animation: float-reverse 11s ease-in-out infinite;
}

.orb-3 {
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--text-faint) 30%, transparent) 0%, transparent 65%);
  top: 40%;
  left: 5%;
  animation: float-slow 13s ease-in-out infinite;
}

.orb-4 {
  width: 14rem;
  height: 14rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--bg-subtle) 70%, transparent) 0%, transparent 65%);
  top: 25%;
  right: 5%;
  animation: float 9s ease-in-out infinite;
}

.orb-line {
  position: absolute;
  border-radius: 9999px;
  border: 2px solid var(--bubble-outline);
  opacity: 0.4; /* Diturunkan sesuai request */
  transition: var(--transition-theme);
  will-change: transform;
}

.orb-line-1 {
  width: 45rem;
  height: 45rem;
  top: -10rem;
  left: -20rem;
  animation: orb-drift 22s ease-in-out infinite alternate;
}

.orb-line-2 {
  width: 38rem;
  height: 38rem;
  bottom: -5rem;
  right: -15rem;
  animation: float-reverse 19s ease-in-out infinite alternate;
}

/* Floating Geometric Particles */
.particle {
  position: absolute;
  color: var(--text-faint);
  font-family: ui-monospace, SFMono-Regular, monospace;
  opacity: 0;
  animation: particle-drift linear infinite;
}

@keyframes particle-drift {
  0% {
    transform: translateY(110vh) rotate(0deg) scale(0.8);
    opacity: 0;
  }

  10% {
    opacity: 0.35;
  }

  90% {
    opacity: 0.35;
  }

  100% {
    transform: translateY(-10vh) rotate(360deg) scale(1.2);
    opacity: 0;
  }
}

.p-1 {
  left: 15%;
  animation-duration: 26s;
  animation-delay: 0s;
  font-size: 1.1rem;
}

.p-2 {
  left: 82%;
  animation-duration: 32s;
  animation-delay: -12s;
  font-size: 0.8rem;
}

.p-3 {
  left: 45%;
  animation-duration: 22s;
  animation-delay: -5s;
  font-size: 0.6rem;
}

.p-4 {
  left: 25%;
  animation-duration: 28s;
  animation-delay: -18s;
  font-size: 0.9rem;
}

.p-5 {
  left: 70%;
  animation-duration: 36s;
  animation-delay: -8s;
  font-size: 1.2rem;
}

.p-6 {
  left: 55%;
  animation-duration: 24s;
  animation-delay: -22s;
  font-size: 0.75rem;
}

.p-7 {
  left: 10%;
  animation-duration: 29s;
  animation-delay: -15s;
  font-size: 1.0rem;
}

.p-8 {
  left: 90%;
  animation-duration: 21s;
  animation-delay: -3s;
  font-size: 0.85rem;
}

.p-9 {
  left: 35%;
  animation-duration: 34s;
  animation-delay: -27s;
  font-size: 1.15rem;
}

.p-10 {
  left: 65%;
  animation-duration: 27s;
  animation-delay: -9s;
  font-size: 0.95rem;
}

/* ── Footer ── */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.social-row {
  display: flex;
  gap: 0.625rem;
  align-items: center;
}

.social-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-default);
  background: var(--glass-bg-btn);
  transition: var(--transition-theme), border-color 200ms, transform 200ms, box-shadow 200ms;
  position: relative;
  contain: layout paint;
}

.social-btn img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  object-position: center;
  display: block;
}

.social-btn svg {
  width: 1rem;
  height: 1rem;
  color: var(--text-muted);
  transition: color 200ms;
}

.social-btn:hover {
  border-color: var(--text-faint);
  box-shadow: 0 4px 16px var(--shadow-color);
  transform: scale(1.12) translateY(-1px);
}

.social-btn:hover svg {
  color: var(--text-primary);
}

.social-btn:active {
  transform: scale(0.91);
}

.footer-domain {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: var(--text-faint);
}

.footer-copy {
  font-size: 0.7rem;
  color: var(--text-faint);
  text-align: center;
}

/* ── Responsive tweaks ── */
@media (max-width: 400px) {
  .page-container {
    padding: 3.5rem 0.875rem 4rem;
  }
}