/* ==========================================================================
   Petro Poly Max (PPM) — Design System
   Compliance-first industrial sourcing & procurement support
   Palette: deep navy, dark slate, white, light grey, restrained teal accent
   ========================================================================== */

/* ---- Tokens -------------------------------------------------------------
   Industrial B2B palette: white + grey + charcoal, restrained deep-red accent.
   NOTE: the --navy* / --teal* variable names are kept for stability but now
   hold CHARCOAL (dark neutrals) and DEEP RED (accent) values respectively.   */
:root {
  --navy:        #1f2933;   /* primary dark — charcoal (headings, dark UI) */
  --navy-700:    #161d26;   /* darker charcoal (gradients/hover) */
  --navy-600:    #2a3744;   /* lighter charcoal (button hover) */
  --slate:       #111827;   /* darkest — footer / deep sections */
  --teal:        #b42318;   /* restrained accent — deep industrial red */
  --teal-600:    #7a1e1e;   /* darker red — hover state */
  --teal-050:    #fbeceb;   /* soft red tint — icon backgrounds */
  --red-200:     #f0a9a3;   /* light red — accents on dark backgrounds */
  --ink:         #1f2933;   /* body text — charcoal */
  --muted:       #6b7280;   /* secondary text — medium grey */
  --line:        #e5e7eb;   /* borders / dividers — soft grey */
  --bg:          #ffffff;
  --bg-soft:     #f4f6f8;   /* light grey sections / cards / forms */
  --bg-softer:   #eef1f4;
  --white:       #ffffff;
  --warn:        #b42318;
  --ok:          #0e7c5a;

  --radius:      14px;
  --radius-sm:   9px;
  --shadow-sm:   0 1px 2px rgba(17,24,39,.06), 0 1px 3px rgba(17,24,39,.08);
  --shadow:      0 6px 20px rgba(17,24,39,.08);
  --shadow-lg:   0 18px 48px rgba(17,24,39,.12);
  --maxw:        1160px;
  --gap:         clamp(1rem, 2.5vw, 2rem);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin: .3rem 0; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

/* ---- Layout helpers ----------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--navy); color: #ced3d9; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.eyebrow { color: var(--teal-600); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; margin: 0 0 .6rem; }
.section--navy .eyebrow { color: var(--red-200); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.section--navy .lead { color: #c0c5cc; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.measure { max-width: 70ch; }
.mt-0{margin-top:0}.mb-0{margin-bottom:0}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: 1rem; line-height: 1;
  padding: .85rem 1.4rem; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; cursor: pointer; transition: .18s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-600); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-600); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--navy); background: var(--bg-soft); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--bg-soft); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--outline-light:hover { background: rgba(255,255,255,.1); border-color:#fff; }
.btn--lg { padding: 1rem 1.7rem; font-size: 1.05rem; }
.btn--block { width: 100%; justify-content: center; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---- Header / Nav ------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1rem; height: 76px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--navy); font-size: 1.15rem; letter-spacing: -.02em; flex: none; }
.brand:hover { text-decoration: none; }
.brand__logo { height: 52px; width: auto; display: block; }
.brand__logo--footer { height: 54px; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 8px; flex: none;
  background: var(--navy); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: .9rem; letter-spacing: 0;
  position: relative; overflow: hidden;
}
.brand__mark::before { /* deep-red accent bar, echoing the PPM logo */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--teal);
}
.brand__sub { display:block; font-size:.62rem; font-weight:600; letter-spacing:.14em; color: var(--muted); text-transform: uppercase; }
.nav__links { display: flex; align-items: center; gap: .1rem; margin-left: auto; }
.nav__links a { color: var(--slate); font-weight: 500; font-size: .93rem; padding: .5rem .6rem; border-radius: 6px; position: relative; white-space: nowrap; }
.nav__links a:hover { color: var(--teal-600); background: var(--bg-soft); text-decoration: none; }
.nav__links a.active { color: var(--navy); font-weight: 600; }
.nav__links a.active::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: -2px; height: 2px; background: var(--teal); border-radius: 2px; }
.nav__cta { display: flex; align-items: center; gap: .5rem; margin-left: .7rem; }
.nav__cta .btn { padding: .6rem 1rem; font-size: .9rem; }
/* Header Submit RFQ: charcoal by default, deep red on hover (header only) */
.nav__cta .btn--primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.nav__cta .btn--primary:hover { background: var(--teal); border-color: var(--teal); }
.nav__toggle { display: none; margin-left: auto; background: none; border: 1.5px solid var(--line); border-radius: 8px; width: 44px; height: 42px; cursor: pointer; }
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--navy); margin: 0 auto; position: relative; transition: .2s;
}
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after { position: absolute; top: 6px; }

