/* ==========================================================
   Saraswati Engineering Works – custom CSS
   Layout, spacing, type, colour and simple hovers live in Tailwind
   classes in the HTML. This file only holds what utilities can't
   express: CSS variables, keyframes, pseudo-elements, JS states.
   ========================================================== */
:root {
  /* ===== BRAND PALETTE from the SEW logo - the only place colours are defined =====
       ink    = logo black (headings, dark sections, footer)   steel = lighter charcoal
       orange = logo orange (primary accent, buttons, links)   amber = soft orange (hover)
       mist / line / text / muted = page tint, border, body ink, muted text */
  --c-ink: 16 16 16;
  --c-steel: 42 45 49;
  --c-orange: 240 120 32;
  --c-amber: 255 154 77;
  --c-mist: 246 246 244;
  --c-line: 226 226 222;
  --c-text: 36 38 41;
  --c-muted: 104 107 112;
  --ease: cubic-bezier(0.22, 0.8, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --header-h: 101px;
}

.container {
  --bs-gutter-x: 1.5rem;
  width: 100%;
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}
@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}
@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

:focus-visible {
  outline: 2px solid rgb(var(--c-orange));
  outline-offset: 3px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Scroll progress bar (CSS scroll timeline) ---------- */
.scroll_progress {
  display: none;
}
@supports (animation-timeline: scroll()) {
  .scroll_progress {
    display: block;
    position: fixed;
    inset: 0 0 auto;
    height: 3px;
    z-index: 60;
    background: rgb(var(--c-orange));
    transform-origin: 0 50%;
    animation: grow linear both;
    animation-timeline: scroll(root);
  }
  @keyframes grow {
    from {
      transform: scaleX(0);
    }
    to {
      transform: scaleX(1);
    }
  }
}

/* ---------- Buttons: lift, shine sweep, arrow nudge ---------- */

.site_button_primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease);
}
.site_button_primary:hover::after {
  transform: translateX(120%);
}

/* ---------- Header: nav underline, active page, burger to X ---------- */
.header_link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: rgb(var(--c-orange));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.header_link:hover::after,
.header_link.is_active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.header_link.is_active {
  color: rgb(var(--c-orange));
}
.header_menu_button span {
  transition:
    transform 0.3s var(--ease),
    opacity 0.2s;
}
.header_menu_button[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.header_menu_button[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}
.header_menu_button[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Page banner (inner pages): drifting glow, blueprint grid, load-in ---------- */
@keyframes drift1 {
  to {
    transform: translate(-60px, 50px) scale(1.12);
  }
}
@keyframes drift2 {
  to {
    transform: translate(70px, -40px) scale(0.9);
  }
}
@keyframes loadIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes upIn {
  to {
    transform: none;
  }
}
.banner_load {
  opacity: 0;
  transform: translateY(18px);
  animation: loadIn 0.8s var(--ease) forwards;
}
.banner_load_up {
  transform: translateY(110%);
  animation: upIn 0.9s var(--ease) forwards;
}
.banner_grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 75% 40%, #000 5%, transparent 70%);
  mask-image: radial-gradient(ellipse at 75% 40%, #000 5%, transparent 70%);
}

/* ---------- Products: filter pills, cards ---------- */
.filter_bar {
  scrollbar-width: none;
}
.filter_bar::-webkit-scrollbar {
  display: none;
}

.filter_button.is_active {
  background: rgb(var(--c-ink));
  border-color: rgb(var(--c-ink));
  color: #fff;
}
.filter_button.is_active .filter_count {
  background: rgb(var(--c-orange));
  color: #fff;
}

.product_card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgb(var(--c-orange));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.product_card:hover::after {
  transform: scaleX(1);
}

.card_in {
  animation: cardIn 0.55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .banner_load,
  .banner_load_up {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .card_in {
    animation: none;
  }
}

/* ================= HOME PAGE ================= */

/* ---------- Hero: pulse dot, spinning gears, floating photo ---------- */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(var(--c-orange) / 0.7);
  }
  100% {
    box-shadow: 0 0 0 10px rgb(var(--c-orange) / 0);
  }
}
.hero_pulse {
  animation: pulse 1.8s ease-out infinite;
}
.gear_spin {
  animation: spin 70s linear infinite;
}
.gear_spin_rev {
  animation: spin 45s linear infinite reverse;
}
@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.hero_photo {
  animation: floatY 7s ease-in-out infinite;
}

/* ---------- How we work: line draws, nodes pop in one by one ---------- */
.steps_line {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.6s var(--ease) 0.2s;
}
.steps.is_in .steps_line {
  transform: scaleX(1);
}
.step_item {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.35s + 0.1s);
}
.steps.is_in .step_item {
  opacity: 1;
  transform: none;
}

