/* ==========================================================================
   Jayakumar Bearings – premium effects layer
   Hand-written CSS (not generated). Edit freely – no build step needed.
   Contents: font · tokens · page transitions · progress · header · gold ring
             · tilt · float · zoom · cursor · marquee · reveal · dialog · misc
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* animatable angle for the rotating gold ring */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --brand: #ff6a00;
  --ember: #ff4500;
  --gold-1: #ffd979;
  --gold-2: #f5b942;
  --gold-3: #fff3c4;
  --ease-out: cubic-bezier(.16, .84, .24, 1);
  --spring: cubic-bezier(.2, .9, .25, 1.25);
}

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* ---------- page-to-page transition (Chrome / Edge / Safari 18+) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 220ms ease both vt-out; }
::view-transition-new(root) { animation: 380ms var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in  { from { opacity: 0; translate: 0 10px; } }

/* ---------- scroll progress ---------- */
#progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100; pointer-events: none;
  background: linear-gradient(90deg, var(--gold-2), var(--brand), var(--ember));
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  box-shadow: 0 0 12px rgba(255, 140, 0, .7);
}

/* ---------- header ---------- */
.site-header { transition: box-shadow .35s, background-color .35s, backdrop-filter .35s; }
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .45); background-color: rgba(255, 255, 255, .86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }
.site-header .logo-img { transition: height .35s var(--ease-out); }
.site-header.scrolled .logo-img { height: 2.75rem; }

.nav-link { position: relative; padding: .5rem .1rem; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-2), var(--brand));
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .4s var(--ease-out);
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after, .has-dd:focus-within > .nav-link::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--brand); }

.has-dd { position: relative; }
.dd {
  position: absolute; left: 50%; top: calc(100% + 14px); width: 22rem; margin-left: -11rem;
  opacity: 0; visibility: hidden; translate: 0 8px; transition: opacity .25s, translate .35s var(--ease-out), visibility .25s;
}
.dd::before { content: ""; position: absolute; inset: -16px 0 auto 0; height: 16px; } /* hover bridge */
.has-dd:hover .dd, .has-dd:focus-within .dd { opacity: 1; visibility: visible; translate: 0 0; }

.drawer { transform: translateX(100%); transition: transform .5s var(--ease-out); visibility: hidden; }
.drawer.open { transform: none; visibility: visible; }
.scrim { opacity: 0; pointer-events: none; transition: opacity .4s; }
.scrim.open { opacity: 1; pointer-events: auto; }

/* ---------- GOLD RING – rotating golden border with twinkling glitter ---------- */
.gold { position: relative; --ring: .4; }
.gold:hover, .gold.gold-on, .gold:focus-within { --ring: 1; }
.gold::before {
  content: ""; position: absolute; inset: -1px; z-index: 5; pointer-events: none;
  border-radius: calc(var(--r, 1rem) + 1px); padding: 2.5px;
  background: conic-gradient(from var(--ang),
      transparent 0deg, transparent 150deg,
      rgba(245, 185, 66, .15) 200deg, var(--gold-2) 270deg,
      var(--gold-3) 322deg, #fff 340deg, var(--gold-1) 350deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  filter: drop-shadow(0 0 5px rgba(255, 190, 60, .85));
  opacity: var(--ring); transition: opacity .5s;
  animation: ring-spin 5.5s linear infinite;
}
@keyframes ring-spin { to { --ang: 360deg; } }

/* glitter stars placed on the border by JS */
.gs {
  position: absolute; z-index: 6; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; pointer-events: none;
  background: radial-gradient(circle, #fff 0 18%, var(--gold-1) 40%, var(--gold-2) 70%);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0; scale: .2; animation: twinkle 3.2s ease-in-out infinite; animation-delay: var(--gd, 0s);
}
.gold:hover .gs, .gold.gold-on .gs { animation-duration: 1.9s; }
@keyframes twinkle {
  0%, 62%, 100% { opacity: 0; scale: .2; rotate: 0deg; }
  76% { opacity: 1; scale: 1.15; rotate: 45deg; }
  88% { opacity: .5; scale: .6; rotate: 90deg; }
}

/* ---------- 3D TILT + spotlight glare ---------- */
[data-tilt] {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, 1));
  transform-style: preserve-3d; will-change: transform;
  transition: transform .7s var(--spring), box-shadow .45s;
}
[data-tilt].is-tilting { transition: transform .12s linear, box-shadow .45s; }
[data-tilt]:hover, [data-tilt].is-tilting { box-shadow: 0 34px 60px -26px rgba(255, 106, 0, .55), 0 18px 30px -22px rgba(0, 0, 0, .4); }
.glare {
  position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .42), rgba(255, 160, 60, .13) 38%, transparent 65%);
}
[data-tilt]:hover > .glare, [data-tilt].is-tilting > .glare { opacity: 1; }
.tz-1 { transform: translateZ(28px); }
.tz-2 { transform: translateZ(56px); }
.tz-3 { transform: translateZ(84px); }