@media (max-width: 1080px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: .75rem 1.25rem 1.25rem;
    gap: .1rem; box-shadow: var(--shadow); transform: translateY(-130%); transition: transform .25s ease; margin-left: 0;
  }
  .nav__links.open { transform: translateY(0); }
  .nav__links a { padding: .8rem .4rem; border-bottom: 1px solid var(--bg-softer); border-radius: 0; }
  .nav__cta { flex-direction: column; align-items: stretch; margin: .6rem 0 0; }
  .nav__cta .btn { width: 100%; justify-content: center; }
}

/* ---- Hero (light: copy left, large right-bleed image that fades left) --- */
.hero { background: #ffffff; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
/* large image, bleeds to the right edge, feathered into white on its left */
.hero__media {
  position: absolute; top: 0; right: 0; bottom: 0; width: 56%; z-index: 0;
  background: url("../img/hero-port.jpg") center 42% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 18%, #000 42%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 18%, #000 42%);
}
.hero__grid { position: relative; z-index: 2; padding: clamp(3rem,6.5vw,6rem) 0; }
.hero__copy { max-width: 620px; }
.hero .eyebrow { color: var(--teal-600); }
.hero h1 { color: var(--navy); font-size: clamp(2.1rem, 4.6vw, 3.3rem); }
.hero__sub { font-size: 1.15rem; color: var(--muted); max-width: 54ch; margin-bottom: 1.7rem; }
.hero__trust { margin-top: 1.7rem; display: flex; flex-wrap: wrap; gap: .55rem; font-size: .85rem; color: var(--slate); }
.hero__trust span { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .85rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm); }
/* floating credibility badge over the image */
.hero__badge { position: absolute; right: clamp(1rem,3vw,2.5rem); bottom: clamp(1.25rem,3vw,2.25rem); z-index: 3; display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 999px; padding: .5rem 1rem; font-size: .85rem; font-weight: 600; color: var(--slate); box-shadow: var(--shadow); backdrop-filter: blur(4px); }
.hero__badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); flex: none; }
@media (max-width: 980px) { .hero__media { width: 64%; } .hero__copy { max-width: 520px; } }
@media (max-width: 760px) {
  .hero__media { position: relative; width: auto; height: 240px; margin: 0 -1.25rem; -webkit-mask-image: none; mask-image: none; }
  .hero__grid { padding-top: 0; }
  .hero__copy { max-width: none; padding-top: 2rem; }
  .hero__badge { right: 1rem; bottom: auto; top: 200px; }
}

/* ---- Process strip (under hero) ---------------------------------------- */
.strip { background: #fff; border-bottom: 1px solid var(--line); }
.strip__grid { display: flex; flex-wrap: wrap; gap: .9rem 1.6rem; justify-content: space-between; align-items: center; padding: 1.05rem 0; }
.strip__item { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; font-size: .92rem; color: var(--slate); white-space: nowrap; }
.strip__ic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--teal-050); color: var(--teal-600); font-size: .72rem; flex: none; }
@media (max-width: 760px) { .strip__grid { justify-content: flex-start; } }

/* ---- Grids / Cards ------------------------------------------------------ */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); transition: .18s ease; height: 100%;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #d1d5db; }
/* premium red top-accent tab for plain card grids */
.cards--accent .card { position: relative; padding-top: 1.7rem; }
.cards--accent .card::before { content: ""; position: absolute; top: 0; left: 1.5rem; width: 34px; height: 3px; background: var(--teal); border-radius: 0 0 3px 3px; }
.card h3 { margin-top: .2rem; }
.card p { color: var(--muted); font-size: .96rem; margin-bottom: .9rem; }
.card__link { font-weight: 600; font-size: .92rem; display: inline-flex; gap: .3rem; align-items: center; }
.card__link::after { content: "→"; transition: transform .15s; }
.card:hover .card__link::after { transform: translateX(3px); }
.card--flush { padding: 1.4rem; }

