/* Visalia Structural Concrete Experts — design system
   Premium engineering-journal look: warm paper, ink, burnt ochre, deep teal.
   Tailwind CDN handles layout utilities only; this file owns the look. */

:root {
  --paper: #FAF7F1;
  --cream: #F3EEE3;
  --white: #FFFFFF;
  --ink: #1C1A17;
  --charcoal: #23201C;
  --stone: #57534A;
  --stone-light: #8A8378;
  --ochre: #C2701A;
  --ochre-dark: #8A4B0A;
  --ochre-soft: #F6E8D4;
  --teal: #1F3D3A;
  --teal-soft: #E4EBE6;
  --hairline: #E5DED2;
  --hairline-dark: #3A352E;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--ochre-soft); color: var(--ink); }

a { color: var(--ochre-dark); }
a:hover { color: var(--ochre); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 2px;
}

/* ---------- Typography ---------- */
.ds-display, h1, h2, h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.ds-h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.12;
  font-weight: 600;
}
.ds-h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  line-height: 1.2;
  font-weight: 600;
}
.ds-h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 600; }
.ds-body { color: var(--stone); line-height: 1.65; }
.ds-lede { font-size: 1.1rem; color: var(--stone); line-height: 1.6; }

.ds-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre-dark);
}
.ds-eyebrow::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 2px;
  background: var(--ochre);
}
.ds-eyebrow--light { color: var(--ochre); }

.ds-section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre-dark);
}
.ds-rule { height: 2px; width: 2.5rem; background: var(--ochre); border: 0; }
.ds-hairline { border-color: var(--hairline); }

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand-mark {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--ochre);
  margin-right: 0.6rem;
  vertical-align: baseline;
}
.brand-wordmark {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand-wordmark small {
  font-family: "Inter", sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone-light);
  margin-left: 0.4rem;
}
.site-nav a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  padding: 0.5rem 0;
}
.site-nav a:hover { color: var(--ochre-dark); }
.call-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--ochre);
  border-radius: 999px;
  color: var(--ochre-dark);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
}
.call-pill:hover { background: var(--ochre-soft); color: var(--ochre-dark); }

/* ---------- Buttons ---------- */
.btn-ink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.85rem 1.6rem;
  background: var(--ink);
  color: #FAF7F1;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
}
.btn-ink:hover { background: var(--charcoal); color: #FAF7F1; }
.btn-ink svg { flex: none; }
.btn-outline-light {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.85rem 1.6rem;
  border: 1px solid rgba(250, 247, 241, 0.5);
  color: #FAF7F1;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
}
.btn-outline-light:hover { border-color: var(--ochre); color: var(--ochre); }

/* ---------- Hero ---------- */
.hero {
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(28, 26, 23, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 26, 23, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  border-bottom: 1px solid var(--hairline);
}
.hero-kicker {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre-dark);
  line-height: 1.6;
}
.hero-headline {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.4rem, 5.2vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--ink);
}
/* Compact hero: same height as the form (equal-height grid columns).
   No fixed pixel height — the form column sets the height and the left
   column stretches to match it exactly (see .hero-grid below). */
.hero-grid { align-items: stretch; }
.hero-grid > * { min-height: 0; height: 100%; }
.hero-copy { min-height: 0; }
.hero-h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--ink);
}
.hero .ds-lede { font-size: 1rem; line-height: 1.45; }
.hero .btn-ink { min-height: 44px; padding: 0.65rem 1.3rem; font-size: 0.875rem; }
.hero .form-card { height: 100%; }
.hero .form-title { font-size: 1.15rem; line-height: 1.25; }
.hero .form-label { font-size: 0.625rem; margin-bottom: 2px; }
.hero .form-input { min-height: 40px; padding: 10px 0.75rem; font-size: 13px; border: 1px solid #CBD5E1; background-color: #FDFCF9; }
.hero select.form-input { border: 1px solid #CBD5E1; background-color: #FDFCF9; }
.hero .form-submit { min-height: 44px; padding: 12px 1.2rem; }
.hero .form-note { font-size: 10px; line-height: 1.35; }
.hero-headline em { font-style: italic; color: var(--ochre-dark); }
.hero-serve {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--stone);
}
.hero-serve strong { color: var(--ink); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--ochre);
  border-radius: 2px;
  box-shadow: 0 18px 40px -22px rgba(28, 26, 23, 0.35);
}
.form-card h3, .form-card .form-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}
.form-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.35rem;
}
.form-input,
input.form-input,
select.form-input,
textarea.form-input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  background: #FDFCF9;
  background-color: #FDFCF9;
  border: 1px solid #CBD5E1;
  border-radius: 2px;
  font-size: 0.95rem;
  color: var(--ink);
}
/* Selects must not fall back to the browser's lighter native border/background. */
select.form-input {
  border: 1px solid #CBD5E1;
  background-color: #FDFCF9;
}
.form-input::placeholder { color: #A39B8C; }
.form-input:focus {
  outline: 2px solid var(--ochre);
  outline-offset: 1px;
  border-color: var(--ochre);
  background: var(--white);
}
.form-submit {
  width: 100%;
  min-height: 52px;
  padding: 0.9rem 1.4rem;
  background: var(--ink);
  color: #FAF7F1;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
}
.form-submit:hover { background: var(--charcoal); }
.form-note {
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--stone-light);
  text-align: center;
}

