/* Souza's NE Building — Design Tokens & Base Styles */

/* Forest & Stone (default) */
:root {
  --ink: #1f3a2e;
  --accent: #3d6b4a;
  --bg: #fbf9f4;
  --bg-alt: #eee7d7;
  --bg-dark: #1f3a2e;
  --line: #a89f8c;
  --line-soft: #d6cfbe;
  --fill: #dcd5c2;
  --fill-soft: #e8e2d1;
  --muted: #6a6353;
  --on-dark: #e8e2d1;
  --on-dark-muted: #a89f8c;
  --site-max: 1200px;
}

[data-palette="brick"] {
  --ink: #3a261a;
  --accent: #a4502c;
  --bg: #fbf6f1;
  --bg-alt: #f0e4d6;
  --bg-dark: #3a261a;
  --line: #a08a76;
  --line-soft: #d8c8b6;
  --fill: #e0d2bf;
  --fill-soft: #ece1cf;
  --muted: #6e5645;
  --on-dark: #ece1cf;
  --on-dark-muted: #b39c87;
}

[data-palette="harbor"] {
  --ink: #1a2a44;
  --accent: #2f5d8c;
  --bg: #f7f6f2;
  --bg-alt: #e6e8ec;
  --bg-dark: #1a2a44;
  --line: #9aa3b0;
  --line-soft: #cdd2da;
  --fill: #d8dde4;
  --fill-soft: #e4e8ee;
  --muted: #5d6878;
  --on-dark: #e4e8ee;
  --on-dark-muted: #9aa3b0;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; display: flex; flex-direction: column; }

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

a { color: inherit; text-decoration: none; }

/* Typography */
.font-serif { font-family: Georgia, 'Times New Roman', serif; }

.display { font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.1; color: var(--ink); }
.h1 { font-family: Georgia, serif; font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; line-height: 1.15; color: var(--ink); }
.h2 { font-family: Georgia, serif; font-size: clamp(1.375rem, 3vw, 2rem); font-weight: 700; line-height: 1.15; color: var(--ink); }
.h3 { font-family: Georgia, serif; font-size: 1.25rem; font-weight: 700; line-height: 1.25; color: var(--ink); }

.body-text { font-size: 1rem; line-height: 1.6; color: var(--muted); }
.body-lg { font-size: 1.0625rem; line-height: 1.6; color: var(--muted); }

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.label {
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-number { font-family: Georgia, serif; font-size: 1.75rem; font-weight: 700; color: var(--accent); line-height: 1.15; }

.text-link {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  transition: opacity 0.2s;
}
.text-link:hover { opacity: 0.75; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { opacity: 0.9; }

.btn-outline:hover { background: var(--fill-soft); }

.btn-on-dark {
  border-color: var(--on-dark);
  color: var(--on-dark);
}
.btn-on-dark:hover { background: rgba(255,255,255,0.1); }

.btn-lg { padding: 14px 24px; font-weight: 700; }

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 40px;
}

.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); color: var(--on-dark); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-around { justify-content: space-around; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-28 { gap: 28px; }
.gap-32 { gap: 32px; }
.gap-40 { gap: 40px; }
.gap-48 { gap: 48px; }
.gap-56 { gap: 56px; }

.text-center { text-align: center; }

/* Photo frame — use aspect-ratio instead of fixed height */
.photo {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--fill-soft);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Service card */
.service-card {
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
}

/* Service icon */
.service-icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
}
.service-icon svg {
  width: 100%;
  height: 100%;
}

/* ===== NAVIGATION ===== */
.navbar {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 16px 40px;
}

.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; text-decoration: none; }
.logo-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.logo-mark svg { width: 100%; height: 100%; }
.logo-wordmark { display: flex; flex-direction: column; gap: 1px; }
.logo-text-primary { font-family: Georgia, serif; font-weight: 700; font-size: 1.0625rem; line-height: 1; letter-spacing: 0.5px; color: var(--ink); }
.logo-text-sub { font-size: 0.6875rem; font-weight: 600; letter-spacing: 2px; color: var(--muted); margin-top: 2px; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link { font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.3px; color: var(--ink); transition: color 0.2s; }
.nav-link:hover { color: var(--accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 16px;
  border-left: 1px solid var(--line-soft);
}
.nav-phone { font-size: 0.875rem; color: var(--muted); }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--ink); }
.nav-toggle svg { width: 24px; height: 24px; }

/* ===== FOOTER ===== */
.footer { background: var(--bg-dark); color: var(--on-dark-muted); }
.footer-inner {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 64px 40px 24px;
}
.footer-grid { display: flex; gap: 48px; align-items: flex-start; justify-content: space-between; }