.icon-badge {
  width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center;
  background: var(--teal-050); color: var(--teal-600); margin-bottom: 1.1rem;
  border: 1px solid #f6d6d2; transition: .18s ease;
}
.icon-badge svg { width: 25px; height: 25px; }
.card:hover .icon-badge { background: var(--teal); color: #fff; border-color: var(--teal); transform: translateY(-1px); }

/* numbered list cards (problem/solution) */
.feature { display: flex; gap: .9rem; align-items: flex-start; }
.feature__num { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.feature h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.feature p { color: var(--muted); font-size: .94rem; margin: 0; }
.check-list { list-style: none; padding: 0; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; margin: .55rem 0; color: inherit; }
.check-list .ic { color: var(--teal-600); flex: none; margin-top: .2rem; }
.x-list { list-style: none; padding: 0; }
.x-list li { display: flex; gap: .6rem; align-items: flex-start; margin: .55rem 0; }
.x-list .ic { color: var(--warn); flex: none; margin-top: .2rem; }

/* ---- Page hero (interior) ---------------------------------------------- */
.page-hero { background: linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%); color: var(--ink); padding: clamp(2.5rem,6vw,4rem) 0; border-bottom: 1px solid var(--line); }
.page-hero h1 { color: var(--navy); max-width: 20ch; }
.page-hero .lead { color: var(--muted); }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: .9rem; }
.crumbs a { color: var(--teal-600); }

