/* Energy Oil & Grease: white site, dark navy brand color, red accent from the logo */
:root {
  --navy: #16213e;
  --navy-deep: #0f172a;
  --red: #e94560;
  --red-dark: #d13350;
  --yellow: #eab308;
  --bg: #ffffff;
  --soft: #f4f6fa;
  --line: #e3e7ef;
  --text: #0f172a;
  --muted: #5a6577;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body:has(.modal[open]) { overflow: hidden; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 800; color: var(--navy); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); max-width: 22ch; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
.eyebrow { color: var(--red); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .75rem; }
.eyebrow.light { color: var(--yellow); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .9em 1.5em; border-radius: 10px; font: 600 .95rem var(--font); text-decoration: none; border: 1px solid var(--line); color: var(--navy); background: #fff; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid rgba(233,69,96,.4); outline-offset: 2px; }
.btn-primary { background: var(--red); color: #fff; border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 8px 24px rgba(233,69,96,.3); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-ghost { background: transparent; }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-sm { padding: .6em 1.1em; font-size: .875rem; }

/* Header: white so the navy logo mark actually reads. Mobile first. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nav { position: sticky; top: 0; z-index: 20; background: transparent;
  -webkit-backdrop-filter: blur(var(--nav-blur, 10px)) saturate(1.5);
  backdrop-filter: blur(var(--nav-blur, 10px)) saturate(1.5);
  box-shadow: 0 1px 0 rgba(15,23,42,calc(var(--nav-shadow, 0) * .08)), 0 10px 30px -18px rgba(15,23,42,calc(var(--nav-shadow, 0) * .55)); }
/* White pane as its own layer: opacity takes a custom property reliably,
   and animating opacity is cheaper than animating a background colour. */
.nav::before { content: ""; position: absolute; inset: 0; background: #fff;
  opacity: var(--nav-alpha, .96); transition: opacity .18s linear; pointer-events: none; }
.nav::after { content: ""; display: block; position: relative; z-index: 2; height: 3px; background: linear-gradient(90deg, var(--red), var(--yellow)); }
.nav-inner { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--navy); order: 1; }
.logo img { height: 36px; width: auto; }
.logo-text { font-weight: 800; font-size: 1rem; letter-spacing: -0.01em; line-height: 1.1; color: var(--navy); }
.nav-right { display: flex; align-items: center; gap: .35rem; order: 2; }
.nav-call { white-space: nowrap; }
.nav-call-num { display: none; }
.nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 11px; background: transparent; border: 0; cursor: pointer; }
.nav-bar { display: block; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] .nav-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-menu { order: 3; flex: 0 0 100%; display: flex; flex-direction: column; margin: 0 -20px; padding: .25rem 0 .5rem; background: var(--soft); border-top: 1px solid var(--line); }
.nav-menu[hidden] { display: none; }
.nav-menu a { padding: .9rem 20px; color: var(--navy); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
.nav-menu a:last-child { border-bottom: 0; }

/* Hero: one headline, one line, one button. Taller, with a layered curve out. */
.hero { position: relative; display: flex; flex-direction: column; overflow: hidden;
  color: #fff; background-color: var(--navy-deep);
  min-height: 88vh; min-height: 88svh; }
/* Separate layer so it can be translated for parallax. background-attachment:fixed
   is not an option — iOS Safari ignores it. */
.hero-bg { position: absolute; left: 0; right: 0; top: -30%; bottom: 0; z-index: 0;
  background-image: linear-gradient(rgba(18,28,54,.64), rgba(18,28,54,.64)), url("assets/img/photos-and-backgrounds/hero-bg-mobile.jpg");
  background-size: cover; background-position: center 62%; background-repeat: no-repeat;
  will-change: transform; }
.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; flex: 1; padding: 28px 0 152px; text-align: center; }
.hero-inner::before { content: ""; flex: 2 1 0; }
.hero-gap { flex: 1 1 0; min-height: 1.75rem; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 7.8vw, 4rem); max-width: 16ch; margin: 0 auto .5em; }
.lead { font-size: 1.05rem; color: #dde3ee; max-width: 46ch; margin: 0 auto; }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.btn-outline { border-width: 1.5px; }
.btn-outline:hover { border-color: #fff; }
.btn-lg { padding: 1.05em 2em; font-size: 1.05rem; width: 100%; }

/* Layered curve out of the hero, carrying the header's red-to-yellow rule */
.hero-curve { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 2; line-height: 0; pointer-events: none; }
.hero-curve svg { display: block; width: 100%; height: 120px; }
.curve-deep { fill: var(--navy-deep); }
.curve-page { fill: var(--bg); }

@media (min-width: 860px) {
  .nav-inner { flex-wrap: nowrap; min-height: 74px; }
  .nav-toggle { display: none; }
  .nav-call-num { display: inline; }
  .nav-menu, .nav-menu[hidden] { display: flex; order: 2; flex: 0 1 auto; flex-direction: row; align-items: center; gap: 1.75rem; margin: 0 0 0 auto; padding: 0; background: transparent; border-top: 0; }
  .nav-menu a { padding: 0; border-bottom: 0; font-weight: 500; font-size: .95rem; color: var(--muted); }
  .nav-menu a:hover { color: var(--navy); }
  .nav-right { order: 3; }
  .logo img { height: 44px; }
  .logo-text { font-size: 1.1rem; }
  .hero { min-height: 780px; }
  .hero-bg { background-image: linear-gradient(rgba(18,28,54,.64), rgba(18,28,54,.64)), url("assets/img/photos-and-backgrounds/hero-bg.jpg"); background-position: center 54%; }
  .hero-inner { padding: 70px 0 230px; }
  .lead { font-size: 1.2rem; }
  .hero-inner::before { flex: 1.5 1 0; }
  .hero-cta { gap: .75rem; }
  .btn-lg { width: auto; }
  .hero-curve svg { height: 185px; }
}

/* Sections */
.section { padding: 90px 0 0; }
.grid { display: grid; gap: 1.1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.product { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; display: flex; flex-direction: column; gap: .5rem; }
.product-img { height: 185px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--line); margin-bottom: .5rem; display: grid; place-items: center; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img.is-empty { background: linear-gradient(135deg, #e9edf5, #f7f9fc); }
.product-img.is-empty::after { content: attr(data-label); color: var(--muted); font-size: .8rem; }
.product-ic { width: 44px; height: 44px; border-radius: 10px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; }
.product h3 { margin: .25rem 0 0; }
.product p { margin: 0; color: var(--muted); font-size: .95rem; }

.brands { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.brand { height: 92px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; padding: 1rem 1.25rem; background: #fff; }
.brand img { max-height: 56px; width: auto; max-width: 100%; object-fit: contain; }
.brand.is-text { font-weight: 700; color: var(--navy); font-size: 1.05rem; }

#serve { background: var(--soft); margin-top: 90px; padding: 90px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.serve article { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; border-top: 4px solid var(--navy); }
.serve article:nth-child(2) { border-top-color: var(--red); }
.serve article:nth-child(3) { border-top-color: var(--yellow); }
.serve article:nth-child(4) { border-top-color: var(--navy-deep); }
.serve h3 { margin-bottom: .3rem; }
.serve p { margin: 0; color: var(--muted); font-size: .95rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.steps li { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; display: flex; gap: 1.1rem; align-items: flex-start; }
.step-n { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; }
.steps h3 { margin-bottom: .25rem; }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Contact block */
.contact { display: grid; grid-template-columns: 1.05fr .95fr; background: var(--navy); color: #fff; border-radius: calc(var(--radius) + 6px); overflow: hidden; }
.contact-info { padding: 3rem; }
.contact-info h2 { color: #fff; }
.contact-info dl { display: grid; grid-template-columns: auto 1fr; gap: .6rem 1.5rem; margin: 0 0 1.75rem; }
.contact-info dt { color: #a9b3c6; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; padding-top: .2em; }
.contact-info dd { margin: 0; font-weight: 500; font-size: 1.05rem; }
.contact-info dd a { text-decoration: none; }
.contact-photo { min-height: 320px; background: var(--navy-deep); }
.contact-photo img { width: 100%; height: 100%; object-fit: cover; }
.contact-photo.is-empty { background: linear-gradient(135deg, #1b2a4e, var(--navy-deep)); }

/* Footer */
.footer { margin-top: 90px; border-top: 1px solid var(--line); padding: 2rem 0; color: var(--muted); font-size: .875rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer a { text-decoration: none; }
.footer-links { display: flex; gap: 1.25rem; }

/* Quote popup */
.modal { width: min(640px, 100% - 24px); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--text); }
.modal::backdrop { background: rgba(15,23,42,.6); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-inner { position: relative; padding: 2.25rem; }
.modal-close { position: absolute; top: 1rem; right: 1rem; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--navy); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.form-title { font-size: 1.6rem; padding-right: 3rem; margin-bottom: .3rem; }
.form-sub { color: var(--muted); margin-bottom: 1.5rem; }
.quote-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.quote-field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; font-size: .85rem; color: var(--muted); font-weight: 500; }
.quote-field input, .quote-field select, .quote-field textarea { font: inherit; font-size: 1rem; color: var(--text); padding: .8em .95em; background: #fff; border: 1px solid #cfd6e2; border-radius: 10px; width: 100%; }
.quote-field input:focus, .quote-field select:focus, .quote-field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(22,33,62,.12); }
.quote-hp { position: absolute; left: -9999px; }
.quote-submit { width: 100%; margin-top: .25rem; }
.quote-submit:disabled { opacity: .6; cursor: wait; transform: none; box-shadow: none; }
.form-fine { font-size: .8rem; color: var(--muted); margin: 1rem 0 0; }
.quote-status { margin: 1rem 0 0; font-size: .95rem; min-height: 1.4em; }
.quote-status[data-state="ok"] { color: #15803d; }
.quote-status[data-state="error"] { color: var(--red-dark); }

/* Tablet */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .brands { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .contact-photo { min-height: 240px; order: -1; }
}
/* Phone */
@media (max-width: 640px) {
  .section { padding-top: 64px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .brands { grid-template-columns: repeat(2, 1fr); }
  .brand { height: 76px; }
  #serve { margin-top: 64px; padding: 64px 0; }
  .contact-info { padding: 2rem 1.5rem; }
  .contact-info dl { grid-template-columns: 1fr; gap: .2rem 0; }
  .contact-info dt { margin-top: .75rem; }
  .quote-row { grid-template-columns: 1fr; }
  .modal-inner { padding: 1.75rem 1.25rem; }
  .footer { margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg { transform: none !important; }
}