/* ---------- FLOATING (cloud-like drift) – uses individual transform props so it composes with tilt ---------- */
@keyframes floaty { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 calc(var(--fa, 10) * -1px); rotate: .35deg; } }
.float { animation: floaty var(--fs, 7s) ease-in-out infinite; animation-delay: var(--fd, 0s); }
.float:hover { animation-play-state: paused; }
@keyframes spin-slow { to { rotate: 360deg; } }
.spin-slow { animation: spin-slow 70s linear infinite; }
.spin-slower { animation: spin-slow 110s linear infinite reverse; }

/* mouse-parallax layers (scope sets --px/--py between -1 and 1) */
.plx { translate: calc(var(--px, 0) * var(--k, 12) * 1px) calc(var(--py, 0) * var(--k, 12) * 1px); transition: translate .5s var(--ease-out); }

/* ---------- ZOOM on hover (origin follows the cursor) ---------- */
.zoom { overflow: hidden; }
.zoom > img, .zoom > picture > img, .zoom .zoom-target {
  transform-origin: var(--zx, 50%) var(--zy, 50%); transition: transform 1.1s var(--ease-out); will-change: transform;
}
.zoom:hover > img, .zoom:hover > picture > img, .zoom:hover .zoom-target { transform: scale(1.16); }

/* ---------- buttons ---------- */
.btn-shine { position: relative; overflow: hidden; isolation: isolate; }
.btn-shine::after {
  content: ""; position: absolute; inset: 0; z-index: -1; transform: translateX(-120%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); transition: transform .9s var(--ease-out);
}
.btn-shine:hover::after { transform: translateX(120%) skewX(-18deg); }
[data-magnetic] { transition: translate .4s var(--ease-out), background-color .25s, box-shadow .3s; }