.footer-brand { flex: 1.4; max-width: 280px; }
.footer-brand .logo-mark {
  width: 40px;
  height: 40px;
}
.footer-brand .logo-text-primary { color: var(--on-dark); }
.footer-brand .logo-text-sub { color: var(--on-dark-muted); }
.footer-brand-desc { font-size: 0.9375rem; line-height: 1.6; color: var(--on-dark-muted); }
.footer-cta-label { font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; color: var(--on-dark); font-weight: 600; }
.footer-cta-btn {
  display: inline-flex;
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  padding: 14px 24px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
}
.footer-social {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.footer-social a {
  width: 32px;
  height: 32px;
  border: 1px solid var(--on-dark-muted);
  color: var(--on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  transition: border-color 0.2s;
}
.footer-social a:hover { border-color: var(--on-dark); }

.footer-col { flex: 1; min-width: 0; }
.footer-col-title {
  font-size: 0.8125rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--on-dark);
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  margin-bottom: 12px;
}
.footer-col-link {
  display: block;
  font-size: 0.9375rem;
  color: var(--on-dark-muted);
  line-height: 1.5;
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-col-link:hover { color: var(--on-dark); }

.footer-bottom {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.8125rem;
  color: var(--on-dark-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom-left { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-bottom-sep { opacity: 0.5; }
.footer-bottom-right { display: flex; align-items: center; gap: 16px; }
.footer-bottom-right a:hover { color: var(--on-dark); }

/* ===== HERO ===== */
.hero {
  padding: 80px 0;
}
.hero-inner {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 40px;
}
.hero-split { display: flex; align-items: center; gap: 48px; }
.hero-content { flex: 1; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hero-photo { flex: 1; min-width: 0; }
.hero-photo .photo { aspect-ratio: 4 / 3; }

.hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

/* ===== PROOF STRIP ===== */
.proof-strip {
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
}
.proof-strip .container { padding-top: 20px; padding-bottom: 20px; }

/* ===== PROCESS ===== */
.process-number {
  font-family: Georgia, serif;
  font-size: 2.25rem;
  color: var(--accent);
}

/* ===== CTA BAND ===== */
.cta-band { background: var(--bg-dark); color: var(--on-dark); }
.cta-band .container { padding-top: 80px; padding-bottom: 80px; }
.cta-band .h1 { color: var(--on-dark); }
.cta-band .body-text { color: var(--on-dark-muted); }
.cta-band-layout { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cta-band-actions { display: flex; gap: 12px; flex-shrink: 0; }

/* ===== QUOTE FORM ===== */
.quote-form-section { }
.quote-form-layout {
  display: flex;
  gap: 56px;
  align-items: flex-start;
}
.quote-form-info { flex: 1; min-width: 0; }
.quote-form {
  flex: 1;
  min-width: 0;
  padding: 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
}

.form-input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 0 12px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--ink);
}
.form-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }

.form-textarea {
  width: 100%;
  height: 100px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 12px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--ink);
  resize: vertical;
}
.form-textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }

.form-chip {
  border: 1px solid var(--line);
  padding: 8px 14px;
  font-size: 0.8125rem;
  color: var(--ink);
  cursor: pointer;
  background: transparent;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.form-chip:hover, .form-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* ===== TESTIMONIAL ===== */
.testimonial-quote {
  font-family: Georgia, serif;
  font-size: 4rem;
  line-height: 0.5;
  color: var(--accent);
}
.testimonial-text {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 400;
  font-style: italic;
  color: var(--on-dark);
  line-height: 1.4;
  font-family: Georgia, serif;
}

/* ===== RECENT WORK ===== */
.work-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.work-card .photo, .work-card-photo { aspect-ratio: 3 / 2; }

/* ===== BLOG ===== */
.blog-card .photo { aspect-ratio: 3 / 2; }
.blog-card-title {
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.blog-card-title:hover { color: var(--accent); }

.featured-post-layout {
  display: flex;
  gap: 40px;
  align-items: center;
}
.featured-post-photo { flex: 1.2; min-width: 0; }
.featured-post-photo .photo { aspect-ratio: 4 / 3; }
.featured-post-content { flex: 1; min-width: 0; }

.article-lead {
  font-family: Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.55;
  font-style: italic;
  color: var(--ink);
  padding-left: 16px;
  border-left: 3px solid var(--accent);
}

.article-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.article-sidebar { width: 200px; position: sticky; top: 90px; flex-shrink: 0; }
.article-sidebar-link {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
  padding: 4px 0 4px 10px;
  border-left: 2px solid transparent;
  display: block;
  transition: color 0.2s;
}
.article-sidebar-link:hover, .article-sidebar-link.active {
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
}

.article-body {
  flex: 1;
  min-width: 0;
  max-width: 660px;
  font-size: 0.9375rem;
  line-height: 1.65;
}
.article-body .photo { aspect-ratio: 16 / 9; }

.share-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

.category-chip {
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.category-chip:hover { border-color: var(--accent); color: var(--accent); }
.category-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.pagination-btn {
  padding: 10px 16px;
  border: 1px solid var(--line);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  min-width: 16px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.pagination-btn:hover { border-color: var(--accent); }
.pagination-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.pagination-btn.disabled { color: var(--muted); cursor: default; }

/* ===== 404 ===== */
.error-code {
  font-family: Georgia, serif;
  font-size: clamp(5rem, 12vw, 8.75rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -2px;
}

.error-layout {
  display: flex;
  gap: 64px;
  align-items: center;
}
.error-content { flex: 1; min-width: 0; }
.error-links { width: 320px; flex-shrink: 0; }

.help-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.2s;
}
.help-link:hover { background: var(--fill-soft); }
.help-link-arrow { color: var(--accent); font-size: 0.875rem; font-weight: 600; }

/* ===== INLINE CTA ===== */
.inline-cta {
  background: var(--bg-dark);
  color: var(--on-dark);
  padding: 40px;
}
.inline-cta-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* ===== RESPONSIVE — TABLET LANDSCAPE (1024px) ===== */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .navbar-inner { padding: 16px 32px; }
  .hero { padding: 56px 0; }
  .hero-inner { padding: 0 32px; }
  .section { padding: 56px 0; }
  .footer-inner { padding: 48px 32px 20px; }
  .footer-grid { gap: 32px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .cta-band .container { padding-top: 56px; padding-bottom: 56px; }
}

/* ===== RESPONSIVE — TABLET PORTRAIT (768px) ===== */
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .navbar-inner { padding: 14px 24px; }
  .hero { padding: 40px 0; }
  .hero-inner { padding: 0 24px; }
  .hero-split { flex-direction: column; gap: 32px; }
  .hero-photo .photo { aspect-ratio: 16 / 9; }
  .hero-stats { gap: 20px; }
  .section { padding: 48px 0; }
  .cta-band .container { padding-top: 48px; padding-bottom: 48px; }

  .nav-links { display: none; }
  .nav-right { display: none; }
  .nav-toggle { display: block; }
  .navbar { position: relative; }
  .navbar.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 20px 24px;
    gap: 4px;
    z-index: 99;
  }
  .navbar.open .nav-link {
    font-size: 1.0625rem;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .navbar.open .nav-right {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px;
    border-left: none;
    gap: 12px;
    z-index: 98;
  }

  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  .footer-inner { padding: 40px 24px 20px; }
  .footer-grid { flex-wrap: wrap; gap: 32px; }
  .footer-brand { max-width: 100%; flex-basis: 100%; }
  .footer-col { flex-basis: calc(50% - 16px); }

  .quote-form-layout { flex-direction: column; gap: 32px; }
  .quote-form { width: 100%; }

  .cta-band-layout { flex-direction: column; align-items: flex-start; gap: 24px; }
  .cta-band-actions { flex-direction: column; width: 100%; }
  .cta-band-actions .btn { width: 100%; }

  .featured-post-layout { flex-direction: column; gap: 24px; }
  .featured-post-photo .photo { aspect-ratio: 16 / 9; }

  .article-layout { flex-direction: column; gap: 24px; }
  .article-sidebar { width: 100%; position: static; display: flex; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line-soft); }
  .article-sidebar > * { flex: 1; }

  .error-layout { flex-direction: column; gap: 40px; }
  .error-links { width: 100%; }

  .inline-cta-layout { flex-direction: column; align-items: flex-start; }

  .proof-strip .flex { justify-content: flex-start; gap: 12px; }
  .services-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .work-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ===== RESPONSIVE — PHONE (480px) ===== */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .navbar-inner { padding: 12px 16px; }
  .hero { padding: 32px 0; }
  .hero-inner { padding: 0 16px; }
  .hero-photo .photo { aspect-ratio: 3 / 2; }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .section { padding: 40px 0; }
  .cta-band .container { padding-top: 40px; padding-bottom: 40px; }

  .display { font-size: 1.875rem; }
  .h1 { font-size: 1.625rem; }
  .h2 { font-size: 1.375rem; }
  .h3 { font-size: 1.125rem; }

  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }

  .btn { padding: 14px 20px; font-size: 0.8125rem; }
  .btn-lg { padding: 16px 24px; }

  .footer-inner { padding: 32px 16px 16px; }
  .footer-grid { flex-direction: column; gap: 28px; }
  .footer-col { flex-basis: 100%; }

  .inline-cta { padding: 24px; }

  .service-card { padding: 20px; }

  .testimonial-text { font-size: 1.125rem; }
  .testimonial-quote { font-size: 3rem; }

  .blog-card-title { font-size: 1.1rem; }

  .article-sidebar { flex-direction: column; gap: 16px; }

  .proof-strip .flex { flex-direction: column; gap: 8px; align-items: flex-start; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  .error-layout .flex.gap-12 { flex-direction: column; }
  .error-layout .flex.gap-12 .btn { width: 100%; }
}
