/* ============================================
   REGANAM LIMITED — Corporate Website
   Aesthetic: Cosmic Tech / Luminous Dark
   Fonts: Syne (display) + Manrope (body)
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg-deep: #07070e;
  --bg-primary: #0a0a14;
  --bg-secondary: #10101c;
  --bg-surface: rgba(255, 255, 255, 0.035);
  --bg-surface-hover: rgba(255, 255, 255, 0.065);
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text-primary: #e4e4ee;
  --text-secondary: #8888a0;
  --text-tertiary: #5a5a72;
  --accent-purple: #8B5CF6;
  --accent-purple-dim: rgba(139, 92, 246, 0.15);
  --accent-pink: #F546C4;
  --accent-pink-dim: rgba(245, 70, 196, 0.12);
  --gradient-accent: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-deep);
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

address {
  font-style: normal;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 56px;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
  margin: 16px auto 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: all 0.35s var(--ease-out-expo);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  background: var(--gradient-accent);
  color: #fff;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #a78bfa, #f0abfc);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
}

.btn--primary:hover::before {
  opacity: 1;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.35);
}

.btn--outline {
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
}

.btn--outline:hover {
  border-color: var(--accent-purple);
  color: #fff;
  background: var(--accent-purple-dim);
  transform: translateY(-1px);
}

.btn svg {
  transition: transform 0.3s var(--ease-out-expo);
}

.btn:hover svg {
  transform: translate(2px, -2px);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.navbar.scrolled {
  background: rgba(7, 7, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  display: block;
  height: 36px;
  width: auto;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.nav-logo:hover img {
  opacity: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--gradient-accent);
  transition: width 0.35s var(--ease-out-expo);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-deep);
}

/* Background layers */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform, opacity;
}

.hero-glow--primary {
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, rgba(139, 92, 246, 0.08) 40%, transparent 70%);
  animation: glowPulse 8s ease-in-out infinite;
}

.hero-glow--secondary {
  width: 400px;
  height: 400px;
  top: 55%;
  left: 55%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(245, 70, 196, 0.15) 0%, rgba(245, 70, 196, 0.05) 40%, transparent 70%);
  animation: glowPulse2 10s ease-in-out infinite 2s;
}

@keyframes glowPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.25);
    opacity: 1;
  }
}

@keyframes glowPulse2 {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-45%, -55%) scale(1.15);
    opacity: 0.8;
  }
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 720px;
}

.hero-logo-wrap {
  margin-bottom: 32px;
  animation: heroFadeUp 1s var(--ease-out-expo) 0.2s both;
}

.hero-logo {
  display: inline-block;
  width: clamp(200px, 30vw, 280px);
  filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.2));
}

.hero-title {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroFadeUp 1s var(--ease-out-expo) 0.4s both;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 40px;
  animation: heroFadeUp 1s var(--ease-out-expo) 0.6s both;
}

.hero-cta {
  animation: heroFadeUp 1s var(--ease-out-expo) 0.8s both;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  animation: heroFadeUp 1s var(--ease-out-expo) 1.2s both;
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent-purple), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.2); }
}

/* ============================================
   PRODUCTS
   ============================================ */
.products {
  padding: 120px 0;
  position: relative;
  background: var(--bg-primary);
}

.products::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, var(--bg-deep), var(--bg-primary));
  pointer-events: none;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

/* Product card */
.product-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 36px 40px;
  text-align: center;
  overflow: hidden;
  transition: all 0.5s var(--ease-out-expo);
  isolation: isolate;
}

/* Gradient border overlay */
.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(
    160deg,
    rgba(139, 92, 246, 0.25),
    transparent 40%,
    transparent 60%,
    rgba(245, 70, 196, 0.2)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

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

/* Top accent glow */
.product-card__accent {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 160px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: -1;
}

.product-card__accent--purple {
  background: rgba(139, 92, 246, 0.25);
}

.product-card__accent--pink {
  background: rgba(245, 70, 196, 0.25);
}

.product-card:hover .product-card__accent {
  opacity: 1;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.product-card__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.product-card__desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  padding: 100px 0 120px;
  background: var(--bg-primary);
  text-align: center;
}

.about-text {
  max-width: 600px;
  margin: 0 auto;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-logo {
  margin-bottom: 20px;
  opacity: 0.7;
}

.footer-address {
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--text-tertiary);
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-purple);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ============================================
   SCROLL REVEAL
   Only hidden when JS confirms it's running
   ============================================ */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.8s var(--ease-out-expo),
    transform 0.8s var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0s);
}

.js-ready .reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: rgba(10, 10, 20, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0 40px;
    gap: 28px;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease-out-expo);
    border-left: 1px solid var(--border);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .product-card {
    padding: 36px 28px 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-glow--primary {
    width: 350px;
    height: 350px;
  }

  .hero-glow--secondary {
    width: 250px;
    height: 250px;
  }

  .hero-content {
    padding: 0 20px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 40px;
  }

  .btn--primary {
    padding: 12px 26px;
    font-size: 0.85rem;
  }
}
