/*
Theme Name: C3 Contractors Co-Operative
Theme URI: https://contractorscoopc3.ca
Description: Custom landing page theme for Contractors Co-Operative of Canada Inc. (C3). Worker-owned general contracting cooperative serving Southwestern Ontario.
Version: 1.0.0
Author: Evormore
Author URI: https://evormore.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: c3-theme
*/

/* ── RESET & VARIABLES ── */
:root {
  --c3-red: #D51920;
  --c3-red-dark: #B01218;
  --c3-red-deep: #8A0E12;
  --c3-white: #FFFFFF;
  --c3-off-white: #F8F6F3;
  --c3-warm-gray: #E8E4DF;
  --c3-charcoal: #2A2A2A;
  --c3-dark: #1A1A1A;
  --c3-text: #3A3632;
  --c3-text-light: #6B6560;
  --c3-accent-gold: #C8952E;
  --font-primary: 'Work Sans', sans-serif;
  --section-pad: clamp(4rem, 8vw, 7rem);
  --content-width: 1200px;
  --narrow-width: 820px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  color: var(--c3-text);
  background: var(--c3-white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── UTILITY ── */
.container { max-width: var(--content-width); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }
.narrow { max-width: var(--narrow-width); }

/* ── NAV ── */
.c3-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
}
.c3-nav.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,0.08); }
.nav-inner {
  max-width: var(--content-width); margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo-icon {
  width: 44px; height: 44px; background: var(--c3-red); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--c3-white); outline: 2px solid var(--c3-red);
}
.nav-logo-icon span { color: white; font-weight: 800; font-size: 18px; letter-spacing: -0.5px; }
.nav-brand { font-weight: 700; font-size: 15px; color: var(--c3-charcoal); letter-spacing: -0.3px; }
.nav-brand small { display: block; font-weight: 400; font-size: 11px; color: var(--c3-text-light); letter-spacing: 0.3px; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--c3-text); text-decoration: none;
  letter-spacing: 0.2px; transition: color 0.2s;
}
.nav-links a:hover { color: var(--c3-red); }
.nav-cta {
  background: var(--c3-red); color: white !important; padding: 10px 24px;
  border-radius: 6px; font-weight: 600; transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--c3-red-dark) !important; transform: translateY(-1px); }
.nav-mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--c3-charcoal); margin: 5px 0; transition: 0.3s; }

/* ── HERO ── */
.hero {
  margin-top: 72px;
  background: var(--c3-red);
  position: relative; overflow: hidden;
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(4rem, 10vw, 7rem);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(0,0,0,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(to top, rgba(0,0,0,0.12), transparent);
  pointer-events: none;
}
.hero-pattern {
  position: absolute; inset: 0; opacity: 0.04;
  background-image:
    repeating-linear-gradient(45deg, white 0, white 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(-45deg, white 0, white 1px, transparent 1px, transparent 40px);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,0.85); margin-bottom: 28px;
}
.hero-tag::before {
  content: ''; display: block; width: 28px; height: 2px;
  background: rgba(255,255,255,0.5);
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800; color: white; line-height: 1.12;
  letter-spacing: -1.5px; max-width: 700px;
  margin-bottom: 24px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 800;
  background: none;
  padding: 0; margin: 0;
  border-left: none;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.88); max-width: 540px;
  line-height: 1.7; font-weight: 400; margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; font-family: var(--font-primary);
  font-size: 15px; font-weight: 600; border-radius: 6px;
  text-decoration: none; cursor: pointer; border: none;
  transition: all 0.2s;
}
.btn-white { background: white; color: var(--c3-red); }
.btn-white:hover { background: var(--c3-off-white); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.4); }
.btn-outline:hover { border-color: white; background: rgba(255,255,255,0.08); }
.btn-red { background: var(--c3-red); color: white; }
.btn-red:hover { background: var(--c3-red-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(213,25,32,0.3); }

/* ── TRUST BAR ── */
.trust-bar {
  background: var(--c3-dark); padding: 28px 0;
}
.trust-bar-inner {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 20px 48px; align-items: center;
}
.trust-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: rgba(255,255,255,0.7); font-weight: 500;
}
.trust-item svg { flex-shrink: 0; }

