/* ═══════════════════════════════════════════════════════════
   UP Agency — Status Pages Shared Styles
   ═══════════════════════════════════════════════════════════ */

/* ─── Google Fonts ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ─── CSS Custom Properties (Design Tokens) ──────────────── */
:root {
  /* Brand Colors */
  --color-dark: #302e2f;
  --color-dark-lighter: #3d3a3b;
  --color-purple: #6262aa;
  --color-indigo: #38348e;
  --color-red: #bf2026;
  --color-kawaii-blue: #7eb8da;
  --color-royal-pink: #e88fc0;

  /* Semantic Colors */
  --color-bg: #1a1819;
  --color-surface: rgba(48, 46, 47, 0.45);
  --color-surface-border: rgba(255, 255, 255, 0.08);
  --color-text-primary: #f5f0f1;
  --color-text-secondary: rgba(245, 240, 241, 0.65);
  --color-text-muted: rgba(245, 240, 241, 0.4);

  /* Typography */
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: clamp(0.7rem, 1.2vw, 0.8rem);
  --font-size-sm: clamp(0.8rem, 1.5vw, 0.9rem);
  --font-size-base: clamp(0.9rem, 1.8vw, 1rem);
  --font-size-lg: clamp(1rem, 2.2vw, 1.15rem);
  --font-size-xl: clamp(1.3rem, 3vw, 1.7rem);
  --font-size-2xl: clamp(1.6rem, 4vw, 2.3rem);
  --font-size-3xl: clamp(2rem, 5vw, 3rem);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Borders & Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-glow-purple: 0 0 60px rgba(98, 98, 170, 0.2);
  --shadow-glow-pink: 0 0 60px rgba(232, 143, 192, 0.15);
  --shadow-card: 0 25px 60px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-normal: 400ms;
  --duration-slow: 800ms;
}

/* ─── Reset & Base ────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

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

/* ─── Animated Background ─────────────────────────────────── */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* Mesh gradient base */
.bg-canvas::before {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(56, 52, 142, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(126, 184, 218, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(232, 143, 192, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 30%, rgba(98, 98, 170, 0.2) 0%, transparent 50%);
  animation: meshMove 20s ease-in-out infinite alternate;
}

@keyframes meshMove {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(-5%, 3%) rotate(1deg);
  }
  66% {
    transform: translate(3%, -5%) rotate(-1deg);
  }
  100% {
    transform: translate(-3%, 5%) rotate(0.5deg);
  }
}

/* Floating orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: orbFloat 15s ease-in-out infinite alternate;
  will-change: transform;
}

.orb--1 {
  width: clamp(200px, 35vw, 500px);
  height: clamp(200px, 35vw, 500px);
  background: radial-gradient(circle, var(--color-kawaii-blue) 0%, transparent 70%);
  top: -10%;
  right: -5%;
  animation-duration: 18s;
  animation-delay: 0s;
}

.orb--2 {
  width: clamp(250px, 40vw, 600px);
  height: clamp(250px, 40vw, 600px);
  background: radial-gradient(circle, var(--color-royal-pink) 0%, transparent 70%);
  bottom: -15%;
  left: -10%;
  animation-duration: 22s;
  animation-delay: -5s;
}

.orb--3 {
  width: clamp(150px, 25vw, 350px);
  height: clamp(150px, 25vw, 350px);
  background: radial-gradient(circle, var(--color-indigo) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 25s;
  animation-delay: -10s;
}

.orb--4 {
  width: clamp(100px, 20vw, 300px);
  height: clamp(100px, 20vw, 300px);
  background: radial-gradient(circle, var(--color-purple) 0%, transparent 70%);
  top: 20%;
  left: 20%;
  animation-duration: 20s;
  animation-delay: -3s;
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -40px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(40px, 30px) scale(1.08);
  }
  100% {
    transform: translate(-10px, -30px) scale(1);
  }
}

/* Grain / noise overlay */
.bg-canvas::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

/* ─── Main Content Container ──────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-xl);
  width: 100%;
  max-width: 100%;
}

/* ─── Glass Card ──────────────────────────────────────────── */
.glass-card {
  background: var(--color-surface);
  backdrop-filter: blur(40px) saturate(1.5);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 6vw, 3.5rem);
  width: 100%;
  max-width: 520px;
  text-align: center;
  box-shadow: var(--shadow-card), var(--shadow-glow-purple);
  position: relative;
  overflow: hidden;

  /* Entry animation */
  animation: cardEnter 1s var(--ease-out) forwards;
  opacity: 0;
  transform: translateY(30px);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15) 30%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.15) 70%,
    transparent
  );
}

@keyframes cardEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Logo ────────────────────────────────────────────────── */
.logo-container {
  margin-bottom: var(--space-xl);
  animation: logoEnter 1s var(--ease-out) 0.2s forwards;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
}

.logo-container img {
  width: clamp(70px, 15vw, 100px);
  height: clamp(70px, 15vw, 100px);
  object-fit: contain;
  border-radius: 50%;
  animation: logoPulse 4s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(126, 184, 218, 0.25));
}

@keyframes logoEnter {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 8px 24px rgba(126, 184, 218, 0.25));
  }
  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 12px 32px rgba(232, 143, 192, 0.35));
  }
}

/* ─── Status Icon ─────────────────────────────────────────── */
.status-icon {
  margin-bottom: var(--space-lg);
  animation: iconEnter 1s var(--ease-out) 0.35s forwards;
  opacity: 0;
  transform: translateY(15px);
}

