/* ==========================================================
   A4 AGILE & ASSOCIATES — Design System
   Palette: Cream / Warm Terracotta / Charcoal
   Concept: the site plan — dimension lines, coordinate marks,
   and a registration "seal" motif drawn from survey drawings.
   ========================================================== */

:root {
  --cream:        #F3EEE4;
  --cream-deep:   #EAE0CC;
  --sand:         #E4D5B7;
  --terracotta:   #B85C2E;
  --terracotta-deep: #8A3F1E;
  --terracotta-soft: #D98452;
  --charcoal:     #24211D;
  --charcoal-soft:#423B33;
  --ink-muted:    #6E6154;
  --line:         rgba(36, 33, 29, 0.14);
  --line-strong:  rgba(36, 33, 29, 0.28);
  --white:        #FFFDF9;

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body:    'Inter', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --radius: 2px;
  --shadow-card: 0 1px 2px rgba(36,33,29,0.06), 0 8px 24px rgba(36,33,29,0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--charcoal);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--charcoal);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 500; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--charcoal-soft); }

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

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--terracotta-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 1em;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--terracotta);
  display: inline-block;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; position: relative; }
.section-tight { padding: 64px 0; }

@media (max-width: 700px) {
  .section { padding: 60px 0; }
  .section-tight { padding: 44px 0; }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .section { padding: 48px 0; }
}
.section-dark { background: var(--charcoal); color: var(--cream); }
.section-dark p { color: rgba(243,238,228,0.72); }
.section-dark h2, .section-dark h3 { color: var(--cream); }
.section-sand { background: var(--cream-deep); }

.divider-line {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--charcoal);
  border-radius: var(--radius);
  cursor: pointer;
  background: transparent;
  color: var(--charcoal);
  transition: all .2s ease;
}
.btn:hover { background: var(--charcoal); color: var(--cream); }
.btn-primary {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--white);
}
.btn-primary:hover { background: var(--terracotta-deep); border-color: var(--terracotta-deep); color: var(--white); }
.btn-light { border-color: rgba(243,238,228,0.4); color: var(--cream); }
.btn-light:hover { background: var(--cream); color: var(--charcoal); }
.btn-sm { padding: 8px 16px; font-size: 0.72rem; }

/* ---------- Navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243,238,228,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px;
  border: 1.5px solid var(--terracotta);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--terracotta-deep);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.brand-text { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.2; }
.brand-text small { display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; color: var(--ink-muted); text-transform: uppercase; font-weight: 400; }

.nav-links { display: flex; gap: 4px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--charcoal-soft);
  border-radius: var(--radius);
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--terracotta-deep); }
.nav-cta { margin-left: 12px; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--charcoal); }

@media (max-width: 900px) {
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; background: var(--cream); flex-direction: column; align-items: stretch; padding: 8px 20px 20px; border-bottom: 1px solid var(--line); display: none; max-height: calc(100vh - 70px); overflow-y: auto; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 16px 4px; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; padding: 4px 8px; line-height: 1; }
  .nav-cta { margin: 14px 0 0; }
  .nav-cta a { display: flex; justify-content: center; padding: 14px 20px; }
  .brand-text { font-size: 0.95rem; }
}

@media (max-width: 400px) {
  .brand-text small { display: none; }
}

/* ---------- Hero: the site plan ---------- */
.hero {
  position: relative;
  padding: 70px 0 60px;
  overflow: hidden;
  background:
    linear-gradient(var(--cream), var(--cream)),
    repeating-linear-gradient(0deg, transparent, transparent 39px, var(--line) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, var(--line) 40px);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 600px) { .hero { padding: 40px 0 36px; } }

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

.reg-mark { position: absolute; width: 22px; height: 22px; }
.reg-mark::before, .reg-mark::after { content:''; position:absolute; background: var(--terracotta); }
.reg-mark::before { width: 100%; height: 1.5px; top: 50%; }
.reg-mark::after { width: 1.5px; height: 100%; left: 50%; }
.reg-tl { top: 20px; left: 24px; } .reg-tr { top: 20px; right: 24px; }
.reg-bl { bottom: 20px; left: 24px; } .reg-br { bottom: 20px; right: 24px; }

.hero-tag { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--ink-muted); text-transform: uppercase; margin-bottom: 18px; }
.hero h1 { margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--terracotta-deep); }
.hero-lede { font-size: 1.12rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 48px; border-top: 1px solid var(--line-strong); }
.hero-stats div { padding: 18px 18px 0; border-right: 1px solid var(--line-strong); }
.hero-stats div:last-child { border-right: none; }
.hero-stat-num { font-family: var(--font-mono); font-size: 1.6rem; color: var(--terracotta-deep); display: block; }
.hero-stat-label { font-size: 0.76rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }

@media (max-width: 600px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .hero-stats div:nth-child(2) { border-right: none; }
  .hero-stats div:nth-child(1), .hero-stats div:nth-child(2) { padding-bottom: 16px; border-bottom: 1px solid var(--line-strong); }
  .hero-stat-num { font-size: 1.35rem; }
}

