/* =============================================================================
   NUTAN ENTERPRISE - custom styles (things Tailwind utilities don't cover)
   Brand: red #E1251B · royal blue #1E40AF/#2563EB · ink #0B0F19 · spark #FF8A00
   ========================================================================== */

:root {
  --ne-red: #e1251b;
  --ne-blue: #1e40af;
  --ne-blue-bright: #2563eb;
  --ne-ink: #0b0f19;
  --ne-orange: #ff8a00;
  --ne-kraft: #eae2d3;
}

html { -webkit-tap-highlight-color: transparent; }
body { background: var(--ne-ink); }
[x-cloak] { display: none !important; }
::selection { background: var(--ne-orange); color: #0b0f19; }

/* Bebas Neue looks best with a little tracking */
.font-display { letter-spacing: 0.02em; }

/* ---------- Background patterns ------------------------------------------ */
.bg-blueprint {
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(37, 99, 235, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.07) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
}
.bg-blueprint-light {
  background-color: #f4f6fa;
  background-image:
    linear-gradient(rgba(30, 64, 175, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 64, 175, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(30, 64, 175, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 64, 175, 0.035) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
}
.mask-fade-y {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 85%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 85%, transparent);
}

/* Kraft-paper texture for the UGC photo wall */
.bg-kraft {
  background-color: var(--ne-kraft);
  background-image:
    radial-gradient(rgba(120, 90, 50, 0.09) 1px, transparent 1px),
    radial-gradient(rgba(120, 90, 50, 0.06) 1px, transparent 1px);
  background-size: 7px 7px, 13px 13px;
  background-position: 0 0, 3px 5px;
}

/* Caution-tape stripes */
.bg-caution {
  background: repeating-linear-gradient(-45deg, #ff8a00 0 14px, #0b0f19 14px 28px);
}

/* ---------- Metal & glass -------------------------------------------------- */
.metal-text {
  background: linear-gradient(180deg, #ffffff 0%, #d7dde8 45%, #8d97ab 55%, #eef2f7 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.metal-surface {
  background:
    linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, #1c2438 0%, #111827 100%);
}
.metal-chip {
  background: linear-gradient(180deg, #f8fafc 0%, #d9dfe9 50%, #c3cad8 51%, #eef1f6 100%);
  color: #0b0f19;
}
.glass {
  background: linear-gradient(140deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
}

/* ---------- Cards: hover lift + spark glow -------------------------------- */
.spark-card {
  position: relative;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.spark-card::after {
  /* tiny orange "spark" that flares at the top-right corner on hover */
  content: "";
  position: absolute;
  top: -6px; right: 18px;
  width: 12px; height: 12px;
  border-radius: 9999px;
  background: radial-gradient(circle, #fff 0%, #ffcf7a 30%, #ff8a00 60%, transparent 70%);
  box-shadow: 0 0 18px 6px rgba(255, 138, 0, .55);
  opacity: 0;
  transform: scale(.3);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.spark-card:hover,
.spark-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px rgba(255,138,0,.5), 0 22px 50px -14px rgba(255,138,0,.5);
}
.spark-card:hover::after,
.spark-card:focus-within::after { opacity: 1; transform: scale(1); }

/* ---------- UGC elements --------------------------------------------------- */
/* Strip of masking tape stuck on top of a card */
.tape {
  position: absolute;
  top: -12px; left: 50%;
  width: 96px; height: 26px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 236, 179, .82);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  -webkit-mask-image: linear-gradient(90deg, transparent 0 3px, #000 3px calc(100% - 3px), transparent calc(100% - 3px)),
                      repeating-linear-gradient(0deg, #000 0 3px, transparent 3px 5px);
  z-index: 2;
}
.tape-label {
  /* tape with text on it (category numbers, labels) */
  display: inline-block;
  padding: 2px 10px 1px;
  background: rgba(255, 228, 150, .92);
  color: #3b2f12;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  clip-path: polygon(2% 0, 98% 6%, 100% 100%, 0 94%);
}
.polaroid {
  background: #fff;
  padding: 10px 10px 44px;
  box-shadow: 0 12px 30px -10px rgba(40, 30, 10, .45), 0 2px 4px rgba(0,0,0,.08);
}
.sticker {
  box-shadow: 0 0 0 3px #fff, 0 8px 18px -6px rgba(0,0,0,.45);
}
.story-bars span { display: block; height: 3px; border-radius: 9999px; background: rgba(255,255,255,.4); }
.story-bars span.on { background: #fff; }

/* WhatsApp-style chat bubbles */
.bubble {
  position: relative;
  max-width: 88%;
  padding: 8px 12px 18px;
  border-radius: 12px;
  font-size: .875rem;
  line-height: 1.35;
  box-shadow: 0 1px 1px rgba(0,0,0,.18);
}
.bubble time {
  position: absolute;
  right: 10px; bottom: 3px;
  font-size: .65rem;
  opacity: .6;
}
.bubble-out { margin-left: auto; background: #d9fdd3; color: #102a1a; border-top-right-radius: 3px; }
.bubble-in  { margin-right: auto; background: #ffffff; color: #111827; border-top-left-radius: 3px; }
.chat-wall {
  background-color: #efe7dd;
  background-image: radial-gradient(rgba(0,0,0,.05) 1px, transparent 1px);
  background-size: 14px 14px;
}

/* Hand-drawn SVG strokes (circles, arrows, underlines) draw themselves in */
.hand-draw path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: ne-draw 1.6s .6s ease-out forwards;
}
@keyframes ne-draw { to { stroke-dashoffset: 0; } }

/* ---------- Marquee --------------------------------------------------------- */
.marquee {
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  flex-shrink: 0;
  gap: 1rem;
  padding-right: 1rem;
  min-width: 100%;
  animation: ne-marquee var(--marquee-speed, 45s) linear infinite;
}
.marquee-reverse .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes ne-marquee { to { transform: translateX(-100%); } }

/* ---------- WhatsApp floating button pulse --------------------------------- */
.wa-pulse::before,
.wa-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #25d366;
  z-index: -1;
  animation: ne-pulse 2.4s ease-out infinite;
}
.wa-pulse::after { animation-delay: 1.2s; }
@keyframes ne-pulse {
  0%   { transform: scale(1);   opacity: .55; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* ---------- Hero ------------------------------------------------------------- */
.hero-fallback {
  /* used when no welding photo is present: a warm glow where the "weld" is */
  background:
    radial-gradient(40% 50% at 78% 58%, rgba(255,138,0,.30), transparent 70%),
    radial-gradient(30% 40% at 82% 62%, rgba(225,37,27,.25), transparent 70%),
    radial-gradient(60% 60% at 10% 10%, rgba(30,64,175,.35), transparent 70%),
    #0b0f19;
}
.hero-glow {
  position: absolute;
  width: 34rem; height: 34rem;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(255,138,0,.35), rgba(225,37,27,.12) 45%, transparent 70%);
  filter: blur(10px);
  animation: ne-flicker 3.2s ease-in-out infinite;
}
@keyframes ne-flicker {
  0%, 100% { opacity: .85; }
  45% { opacity: 1; }
  50% { opacity: .65; }
  55% { opacity: .95; }
}
.scroll-cue { animation: ne-bob 2s ease-in-out infinite; }
@keyframes ne-bob { 50% { transform: translateY(6px); } }

/* Tilted ticker ribbon */
.ribbon-tilt { transform: rotate(-2deg); }

/* ---------- Navbar ------------------------------------------------------------ */
.nav-link { position: relative; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--ne-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-link:hover::after,
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Floating WhatsApp button clearance (tablet / desktop) ------------
   The 56px button sits 16px from the right edge. On screens narrower than
   ~1440px the page content would run underneath it, so page containers get
   extra side padding (same on both sides, so layouts stay centred). On wide
   screens the normal margins are already big enough and nothing changes. */
@media (min-width: 768px) {
  main .max-w-page,
  footer .max-w-page {
    padding-left: max(2rem, calc(5.75rem - max(0px, (100vw - 80rem) / 2)));
    padding-right: max(2rem, calc(5.75rem - max(0px, (100vw - 80rem) / 2)));
  }
}

/* ---------- Category photos (portrait, about 3:4) ---------------------------
   The wrapper sets the shape (aspect-ratio) and overflow-hidden; the photo
   fills it. object-position 60% keeps products (usually lower in the frame)
   in view. Subtle zoom on hover of the surrounding .group card. */
.product-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  transition: transform 400ms ease;
}
.group:hover .product-img,
.group:focus-visible .product-img { transform: scale(1.05); }

/* ---------- Accessibility --------------------------------------------------- */
:focus-visible { outline: 2px solid var(--ne-orange); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .hand-draw path { stroke-dashoffset: 0; }
  .marquee-track { animation: none; }
  .group:hover .product-img,
  .group:focus-visible .product-img { transform: none; }
}
