/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.hero,
.slide,
.nav-inner {
  transform: translate3d(0, 0, 0);
}

/* Promote common animated layers without permanent will-change (reduces compositor overhead) */
.hero,
.slide,
.division-card,
.parallax-bg {
  transform: translateZ(0);
}

:root {
  /* Strong gold: CTAs, key actions (solid, high contrast) */
  --gold: #c8a646;
  --gold-hover: #d9b55a;
  /* Soft gold: thin lines — visible but secondary to strong gold */
  --gold-line: rgba(200, 166, 70, 0.52);
  --gold-soft: rgba(200, 166, 70, 0.68);
  --navy: #0a1222;
  --text: #d1d5db;
  --section-pad: 96px;
  --ease-primary: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-luxury: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-fast: 0.28s;
  --motion-medium: 0.48s;
  --motion-slow: 0.82s;
  --duration-base: 0.45s;
  --transition: var(--ease-primary);
  --type-body-tablet: 15px;
  --type-body-mobile: 14px;
  /* Unified image grading curve for hero + service visuals */
  --img-grade-sat: 0.92;
  --img-grade-contrast: 1.05;
  --img-grade-brightness: 0.94;
}

:focus:not(:focus-visible) {
  outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(200, 166, 70, 0.88);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Chat panel + inquiry: no sharp outline — fields use soft inset + glow in their stylesheets */
.chat-panel input:not(.hp-field):focus-visible,
.chat-panel textarea:focus-visible,
.inquiry-form input:not(.hp-field):focus-visible,
.inquiry-form textarea:focus-visible {
  outline: none;
}

.btn:focus-visible,
.chat-bubble-btn:focus-visible,
.nav-toggle:focus-visible {
  outline-color: rgba(255, 255, 255, 0.92);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--navy);
  color: var(--text);
  line-height: 1.78;
  overflow-x: hidden;
  position: relative;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

@media (min-width: 1024px) {
  body {
    overscroll-behavior-y: none;
  }
}

/* During scroll: disable heavy blur to prevent frame drops */
body.scrolling .nav .nav-inner {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(10,18,34,0.65);
}

/* Performance: pause fixed ambient layers when tab is hidden (see scroll.js .tab-hidden) */
body.tab-hidden::before {
  animation-play-state: paused;
}

/* Pause ambient drift while scrolling — one less layer animating during interaction */
body.scrolling::before {
  animation-play-state: paused;
}

/* Ambient luxury background */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: -20%;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle, rgba(200,166,70,.04), transparent 60%);
  pointer-events: none;
  z-index: -1;
  animation: ambientShift 25s ease-in-out infinite alternate;
}

/* Kitchen & oil-gas: same canvas as the rest of the site (navy + global ::before ambient only) */

@keyframes ambientShift {
  0% { transform: translate(0,0); }
  100% { transform: translate(60px,40px); }
}

@media (max-width: 768px) {
  body::before {
    animation: ambientShift 32s ease-in-out infinite alternate;
  }

  .inquiry-submit {
    align-self: center;
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
}

h1,h2,h3,h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.22;
}

/* Skip rendering for off-screen sections (hero & kitchen-timeline excluded) */
section:not(.hero):not(.kitchen-timeline) {
  content-visibility: auto;
  contain-intrinsic-size: auto 800px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Accent line system: highlight key phrases (no background) */
.accent-highlight {
  border-left: 2px solid var(--gold-soft);
  padding-left: 12px;
}
/* ================= SECTION TRANSITION ================= */

section {
  padding: var(--section-pad) 0;
  position: relative;
  overflow: hidden;
  transition: transform 0.7s ease,
              opacity 0.7s ease;
}

section.reveal-init {
  opacity: 0;
  transform: translateY(14px);
}

section.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

/* Hero never fades on scroll leave – prevents flash when scrolling back up */
section.hero.reveal-init {
  opacity: 1;
  transform: none;
}

/* Kitchen CTA should not "pop in" separately; keep it steady */
.kitchen-cta.reveal-init,
.kitchen-cta.reveal-active {
  opacity: 1;
  transform: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  opacity: 1;
}

html {
  scroll-behavior: smooth;
  /* Nav clearance; slightly *less* inset (~0.5cm) so anchors land a bit further down the page */
  scroll-padding-top: calc(80px - 0.5cm);
}

@media (max-width: 992px) {
  html {
    /*
      Taller fixed header (nav padding + 56px inner). Larger than desktop so #about-section /
      #services-section titles clear the bar on small screens; safe-area for notched devices.
    */
    scroll-padding-top: calc(104px + env(safe-area-inset-top, 0px));
  }
}

.kitchen-stage section {
  padding: 0 !important;
  overflow: visible !important;
}

/* ===== KITCHEN & OIL-GAS PAGE LAYOUT (shared journey pages) ===== */
body:is(.kitchen-page, .oil-gas-page) section {
  padding: 0 !important;
}

body:is(.kitchen-page, .oil-gas-page) .about {
  padding: var(--section-pad) 6% !important;
}

body:is(.kitchen-page, .oil-gas-page) #kitchen-timeline {
  padding: 120px 0 96px !important;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  body::before {
    animation: none !important;
  }
  .hero .hero-bg-img {
    animation: none !important;
  }
  .nav-links,
  .nav.open .nav-links,
  .nav-links .dropdown-logo,
  .nav-links a:not(.dropdown-logo) {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* Skip link (keyboard / screen reader) */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 10000;
  padding: 0.5rem 1rem;
  background: #fff;
  color: #000;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}