/* ==========================================================================
   ASK Technologies - base styles: brand tokens, fonts, scroll reveal,
   floating contact, enquiry prompt, forms and modals
   Brand palette is taken from the ASK Technologies logo:
   teal #01738B and orange #FF9C00
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
:root {
  /* Logo colours (ASK Technologies logo: teal wordmark with an orange bar) */
  --ask-teal: #01738b;
  --ask-orange: #ff9c00;

  /* UI shades built around them */
  --ask-primary: #01738b; /* buttons, links, emphasis. AA with white text */
  --ask-primary-dark: #015a6d;
  --ask-primary-light: #1c93ab;
  --ask-primary-50: #e8f4f7;
  --ask-accent: #ff9c00; /* highlight lines, markers, progress bars */
  --ask-accent-text: #a85e00; /* orange that stays readable as text on white */
  --ask-accent-50: #fff5e3;
  --ask-ink: #10161c; /* dark neutral */
  --ask-ink-2: #19212a;
  --ask-ink-3: #232d38;
  --ask-deep: #0a2733; /* teal-shaded dark surface */
  --ask-text: #2b333c;
  --ask-muted: #66707b;
  --ask-line: #e2e7ec;
  --ask-mist: #f4f6f8; /* light background */
  --ask-white: #ffffff;

  --ask-radius: 18px;
  --ask-radius-sm: 10px;
  --ask-ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --ask-header-h: 76px;

  --bs-primary: var(--ask-primary);
  --bs-link-color-rgb: 1, 115, 139;
  --bs-link-hover-color-rgb: 1, 90, 109;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--ask-header-h) + 16px);
}
body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--ask-text);
  background: var(--ask-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Reveal offsets must never widen the page on phones */
main {
  overflow-x: clip;
}
img {
  max-width: 100%;
  height: auto;
}
::selection {
  background: var(--ask-primary);
  color: #fff;
}
:focus-visible {
  outline: 3px solid var(--ask-primary-light);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 2000;
  background: var(--ask-ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* --------------------------------------------------------------------------
   Page load transition (CSS only, never blocks content)
   -------------------------------------------------------------------------- */
.page-veil {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
  display: flex;
}
.page-veil span {
  flex: 1;
  background: var(--veil, var(--ask-ink));
  transform-origin: top;
  animation: veilUp 0.7s var(--ask-ease) forwards;
}
.page-veil span:nth-child(2) { animation-delay: 0.06s; }
.page-veil span:nth-child(3) { animation-delay: 0.12s; }
.page-veil span:nth-child(4) { animation-delay: 0.18s; }
@keyframes veilUp {
  to { transform: scaleY(0); }
}

/* --------------------------------------------------------------------------
   Scroll reveal. Hidden state applies only when JS is running (html.js)
   -------------------------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transition: opacity 0.8s var(--ask-ease), transform 0.9s var(--ask-ease), clip-path 1s var(--ask-ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.js [data-reveal="up"] { transform: translateY(36px); }
.js [data-reveal="down"] { transform: translateY(-28px); }
.js [data-reveal="left"] { transform: translateX(-48px); }
.js [data-reveal="right"] { transform: translateX(48px); }
.js [data-reveal="scale"] { transform: scale(0.92); }
.js [data-reveal="clip"] { opacity: 1; clip-path: inset(0 100% 0 0); }
.js [data-reveal="clip-up"] { opacity: 1; clip-path: inset(100% 0 0 0); }
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 0);
}

/* --------------------------------------------------------------------------
   Product images. Source photos are on white, so they sit on white tiles.
   -------------------------------------------------------------------------- */
.pimg {
  display: block;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* --------------------------------------------------------------------------
   Floating quick contact
   -------------------------------------------------------------------------- */
.quick-contact {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qc-btn {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  border: 0;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(16, 22, 28, 0.22);
  transition: transform 0.25s var(--ask-ease), box-shadow 0.25s;
  animation: qcFloat 5s ease-in-out infinite;
}
.qc-btn:nth-child(2) { animation-delay: 0.6s; }
.qc-btn:nth-child(3) { animation-delay: 1.2s; }
.qc-btn svg { width: 24px; height: 24px; }
.qc-btn:hover,
.qc-btn:focus-visible {
  transform: scale(1.1);
  color: #fff;
  box-shadow: 0 14px 30px rgba(16, 22, 28, 0.3);
  animation-play-state: paused;
}
.qc-call { background: var(--ask-primary); }
.qc-wa { background: #1fa855; }
.qc-mail { background: #c77700; }
/* soft ring, runs a short burst then rests */
.qc-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid currentColor;
  color: inherit;
  opacity: 0;
  animation: qcRing 4.5s ease-out infinite;
}
.qc-call::before { border-color: var(--ask-primary-light); }
.qc-wa::before { border-color: #1fa855; animation-delay: 1.5s; }
.qc-mail::before { border-color: var(--ask-accent); animation-delay: 3s; }
.qc-btn .qc-tip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translate(8px, -50%);
  white-space: nowrap;
  background: var(--ask-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.qc-btn:hover .qc-tip,
.qc-btn:focus-visible .qc-tip {
  opacity: 1;
  transform: translate(0, -50%);
}
@keyframes qcFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}
@keyframes qcRing {
  0% { transform: scale(1); opacity: 0.55; }
  30% { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* --------------------------------------------------------------------------
   Quick notification / enquiry prompt
   -------------------------------------------------------------------------- */
.nudge {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 1035;
  width: min(320px, calc(100vw - 100px));
  background: #fff;
  color: var(--ask-ink);
  border-radius: 14px;
  border-left: 4px solid var(--ask-accent);
  box-shadow: 0 18px 44px rgba(16, 22, 28, 0.2);
  padding: 16px 40px 16px 16px;
  transform: translateY(24px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.5s var(--ask-ease), opacity 0.4s, visibility 0s 0.5s;
}
.nudge.is-open {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition: transform 0.5s var(--ask-ease), opacity 0.4s;
}
.nudge strong { display: block; font-size: 15px; margin-bottom: 4px; }
.nudge button.nudge-go {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ask-primary);
  font-weight: 700;
  font-size: 14px;
}
.nudge button.nudge-go:hover { text-decoration: underline; }
.nudge .nudge-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--ask-mist);
  color: var(--ask-ink);
  line-height: 1;
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   Enquiry form (page section + modal)
   -------------------------------------------------------------------------- */
.ask-form .form-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.ask-form .form-control,
.ask-form .form-select {
  border-radius: 10px;
  border: 1.5px solid var(--ask-line);
  padding: 12px 14px;
  font-size: 15px;
  background-color: #fff;
  color: var(--ask-ink);
}
.ask-form .form-control:focus,
.ask-form .form-select:focus {
  border-color: var(--ask-primary-light);
  box-shadow: 0 0 0 4px rgba(1, 115, 139, 0.16);
}
.ask-form .req { color: var(--ask-primary); }
.ask-form .form-success {
  display: none;
  text-align: center;
  padding: 28px 12px;
}
.ask-form.is-sent .form-fields { display: none; }
.ask-form.is-sent .form-success { display: block; }
.form-success .tick {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--ask-primary-50);
  color: var(--ask-primary);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
}
.form-success .tick svg { width: 30px; height: 30px; }

.ask-modal .modal-content {
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  color: var(--ask-text);
}
.ask-modal .modal-header {
  border: 0;
  padding: 24px 28px 0;
}
.ask-modal .modal-body { padding: 16px 28px 28px; }
.ask-modal .modal-title { font-weight: 800; color: var(--ask-ink); }
.ask-modal .modal-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ask-primary);
}

/* Product quick view */
.qv-media {
  background: #fff;
  border: 1px solid var(--ask-line);
  border-radius: 16px;
  display: grid;
  place-items: center;
  padding: 24px;
  min-height: 260px;
}
.qv-media img { max-height: 300px; width: auto; }
.qv-features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qv-features li {
  font-size: 12.5px;
  background: var(--ask-mist);
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--ask-ink);
}
.qv-specs {
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
}
.qv-specs th,
.qv-specs td {
  padding: 8px 0;
  border-bottom: 1px solid var(--ask-line);
  vertical-align: top;
}
.qv-specs th {
  font-weight: 600;
  color: var(--ask-muted);
  width: 46%;
  padding-right: 12px;
}
.qv-specs td { color: var(--ask-ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   Marquee (pure CSS, pauses on hover)
   -------------------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  display: flex;
  -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: var(--gap, 48px);
  padding-right: var(--gap, 48px);
  min-width: 100%;
  animation: marquee var(--speed, 40s) linear infinite;
}
.marquee.reverse .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-100%); }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; clip-path: none; }
}

@media (max-width: 575.98px) {
  .quick-contact { right: 12px; bottom: 12px; gap: 10px; }
  .qc-btn { width: 46px; height: 46px; }
  .qc-btn svg { width: 21px; height: 21px; }
  .qc-btn .qc-tip { display: none; }
  .nudge { left: 12px; bottom: 12px; width: calc(100vw - 84px); }
}

/* Prototype notice for links to pages that are not built yet */
.soon-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1100;
  transform: translate(-50%, 20px);
  background: var(--ask-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.4s var(--ask-ease);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.soon-toast.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Product photos that are not on a white studio background */
.pimg.is-photo {
  mix-blend-mode: normal;
  border-radius: 12px;
}
.qv-note {
  background: var(--ask-mist);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14.5px;
  margin: 0;
}
.form-success:focus { outline: none; }
