/* ===== P4PCT Design System ===== */
:root {
  --blue: #2C7DB8;
  --blue-dark: #1F4E79;
  --blue-deep: #143959;
  --green: #7FB539;
  --green-dark: #5F8A25;
  --bg: #FAFAF7;
  --bg-alt: #F3F1EC;
  --ink: #2A2A2A;
  --ink-soft: #4A4A4A;
  --mute: #6E6E6E;
  --line: #E6E4DE;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(20, 57, 89, 0.06), 0 2px 8px rgba(20, 57, 89, 0.04);
  --shadow-md: 0 4px 14px rgba(20, 57, 89, 0.08), 0 12px 32px rgba(20, 57, 89, 0.06);
  --radius: 10px;
  --radius-lg: 18px;
  --max: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
img { max-width: 100%; }
body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

h1, h2, h3, h4, h5 {
  font-family: 'Montserrat', sans-serif;
  color: var(--blue-dark);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); }

p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: var(--blue); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--blue-dark); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
#header-mount {
  position: sticky; top: 0; z-index: 50;
}
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}
.site-header.scrolled { box-shadow: 0 2px 12px rgba(20, 57, 89, 0.08); }
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: padding 0.2s ease;
}
.site-header.scrolled .header-inner { padding: 2px 24px; }
.logo-link { display: flex; align-items: center; gap: 12px; color: inherit; }
.logo-img {
  height: 130px;
  width: auto;
  display: block;
  transition: height 0.2s ease;
}
.site-header.scrolled .logo-img { height: 60px; }
@media (max-width: 600px) {
  .logo-img { height: 76px; }
  .site-header.scrolled .logo-img { height: 48px; }
}

nav.primary {
  display: flex; align-items: center; gap: 4px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
nav.primary a.nav-link {
  padding: 10px 14px;
  color: var(--ink);
  border-radius: 6px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
nav.primary a.nav-link:hover { color: var(--blue); background: rgba(44, 125, 184, 0.06); }
nav.primary a.nav-link.active { color: var(--blue); }
nav.primary a.nav-link.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 2px; background: var(--green);
}
nav .has-dropdown { position: relative; }
nav .dropdown {
  position: absolute; top: 100%; left: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: 8px;
  min-width: 200px;
  display: none;
  z-index: 10;
}
nav .has-dropdown:hover .dropdown,
nav .has-dropdown.open .dropdown { display: block; }
nav .dropdown a {
  display: block;
  padding: 10px 14px;
  color: var(--ink);
  border-radius: 6px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  font-weight: 500;
}
nav .dropdown a:hover { background: var(--bg-alt); color: var(--blue); }
.caret { display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid currentColor; margin-left: 2px; }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: white;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--ink);
}
.icon-btn:hover { border-color: var(--blue); color: var(--blue); }

.mobile-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn-primary { background: var(--white); color: var(--blue-dark); }
.btn-primary:hover { background: var(--green); color: white; transform: translateY(-1px); }
.btn-green { background: var(--green); color: white; }
.btn-green:hover { background: var(--green-dark); color: white; transform: translateY(-1px); }
.btn-blue { background: var(--blue); color: white; }
.btn-blue:hover { background: var(--blue-dark); color: white; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: white; }
.btn-outline-white { background: transparent; color: white; border-color: white; }
.btn-outline-white:hover { background: white; color: var(--blue-dark); }

/* ===== Sections ===== */
section { padding: 72px 0; }
.section-title {
  text-align: center;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  margin-bottom: 48px;
  font-weight: 700;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px; height: 3px;
  background: var(--green);
  margin: 16px auto 0;
}
.eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 12px;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--blue-deep);
  color: #C8D6E3;
  padding: 56px 0 24px;
  margin-top: 72px;
}
.site-footer a { color: #C8D6E3; }
.site-footer a:hover { color: white; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  color: white;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; font-size: 14px; }
.footer-brand .fb-name {
  font-family: 'Montserrat', sans-serif;
  color: white;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 8px;
}
.footer-brand p { color: #9DB4CA; font-size: 14px; max-width: 280px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #9DB4CA;
}
.socials { display: flex; gap: 12px; }
.socials a {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: grid; place-items: center;
  transition: all 0.15s;
}
.socials a:hover { background: var(--green); border-color: var(--green); color: white; }

/* ===== Utilities ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.img-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #e8f2f9, #edf5e0);
  position: relative;
}
.img-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(127, 181, 57, 0.12);
  color: var(--green-dark);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.04em;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--blue-dark);
  color: white;
  padding: 14px 22px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  font-weight: 600;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  nav.primary { display: none; }
  nav.primary.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: white;
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    align-items: stretch;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }
  nav.primary.open a.nav-link { padding: 14px 16px; font-size: 14px; }
  nav.primary.open .dropdown { position: static; box-shadow: none; border: none; padding: 0 0 0 16px; display: block; }
  nav.primary.open .dropdown a { padding: 12px 14px; }
  nav.primary.open .icon-btn { align-self: flex-start; margin: 8px 16px; }
  .mobile-toggle { display: block; }
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  section { padding: 56px 0; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .header-inner { padding: 2px 16px; }
  section { padding: 44px 0; }
  .grid-4 { grid-template-columns: 1fr; }
  .card { padding: 24px 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
  }
  .site-footer { padding: 44px 0 20px; margin-top: 48px; }
}

/* ===== Hero band (reused) ===== */
.hero-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
  background: var(--blue);
}
.hero-image {
  background-size: cover;
  background-position: center;
}
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
  color: white;
  text-align: center;
  align-items: center;
}
.hero-content h1 {
  color: white;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  margin-bottom: 16px;
  max-width: 18ch;
}
.hero-content p.subtitle { color: rgba(255,255,255,0.95); font-size: 1.05rem; margin-bottom: 28px; }
.hero-content .email-tag { margin-top: 20px; color: white; font-size: 15px; font-weight: 600; }
@media (max-width: 900px) {
  .hero-band { grid-template-columns: 1fr; }
  .hero-image { min-height: 280px; }
  .hero-content { padding: 48px 24px; }
}

/* ===== Forms ===== */
.form-field {
  margin-bottom: 20px;
}
.form-field label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--blue-dark);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  /* 16px minimum prevents iOS Safari from auto-zooming when a field is focused */
  font-size: 16px;
  color: var(--ink);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-field textarea { resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 125, 184, 0.12);
}
.form-field .hint { font-size: 12px; color: var(--mute); margin-top: 4px; }
.form-field.error input,
.form-field.error select,
.form-field.error textarea { border-color: #D94A4A; }
.form-field .err-msg { color: #D94A4A; font-size: 12px; margin-top: 4px; display: none; }
.form-field.error .err-msg { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
/* min-width: 0 lets fields shrink inside the grid instead of overflowing off-screen */
.form-row > .form-field { min-width: 0; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ===== Checkbox ===== */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  cursor: pointer;
}
.checkbox input[type="checkbox"] { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--green); }
.checkbox span { font-size: 14px; color: var(--ink-soft); }
