@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@100..900&family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap");
@import "tailwindcss";

@theme inline {
  /* ── Design system colors (from Stitch HTML) ── */
  --color-background: #020412;
  --color-on-background: #1a1c1c;
  --color-on-surface: #f1f1f1;
  --color-on-surface-variant: #464651;
  --color-surface: #f9f9f9;
  --color-surface-dim: #dadada;
  --color-surface-bright: #f9f9f9;
  --color-surface-tint: #4f57a6;
  --color-surface-container: #eeeeee;
  --color-surface-container-low: #f3f3f3;
  --color-surface-container-high: #e8e8e8;
  --color-surface-container-highest: #e2e2e2;
  --color-surface-container-lowest: #ffffff;
  --color-surface-variant: #e2e2e2;
  --color-surface-deep: #0D1145;
  --color-inverse-surface: #2f3131;
  --color-inverse-on-surface: #f1f1f1;
  --color-outline: #767682;
  --color-outline-variant: #c6c5d3;

  --color-primary: #000000;
  --color-on-primary: #ffffff;
  --color-primary-fixed: #e0e0ff;
  --color-primary-fixed-dim: #bdc2ff;
  --color-primary-container: #040b61;
  --color-on-primary-fixed: #040b61;
  --color-on-primary-fixed-variant: #373f8c;
  --color-on-primary-container: #757dcf;
  --color-inverse-primary: #bdc2ff;

  --color-secondary: #755b00;
  --color-on-secondary: #ffffff;
  --color-secondary-container: #fed979;
  --color-on-secondary-container: #785d03;
  --color-secondary-fixed: #ffdf90;
  --color-secondary-fixed-dim: #e6c366;
  --color-on-secondary-fixed: #241a00;
  --color-on-secondary-fixed-variant: #584400;
  --color-success-pulse: #755B00;

  --color-tertiary: #000000;
  --color-on-tertiary: #ffffff;
  --color-tertiary-container: #1a1c1d;
  --color-on-tertiary-container: #838485;
  --color-tertiary-fixed: #e2e2e3;
  --color-tertiary-fixed-dim: #c6c6c7;
  --color-on-tertiary-fixed: #1a1c1d;
  --color-on-tertiary-fixed-variant: #454748;

  --color-error: #ba1a1a;
  --color-on-error: #ffffff;
  --color-error-container: #ffdad6;
  --color-on-error-container: #93000a;

  --color-gold-accent: #FED665;
  --color-glass-bg: rgba(13, 17, 69, 0.7);

  /* ── Border radius (from Stitch config) ── */
  --radius: 0.25rem;
  --radius-lg: 1rem;
  --radius-xl: 2rem;
  --radius-full: 9999px;

  /* ── Spacing (from Stitch config) ── */
  --spacing-container-max: 1200px;
  --spacing-section-gap-lg: 120px;
  --spacing-section-gap-md: 80px;
  --spacing-unit: 8px;
  --spacing-gutter: 24px;
  --spacing-margin-mobile: 20px;

  /* ── Font families ── */
  --font-headline-md: "Plus Jakarta Sans", sans-serif;
  --font-headline-lg: "Plus Jakarta Sans", sans-serif;
  --font-display-lg: "Plus Jakarta Sans", sans-serif;
  --font-display-lg-mobile: "Plus Jakarta Sans", sans-serif;
  --font-body-lg: "Inter", sans-serif;
  --font-body-md: "Inter", sans-serif;
  --font-label-md: "Inter", sans-serif;
  --font-label-sm: "Inter", sans-serif;
  --font-heading: "Plus Jakarta Sans", sans-serif;
  --font-body: "Inter", sans-serif;
}

