/* ============================================================
   Haddad Insurance Corp — Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Color */
  --ink: #14213D;
  --ink-soft: #2A3655;
  --paper: #FAF8F4;
  --paper-dim: #F1EEE7;
  --accent: #8A6A23;
  --accent-on-dark: #D4AF6F;
  --line: #E2DDD2;
  --text-body: #3B4256;
  --text-muted: #6B7185;
  --white: #FFFFFF;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  /* Layout */
  --container: 1160px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 var(--space-sm);
}

h1 { font-size: clamp(2.4rem, 4vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 var(--space-sm); }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}
.hero .eyebrow,
.page-hero .eyebrow,
.section-dark .eyebrow {
  color: var(--accent-on-dark);
}

.lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 42em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--accent);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.btn-outline-light {
  background: transparent;
  color: var(--paper);
  border-color: rgba(250, 248, 244, 0.5);
}
.btn-outline-light:hover {
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 0;
}

.brand {
  font-family: var(--font-display);
  font-size: 2.15rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.005em;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.brand:hover { text-decoration: none; }

.logo-mark {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a.active { color: var(--accent); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  background-color: var(--ink);
  background-image: radial-gradient(rgba(250, 248, 244, 0.07) 1px, transparent 1.5px);
  background-size: 22px 22px;
  color: var(--paper);
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero h1 { color: var(--white); }

.hero .lede {
  color: rgba(250, 248, 244, 0.75);
  font-size: 1.2rem;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.hero-mark {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-mark svg { width: 100%; max-width: 320px; height: auto; }

.page-hero {
  background-color: var(--ink);
  background-image: radial-gradient(rgba(250, 248, 244, 0.07) 1px, transparent 1.5px);
  background-size: 22px 22px;
  color: var(--paper);
  padding: var(--space-xl) 0 var(--space-lg);
}
.page-hero h1 { color: var(--white); margin-bottom: var(--space-xs); }
.page-hero .lede { color: rgba(250, 248, 244, 0.75); }

/* ---------- Sections ---------- */
section { padding: var(--space-2xl) 0; }
.section-tight { padding: var(--space-xl) 0; }
.section-alt { background: var(--paper-dim); }
.section-dark { background: var(--ink); color: var(--paper); }
.section-dark h2 { color: var(--white); }
.section-dark .lede { color: rgba(250, 248, 244, 0.7); }
.section-dark .quote { color: var(--white); }
.section-dark .quote-attribution { color: rgba(250, 248, 244, 0.6); }

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-lg);
}

/* ---------- Cards ---------- */
.grid {
  display: grid;
  gap: var(--space-md);
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: var(--space-lg) var(--space-md);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-icon {
  width: 42px;
  height: 42px;
  margin-bottom: var(--space-sm);
  color: var(--accent);
}
.card-icon svg { width: 100%; height: 100%; }

.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.97rem; margin-bottom: 0; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3rem);
  color: var(--accent-on-dark);
  font-weight: 600;
  display: block;
}
.stat-label {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.section-dark .stat-label { color: rgba(250, 248, 244, 0.6); }

/* ---------- Service detail blocks ---------- */
.service-block {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--line);
}
.service-block:last-child { border-bottom: none; }
.service-icon {
  width: 56px;
  height: 56px;
  color: var(--accent);
}
.service-icon svg { width: 100%; height: 100%; }
.service-block h3 { margin-bottom: 0.5rem; }
.service-block p { color: var(--text-muted); max-width: 60em; }

/* ---------- Quote / testimonial ---------- */
.quote-mark {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}
.quote-mark svg { width: 100%; height: 100%; }

.quote {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--ink);
  line-height: 1.4;
  max-width: 46em;
  margin: 0 auto var(--space-sm);
}
.quote-attribution {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Timeline (About page) ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  position: relative;
  text-align: center;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--line);
}
.timeline-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
  position: relative;
  z-index: 1;
  color: var(--accent);
}
.timeline-icon svg { width: 24px; height: 24px; }
.timeline-item h4 { font-family: var(--font-display); color: var(--ink); font-size: 1.1rem; margin-bottom: 0.35rem; }
.timeline-item p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 0; }

/* ---------- Small supporting illustrations ---------- */
.mini-illustration {
  width: 90px;
  height: 90px;
  margin-bottom: var(--space-md);
  position: relative;
}
.mini-illustration svg { width: 100%; height: 100%; }

/* ---------- Generated images ---------- */
.generated-image {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: var(--space-md);
}
.generated-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.monogram-display {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--space-md);
}
.monogram-display svg {
  width: 220px;
  height: 220px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-info dt {
  font-weight: 600;
  color: var(--ink);
  margin-top: var(--space-md);
}
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd { margin: 0.25rem 0 0; color: var(--text-muted); }

.form-field {
  margin-bottom: var(--space-md);
}
.form-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-body);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}
.form-status {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: var(--space-sm);
}
.form-status:empty { display: none; }
.form-status-success { color: #2E7D4F; }
.form-status-error { color: #B3413E; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(250, 248, 244, 0.8);
  padding: var(--space-xl) 0 var(--space-md);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(250, 248, 244, 0.15);
}
.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--space-xs);
}
.footer-logo-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
}
.footer-grid h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}
.footer-grid p { color: rgba(250, 248, 244, 0.65); font-size: 0.95rem; }
.footer-grid p a { color: rgba(250, 248, 244, 0.85); }
.footer-grid p a:hover { color: var(--accent-on-dark); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: rgba(250, 248, 244, 0.75); font-size: 0.95rem; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  padding-top: var(--space-md);
  font-size: 0.82rem;
  color: rgba(250, 248, 244, 0.45);
  display: flex;
  justify-content: space-between;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-links, .nav-cta .btn-outline { display: none; }
  .nav-toggle { display: block; }
  .brand { font-size: 1.55rem; gap: 0.55rem; }
  .logo-mark { width: 38px; height: 38px; }
  .nav.is-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: var(--space-md);
    gap: var(--space-sm);
  }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .service-block { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
  .timeline { grid-template-columns: 1fr; gap: var(--space-lg); }
  .timeline::before { display: none; }
}
