/* Foodservice Engineering Solutions — modeled on the dunbarsystems.com layout */
:root {
  /* Navy = engineering/trust, orange = appetite/energy. (Var names kept from the first palette.) */
  --charcoal: #0f2a44;
  --ink: #0a1d30;
  --text: #4a5563;
  --heading: #12263a;
  --gold: #f5891f;
  --gold-dark: #b45309;
  --cream: #f1f6fb;
  --line: #dbe4ee;
  --panel: #163a5c;
  --panel-hover: #1b4670;
  --white: #fff;
  --head-font: "Montserrat", "Verdana", sans-serif;
  --body-font: "Roboto", "Helvetica Neue", Arial, sans-serif;
  /* Shown wherever a photo hasn't been added yet */
  --placeholder: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 2px, transparent 2px 14px), linear-gradient(135deg, #1d4b75, #0c2238);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--text); font: 300 16px/1.7 var(--body-font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--gold-dark); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }
h1, h2, h3 { font-family: var(--head-font); font-weight: 400; color: var(--heading); letter-spacing: .04em; line-height: 1.25; margin: 0 0 .6em; }
h2 { text-transform: uppercase; font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 18px; }
p { margin: 0 0 1.1em; }
.wrap { width: min(1200px, 100% - 32px); margin: 0 auto; }
.narrow { width: min(860px, 100% - 32px); }
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn { display: inline-block; font: 500 14px/1 var(--head-font); letter-spacing: .12em; text-transform: uppercase; padding: 16px 30px; border: 2px solid transparent; transition: all .2s; cursor: pointer; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: transparent; border-color: var(--gold); color: var(--gold); }
.btn-dark { background: var(--charcoal); color: var(--white); }
.btn-dark:hover { background: var(--gold); color: var(--ink); }
.btn-sm { padding: 12px 20px; font-size: 12px; }
.text-link { font: 500 13px var(--head-font); letter-spacing: .12em; text-transform: uppercase; }
.kicker { display: inline-block; font: 500 13px var(--head-font); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.kicker.dark { color: var(--gold-dark); }
.rule { display: block; width: 260px; max-width: 60%; height: 2px; background: var(--gold); margin: 26px 0; }

/* ---------- header ---------- */
.topbar { background: var(--ink); color: #b9c7d6; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: flex-end; padding: 6px 0; }
.topbar a { color: var(--gold); margin-left: 6px; }
.site-header { background: var(--charcoal); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; }
.logo { display: flex; align-items: center; gap: 12px; border: 2px solid var(--gold); padding: 6px 14px 6px 6px; color: var(--gold); }
.logo:hover { color: var(--gold); }
.logo-mark { background: var(--gold); color: var(--ink); font: 600 18px var(--head-font); letter-spacing: .06em; padding: 8px 9px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font: 500 15px var(--head-font); letter-spacing: .04em; }
.logo-sub { font: 400 10px var(--head-font); letter-spacing: .5em; text-transform: uppercase; color: #dbe4ee; margin-top: 4px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a { display: flex; align-items: center; gap: 6px; color: #eee; font: 400 14px var(--head-font); letter-spacing: .06em; padding: 30px 16px; }
.main-nav > ul > li > a:hover, .main-nav a.active { color: var(--gold); }
.caret { width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.sub { position: absolute; top: 100%; left: 0; min-width: 270px; background: var(--white); flex-direction: column !important; box-shadow: 0 10px 30px rgba(0,0,0,.18); border-top: 3px solid var(--gold); opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s; }
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { display: block; padding: 11px 20px; color: var(--text); font-size: 14px; border-bottom: 1px solid var(--line); }
.sub a:hover { background: var(--cream); color: var(--gold-dark); }
.menu-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 26px; height: 2px; background: var(--gold); margin: 5px 0; transition: .2s; }

/* ---------- hero slider ---------- */
.hero { position: relative; height: min(78vh, 680px); min-height: 460px; overflow: hidden; background: var(--placeholder); }
.slide { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; transition: opacity 1.1s ease; background: linear-gradient(90deg, rgba(8,24,42,.92) 0%, rgba(8,24,42,.78) 45%, rgba(8,24,42,.35) 100%), var(--bg) center/cover no-repeat, var(--placeholder); }
.slide.is-active { opacity: 1; z-index: 1; }
.slide-title { font: 300 clamp(30px, 5.4vw, 64px)/1.12 var(--head-font); color: var(--white); text-transform: uppercase; letter-spacing: .03em; margin: 0; }
.slide-title strong { font-weight: 500; }
.slide.is-active .slide-inner > * { animation: rise .9s both; }
.slide.is-active .slide-inner > *:nth-child(2) { animation-delay: .12s; }
.slide.is-active .slide-inner > *:nth-child(3) { animation-delay: .24s; }
.slide.is-active .slide-inner > *:nth-child(4) { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.slide-link { color: var(--gold); font: 500 15px var(--head-font); letter-spacing: .12em; text-transform: uppercase; }
.hero-dots { position: absolute; z-index: 2; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.hero-dots button { width: 34px; height: 4px; border: 0; background: rgba(255,255,255,.4); cursor: pointer; padding: 0; }
.hero-dots button.is-active { background: var(--gold); }

/* ---------- mission strip ---------- */
.mission { background: var(--charcoal); color: #dbe4ee; text-align: center; padding: 56px 0; }
.mission-lead { font: 400 clamp(17px, 1.8vw, 22px)/1.5 var(--head-font); color: var(--white); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5em; }
.mission-sub { font: 300 clamp(14px, 1.4vw, 17px)/1.6 var(--head-font); color: var(--gold); text-transform: uppercase; letter-spacing: .08em; margin: 0; }

/* ---------- section heads ---------- */
.section-head { text-align: center; max-width: 860px; margin: 0 auto 44px; }
.section-head h2::after { content: ""; display: block; width: 70px; height: 2px; background: var(--gold); margin: 18px auto 0; }
.section-head.light h2 { color: var(--white); }
.section-head.light p { color: #c9d5e2; }

/* ---------- tiles ---------- */
.tiles-section { background: var(--cream); padding: 80px 0; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tile { position: relative; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; color: var(--white); overflow: hidden; background: linear-gradient(180deg, rgba(8,24,42,.1) 20%, rgba(8,24,42,.92) 100%), var(--bg) center/cover no-repeat, var(--placeholder); transition: transform .3s, box-shadow .3s; }
.tile:hover { color: var(--white); transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0,0,0,.2); }
.tile::after { content: ""; position: absolute; left: 28px; bottom: 0; width: 0; height: 4px; background: var(--gold); transition: width .35s; }
.tile:hover::after { width: calc(100% - 56px); }
.tile-label { font: 400 11px var(--head-font); letter-spacing: .25em; text-transform: uppercase; color: var(--gold); }
.tile-title { font: 500 22px var(--head-font); text-transform: uppercase; letter-spacing: .05em; margin: 6px 0 8px; }
.tile-text { font-size: 15px; color: #dbe4ee; max-height: 0; opacity: 0; overflow: hidden; transition: all .35s; }
.tile:hover .tile-text, .tile:focus .tile-text { max-height: 120px; opacity: 1; }

/* ---------- split ---------- */
.split { padding: 90px 0; }
.split.alt { background: var(--cream); }
.split-grid { position: relative; z-index: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-media { min-height: 440px; background: var(--bg) center/cover no-repeat, var(--placeholder); position: relative; }
.split-media::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 2px solid var(--gold); z-index: -1; }
.split.alt .split-media::before { inset: 18px 18px -18px -18px; }
.split-copy h2 { margin-bottom: .8em; }

/* ---------- services list (home) ---------- */
.services-strip { padding: 90px 0; background: var(--white); }
.svc-list { list-style: none; margin: 0 0 44px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.svc-list a { display: flex; justify-content: space-between; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line); color: var(--heading); font: 400 16px var(--head-font); letter-spacing: .04em; text-transform: uppercase; }
.svc-list a:hover { color: var(--gold-dark); padding-left: 12px; }
.svc-list svg, .to-top svg { width: 18px; height: 18px; color: var(--gold); flex: none; }

/* ---------- process ---------- */
.process-mini { background: var(--charcoal); padding: 90px 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.steps li { background: var(--panel); padding: 32px 24px; border-top: 3px solid transparent; transition: border-color .2s, background .2s; }
.steps li:hover { border-color: var(--gold); background: var(--panel-hover); }
.steps .num { font: 300 34px var(--head-font); color: var(--gold); }
.steps h3 { color: var(--white); text-transform: uppercase; font-size: 16px; margin: 12px 0 10px; }
.steps p { color: #b9c7d6; font-size: 15px; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; padding: 90px 0; color: #dbe4ee; background: linear-gradient(rgba(8,24,42,.84), rgba(8,24,42,.84)), var(--bg) center/cover no-repeat, var(--placeholder); }
.cta-band h2 { color: var(--white); font-size: clamp(26px, 3.4vw, 40px); font-weight: 300; }
.cta-band p { max-width: 640px; margin: 0 auto 30px; }

/* ---------- inner pages ---------- */
.page-hero { padding: 120px 0 90px; color: var(--white); background: linear-gradient(90deg, rgba(8,24,42,.9), rgba(8,24,42,.6)), var(--bg) center/cover no-repeat, var(--placeholder); }
.page-hero h1 { color: var(--white); font-weight: 300; text-transform: uppercase; font-size: clamp(30px, 4.6vw, 54px); max-width: 860px; margin: 0; }
.page-hero .rule { margin-bottom: 0; }
.prose-section { padding: 80px 0 40px; }
.lead { font-size: 20px; line-height: 1.7; color: var(--heading); }

.values { background: var(--cream); padding: 90px 0; }
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.value { background: var(--white); padding: 30px 26px; border-top: 3px solid var(--gold); }
.value h3 { text-transform: uppercase; font-size: 15px; }
.value p { margin: 0; font-size: 15px; }

.svc-rows { padding: 30px 0 90px; }
.svc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 40px; background: var(--cream); scroll-margin-top: 110px; }
.svc-row.rev .svc-media { order: 2; }
.svc-media { min-height: 340px; background: var(--bg) center/cover no-repeat, var(--placeholder); }
.svc-copy { padding: 48px 52px; align-self: center; }
.svc-copy .num { font: 300 40px var(--head-font); color: var(--gold); display: block; margin-bottom: 6px; }

.sol-section { padding: 30px 0 90px; }
.sol-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.sol-card { background: var(--cream); scroll-margin-top: 110px; transition: box-shadow .25s; }
.sol-card:hover { box-shadow: 0 14px 30px rgba(0,0,0,.12); }
.sol-media { height: 230px; background: var(--bg) center/cover no-repeat, var(--placeholder); }
.sol-body { padding: 28px; border-top: 3px solid var(--gold); }
.sol-body h2 { font-size: 20px; }

.timeline-section { padding: 20px 0 90px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 34px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-item { display: flex; gap: 32px; align-items: flex-start; padding: 0 0 44px; position: relative; }
.tl-item .num { flex: none; width: 70px; height: 70px; border-radius: 50%; background: var(--charcoal); color: var(--gold); display: grid; place-items: center; font: 400 22px var(--head-font); position: relative; z-index: 1; }
.tl-item h2 { font-size: 20px; margin: 18px 0 8px; }

/* ---------- contact ---------- */
.contact-section { padding: 80px 0 100px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; }
.info-block { border-left: 3px solid var(--gold); padding: 4px 0 4px 18px; margin-bottom: 24px; }
.info-block h3 { text-transform: uppercase; font-size: 14px; margin-bottom: 4px; }
.info-block p { margin: 0; word-break: break-word; }
.contact-form { background: var(--cream); padding: 40px; }
.contact-form label { display: block; font: 500 13px var(--head-font); letter-spacing: .06em; text-transform: uppercase; color: var(--heading); margin-bottom: 18px; }
.contact-form input, .contact-form select, .contact-form textarea { display: block; width: 100%; margin-top: 8px; padding: 13px 14px; border: 1px solid var(--line); background: var(--white); font: 300 16px var(--body-font); color: var(--heading); border-radius: 0; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hp { position: absolute !important; left: -9999px; }
.form-status { margin: 16px 0 0; font-weight: 400; }
.form-status.ok { color: #2e7d32; }
.form-status.err { color: #b3261e; }

/* ---------- footer ---------- */
.site-footer { background: var(--charcoal); color: #a9b8c8; padding: 70px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; padding-bottom: 50px; }
.site-footer h3 { color: var(--white); font-size: 15px; letter-spacing: .14em; margin-bottom: 18px; }
.site-footer a { color: var(--gold); word-break: break-word; }
.site-footer .btn-gold { color: var(--ink); }
.site-footer .btn-gold:hover { color: var(--gold); }
.flinks { list-style: none; margin: 0; padding: 0; }
.flinks li { margin-bottom: 8px; }
.flinks a { color: #c9d5e2; }
.flinks a:hover { color: var(--gold); }
.copyright { border-top: 1px solid #21405f; padding: 22px 0; font-size: 13px; color: #8fa1b4; }
.to-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; background: var(--gold); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 40; }
.to-top svg { transform: rotate(-90deg); color: var(--ink); }
.to-top.show { opacity: 1; pointer-events: auto; }

.preload * { transition: none !important; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--charcoal); max-height: 0; overflow: hidden; transition: max-height .35s; }
  .main-nav.open { max-height: 80vh; overflow-y: auto; }
  .main-nav ul { flex-direction: column; }
  .main-nav > ul > li > a { padding: 14px 20px; border-top: 1px solid #1d3f60; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: #0a1d30; display: none; }
  .has-sub.open .sub { display: flex; }
  .sub a { color: #c9d5e2; border-color: #1d3f60; padding-left: 36px; }
  .tiles, .sol-grid { grid-template-columns: repeat(2, 1fr); }
  .split-grid, .contact-grid, .svc-row { grid-template-columns: 1fr; gap: 40px; }
  .svc-row { gap: 0; }
  .svc-row.rev .svc-media { order: 0; }
  .split-media { min-height: 320px; margin: 0 18px 18px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .topbar .wrap { justify-content: center; font-size: 12px; }
  .header-inner { min-height: 72px; }
  .logo-name { font-size: 13px; }
  .logo-sub { letter-spacing: .35em; }
  .tiles, .sol-grid, .svc-list, .steps, .value-grid, .row2, .footer-grid { grid-template-columns: 1fr; }
  .svc-list { gap: 0; }
  .tile-text { max-height: none; opacity: 1; }
  .svc-copy, .contact-form { padding: 30px 22px; }
  .timeline::before { left: 26px; }
  .tl-item { gap: 20px; }
  .tl-item .num { width: 54px; height: 54px; font-size: 18px; }
  .tl-item h2 { margin-top: 12px; }
  .split, .services-strip, .process-mini, .tiles-section, .values, .cta-band { padding: 64px 0; }
  .page-hero { padding: 80px 0 64px; }
}