.status-icon svg {
  width: clamp(40px, 8vw, 56px);
  height: clamp(40px, 8vw, 56px);
}

@keyframes iconEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Suspended icon — subtle shake */
.status-icon--suspended svg {
  animation: iconShake 5s ease-in-out infinite;
  color: var(--color-royal-pink);
}

@keyframes iconShake {
  0%, 86%, 100% {
    transform: rotate(0);
  }
  88% {
    transform: rotate(-8deg);
  }
  90% {
    transform: rotate(8deg);
  }
  92% {
    transform: rotate(-6deg);
  }
  94% {
    transform: rotate(6deg);
  }
  96% {
    transform: rotate(-3deg);
  }
  98% {
    transform: rotate(3deg);
  }
}

/* Construction icon — gentle bounce */
.status-icon--construction svg {
  animation: iconBounce 3s ease-in-out infinite;
  color: var(--color-kawaii-blue);
}

@keyframes iconBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* ─── Domain Label ────────────────────────────────────────── */
.domain-label {
  display: inline-block;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-kawaii-blue);
  background: rgba(126, 184, 218, 0.1);
  border: 1px solid rgba(126, 184, 218, 0.2);
  border-radius: var(--radius-full);
  padding: var(--space-xs) var(--space-lg);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.02em;
  word-break: break-all;

  animation: textEnter 1s var(--ease-out) 0.4s forwards;
  opacity: 0;
  transform: translateY(15px);
}

.domain-label:empty {
  display: none;
}

/* ─── Typography ──────────────────────────────────────────── */
.status-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--color-text-primary) 0%, rgba(245, 240, 241, 0.8) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: textEnter 1s var(--ease-out) 0.45s forwards;
  opacity: 0;
  transform: translateY(15px);
}

.status-subtitle {
  font-size: var(--font-size-base);
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-2xl);
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;

  animation: textEnter 1s var(--ease-out) 0.55s forwards;
  opacity: 0;
  transform: translateY(15px);
}

@keyframes textEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── CTA Button ──────────────────────────────────────────── */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  background: linear-gradient(135deg, var(--color-indigo) 0%, var(--color-purple) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: 0 4px 20px rgba(56, 52, 142, 0.3);
  position: relative;
  overflow: hidden;

  animation: textEnter 1s var(--ease-out) 0.65s forwards;
  opacity: 0;
  transform: translateY(15px);
}

.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-royal-pink) 100%);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  border-radius: inherit;
}

.cta-button:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 32px rgba(98, 98, 170, 0.45);
  border-color: rgba(255, 255, 255, 0.2);
}

.cta-button:hover::before {
  opacity: 1;
}

.cta-button:active {
  transform: translateY(0) scale(0.98);
}

.cta-button svg,
.cta-button span {
  position: relative;
  z-index: 1;
}

.cta-button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ─── Contact Info ────────────────────────────────────────── */
.contact-info {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);

  animation: textEnter 1s var(--ease-out) 0.75s forwards;
  opacity: 0;
  transform: translateY(15px);
}

.contact-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

.contact-item:hover {
  color: var(--color-text-primary);
}

.contact-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.6;
  flex-shrink: 0;
}

/* Divider */
.divider {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-surface-border), transparent);
  margin: var(--space-sm) auto;
}

/* ─── Progress Bar (Construction Page) ────────────────────── */
.progress-section {
  margin-top: var(--space-2xl);
  width: 100%;

  animation: textEnter 1s var(--ease-out) 0.85s forwards;
  opacity: 0;
  transform: translateY(15px);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-kawaii-blue), var(--color-royal-pink), var(--color-purple));
  background-size: 200% 100%;
  animation: progressGrow 1.5s var(--ease-out) 1.2s forwards, progressShimmer 3s ease-in-out infinite;
  width: 0%;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--color-royal-pink);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(232, 143, 192, 0.6);
  animation: progressDot 2s ease-in-out infinite;
}

@keyframes progressGrow {
  to {
    width: var(--progress-value, 70%);
  }
}

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

@keyframes progressDot {
  0%, 100% {
    box-shadow: 0 0 12px rgba(232, 143, 192, 0.4);
  }
  50% {
    box-shadow: 0 0 20px rgba(232, 143, 192, 0.8);
  }
}

/* ─── Footer ──────────────────────────────────────────────── */
.page-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  text-align: center;
  padding: var(--space-lg) var(--space-xl);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);

  animation: textEnter 1s var(--ease-out) 1s forwards;
  opacity: 0;
  transform: translateY(10px);
}

.page-footer a {
  color: var(--color-text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
  font-weight: 500;
}

.page-footer a:hover {
  color: var(--color-royal-pink);
}

/* ─── Variant: Construction (more vibrant) ────────────────── */
.page--construction .orb--1 {
  opacity: 0.6;
}

.page--construction .orb--2 {
  opacity: 0.55;
}

.page--construction .glass-card {
  box-shadow: var(--shadow-card), var(--shadow-glow-pink);
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .glass-card {
    padding: clamp(1.5rem, 5vw, 2rem);
    border-radius: var(--radius-lg);
    margin: 0 var(--space-md);
  }

  .cta-button {
    width: 100%;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
  }

  .page-footer {
    position: relative;
    margin-top: var(--space-xl);
  }
}

@media (max-width: 360px) {
  .glass-card {
    padding: var(--space-lg);
  }
}

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

/* ─── Selection ───────────────────────────────────────────── */
::selection {
  background: rgba(126, 184, 218, 0.3);
  color: var(--color-text-primary);
}
