/*
 * custom.css — project-wide custom utilities.
 *
 * CSS variables below mirror js/tokens.js exactly.
 * Framer Motion / React migration: import tokens.js into tailwind.config.ts
 * and delete the :root block; replace class references in JSX as-is.
 */

:root {
  /* Brand */
  --color-primary:              #00081e;
  --color-primary-container:    #0a1f44;
  --color-secondary:            #755b00;
  --color-secondary-dark:       #8a6a00;
  --color-secondary-fixed:      #ffe08f;
  --color-secondary-fixed-hover:#e6c364;
  --color-on-primary:           #ffffff;
  --color-on-surface-variant:   #44464e;
  --color-outline-variant:      #c5c6cf;
  --color-surface:              #f8f9ff;
  --color-whatsapp:             #25d366;
  --color-whatsapp-hover:       #1da851;

  /* Shadows (match tokens.js boxShadow) */
  --shadow-micro:               0px 2px 12px rgba(0, 8, 30, 0.05);
  --shadow-micro-hover:         0px 8px 24px rgba(0, 8, 30, 0.08);
  --shadow-card:                0px 4px 16px rgba(0, 8, 30, 0.06);
  --shadow-card-hover:          0 20px 60px rgba(0, 8, 30, 0.08);

  /* Animation timing (matches animations.js variants) */
  --ease-standard:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring-out:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-sharp:       cubic-bezier(0.76, 0,    0.24, 1);
  --duration-fast:    200ms;
  --duration-base:    300ms;
  --duration-slow:    700ms;
}

/* ── Shared card shadow ───────────────────────────────────── */
.micro-shadow {
  box-shadow: var(--shadow-micro);
}
.micro-shadow-hover:hover {
  box-shadow: var(--shadow-micro-hover);
  transform: translateY(-2px);
}
.card-shadow {
  box-shadow: var(--shadow-card);
}
.card-shadow-hover:hover {
  box-shadow: var(--shadow-card-hover);
}

/* ── Hero background pattern ─────────────────────────────── */
.hero-pattern {
  background-image:
    radial-gradient(circle at 15% 50%, rgba(255,255,255,0.03) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(117,91,0,0.05)   0%, transparent 50%);
}

/* ── Glassmorphism panel ──────────────────────────────────── */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(197, 198, 207, 0.8); /* --color-outline-variant @ 80% */
}

/* ── Form input focus glow ───────────────────────────────── */
.input-focus-glow:focus {
  border-color: var(--color-secondary-fixed);
  box-shadow: 0 0 0 2px rgba(255, 224, 143, 0.25);
  outline: none;
}

/* ── Gold button (request-quote page) ───────────────────── */
.btn-gold {
  background-color: var(--color-secondary-fixed);
  color: var(--color-primary);
  transition: all var(--duration-fast) var(--ease-standard);
}
.btn-gold:hover {
  background-color: var(--color-secondary-fixed-hover);
  transform: translateY(-1px);
}

/* ── Material Symbols base settings ─────────────────────── */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.material-symbols-outlined[data-weight="fill"],
.material-symbols-outlined.fill {
  font-variation-settings: 'FILL' 1;
}

/* ── Mobile nav drawer ───────────────────────────────────── */
#mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--color-surface);
  border-bottom: 1px solid rgba(197, 198, 207, 0.4);
  box-shadow: 0 10px 30px rgba(0, 8, 30, 0.1);
  z-index: 50; /* z-nav */
  transition: transform var(--duration-base) var(--ease-standard),
              opacity  var(--duration-base) var(--ease-standard),
              visibility var(--duration-base) var(--ease-standard);
}
#mobile-nav.nav-closed {
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#mobile-nav.nav-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── Animation: visibility base (JS-controlled) ─────────── */
[data-animate] {
  will-change: opacity, transform, filter;
}

