
/* Om Enviro logo motion: transparent hero logo + subtle floating header/hero animation */
.site-header-logo {
  animation: logoFloat 5.8s ease-in-out infinite;
  will-change: transform;
  transform-origin: center center;
}
.hero-brand-logo {
  background: transparent !important;
  animation: logoFloat 6.8s ease-in-out infinite;
  will-change: transform;
  transform-origin: center center;
}
.hero-brand-logo img {
  background: transparent !important;
  display: block;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.20));
}
@keyframes logoFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -7px, 0) rotate(-0.5deg); }
}
@media (prefers-reduced-motion: reduce) {
  .site-header-logo, .hero-brand-logo { animation: none !important; }
}

:root {
  --background: #f0f7fc;
  --foreground: #0f2d3e;
  --card: #ffffff;
  --card-foreground: #0f2d3e;
  --primary: #0e4f6e;
  --primary-foreground: #ffffff;
  --secondary: #1a7aad;
  --secondary-foreground: #ffffff;
  --muted: #daeaf5;
  --muted-foreground: #4a6e82;
  --accent: #52a535;
  --accent-foreground: #ffffff;
  --border: #c5dcea;
  --ring: #0e4f6e;
  --radius: 6px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

h1, h2, h3, h4, h5 {
  font-family: 'Raleway', sans-serif;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #0e4f6e55;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0e4f6e99;
}

/* Hero enquiry layout */
.hero-enquiry-grid { min-height: 80vh; }
.hero-enquiry-form input::placeholder,
.hero-enquiry-form textarea::placeholder { color: rgba(255,255,255,0.55); }
.hero-enquiry-form input,
.hero-enquiry-form textarea,
.hero-enquiry-form select { box-sizing: border-box; }
.hero-enquiry-form select option { color: #0f2d3e; background: #fff; }

@media (max-width: 900px) {
  .hero-enquiry-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    padding-top: 5.5rem;
    padding-bottom: 3rem;
  }
  .hero-enquiry-form {
    width: 100%;
  }
}

/* =========================================================
   Compact hero enquiry card
   ========================================================= */
.hero-enquiry-grid {
  grid-template-columns: minmax(0, 1fr) 350px !important;
  gap: 2.25rem !important;
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.hero-enquiry-form {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 1.25rem 1.3rem !important;
  border-radius: 10px !important;
  background: rgba(7, 49, 67, 0.9) !important;
  border: 1px solid rgba(125, 217, 90, 0.32) !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22) !important;
}

.hero-enquiry-form h3 {
  color: #fff !important;
  font-size: 1.05rem !important;
  margin-bottom: 0.3rem !important;
}

.hero-enquiry-form p {
  color: rgba(255,255,255,0.68) !important;
  font-size: 0.72rem !important;
  line-height: 1.45 !important;
  margin-bottom: 0.85rem !important;
}

.hero-enquiry-form > form,
.hero-enquiry-form form {
  gap: 0.62rem !important;
}

.hero-enquiry-form label {
  font-size: 0.64rem !important;
  margin-bottom: 0.22rem !important;
  color: rgba(255,255,255,0.86) !important;
}

.hero-enquiry-form input,
.hero-enquiry-form select {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0.45rem 0.72rem !important;
  font-size: 0.76rem !important;
  border-radius: 5px !important;
  box-sizing: border-box !important;
}

.hero-enquiry-form textarea {
  height: 62px !important;
  min-height: 62px !important;
  max-height: 75px !important;
  padding: 0.55rem 0.72rem !important;
  font-size: 0.76rem !important;
  border-radius: 5px !important;
  box-sizing: border-box !important;
  resize: vertical !important;
}

.hero-enquiry-form button,
.hero-enquiry-form input[type="submit"] {
  min-height: 36px !important;
  height: 36px !important;
  padding: 0.5rem 0.8rem !important;
  margin-top: 0.1rem !important;
  font-size: 0.72rem !important;
  border-radius: 5px !important;
}

.hero-enquiry-form select {
  color: #fff !important;
  background: rgba(255,255,255,0.07) !important;
  border-color: rgba(255,255,255,0.28) !important;
}

.hero-enquiry-form select option {
  color: #0f2d3e !important;
  background: #fff !important;
}

@media (max-width: 900px) {
  .hero-enquiry-grid {
    grid-template-columns: 1fr !important;
    gap: 1.4rem !important;
    max-width: 650px !important;
  }

  .hero-enquiry-form {
    max-width: 420px !important;
    margin: 0 auto !important;
  }
}

@media (max-width: 520px) {
  .hero-enquiry-grid {
    padding-top: 4.8rem !important;
  }

  .hero-enquiry-form {
    max-width: 100% !important;
    padding: 1rem !important;
  }
}

/* Email enquiry form */
.hero-enquiry-form button[type="submit"] {
  cursor: pointer;
}

/* Enhanced contact area */
.contact-enhanced-grid a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14,79,110,0.12) !important;
}
@media (max-width: 900px) {
  .contact-enhanced-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 520px) {
  .contact-enhanced-grid > div > div[style*="grid-template-columns: repeat(2"] {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   Om Enviro — Performance + Motion System
   ========================================================= */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Keyboard accessibility */
.skip-link {
  position: fixed;
  left: 14px;
  top: -60px;
  z-index: 99999;
  padding: 10px 15px;
  border-radius: 6px;
  background: #0e4f6e;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus {
  top: 14px;
}

/* Navigation underline */
nav a {
  position: relative;
}
nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -5px;
  height: 2px;
  border-radius: 2px;
  background: #52a535;
  transition: left .25s ease, right .25s ease;
}
nav a:hover::after,
nav a:focus-visible::after {
  left: 0;
  right: 0;
}

/* Form focus */
.hero-enquiry-form input,
.hero-enquiry-form select,
.hero-enquiry-form textarea {
  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    background-color .2s ease;
}
.hero-enquiry-form input:focus,
.hero-enquiry-form select:focus,
.hero-enquiry-form textarea:focus {
  border-color: rgba(125,217,90,.85) !important;
  box-shadow: 0 0 0 3px rgba(82,165,53,.14);
  outline: none;
}

/* Footer links */
footer a {
  transition: color .2s ease, transform .2s ease;
}
footer a:hover {
  color: #7dd95a !important;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Footer bottom row */
.footer-bottom-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 0.9rem;
}

/* Client logo zoom on hover */
#clients img {
  transition: transform 0.5s cubic-bezier(.22,.61,.36,1);
}
#clients img:hover {
  transform: scale(1.15);
}