/* Seal / stamp graphic */
.seal-wrap { display: flex; align-items: center; justify-content: center; position: relative; }
.seal {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
}
@media (max-width: 600px) { .seal { max-width: 220px; } }
.seal-ring-outer { fill: none; stroke: var(--charcoal); stroke-width: 1; }
.seal-ring-inner { fill: none; stroke: var(--terracotta); stroke-width: 1.4; }
.seal-text { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 2px; fill: var(--charcoal); }
.seal-center-num { font-family: var(--font-display); font-size: 44px; fill: var(--terracotta-deep); }
.seal-center-label { font-family: var(--font-mono); font-size: 8px; letter-spacing: 1.5px; fill: var(--ink-muted); }
.seal-tick { stroke: var(--charcoal); stroke-width: 1; }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); border-color: var(--line-strong); }
.card-icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--terracotta);
  border-radius: 50%;
  color: var(--terracotta-deep);
  margin-bottom: 18px;
}
.icon { width: 22px; height: 22px; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head p { max-width: 48ch; margin: 0; }

/* ---------- Value pillars ---------- */
.pillar { border-top: 1px solid var(--line-strong); padding-top: 20px; }
.pillar-num { font-family: var(--font-mono); color: var(--terracotta); font-size: 0.85rem; }

/* ---------- Project / list rows (dimension-line style) ---------- */
.dim-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.dim-row:first-child { border-top: 1px solid var(--line-strong); }
.dim-tag { font-family: var(--font-mono); font-size: 0.76rem; color: var(--terracotta-deep); text-transform: uppercase; }
.dim-title { margin: 0 0 4px; font-size: 1.05rem; }
.dim-amount { font-family: var(--font-mono); font-size: 0.92rem; color: var(--ink-muted); white-space: nowrap; }
@media (max-width: 700px) { .dim-row { grid-template-columns: 1fr; gap: 6px; } .dim-amount { text-align: left; } }

/* ---------- Timeline / values ---------- */
.value-item { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.value-item:first-child { border-top: 1px solid var(--line-strong); }
.value-mark { font-family: var(--font-mono); color: var(--terracotta); font-size: 0.85rem; flex-shrink: 0; width: 56px; }

/* ---------- Team ---------- */
.team-card { text-align: left; padding: 24px; border: 1px solid var(--line); background: var(--white); }
.team-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--cream-deep); border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); color: var(--terracotta-deep); font-size: 1.1rem;
  margin-bottom: 16px;
}
.team-role { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); }

/* ---------- Certification stamps ---------- */
.cert-card { display: flex; gap: 16px; padding: 22px; border: 1px solid var(--line); background: var(--white); align-items: flex-start; }
.cert-badge {
  width: 40px; height: 40px; flex-shrink: 0;
  border: 1.5px solid var(--terracotta);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--terracotta-deep);
}

/* ---------- Clients marquee ---------- */
.clients-strip { display: flex; flex-wrap: wrap; gap: 14px; }
.client-chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--charcoal-soft);
  background: var(--white);
}

/* ---------- Forms ---------- */
.form-control, .form-select, textarea.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--charcoal);
  margin-bottom: 18px;
}
.form-control:focus, textarea.form-control:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(184,92,46,0.12);
}
label { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); display: block; margin-bottom: 8px; }

.alert-box { padding: 16px 20px; border-radius: var(--radius); margin-bottom: 24px; font-size: 0.92rem; }
.alert-success { background: #EAF3E6; border: 1px solid #B7D6A8; color: #2F5B24; }
.alert-error { background: #F9E7E1; border: 1px solid #E3A98D; color: #8A3F1E; }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: rgba(243,238,228,0.7); padding: 72px 0 28px; }
.site-footer h4 { color: var(--cream); font-size: 0.95rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.site-footer a { color: rgba(243,238,228,0.7); }
.site-footer a:hover { color: var(--terracotta-soft); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } .site-footer { padding: 56px 0 24px; } }
.footer-bottom { border-top: 1px solid rgba(243,238,228,0.14); margin-top: 56px; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; font-family: var(--font-mono); }

/* ---------- Page header (interior pages) ---------- */
.page-header {
  padding: 60px 0 50px;
  background: var(--charcoal);
  color: var(--cream);
  position: relative;
}
.page-header p { color: rgba(243,238,228,0.7); max-width: 60ch; }
.breadcrumb { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--terracotta-soft); margin-bottom: 16px; }

/* ---------- Filters (projects) ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-btn {
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 9px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: transparent; cursor: pointer; color: var(--charcoal-soft);
}
.filter-btn.active, .filter-btn:hover { background: var(--terracotta); border-color: var(--terracotta); color: var(--white); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.small-mono { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-muted); }

/* ==========================================================
   Mobile refinements
   ========================================================== */
@media (max-width: 640px) {
  .grid { gap: 16px; }
  .card { padding: 22px; }
  .section-head { margin-bottom: 32px; gap: 16px; }
  .value-item, .cert-card { padding: 18px 0; }
  .cert-card { padding: 18px; }
  .dim-row { padding: 18px 0; }
  .btn { padding: 13px 22px; font-size: 0.78rem; }
  .page-header { padding: 44px 0 36px; }
  .filter-bar { gap: 8px; margin-bottom: 28px; }
  .filter-btn { padding: 10px 14px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.55rem; }
  .hero-tag { font-size: 0.68rem; }
}