/* ── Card hover lift (whileHover equivalent) ─────────────── */
/* Framer: whileHover={{ y: -7, scale: 1.018 }} transition={{ type:'spring', stiffness:300, damping:22 }} */
.card-lift {
  transition: transform 280ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 280ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card-lift:hover {
  transform: translateY(-7px) scale(1.018);
  box-shadow: var(--shadow-card-hover);
}
.card-lift:hover .card-inner-img {
  transform: translateY(-3px);
  transition-delay: 150ms;
}
.card-inner-img {
  transition: transform 280ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Button hover scale (whileHover/whileTap equivalent) ─── */
/* Framer: whileHover={{ scale:1.05 }} whileTap={{ scale:0.97 }} */
.btn-scale {
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 200ms ease-out,
              box-shadow 200ms ease-out;
  transform-origin: center;
}
.btn-scale:hover  { transform: scale(1.05); }
.btn-scale:active { transform: scale(0.97); }

/* Arrow icon inside button nudges right on hover */
.btn-scale:hover .btn-arrow { transform: translateX(3px); }
.btn-arrow { transition: transform 200ms ease-out; display: inline-block; }

/* ── Bounce animation (WhatsApp FAB) ─────────────────────── */
@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(-4px); }
}
.animate-bounce-subtle {
  animation: bounce-subtle 2s ease-in-out infinite;
}

/* ── Line reveal (JS-driven via Web Animations API) ─────── */
.line-reveal {
  transform-origin: left;
  transform: scaleX(0);
}

/* ── Filter Buttons ──────────────────────────────────────── */
.filter-btn {
  border-color: var(--color-outline-variant);
  color: var(--color-on-surface-variant);
  background: transparent;
  cursor: pointer;
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(0, 8, 30, 0.04);
}
.filter-btn.active {
  font-weight: 600;
}

/* ── Disabled submit button ──────────────────────────────── */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Product card smooth filter transition ───────────────── */
.product-card {
  transition: opacity 300ms ease-out, transform 300ms ease-out,
              box-shadow 280ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── No-results state ────────────────────────────────────── */
#no-results {
  animation: fadeIn 400ms ease-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Doc request toast ───────────────────────────────────── */
#doc-toast {
  transition: opacity 300ms ease-out;
}

/* ── Select optgroup styling ─────────────────────────────── */
optgroup {
  font-style: normal;
  color: var(--color-on-surface-variant);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

/* ══ Global polish additions ════════════════════════════════ */

/* Gradient text utility */
.text-gradient-gold {
  background: linear-gradient(90deg, #fed977, #e6c364, #ffe08f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Better section label */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

/* Smooth scroll behaviour */
html { scroll-behavior: smooth; }

/* Product card quote button hover */
.product-card a.btn-scale:hover {
  background: var(--color-secondary-container) !important;
}

/* Footer responsive fix */
@media (max-width: 768px) {
  footer .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  footer .grid { grid-template-columns: 1fr; }
}

/* Nav wordmark */
.nav-wordmark {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

/* About page footer fix */
footer.bg-primary {
  background: #00081e !important;
  border-top: 1px solid rgba(255,224,143,0.12) !important;
}

/* ── Improved focus rings ─────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Responsive Hero Section ────────────────────────────── */
@media (max-width: 768px) {
  #hero-section {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 80px;
  }
  #hero-3d-canvas {
    opacity: 0.38 !important; /* Dim ambient background on mobile for perfect readability */
  }
  #hero-content {
    min-height: auto;
    padding: 0 16px;
    justify-content: center;
    text-align: center;
  }
  #hero-text-block {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  #hero-headline {
    font-size: 2.2rem !important;
    line-height: 1.2;
    margin-bottom: 16px;
  }
  #hero-sub {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 100%;
  }
  .hero-ctas {
    justify-content: center;
    width: 100%;
    gap: 12px;
  }
  .btn-hero-gold, .btn-hero-outline {
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
  }
  .hero-stats {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    width: 100% !important;
    margin-top: 24px;
  }
  .hero-stat {
    padding: 12px 0 !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(201, 168, 76, 0.18) !important;
    text-align: center;
    width: 100%;
  }
  .hero-stat:last-child {
    border-bottom: none !important;
  }
  .hero-stat:first-child {
    padding-left: 0 !important;
  }
}

/* ── Footer links global styling ──────────────────────────── */
.footer-link {
  color: rgba(249, 247, 243, 0.72) !important;
  transition: color 0.2s;
  text-decoration: none;
}
.footer-link:hover {
  color: #C9A84C !important;
}