.footer-copyright {
  color: rgba(255,255,255,0.72);
  font-size: 0.72rem;
  line-height: 1.5;
}

.footer-designer {
  margin-left: auto;
  color: #7dd95a;
  font-size: 0.72rem;
  line-height: 1.5;
  font-weight: 700;
  white-space: nowrap;
  text-align: right;
}

@media (max-width: 600px) {
  .footer-bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .footer-designer {
    margin-left: 0;
    text-align: left;
  }
}


/* =========================================================
   Motion system v2
   - Every entrance uses ONE mechanism (a keyframe animation played once
     when the element scrolls into view). Because it is an animation and
     not a transition, hover effects and the element's own inline
     transitions are never delayed or overridden by it.
   - Only transform + opacity are animated (compositor-only, no repaint).
   - No permanent will-change, no backdrop-filter, no page-wide fades.
   ========================================================= */
:root {
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --reveal-dur: 1.05s;
  --reveal-shift: 22px;
}
html { -webkit-tap-highlight-color: transparent; }

/* Hidden start state only when JS + motion are available (set in <head>) */
.js-anim .reveal:not(.is-visible),
.js-anim .reveal-left:not(.is-visible),
.js-anim .reveal-right:not(.is-visible),
.js-anim .reveal-scale:not(.is-visible),
.js-anim .motion-reveal:not(.is-visible) {
  opacity: 0;
}
.reveal.is-visible,
.motion-reveal.is-visible {
  animation: revealUp var(--reveal-dur) var(--ease-out) var(--rd, 0s) backwards;
}
.reveal-left.is-visible  { animation: revealLeft  var(--reveal-dur) var(--ease-out) var(--rd, 0s) backwards; }
.reveal-right.is-visible { animation: revealRight var(--reveal-dur) var(--ease-out) var(--rd, 0s) backwards; }
.reveal-scale.is-visible { animation: revealScale var(--reveal-dur) var(--ease-out) var(--rd, 0s) backwards; }

@keyframes revealUp    { from { opacity: 0; transform: translate3d(0, var(--reveal-shift), 0); } to { opacity: 1; transform: translate3d(0,0,0); } }
@keyframes revealLeft  { from { opacity: 0; transform: translate3d(calc(var(--reveal-shift) * -1.4), 0, 0); } to { opacity: 1; transform: translate3d(0,0,0); } }
@keyframes revealRight { from { opacity: 0; transform: translate3d(calc(var(--reveal-shift) * 1.4), 0, 0); } to { opacity: 1; transform: translate3d(0,0,0); } }
@keyframes revealScale { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }

/* Stagger steps (used as animation-delay, so they never affect hover) */
.stagger-1 { --rd: .10s; }
.stagger-2 { --rd: .20s; }
.stagger-3 { --rd: .30s; }
.stagger-4 { --rd: .40s; }
.stagger-5 { --rd: .50s; }
.stagger-6 { --rd: .60s; }
/* Hero: badge -> logo/title -> text -> buttons -> form, one calm sequence */
.hero-enquiry-grid > div:first-child > .reveal:nth-child(2) { --rd: .12s; }
.hero-enquiry-form.reveal-right { --rd: .30s; }

@media (max-width: 520px) { :root { --reveal-shift: 14px; --reveal-dur: .9s; } }