/* ---------- custom cursor (desktop only) ---------- */
.cur-ring, .cur-dot { position: fixed; left: 0; top: 0; z-index: 120; pointer-events: none; border-radius: 50%; opacity: 0; transition: opacity .3s, width .3s var(--ease-out), height .3s var(--ease-out), background-color .3s, border-color .3s; }
.cur-ring { width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1.5px solid var(--gold-2); box-shadow: 0 0 14px rgba(245, 185, 66, .45); }
.cur-dot { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: var(--brand); }
.cursor-on .cur-ring, .cursor-on .cur-dot { opacity: 1; }
.cursor-hover .cur-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(255, 106, 0, .1); border-color: var(--brand); }
.cursor-hover .cur-dot { background: var(--gold-2); }
@media (hover: none), (pointer: coarse) { .cur-ring, .cur-dot { display: none; } }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; display: flex; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.marquee-track { display: flex; flex-shrink: 0; min-width: 100%; align-items: center; justify-content: space-around; gap: 2.5rem; padding-right: 2.5rem; animation: marq 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marq { to { transform: translateX(-100%); } }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; translate: 0 26px; transition: opacity .9s ease, translate .9s var(--ease-out); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ---------- misc components ---------- */
.dot-grid { background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.2px); background-size: 22px 22px; }
.metal-bg { background: linear-gradient(135deg, #0e0e0f 0%, #26272a 55%, #5d5f64 100%); }
.cta-bg { background: linear-gradient(105deg, #ff7300 0%, #ff5a00 55%, #ff4500 100%); }
.hero-wave { filter: drop-shadow(0 -6px 10px rgba(0, 0, 0, .18)); }

.wa-fab { animation: none; }
.wa-fab::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22c55e; z-index: -1; animation: wa-ping 2.6s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes wa-ping { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(1.7); opacity: 0; } }

.chip { transition: background-color .25s, color .25s, border-color .25s, transform .3s var(--spring); }
.chip:hover { transform: translateY(-2px); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 10px 24px -10px rgba(255, 106, 0, .8); }

.card-link-arrow { transition: translate .35s var(--ease-out); }
a:hover > .card-link-arrow, .group:hover .card-link-arrow { translate: 5px 0; }

/* spec dialog */
dialog.spec { border: 0; padding: 0; max-width: min(56rem, calc(100vw - 1.5rem)); width: 100%; border-radius: 1.25rem; overflow: hidden; background: #fff; color: #111; box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .7); }
dialog.spec[open] { animation: dlg-in .5s var(--ease-out); }
dialog.spec::backdrop { background: rgba(10, 10, 12, .66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: bd-in .4s ease; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(26px) scale(.97); } }
@keyframes bd-in { from { opacity: 0; } }

/* tables */
.spec-table th { text-align: left; font-weight: 600; width: 34%; color: #52525b; }
.spec-table td, .spec-table th { padding: .7rem .9rem; border-bottom: 1px solid #ececf0; vertical-align: top; }

/* form fields */
:where(.field) { width: 100%; border: 1.5px solid #e4e4e7; border-radius: .75rem; padding: .85rem 1rem; background: #fff; font: inherit; transition: border-color .25s, box-shadow .25s; }
.field:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255, 106, 0, .16); }

/* hero text sheen: a single, slow highlight crossing the orange words */
.sheen { background: linear-gradient(100deg, var(--brand) 0 40%, #ffd08a 50%, var(--brand) 60% 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 7s ease-in-out 1.2s infinite; }
@keyframes sheen { 0%, 55% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.back-top { transition: opacity .3s, translate .4s var(--ease-out); opacity: 0; translate: 0 14px; pointer-events: none; }
.back-top.show { opacity: 1; translate: 0 0; pointer-events: auto; }

/* ---------- reduced motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; translate: none; }
  [data-tilt] { transform: none !important; }
  .gs { display: none; }
}
@media print { #progress, .cur-ring, .cur-dot, .wa-fab, .back-top, .site-header { display: none !important; } }

/* ---------- Quick Order & Cart ---------- */
.chip { border: 1px solid #d4d4d4; background: #fff; border-radius: 999px; padding: .4rem .9rem; font-size: .8125rem; font-weight: 600; transition: all .2s; }
.chip:hover { border-color: #FF6A00; color: #C24800; }
.chip.is-on { background: #111; border-color: #111; color: #fff; }
.tab { padding: .65rem 1.1rem; border-radius: .9rem; color: #525252; transition: all .2s; }
.tab[aria-selected="true"] { background: #fff; color: #111; box-shadow: 0 4px 14px -6px rgba(0,0,0,.25); }
.pcard { transition: border-color .2s, box-shadow .2s; }
.pcard:hover { border-color: #FFB27A; box-shadow: 0 14px 30px -18px rgba(255,106,0,.55); }
.stepper { display: inline-flex; align-items: center; border: 1px solid #d4d4d4; border-radius: .75rem; background: #fff; overflow: hidden; }
.stepper button { width: 2.25rem; height: 2.5rem; display: grid; place-items: center; color: #404040; }
.stepper button:hover { background: #FFF5EC; color: #C24800; }
.stepper input { width: 3.25rem; height: 2.5rem; text-align: center; font-weight: 700; border: 0; outline: none; -moz-appearance: textfield; background: transparent; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sugg { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: 280px; overflow: auto; background: #fff; border: 1px solid #e5e5e5; border-radius: .75rem; box-shadow: 0 20px 40px -16px rgba(0,0,0,.35); }
.sugg button { display: flex; width: 100%; justify-content: space-between; gap: 1rem; padding: .6rem .9rem; text-align: left; font-size: .875rem; }
.sugg button:hover, .sugg button[aria-selected="true"] { background: #FFF5EC; }
#toast.on { opacity: 1; translate: 0 6px; }
@keyframes pop { 50% { scale: 1.25; } }
.pop { animation: pop .35s ease; }
