/* =========================================
   Construction Worker Hub — Main Stylesheet
   ========================================= */

:root {
  --primary: #1e3a5f;
  --primary-dark: #0f2338;
  --primary-light: #2d4a6f;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #1f2937;
  --text-light: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(15,35,56,0.08);
  --shadow-md: 0 4px 14px rgba(15,35,56,0.08);
  --shadow-lg: 0 20px 45px rgba(15,35,56,0.12);
  --radius: 10px;
  --radius-lg: 16px;
  --max-w: 1200px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: var(--primary-light); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 { line-height: 1.25; color: var(--primary); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin-bottom: 1rem; color: var(--text); }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: var(--max-w); margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--primary); }
.logo:hover { color: var(--primary); }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.9rem;
  box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.logo-mark::after { content: "CW"; }
.logo-text small { display: block; font-size: 0.68rem; font-weight: 500; color: var(--text-light); letter-spacing: 0.02em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: 0.92rem; font-weight: 500; padding: 8px 12px; border-radius: 8px; color: var(--text);
}
.nav a:hover { background: var(--bg-alt); color: var(--primary); }
.nav a.nav-cta { background: var(--primary); color: #fff; padding: 9px 18px; font-size: 0.88rem; }
.nav a.nav-cta:hover { background: var(--primary-light); color: #fff; }
@media (max-width: 900px) { .nav { display: none; } }

/* HERO */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0f2338 0%, #1e3a5f 55%, #2d4a6f 100%);
  color: #fff; padding: 100px 0 110px;
}
.hero::before {
  content: ""; position: absolute; top: -120px; right: -120px;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.28), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; bottom: -180px; left: -120px;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,0.18), transparent 65%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; text-align: center; padding: 0 24px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  padding: 7px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 500;
  color: #e2e8f0; margin-bottom: 22px; letter-spacing: 0.02em;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(245,158,11,0.25); }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero h1 span { color: var(--accent); }
.hero p.lead { font-size: clamp(1rem, 1.5vw, 1.18rem); color: #cbd5e1; max-width: 720px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  transition: transform .2s, box-shadow .2s, background .2s;
  cursor: pointer; border: none; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #1a1300; }
.btn-primary:hover { background: #fbbf24; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(245,158,11,0.3); color: #1a1300; }
.btn-outline { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.25); }
.btn-outline:hover { background: rgba(255,255,255,0.16); color: #fff; transform: translateY(-2px); }

/* SECTIONS */
section.block { padding: 80px 0; }
section.block.alt { background: var(--bg-alt); }
.section-head { max-width: 780px; margin: 0 auto 50px; text-align: center; }
.section-head .eyebrow {
  display: inline-block; text-transform: uppercase; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; color: var(--accent-dark); margin-bottom: 12px;
}
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--text-light); font-size: 1.02rem; margin-bottom: 0; }

/* PROSE */
.prose { max-width: 820px; margin: 0 auto; }
.prose h3 { margin: 28px 0 12px; color: var(--primary); }
.prose p { color: #334155; font-size: 1rem; line-height: 1.75; }
.prose ul { margin: 0 0 18px 20px; }
.prose li { margin-bottom: 8px; color: #334155; }
.prose strong { color: var(--primary); }

/* GRID + CARDS */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 24px; box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cbd5e1; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(30,58,95,0.08), rgba(245,158,11,0.14));
  display: grid; place-items: center; color: var(--primary); margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.card p { color: var(--text-light); font-size: 0.93rem; margin: 0; }

/* PROCESS STEPS */
.steps { display: grid; gap: 30px 20px; grid-template-columns: repeat(4, 1fr); counter-reset: step; padding-top: 20px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 22px 24px; box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: -18px; left: 22px;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 0.95rem;
  display: grid; place-items: center; box-shadow: 0 8px 16px rgba(30,58,95,0.25);
}
.step h3 { margin-top: 8px; font-size: 1.02rem; margin-bottom: 8px; }
.step p { font-size: 0.9rem; color: var(--text-light); margin: 0; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
  transition: border-color .2s;
}
.faq details[open] { border-color: var(--primary-light); }
.faq summary {
  font-weight: 600; color: var(--primary); cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.5rem; color: var(--accent-dark); font-weight: 400;
  transition: transform .25s; line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 14px; margin-bottom: 0; color: var(--text-light); font-size: 0.94rem; }

/* CONTACT */
.contact-box {
  max-width: 760px; margin: 0 auto; text-align: center;
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 50px 30px; box-shadow: var(--shadow-md);
}
.contact-box h2 { margin-bottom: 12px; }
.contact-box p { color: var(--text-light); margin-bottom: 26px; }
.contact-email {
  display: inline-block; font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 700; color: var(--primary); padding: 14px 26px;
  border: 2px dashed var(--primary-light); border-radius: 12px;
  background: #fff; transition: all .25s; word-break: break-all;
}
.contact-email:hover { border-color: var(--accent); color: var(--accent-dark); transform: translateY(-2px); }
.contact-note { font-size: 0.86rem; color: var(--text-light); margin-top: 18px; margin-bottom: 0; }

/* FOOTER */
.site-footer { background: #0f2338; color: #cbd5e1; padding: 60px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.site-footer h4 { color: #fff; font-size: 0.98rem; margin-bottom: 14px; }
.site-footer p { color: #94a3b8; font-size: 0.88rem; line-height: 1.65; }
.site-footer a { color: #cbd5e1; font-size: 0.9rem; display: block; padding: 4px 0; }
.site-footer a:hover { color: var(--accent); }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: #fff; font-weight: 800; font-size: 1.02rem; }
.footer-logo .logo-mark { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); color: #1a1300; }
.disclaimer {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 18px 22px; margin-bottom: 26px;
  color: #94a3b8; font-size: 0.82rem; line-height: 1.65;
}
.disclaimer strong { color: #e2e8f0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 0.82rem; color: #94a3b8; flex-wrap: wrap;
}

/* LEGAL PAGES */
.legal-wrap { max-width: 880px; margin: 0 auto; padding: 70px 24px 90px; }
.legal-wrap h1 { margin-bottom: 10px; }
.legal-wrap .legal-meta { color: var(--text-light); font-size: 0.9rem; margin-bottom: 32px; }
.legal-wrap h2 { font-size: 1.25rem; margin: 28px 0 10px; }
.legal-wrap p, .legal-wrap li { color: #334155; font-size: 0.97rem; line-height: 1.75; }
.legal-wrap ul { margin: 0 0 16px 22px; }
.legal-wrap a { text-decoration: underline; }

/* ANIMATIONS */
[data-animate] {
  opacity: 0; transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.2,.7,.3,1), transform .8s cubic-bezier(.2,.7,.3,1);
  will-change: opacity, transform;
}
[data-animate].in { opacity: 1; transform: translateY(0); }

.hero-badge, .hero h1, .hero p.lead, .hero-actions { opacity: 0; animation: heroFade .9s ease forwards; }
.hero-badge { animation-delay: .05s; }
.hero h1 { animation-delay: .15s; }
.hero p.lead { animation-delay: .3s; }
.hero-actions { animation-delay: .45s; }
@keyframes heroFade {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-animate] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}