/* Inline styles use "transition: all", which animates layout properties
   too. Limit it to cheap properties and give it a softer curve. */
[style*="transition: all"] {
  transition-property: color, background-color, border-color, box-shadow, transform, opacity !important;
  transition-duration: .35s !important;
  transition-timing-function: var(--ease-out) !important;
}

/* Hover effects only on devices that really hover (no sticky hover on touch) */
@media (hover: hover) and (pointer: fine) {
  #services [role="button"]:hover,
  .contact-enhanced-grid a:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 14px 32px rgba(14,79,110,.14) !important;
  }
  button:hover,
  .hero-enquiry-form button:hover { transform: translateY(-2px); }
}
button:active,
.hero-enquiry-form button:active { transform: translateY(0) scale(.98); }
.contact-enhanced-grid a,
button { transition: transform .3s var(--ease-out), box-shadow .3s ease, background-color .3s ease; }

/* Fixed nav: a class toggle (no blur, no per-scroll style writes) */
nav.is-scrolled {
  background: rgba(14, 79, 110, .97) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.1), 0 8px 24px rgba(0,0,0,.14);
}
.nav-links a.active-link { color: #fff !important; background: rgba(82,165,53,.28); }
.nav-links a.active-link::after { left: 0; right: 0; }

/* Sheen sweep on primary buttons (transform only) */
.hero-enquiry-form button[type="submit"],
nav a[href^="tel:"] { position: relative; overflow: hidden; }
.hero-enquiry-form button[type="submit"]::before,
nav a[href^="tel:"]::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -40%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translate3d(0,0,0) skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}
@media (hover: hover) {
  .hero-enquiry-form button[type="submit"]:hover::before,
  nav a[href^="tel:"]:hover::before { animation: sheen 1.4s var(--ease-out); }
}
@keyframes sheen {
  0%   { transform: translate3d(0,0,0) skewX(-18deg); opacity: 0; }
  25%  { opacity: 1; }
  100% { transform: translate3d(480%,0,0) skewX(-18deg); opacity: 0; }
}

/* Form spinner */
.btn-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-right: .5rem;
  vertical-align: -2px;
}

/* Back-to-top */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 4.75rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: #52a535;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(14,79,110,.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  opacity: 0;
  transform: translate3d(0,16px,0) scale(.9);
  pointer-events: none;
  transition: opacity .4s ease, transform .4s var(--ease-out), background-color .25s ease;
}
.back-to-top.visible { opacity: 1; transform: translate3d(0,0,0) scale(1); pointer-events: auto; }
.back-to-top:hover { background: #468f2d; }

/* Reduced motion: no looping or entrance motion at all */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}


/* Hero brand: water-drop mark only, with no border/background */
.hero-mark-only {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.hero-water-mark {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  animation: logoFloat 6.8s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hero-water-mark { animation: none !important; }
}

/* Hero brand lockup: water drop sits BESIDE the text in normal flow (no overlap) */
.hero-brand-composition {
  display: flex !important;
  align-items: center;
  gap: clamp(0.85rem, 2vw, 1.5rem);
  position: relative;
  width: 100%;
  max-width: 640px;
  min-height: 0;
  margin-bottom: 1.75rem !important;
}
.hero-brand-composition .hero-water-mark {
  position: static !important;
  transform: none;
  flex: 0 0 auto;
  width: clamp(56px, 7vw, 88px) !important;
  max-width: none;
  height: auto !important;
  aspect-ratio: 150 / 227;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.22));
  z-index: 1;
}
.hero-brand-text {
  position: relative;
  z-index: 2;
  min-width: 0;
  margin: 0 !important;
  text-align: left;
  line-height: 0.96;
  text-shadow: 0 4px 18px rgba(0,0,0,0.28);
  white-space: nowrap;
}
.hero-brand-name,
.hero-brand-company {
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.hero-brand-name { color: #fff; font-size: clamp(2.2rem, 4.6vw, 3.9rem); }
.hero-brand-company { color: #7dd95a; font-size: clamp(1.75rem, 3.7vw, 3.1rem); margin-top: 0.12rem; }
@media (max-width: 420px) {
  .hero-brand-composition { gap: 0.7rem; }
  .hero-brand-name { font-size: 1.9rem; }
  .hero-brand-company { font-size: 1.5rem; }
}

/* Form text visibility fix: typed text must remain readable on white fields */
.hero-enquiry-form input,
.hero-enquiry-form textarea {
  color: #0f2d3e !important;
  -webkit-text-fill-color: #0f2d3e !important;
  background: #ffffff !important;
  caret-color: #0f2d3e !important;
}
.hero-enquiry-form input::placeholder,
.hero-enquiry-form textarea::placeholder {
  color: #6b7f8d !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #6b7f8d !important;
}
.hero-enquiry-form input:focus,
.hero-enquiry-form textarea:focus {
  color: #0f2d3e !important;
  -webkit-text-fill-color: #0f2d3e !important;
  background: #ffffff !important;
}