/* ── Explicit utility classes (guaranteed, regardless of @theme resolution) ── */
@layer utilities {
  /* Spacing layout tokens */
  .max-w-container-max { max-width: 1200px; }
  .py-section-gap-lg { padding-top: 120px; padding-bottom: 120px; }
  .py-section-gap-md { padding-top: 80px; padding-bottom: 80px; }
  .pb-section-gap-lg { padding-bottom: 120px; }
  .pt-section-gap-lg { padding-top: 120px; }
  .px-margin-mobile { padding-left: 20px; padding-right: 20px; }
  .px-gutter { padding-left: 24px; padding-right: 24px; }
  .gap-gutter { gap: 24px; }
  .h-20 { height: 80px; }
  .mb-section-gap-lg { margin-bottom: 120px; }
  .w-13 { width: 52px; }
  .h-13 { height: 52px; }
  .scale-108 { transform: scale(1.08); }

  /* Color utilities */
  .bg-background { background-color: #08112E; }
  .bg-surface-deep { background-color: #111550; }
  .bg-glass-bg { background-color: rgba(17, 21, 80, 0.7); }
  .bg-gold-accent { background-color: #FED665; }
  .bg-primary-container { background-color: #040b61; }
  .bg-surface-container { background-color: #eeeeee; }
  .text-gold-accent { color: #FED665; }
  .text-on-surface { color: #f1f1f1; }
  .text-on-surface-variant { color: #464651; }
  .text-surface-deep { color: #0D1145; }
  .text-on-primary { color: #ffffff; }
  .text-secondary-fixed-dim { color: #e6c366; }
  .border-gold-accent { border-color: #FED665; }
  .ring-gold-accent { --tw-ring-color: #FED665; }

  /* Font family utilities */
  .font-display-lg { font-family: "Plus Jakarta Sans", sans-serif; }
  .font-display-lg-mobile { font-family: "Plus Jakarta Sans", sans-serif; }
  .font-headline-lg { font-family: "Plus Jakarta Sans", sans-serif; }
  .font-headline-md { font-family: "Plus Jakarta Sans", sans-serif; }
  .font-body-lg { font-family: "Inter", sans-serif; }
  .font-body-md { font-family: "Inter", sans-serif; }
  .font-label-md { font-family: "Inter", sans-serif; }
  .font-label-sm { font-family: "Inter", sans-serif; }
}

/* ── Custom font size utilities (from Stitch fontSize config) ── */
@layer utilities {
  .text-display-lg {
    font-size: 64px;
    line-height: 72px;
    letter-spacing: -0.04em;
    font-weight: 800;
  }
  .text-display-lg-mobile {
    font-size: 32px;
    line-height: 40px;
    letter-spacing: -0.02em;
    font-weight: 800;
  }
  .text-headline-lg {
    font-size: 48px;
    line-height: 56px;
    font-weight: 700;
  }
  .text-headline-md {
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
  }
  .text-body-lg {
    font-size: 18px;
    line-height: 28px;
    font-weight: 400;
  }
  .text-body-md {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
  }
  .text-label-md {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.05em;
    font-weight: 600;
  }
  .text-label-sm {
    font-size: 10px;
    line-height: 12px;
    font-weight: 600;
  }
  .text-headline-lg-mobile {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
  }
  .gold-text-glow {
    background: linear-gradient(135deg, #FED665 0%, #D4AF37 50%, #FED665 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 12px rgba(254, 214, 101, 0.4));
  }
  .pb-safe {
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
  .scrollbar-hide::-webkit-scrollbar { display: none; }
  .scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
}

/* ── Custom component classes (from Stitch CSS) ── */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 32px 64px -12px rgba(1, 7, 95, 0.3);
}

.mesh-gradient {
  background:
    radial-gradient(at 0% 0%, hsla(234, 76%, 15%, 1) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(45, 98%, 70%, 0.15) 0, transparent 50%),
    radial-gradient(at 100% 100%, hsla(234, 76%, 15%, 1) 0, transparent 50%),
    radial-gradient(at 0% 100%, hsla(45, 98%, 70%, 0.15) 0, transparent 50%);
}

.arch-mask {
  clip-path: ellipse(50% 80% at 50% 80%);
}

.arched-image {
  clip-path: ellipse(100% 100% at 50% 100%);
  border-top-left-radius: 120px;
  border-top-right-radius: 120px;
}

/* Smooth pointed arch using border-radius */
.arch-pointed {
  border-top-left-radius: 50% 18%;
  border-top-right-radius: 50% 18%;
}

.gold-glow {
  text-shadow: 0 0 20px rgba(254, 214, 101, 0.4);
}

.packages-mesh-gradient {
  background:
    radial-gradient(at 50% 0%, rgba(254, 214, 101, 0.1) 0%, transparent 50%),
    radial-gradient(at 100% 100%, rgba(55, 63, 140, 0.2) 0%, transparent 50%);
}

@keyframes pulse-gold {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.98); }
}
.animate-pulse-gold {
  animation: pulse-gold 3s ease-in-out infinite;
}

.floating {
  animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ── Auth page backgrounds ── */
.nav-gradient {
  background: linear-gradient(135deg, #111550 0%, #040b61 100%);
}
.auth-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.auth-glass-login {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(254, 214, 101, 0.2);
}
.bg-visionary-gradient {
  background: radial-gradient(circle at top right, #1a237e, #111550 60%, #040b61);
}
.otp-input:focus {
  border-color: #FED665;
  box-shadow: 0 0 0 4px rgba(254, 214, 101, 0.1);
}

/* ── Dashboard dark theme ── */
.mesh-bg {
  background-color: #040b3c;
  background-image:
    radial-gradient(at 0% 0%, hsla(232,82%,15%,1) 0, transparent 50%),
    radial-gradient(at 50% 0%, hsla(242,75%,25%,1) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(232,82%,15%,1) 0, transparent 50%);
}
.dark-glass {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid transparent;
  border-image: linear-gradient(to bottom right, rgba(254, 214, 101, 0.25), transparent 60%) 1;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.dark-glass-pill {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.luminous-text {
  text-shadow: 0 0 15px rgba(254, 214, 101, 0.4);
}
.fiber-optic {
  background: linear-gradient(to bottom, #FED665 0%, rgba(254, 214, 101, 0.1) 100%);
  box-shadow: 0 0 10px rgba(254, 214, 101, 0.5);
}
.spiritual-dust {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(254, 214, 101, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.3;
}
.progress-ring__circle {
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}
@keyframes pulse-ring {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(254, 214, 101, 0.4)); opacity: 1; }
  50% { filter: drop-shadow(0 0 16px rgba(254, 214, 101, 0.8)); opacity: 0.9; }
}
.holographic-ring {
  filter: drop-shadow(0 0 12px rgba(254, 214, 101, 0.6));
  animation: pulse-ring 3s ease-in-out infinite;
}
@keyframes halo-pulse {
  0% { transform: scale(1); opacity: 0.8; box-shadow: 0 0 0 0 rgba(254, 214, 101, 0.6); }
  70% { transform: scale(1.5); opacity: 0; box-shadow: 0 0 0 15px rgba(254, 214, 101, 0); }
  100% { transform: scale(1); opacity: 0; box-shadow: 0 0 0 0 rgba(254, 214, 101, 0); }
}
.halo-active {
  position: relative;
}
.halo-active::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background: rgba(254, 214, 101, 0.4);
  animation: halo-pulse 2s infinite;
}

/* ── Marquee ticker ── */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

/* ── Noise/grain overlay ── */
.grain::after {
  content: '';
  position: fixed;
  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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
}

/* ── Premium marketing utilities ── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.shimmer-btn {
  background-size: 200% auto;
  background-image: linear-gradient(to right, #D4AF37 0%, #FED665 30%, #fff8d6 50%, #FED665 70%, #D4AF37 100%);
  animation: shimmer 3s linear infinite;
}
.gold-border-pulse {
  box-shadow: 0 0 0 0 rgba(254, 214, 101, 0.4);
  animation: gold-border-pulse 2.5s ease-in-out infinite;
}
@keyframes gold-border-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(254, 214, 101, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(254, 214, 101, 0); }
}
.glass-card-gold {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(254, 214, 101, 0.2);
  box-shadow: 0 32px 64px -12px rgba(1, 7, 95, 0.3), inset 0 1px 0 rgba(254, 214, 101, 0.1);
}
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #FED665;
}
.divider-gold {
  height: 1px;
  background: linear-gradient(to right, transparent, #FED665, transparent);
  opacity: 0.3;
}

/* ── Base ── */
@layer base {
  *, *::before, *::after { box-sizing: border-box; }

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

  body {
    min-height: max(884px, 100dvh);
    background-color: #020412;
    color: #f1f1f1;
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
  }
  body.grain::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.022;
    pointer-events: none;
    z-index: 9999;
  }

  ::selection {
    background-color: #FED665;
    color: #0D1145;
  }
}