/* ---- Stats strip -------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
.stat { text-align: center; padding: 1rem; }
.stat__n { font-size: 1.9rem; font-weight: 800; color: var(--navy); line-height: 1; }
.section--navy .stat__n { color: #fff; }
.stat__l { font-size: .85rem; color: var(--muted); margin-top: .4rem; }
.section--navy .stat__l { color: #aab0b8; }
@media (max-width: 620px){ .stats{ grid-template-columns: repeat(2,1fr);} }

/* ---- Callout / compliance banner --------------------------------------- */
.callout {
  border: 1px solid var(--line); border-left: 4px solid var(--teal);
  background: var(--bg-soft); border-radius: var(--radius); padding: 1.3rem 1.4rem;
}
.callout--navy { background: var(--navy); border-color: var(--navy); border-left-color: var(--teal); color: #ced3d9; }
.callout--navy strong { color: #fff; }
.disclaimer { font-size: .9rem; color: var(--muted); background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }

/* ---- CTA band ----------------------------------------------------------- */
.cta-band { background: var(--navy); color: #fff; border-radius: 16px; padding: clamp(1.8rem,4vw,3rem); text-align: center; border-top: 3px solid var(--teal); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #ced3d9; max-width: 60ch; margin-inline: auto; }
.cta-split { display:grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width:760px){ .cta-split{ grid-template-columns:1fr; } }
.cta-card { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.cta-card h3 { font-size:1.25rem; }
.cta-card p { color: var(--muted); }

/* ---- FAQ accordion ------------------------------------------------------ */
.faq { max-width: 820px; margin-inline: auto; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .7rem; background: #fff; overflow: hidden; }
.faq__q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: 1.1rem 1.2rem; font-size: 1.02rem; font-weight: 600; color: var(--navy); display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: inherit; }
.faq__q:hover { background: var(--bg-soft); }
.faq__q .pm { flex: none; width: 22px; height: 22px; position: relative; transition: transform .2s; }
.faq__q .pm::before, .faq__q .pm::after { content:""; position:absolute; background: var(--teal-600); border-radius: 2px; }
.faq__q .pm::before { top: 10px; left: 2px; right: 2px; height: 2px; }
.faq__q .pm::after { left: 10px; top: 2px; bottom: 2px; width: 2px; transition: opacity .2s; }
.faq__item[open] .pm::after { opacity: 0; }
.faq__a { padding: 0 1.2rem 1.2rem; color: var(--muted); }
.faq__a p:last-child { margin-bottom: 0; }

/* ---- Tables / spec ------------------------------------------------------ */
.spec { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec th, .spec td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { color: var(--navy); font-weight: 700; background: var(--bg-soft); }
.tag-row { display:flex; flex-wrap:wrap; gap:.5rem; margin: .4rem 0 0; }
.tag { font-size:.85rem; background:var(--bg-softer); color:var(--slate); border:1px solid var(--line); padding:.3rem .7rem; border-radius:999px; }

/* ---- Forms -------------------------------------------------------------- */
.form-wrap { background:#fff; border:1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: clamp(1.25rem,3vw,2rem); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; color: var(--slate); }
.field .req { color: var(--warn); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .98rem; padding: .7rem .8rem; border: 1.5px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); width: 100%; transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); outline: none; }
.field textarea { min-height: 110px; resize: vertical; }
.field .hint { font-size: .8rem; color: var(--muted); }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin: 0 0 1.3rem; }
.fieldset legend { font-weight: 700; color: var(--navy); padding: 0 .5rem; font-size: 1.05rem; }
.consent { display: flex; gap: .6rem; align-items: flex-start; background: var(--bg-soft); border:1px solid var(--line); border-radius: 8px; padding: .9rem 1rem; font-size: .9rem; color: var(--slate); }
.consent input { width: 18px; height: 18px; flex: none; margin-top: .15rem; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 1rem; }
.form-status { display:none; padding: .9rem 1.1rem; border-radius: 8px; margin-bottom: 1rem; font-weight: 600; }
.form-status--ok { display:block; background: #e7f6ef; color: var(--ok); border:1px solid #b9e3cf; }
.form-status--err { display:block; background: #fdecea; color: #b42318; border:1px solid #f5c2bd; }
@media (max-width: 620px){ .form-grid{ grid-template-columns: 1fr; } }

/* ---- Two-column content ------------------------------------------------- */
.split { display:grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,4vw,3rem); align-items:center; }
.split--sticky-form { grid-template-columns: 1fr 1.25fr; align-items: start; }
@media (max-width: 880px){ .split, .split--sticky-form { grid-template-columns: 1fr; } }
.side-card { background: var(--bg-soft); border:1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.side-card h3 { font-size: 1.05rem; }
.side-card ul { padding-left: 1.1rem; color: var(--muted); font-size:.93rem; }

/* anchored sections offset for sticky header */
.anchor { scroll-margin-top: 90px; }

/* ---- Blog list ---------------------------------------------------------- */
.post { display:flex; flex-direction:column; }
.post__tag { font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color: var(--teal-600); margin-bottom:.4rem; }
.post h3 { font-size: 1.1rem; }
.post p { font-size:.93rem; }
.post__meta { font-size:.8rem; color: var(--muted); margin-top:auto; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--slate); color: #aab1ba; padding: 3.5rem 0 1.5rem; font-size: .93rem; border-top: 3px solid var(--teal); }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2rem; }
.footer-grid a { color: #aab1ba; display: block; padding: .25rem 0; }
.footer-grid a:hover { color: #fff; text-decoration: none; }
.footer__brand .brand { color: #fff; margin-bottom: .8rem; }
.footer__brand .brand__sub { color: #828a94; }
.footer__about { max-width: 34ch; color: #9aa1ab; }
.footer__contact a, .footer__contact p { color:#aab1ba; margin:.2rem 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; color: #828a94; font-size: .85rem; }
.footer-bottom a { color:#828a94; }
.footer__disclaimer { color:#7b828c; font-size:.8rem; margin-top:1rem; max-width: 60ch; }
@media (max-width: 820px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px){ .footer-grid{ grid-template-columns: 1fr; } }

/* ---- Utilities ---------------------------------------------------------- */
.skip-link { position:absolute; left:-9999px; top:0; background:#fff; color:var(--navy); padding:.6rem 1rem; z-index:200; border-radius:0 0 8px 0; }
.skip-link:focus { left:0; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
.divider { height:1px; background: var(--line); border:0; margin: 2rem 0; }
