/* ==========================================================================
   Mountain Pine Manufacturing — global stylesheet
   1. Tokens  2. Base  3. Layout  4. Header  5. Components
   6. Sections  7. Forms  8. Footer  9. Responsive
   ========================================================================== */

/* 1. Tokens ------------------------------------------------------------- */
:root {
  --steel-900: #12210f;
  --steel-800: #1b2f17;
  --steel-700: #27431f;
  --steel-100: #eef3ea;
  --steel-50: #f7faf5;
  --brand: #2f7d32;
  --brand-dark: #215c24;
  --brand-soft: #e4f0e2;
  --amber: #c98a2b;
  --text: #1a2417;
  --text-muted: #5c6b57;
  --line: #dde5d8;
  --white: #ffffff;

  --font-sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1160px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(18, 33, 15, .06), 0 4px 12px rgba(18, 33, 15, .05);
  --shadow-md: 0 8px 28px rgba(18, 33, 15, .10);
  --space-section: clamp(3.5rem, 7vw, 6.5rem);
  --transition: .25s ease;
}

/* 2. Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; color: var(--steel-900); font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }
p { margin: 0 0 1rem; }
a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-dark); text-decoration: underline; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--steel-900); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* 3. Layout ------------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: var(--space-section); }
.section--tint { background: var(--steel-50); }
.section--dark { background: var(--steel-900); color: #cfdcc9; }
.section--dark h2, .section--dark h3 { color: #fff; }

.section-head { max-width: 720px; margin-bottom: 2.75rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand); margin-bottom: .75rem;
}
.section--dark .eyebrow { color: var(--amber); }
.lead { font-size: 1.1rem; color: var(--text-muted); }
.section--dark .lead { color: #a9b8cb; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }

/* 4. Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--transition);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--steel-900); font-size: 1.08rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; color: var(--brand); }
.brand img { width: 34px; height: 34px; }
.brand span small { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }

.nav ul { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  color: var(--text); font-weight: 600; font-size: .95rem; padding: .35rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--brand); text-decoration: none; border-bottom-color: var(--brand); }
.nav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }

.header-actions { display: flex; align-items: center; gap: .75rem; }
.nav .nav-cta { display: none; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); cursor: pointer; padding: 0; align-items: center; justify-content: center;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--steel-900); position: relative; transition: var(--transition); }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--steel-900); transition: var(--transition);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* 5. Components --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: var(--radius-sm); font-weight: 700; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; text-align: center;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--steel-900); border-color: var(--line); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn-block { width: 100%; }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #c6d6ef; }
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card .card-link { font-weight: 700; font-size: .92rem; }

.icon-badge {
  width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem;
  font-weight: 800; font-size: 1.05rem;
}
.section--dark .icon-badge { background: rgba(244, 161, 42, .16); color: var(--amber); }

.media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.media img { width: 100%; object-fit: cover; }

.stat { text-align: center; }
.stat strong { display: block; font-size: clamp(2rem, 4vw, 2.8rem); color: #fff; line-height: 1.1; }
.stat span { font-size: .9rem; color: #a9b8cb; }

.checklist { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.checklist li { position: relative; padding-left: 1.85rem; margin-bottom: .65rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .45rem; width: 1.1rem; height: 1.1rem;
  border-radius: 50%; background: var(--brand-soft);
  box-shadow: inset 0 0 0 2px var(--brand);
}

.quote { border-left: 4px solid var(--brand); padding-left: 1.25rem; font-size: 1.05rem; }
.quote cite { display: block; margin-top: .75rem; font-style: normal; font-weight: 700; font-size: .9rem; color: var(--text-muted); }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 3.25rem; margin-bottom: 1.6rem; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0; font-weight: 800; color: var(--brand);
  background: var(--brand-soft); border-radius: 10px; width: 2.4rem; height: 2.4rem;
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
}

.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.25rem;
  margin-bottom: .75rem; background: var(--white);
}
.faq summary { cursor: pointer; font-weight: 700; color: var(--steel-900); }
.faq details[open] summary { color: var(--brand); }
.faq p { margin: .75rem 0 0; color: var(--text-muted); }

.breadcrumbs { font-size: .85rem; color: var(--text-muted); padding-top: 1.5rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--line); }

/* 6. Sections ----------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--steel-900) 0%, var(--steel-700) 100%);
  color: #cddaea; padding-block: clamp(3.5rem, 8vw, 6rem);
}
.hero h1 { color: #fff; }
.hero p { font-size: 1.12rem; max-width: 34rem; }
.hero .hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.75rem; }
.hero .media { box-shadow: 0 24px 60px rgba(0, 0, 0, .38); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1.75rem; margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid rgba(255, 255, 255, .14); }
.hero-meta div strong { display: block; color: #fff; font-size: 1.3rem; }
.hero-meta div span { font-size: .85rem; color: #9fb0c5; }

.page-hero { background: var(--steel-900); color: #b9c8db; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.page-hero h1 { color: #fff; margin-top: .5rem; }
.page-hero p { max-width: 46rem; font-size: 1.08rem; }
.page-hero .breadcrumbs, .page-hero .breadcrumbs a { color: #8fa2ba; }

.logo-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2.5rem; }
.logo-strip span {
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .82rem;
  color: var(--text-muted); border: 1px dashed var(--line); border-radius: 100px; padding: .5rem 1.1rem;
}

.cta-band {
  background: linear-gradient(120deg, var(--brand) 0%, var(--steel-700) 100%);
  color: #fff; border-radius: var(--radius); padding: clamp(2rem, 5vw, 3.25rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.cta-band h2 { color: #fff; margin-bottom: .35rem; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .88); }

.legal { max-width: 780px; }
.legal h2 { margin-top: 2.5rem; }
.legal h3 { margin-top: 1.75rem; }
.legal ul { padding-left: 1.25rem; color: var(--text-muted); }
.legal li { margin-bottom: .4rem; }
.legal .updated { font-size: .9rem; color: var(--text-muted); }
.placeholder {
  background: #fff6e5; border: 1px dashed var(--amber); border-radius: 6px;
  padding: .05rem .4rem; font-size: .95em; color: #7a4f06;
}

.error-page { text-align: center; padding-block: clamp(4rem, 12vw, 8rem); }
.error-page .code { font-size: clamp(4.5rem, 16vw, 9rem); font-weight: 800; color: var(--brand); line-height: 1; letter-spacing: -.04em; }

/* 7. Forms -------------------------------------------------------------- */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow-sm); }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .4rem; }
.field .req { color: #c0392b; }
.field input, .field textarea, .field select {
  width: 100%; padding: .75rem .9rem; font: inherit; font-size: .95rem; color: var(--text);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 111, 235, .15);
}
.field textarea { min-height: 150px; resize: vertical; }
.field .hint { font-size: .82rem; color: var(--text-muted); margin: .35rem 0 0; }
.field .error { display: none; font-size: .82rem; color: #c0392b; margin: .35rem 0 0; font-weight: 600; }
.field.has-error input, .field.has-error textarea { border-color: #c0392b; }
.field.has-error .error { display: block; }

.field-check { display: flex; gap: .65rem; align-items: flex-start; margin-bottom: 1.25rem; }
.field-check input { width: 18px; height: 18px; margin-top: .25rem; flex: none; }
.field-check label { font-size: .9rem; font-weight: 500; color: var(--text-muted); }
.field-check.has-error label { color: #c0392b; }

.form-status { display: none; border-radius: var(--radius-sm); padding: .9rem 1.1rem; margin-bottom: 1.25rem; font-size: .93rem; font-weight: 600; }
.form-status.is-visible { display: block; }
.form-status.success { background: #e7f7ee; color: #14663c; border: 1px solid #b9e6cd; }
.form-status.error { background: #fdecea; color: #97231a; border: 1px solid #f5c6c2; }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { margin-bottom: 1.15rem; }
.contact-list strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }

/* 8. Footer ------------------------------------------------------------- */
.site-footer { background: var(--steel-900); color: #93a5ba; padding-block: 3.5rem 1.5rem; font-size: .93rem; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1rem; }
.site-footer a { color: #b8c6d8; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer .brand { color: #fff; }
.site-footer .brand span small { color: #8497ad; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; font-size: .85rem;
}

/* 9. Responsive --------------------------------------------------------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .split.reverse .media { order: -1; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .header-actions .btn { display: none; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); display: none;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1.25rem; }
  .nav li { border-bottom: 1px solid var(--line); }
  .nav li:last-child { border-bottom: none; }
  .nav a { display: block; padding: .9rem 0; border-bottom: none; }
  .nav a[aria-current="page"] { border-bottom: none; }
  .nav .nav-cta { display: block; margin-top: .9rem; border-bottom: none; }
  .nav .nav-cta .btn { display: inline-flex; width: 100%; }
}

@media (max-width: 600px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .hero-meta { gap: 1.25rem; }
  .btn { width: 100%; }
  .hero-actions .btn, .cta-band .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