/* ---------- City grid ---------- */
.city-card {
  display: block;
  position: relative;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-top: 3px solid transparent;
  border-radius: 2px;
  padding: 1.6rem 1.5rem 1.4rem;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-top-color 0.18s ease;
}
.city-card:hover {
  transform: translateY(-3px);
  border-top-color: var(--ochre);
  box-shadow: 0 16px 32px -20px rgba(28, 26, 23, 0.35);
}
.city-index {
  font-family: "Fraunces", Georgia, serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ochre-dark);
  letter-spacing: 0.08em;
}
.city-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}
.city-card p { color: var(--stone); font-size: 0.92rem; line-height: 1.6; }
.city-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ochre-dark);
}
.city-card:hover .city-link { color: var(--ochre); }
.city-motif { color: var(--ochre); opacity: 0.85; }

/* ---------- Showcases ---------- */
.showcase { border-radius: 2px; padding: 2rem; }
.showcase-foundation {
  background: var(--ink);
  color: #F3EEE3;
}
.showcase-foundation h3, .showcase-foundation .ds-h3 { color: #FAF7F1; }
.showcase-foundation p { color: #CFC8B8; }
.showcase-foundation ul li { color: #EDE7D8; }
.showcase-foundation a { color: #E8A34C; }
.showcase-foundation a:hover { color: #F2B96E; }
.showcase-foundation .ds-rule { background: var(--ochre); }
.showcase-slab {
  background: var(--cream);
  border: 1px solid var(--hairline);
}
.showcase-slab h3, .showcase-slab .ds-h3 { color: var(--teal); }
.showcase-slab p { color: var(--stone); }
.showcase-slab ul li { color: var(--ink); }
.showcase-slab a { color: var(--teal); }
.showcase-slab a:hover { color: var(--ochre-dark); }
.showcase-slab .ds-rule { background: var(--teal); }
.showcase-marker { color: var(--ochre); font-weight: 700; }
.showcase-slab .showcase-marker { color: var(--teal); }

/* ---------- Soil band ---------- */
.soil-band {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background: var(--charcoal);
  color: #F3EEE3;
  border-top: 1px solid var(--hairline-dark);
  border-bottom: 1px solid var(--hairline-dark);
}
.soil-band h2 { color: #FAF7F1; }
.soil-band p { color: #CFC8B8; }
.soil-pull {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.35;
  font-weight: 500;
  color: #FAF7F1;
}
.soil-pull em { font-style: italic; color: #E8A34C; }
.disclaimer-box {
  border: 1px solid var(--hairline-dark);
  border-left: 3px solid var(--ochre);
  background: rgba(250, 247, 241, 0.04);
  border-radius: 2px;
  padding: 1.1rem 1.25rem;
}
.disclaimer-box p { color: #D8D1C2; font-size: 0.92rem; line-height: 1.6; }

/* ---------- FAQ / content pages ---------- */
.ds-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ochre-dark);
  border: 1px solid var(--hairline);
  background: var(--white);
  border-radius: 2px;
  padding: 0.35rem 0.7rem;
}
.ds-faq {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 1.25rem 1.4rem;
}
.ds-faq h3 { font-size: 1.15rem; }
.ds-faq p { color: var(--stone); font-size: 0.95rem; }
.ds-figure {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 1.25rem;
}
.ds-figure figcaption { color: var(--stone-light); font-size: 0.8rem; }
.ds-cta {
  background: var(--ink);
  color: #F3EEE3;
  border-radius: 2px;
  padding: 1.75rem;
}
.ds-cta h2 { color: #FAF7F1; }
.ds-cta p { color: #CFC8B8; }
.ds-cta a { color: #E8A34C; }
.ds-cta a:hover { color: #F2B96E; }
.ds-loc-line { font-size: 0.9rem; font-weight: 600; color: var(--ochre-dark); letter-spacing: 0.02em; }
.ds-num {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  color: var(--ochre-dark);
}
.ds-step {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.ds-step .ds-num { font-size: 1.3rem; line-height: 1.2; flex: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #A39B8C;
  border-top: 1px solid var(--hairline-dark);
}
.site-footer .brand-wordmark { color: #FAF7F1; }
.site-footer p { color: #A39B8C; }
.site-footer .footer-title { color: #F3EEE3; font-family: "Fraunces", Georgia, serif; font-size: 1rem; }
.site-footer a { color: #E8A34C; }
.site-footer a:hover { color: #F2B96E; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero-headline { font-size: clamp(2rem, 9vw, 2.5rem); }
  .hero-h1 { font-size: clamp(1.55rem, 7vw, 1.9rem); }
  .showcase { padding: 1.5rem; }
  .form-card { padding: 1.25rem; }
  .brand-wordmark small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .city-card { transition: none; }
}

/* ---------- Admin panel ---------- */
/* Same paper / ink / burnt ochre / Fraunces + Inter system as the public
   site — the admin is deliberately not a generic Bootstrap panel. */
.admin-body { background: var(--cream); }
.admin-nav a { white-space: nowrap; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 768px) { .admin-stats { grid-template-columns: repeat(4, 1fr); } }
.admin-stat {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--ochre);
  border-radius: 2px;
  padding: 1.25rem 1.4rem;
}
.admin-stat-num {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
}
.admin-stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  font-size: 0.9rem;
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.admin-table thead th {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  background: var(--cream);
}
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-details { max-width: 22rem; }
.admin-muted { color: var(--stone-light); font-size: 0.8rem; }
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}
.admin-filters > div { min-width: 12rem; }
.admin-filters .btn-ink { min-height: 48px; }
.admin-btn--ghost {
  background: transparent;
  color: var(--ochre-dark);
  border: 1px solid var(--ochre);
}
.admin-btn--ghost:hover { background: var(--ochre-soft); color: var(--ochre-dark); }
.admin-delete {
  background: none;
  border: 0;
  padding: 0.25rem 0;
  color: #9B2C2C;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.admin-flash {
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--ochre);
  background: var(--white);
  border-radius: 2px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}
.admin-flash--error { border-left-color: #9B2C2C; }
.admin-flash--ok { border-left-color: var(--teal); }
.admin-empty {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 2rem;
}
.admin-link-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--ochre);
  border-radius: 2px;
  padding: 1rem 1.2rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.admin-link-card:hover { color: var(--ochre-dark); }
.admin-help { font-size: 0.8rem; color: var(--stone-light); margin-top: 0.4rem; }

/* ---------- Site logo (uploaded) ---------- */
.site-logo {
  max-height: 40px;
  max-width: 220px;
  width: auto;
  height: auto;
  vertical-align: middle;
}
.site-footer .site-logo { max-height: 36px; }

/* ---------- Page editor / settings ---------- */
.admin-edited-badge {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ochre-dark);
  border: 1px solid var(--ochre);
  background: var(--ochre-soft);
  border-radius: 2px;
  padding: 0.25rem 0.55rem;
  white-space: nowrap;
}
.admin-warn-box {
  border: 1px solid var(--hairline);
  border-left: 3px solid #B45309;
  background: #FFF7E6;
  border-radius: 2px;
  padding: 0.85rem 1.1rem;
  font-size: 0.92rem;
}
.admin-warn-box p { margin: 0.25rem 0; }
.admin-flash--warn { border-left-color: #B45309; }
.admin-thumb {
  max-height: 72px;
  max-width: 260px;
  width: auto;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 0.5rem;
}
.admin-thumb--small { max-height: 32px; max-width: 64px; }
.admin-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.admin-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--hairline);
  background: var(--white);
  border-radius: 2px;
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.admin-swatch input { accent-color: var(--ochre); }
.admin-swatch-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 2px;
  background: var(--swatch);
  flex: none;
}
.admin-swatch:has(input:checked) {
  border-color: var(--ochre);
  box-shadow: 0 0 0 1px var(--ochre);
}