/* ---------- Why choose us cards ---------- */

.why_card::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgb(var(--c-orange));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
  pointer-events: none;
}

.why_card:hover::before {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .gear_spin,
  .gear_spin_rev,
  .hero_photo,
  .hero_pulse {
    animation: none;
  }
  .steps_line {
    transform: scaleX(1);
    transition: none;
  }
  .step_item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Shared hidden state and accessibility defaults. */
[hidden] {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Shared messages created by jQuery Validation. */
.form_error {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: #b91c1c;
}

/* Workshop image and card interactions */
.workshop-page .workshop-image {
  display: block;
  overflow: hidden;
}
.workshop-page .workshop-image img {
  display: block;
  transition: transform 500ms var(--ease);
}
.workshop-page .workshop-card {
  transition: transform 350ms var(--ease), box-shadow 350ms var(--ease), border-color 350ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .workshop-page .workshop-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px -16px rgb(var(--c-ink) / .25);
    border-color: rgb(var(--c-orange) / .65);
  }
  .workshop-page .workshop-card:hover img,
  .workshop-page .workshop-image:hover img {
    transform: scale(1.045);
  }
}
.workshop-page a.workshop-image:focus-visible img {
  transform: scale(1.045);
}
@media (prefers-reduced-motion: reduce) {
  .workshop-page .workshop-card,
  .workshop-page .workshop-image img {
    transition: none;
    transform: none !important;
  }
}

/* Consistent capability image frames with uncropped photographs. */
.workshop-page .workshop-capability-image {
  background: rgb(var(--c-mist));
}
.workshop-page .workshop-capability-photo {
  display: block;
  width: 100%;
  height: 370px;
  object-fit: contain;
}
/* Keep the entire photograph visible during card hover. */
.workshop-page .workshop-card:hover .workshop-capability-photo,
.workshop-page .workshop-capability-image:hover .workshop-capability-photo {
  transform: none;
}
@media (max-width: 767px) {
  .workshop-page .workshop-capability-photo { height: 335px; }
}

/* Shared inner-page banner and controls: one treatment across the site. */
.page-banner { position: relative; overflow: hidden; isolation: isolate; border-bottom: 4px solid rgb(var(--c-orange)); }
.page-banner::before, .page-banner::after { content: ''; position: absolute; pointer-events: none; z-index: -1; border-radius: 50%; filter: blur(80px); }
.page-banner::before { right: -120px; top: -180px; width: 480px; height: 480px; background: rgb(var(--c-orange)); opacity: .45; animation: drift1 16s ease-in-out infinite alternate; }
.page-banner::after { left: 8%; bottom: -200px; width: 340px; height: 340px; background: rgb(var(--c-amber)); opacity: .18; animation: drift2 18s ease-in-out infinite alternate; }
.page-banner > .container { position: relative; }
.page-banner h1 { font-size: 28px; line-height: 1.35; letter-spacing: -.02em; }
.page-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; font-size: 14px; font-weight: 500; color: rgb(255 255 255 / .7); }
.page-breadcrumb > span[aria-hidden] { color: rgb(var(--c-orange)); }
.page-breadcrumb a { transition: color 250ms ease; }
.page-breadcrumb a:hover { color: rgb(var(--c-orange)); }
.common-button { min-height: 44px; padding: 10px 18px; font-size: 14px; line-height: 1.4; font-weight: 600; border-radius: 4px; gap: 8px; }
#mobile_menu a[aria-current="page"] { color: rgb(var(--c-orange)); }
@media (min-width: 768px) { .page-banner h1 { font-size: 40px; line-height: 1.2; } }
@media (prefers-reduced-motion: reduce) { .page-banner::before, .page-banner::after { animation: none; } }

/* Stack About statistics with horizontal separators on mobile. */
@media (max-width: 767px) {
  .about_facts { flex-direction: column; flex-wrap: nowrap; gap: 18px; }
  .about_facts > div { border-left: 0; padding-left: 0; }
  .about_facts > div:not(:last-child) {
    border-bottom: 2px solid rgb(var(--c-orange));
    padding-bottom: 18px;
  }
}

/* Compact product category controls on phones. */
@media (max-width: 767px) {
  .product-filter-container { padding: 8px 12px; gap: 8px; }
  .product-filter-container .filter_bar { gap: 6px; }
  .product-filter-container .filter_button {
    min-height: 32px;
    padding: 5px 10px;
    gap: 5px;
    font-size: 12px;
    line-height: 1.2;
  }
  .product-filter-container .filter_count {
    min-width: 17px;
    height: 17px;
    padding: 0 2px;
    font-size: 10px;
    line-height: 1;
  }
}