/* ── JTBD SECTION ── */
.jtbd {
  padding: var(--section-pad) 0;
  background: var(--c3-off-white);
}
.section-label {
  font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--c3-red); margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800; color: var(--c3-charcoal);
  line-height: 1.15; letter-spacing: -1px; margin-bottom: 16px;
}
.section-intro {
  font-size: 1.1rem; color: var(--c3-text-light);
  max-width: 560px; line-height: 1.7; margin-bottom: 48px;
}
.jtbd-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.jtbd-card {
  background: white; border-radius: 12px;
  padding: 36px 32px; position: relative;
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform 0.25s, box-shadow 0.25s;
}
.jtbd-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.jtbd-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: linear-gradient(135deg, var(--c3-red), var(--c3-red-dark));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.jtbd-when {
  font-size: 13px; font-weight: 600; color: var(--c3-red);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
}
.jtbd-card h3 {
  font-size: 1.2rem; font-weight: 700; color: var(--c3-charcoal);
  line-height: 1.35; margin-bottom: 12px; letter-spacing: -0.3px;
}
.jtbd-card p {
  font-size: 0.95rem; color: var(--c3-text-light); line-height: 1.65;
}

/* ── COOPERATIVE DIFFERENCE ── */
.coop {
  padding: var(--section-pad) 0;
  background: var(--c3-white);
}
.coop-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.coop-visual {
  background: var(--c3-red); border-radius: 16px;
  padding: 48px 40px; position: relative; overflow: hidden;
  min-height: 480px; display: flex; flex-direction: column; justify-content: flex-end;
}
.coop-visual::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(255,255,255,0.08), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(0,0,0,0.2), transparent 60%);
  pointer-events: none;
}
.coop-visual-pattern {
  position: absolute; top: 32px; right: 32px;
  display: grid; grid-template-columns: repeat(5, 16px); gap: 12px;
  opacity: 0.15;
}
.coop-visual-pattern span {
  width: 16px; height: 16px; background: white; border-radius: 50%;
}
.coop-quote {
  position: relative; z-index: 2;
  font-size: 1.6rem; font-weight: 700; color: white;
  line-height: 1.35; letter-spacing: -0.5px;
}
.coop-quote-attr {
  position: relative; z-index: 2;
  margin-top: 20px; font-size: 0.9rem; color: rgba(255,255,255,0.7);
  font-weight: 500;
}
.coop-pillars { list-style: none; display: flex; flex-direction: column; gap: 28px; }
.coop-pillar { display: flex; gap: 20px; align-items: flex-start; }
.coop-pillar-num {
  flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--c3-red); color: var(--c3-red);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}
.coop-pillar h4 {
  font-size: 1.05rem; font-weight: 700; color: var(--c3-charcoal);
  margin-bottom: 4px; letter-spacing: -0.2px;
}
.coop-pillar p { font-size: 0.92rem; color: var(--c3-text-light); line-height: 1.6; }

/* ── SERVICES ── */
.services {
  padding: var(--section-pad) 0;
  background: var(--c3-charcoal);
  color: white;
}
.services .section-label { color: rgba(255,255,255,0.5); }
.services .section-title { color: white; }
.services .section-intro { color: rgba(255,255,255,0.6); }
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.service-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 32px 28px;
  transition: background 0.25s, border-color 0.25s;
}
.service-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}
.service-card h3 {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 10px;
  letter-spacing: -0.2px;
}
.service-card p { font-size: 0.9rem; color: rgba(255,255,255,0.55); line-height: 1.6; }
.service-tag {
  display: inline-block; margin-top: 16px;
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: var(--c3-red);
  padding: 4px 10px; border: 1px solid var(--c3-red); border-radius: 4px;
}

/* ── COMMUNITY IMPACT ── */
.impact {
  padding: var(--section-pad) 0;
  background: var(--c3-off-white);
}
.impact-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin-bottom: 56px;
}
.impact-stat {
  text-align: center; padding: 32px 16px;
  background: white; border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.05);
}
.impact-stat-num {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900; color: var(--c3-red);
  line-height: 1; margin-bottom: 8px; letter-spacing: -1px;
}
.impact-stat-label {
  font-size: 0.85rem; color: var(--c3-text-light);
  font-weight: 500; line-height: 1.4;
}
.impact-promises {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.impact-promise {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 24px; background: white; border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.05);
}
.impact-promise-check {
  flex-shrink: 0; width: 32px; height: 32px;
  background: var(--c3-red); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.impact-promise h4 {
  font-size: 0.95rem; font-weight: 700; color: var(--c3-charcoal);
  margin-bottom: 4px;
}
.impact-promise p { font-size: 0.88rem; color: var(--c3-text-light); line-height: 1.55; }

/* ── CTA SECTION ── */
.cta-section {
  padding: var(--section-pad) 0;
  background: var(--c3-red);
  text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(0,0,0,0.2), transparent 70%);
  pointer-events: none;
}
.cta-section .container { position: relative; z-index: 2; }
.cta-section h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800; color: white; letter-spacing: -1px;
  line-height: 1.2; margin-bottom: 16px;
}
.cta-section p {
  font-size: 1.1rem; color: rgba(255,255,255,0.85);
  max-width: 520px; margin: 0 auto 36px; line-height: 1.65;
}
.cta-section .btn-white { font-size: 16px; padding: 16px 36px; }

/* ── FOOTER ── */
.c3-footer {
  background: var(--c3-dark); color: rgba(255,255,255,0.5);
  padding: 48px 0 32px;
}
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 32px; margin-bottom: 40px;
  padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand { max-width: 320px; }
.footer-brand h3 { color: white; font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.footer-brand p { font-size: 0.85rem; line-height: 1.6; }
.footer-links { display: flex; gap: 48px; }
.footer-col h4 { color: rgba(255,255,255,0.8); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; color: rgba(255,255,255,0.45); text-decoration: none; margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: white; }
.footer-bottom { font-size: 13px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0);
  backdrop-filter: blur(0px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  pointer-events: none;
  transition: background 0.35s, backdrop-filter 0.35s;
}
.modal-overlay.active {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}
.modal {
  background: var(--c3-white); border-radius: 16px;
  width: 100%; max-width: 520px;
  position: relative;
  opacity: 0; transform: translateY(32px) scale(0.97);
  transition: opacity 0.35s ease, transform 0.35s ease;
  max-height: calc(100vh - 48px); overflow-y: auto;
}
.modal-overlay.active .modal {
  opacity: 1; transform: translateY(0) scale(1);
}
.modal-header {
  background: var(--c3-red); padding: 32px 36px 28px;
  border-radius: 16px 16px 0 0; position: relative; overflow: hidden;
}
.modal-header::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 30px,
    rgba(255,255,255,0.03) 30px, rgba(255,255,255,0.03) 31px
  );
  pointer-events: none;
}
.modal-header h2 {
  font-size: 1.5rem; font-weight: 800; color: white;
  letter-spacing: -0.5px; line-height: 1.2; margin-bottom: 6px;
  position: relative;
}
.modal-header p {
  font-size: 0.9rem; color: rgba(255,255,255,0.8);
  line-height: 1.5; position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.15); border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.25); }
.modal-close svg { stroke: white; }
.modal-body { padding: 32px 36px 36px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--c3-charcoal); margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.form-group label .required { color: var(--c3-red); margin-left: 2px; }
.form-input {
  width: 100%; padding: 12px 16px;
  font-family: var(--font-primary); font-size: 15px;
  color: var(--c3-charcoal); background: var(--c3-off-white);
  border: 2px solid transparent; border-radius: 8px;
  outline: none; transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none; appearance: none;
}
.form-input:focus {
  border-color: var(--c3-red); background: white;
}
.form-input::placeholder { color: #B0AAA4; }
select.form-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B6560' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
textarea.form-input { resize: vertical; min-height: 100px; }

.form-submit {
  width: 100%; padding: 14px 24px;
  font-family: var(--font-primary); font-size: 16px; font-weight: 700;
  color: white; background: var(--c3-red);
  border: none; border-radius: 8px; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: -0.2px;
}
.form-submit:hover { background: var(--c3-red-dark); transform: translateY(-1px); }
.form-submit:active { transform: translateY(0); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-note {
  text-align: center; margin-top: 14px;
  font-size: 12.5px; color: var(--c3-text-light);
}
.form-note a { color: var(--c3-red); text-decoration: none; font-weight: 600; }
.form-error {
  color: var(--c3-red); font-size: 13px; font-weight: 500;
  text-align: center; margin-bottom: 16px; display: none;
}
.form-error.show { display: block; }

.form-success {
  display: none; text-align: center; padding: 24px 0;
}
.form-success.show { display: block; }
.form-success-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--c3-red); margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
}
.form-success h3 {
  font-size: 1.3rem; font-weight: 800; color: var(--c3-charcoal);
  margin-bottom: 8px;
}
.form-success p {
  font-size: 0.95rem; color: var(--c3-text-light);
  line-height: 1.6; max-width: 360px; margin: 0 auto;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .coop-layout { grid-template-columns: 1fr; }
  .coop-visual { min-height: 320px; }
  .impact-stats { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; }
  .jtbd-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .impact-stats { grid-template-columns: 1fr 1fr; }
  .footer-links { flex-direction: column; gap: 24px; }
  .impact-promises { grid-template-columns: 1fr; }
  .modal-header { padding: 24px 24px 20px; }
  .modal-body { padding: 24px 24px 28px; }
  .modal-header h2 { font-size: 1.3rem; }
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-content > * {
  animation: fadeUp 0.7s ease-out both;
}
.hero-content > :nth-child(1) { animation-delay: 0.1s; }
.hero-content > :nth-child(2) { animation-delay: 0.2s; }
.hero-content > :nth-child(3) { animation-delay: 0.35s; }
.hero-content > :nth-child(4) { animation-delay: 0.5s; }
