/* Coastal Sediment Partners — palette sampled from the logo */
:root {
  --navy: #08254A;
  --navy-deep: #051A35;
  --sea: #0E4269;
  --teal: #4E8897;
  --teal-light: #8FB9C3;
  --sand: #D4AB73;
  --sand-light: #F1D9B5;
  --gold: #B1884D;
  --gold-dark: #8C6A36;
  --cream: #FFFAF4;
  --cream-2: #F8F0E3;
  --white: #FFFFFF;
  --text: #1E2B3C;
  --muted: #55606F;
  --line: #E7DCCB;
  --error: #A23B2A;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(8, 37, 74, .08);
  --header-h: 82px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65;
  color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sea); }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.12; margin: 0 0 .6rem; font-weight: 600; }
h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); letter-spacing: -.005em; }
h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1rem; }

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(820px, 100% - 2.5rem); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 6px; }
.skip-link:focus { left: 1rem; top: 1rem; }

.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold-dark); margin: 0 0 .75rem;
}
.eyebrow-light { color: var(--sand); }
.rule { display: block; width: 64px; height: 2px; background: var(--gold); margin: .9rem 0 1.4rem; }
.rule-center { margin-inline: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: 600 1rem/1 var(--sans); padding: .95rem 1.5rem; border-radius: 999px;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--sea); }
.btn-ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); }
.btn:disabled { opacity: .7; cursor: wait; transform: none; }
a:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--teal); outline-offset: 3px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 250, 244, .94);
  backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--line);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand img { width: 54px; height: 54px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--navy); letter-spacing: .04em; text-transform: uppercase; font-variant: small-caps; }
.brand-sub { font-family: var(--serif); font-weight: 600; font-size: .86rem; color: var(--gold); letter-spacing: .5em; text-transform: uppercase; margin-top: .3rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.6rem; }
.site-nav a { text-decoration: none; color: var(--navy); font-weight: 600; font-size: .98rem; }
.site-nav a:hover { color: var(--teal); }
.site-nav a.nav-cta { background: var(--navy); color: #fff; padding: .6rem 1.15rem; border-radius: 999px; }
.site-nav a.nav-cta:hover { background: var(--sea); color: #fff; }
.nav-toggle, .nav-toggle-label { display: none; }

/* Hero */
.hero {
  position: relative; background: var(--cream);
  padding: 4.5rem 0 6.5rem; overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center; }
.hero h1 { margin-bottom: 1.1rem; }
.lede { font-size: 1.18rem; color: var(--muted); max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 2.2rem; }
.hero-facts { list-style: none; padding: 1.3rem 0 0; margin: 0; display: flex; gap: 2.5rem; border-top: 1px solid var(--line); }
.hero-facts li { display: flex; align-items: baseline; gap: .6rem; }
.hero-facts strong { font-family: var(--serif); font-size: 2.3rem; color: var(--gold); line-height: 1; }
.hero-facts span { color: var(--muted); font-size: .95rem; max-width: 12rem; line-height: 1.3; }
.hero-logo img { width: 100%; max-width: 560px; margin-inline: auto; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; }
.hero-wave svg { width: 100%; height: 100%; display: block; }

/* Sections */
.section { padding: 5.5rem 0; }
.section-head { max-width: 46rem; margin-bottom: 2.6rem; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-intro { color: var(--muted); font-size: 1.1rem; margin: 0; }

/* Services */
.service-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.service-grid li {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.75rem 1.75rem; box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.service-grid li::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--sand), var(--teal), var(--sea));
}
.service-grid li:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(8, 37, 74, .12); }
.svc-num { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 600; color: var(--sand); line-height: 1; margin-bottom: .8rem; }
.service-grid p { color: var(--muted); margin: 0; font-size: 1rem; }

/* Where we work */
.where { background: var(--cream-2); border-block: 1px solid var(--line); }
.country-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; }
.country {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line); border-top: 4px solid var(--teal);
  padding: 1.9rem 1.75rem; box-shadow: var(--shadow);
}
.country:nth-child(2) { border-top-color: var(--gold); }
.country:nth-child(3) { border-top-color: var(--sea); }
.country-kicker { font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); margin: 0 0 .2rem; }
.country h3 { font-size: 1.9rem; }
.country-lead { color: var(--muted); font-size: .98rem; }
.agency-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.agency-list li { padding: .7rem 0 .7rem 1.4rem; border-top: 1px solid var(--line); position: relative; }
.agency-list li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: 8px; height: 8px; border-radius: 50%; background: var(--sand); }
.agency-list strong { display: block; color: var(--navy); font-weight: 600; line-height: 1.35; }
.agency-list span { display: block; color: var(--muted); font-size: .92rem; line-height: 1.4; margin-top: .15rem; }
.text-link { font-weight: 600; color: var(--sea); text-decoration: none; }
.text-link:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }

/* Mexico */
.mexico {
  color: #E7EEF3;
  background:
    radial-gradient(900px 400px at 0% 100%, rgba(78, 136, 151, .35), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--sea) 100%);
}
.mexico h2, .mexico h3 { color: #fff; }
.mexico .rule { background: var(--sand); }
.mexico-lead { font-size: 1.15rem; color: #CFDDE6; }
.mexico .split > div:first-child { position: sticky; top: calc(var(--header-h) + 2rem); }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 4rem; align-items: start; }
.mx-steps { list-style: none; counter-reset: mx; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.mx-steps li {
  counter-increment: mx; position: relative; padding: 1.4rem 1.5rem 1.3rem 4.4rem;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius);
}
.mx-steps li::before {
  content: counter(mx); position: absolute; left: 1.4rem; top: 1.35rem; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--sand); color: var(--navy); font: 700 1rem/1 var(--sans);
}
.mx-steps h3 { font-size: 1.35rem; margin-bottom: .35rem; }
.mx-steps p { margin: 0; color: #CFDDE6; font-size: 1rem; }

/* Experience */
.experience { background: #fff; }
.prose p { color: var(--muted); }
.exp-quote {
  font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 1.95rem); line-height: 1.3; color: var(--navy) !important;
  border-left: 3px solid var(--gold); padding-left: 1.4rem; margin-bottom: 1.5rem;
}
.exp-note { font-size: .93rem; font-style: italic; }

/* Spanish */
.espanol { background: var(--cream); border-top: 1px solid var(--line); }
.espanol p { color: var(--muted); }
.es-contact { font-weight: 600; color: var(--navy) !important; }

/* Contact */
.contact { background: var(--navy-deep); color: #DCE6EE; }
.contact h2 { color: #fff; }
.contact-inner { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3.5rem; align-items: start; }
.contact-lede { color: #C5D3DE; font-size: 1.1rem; }
.contact-list { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: .9rem; }
.contact-list li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding-bottom: .9rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.contact-label { font-size: .75rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--sand); padding-top: .25rem; }
.contact-list a { color: #fff; text-decoration: none; font-weight: 600; word-break: break-word; }
.contact-list a:hover { text-decoration: underline; text-decoration-color: var(--sand); text-underline-offset: 4px; }
.form-card { background: #fff; color: var(--text); border-radius: 14px; padding: 2.2rem; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.form-card h3 { font-size: 1.7rem; margin-bottom: .2rem; }
.form-intro { color: var(--muted); font-size: .93rem; }
.req { color: var(--error); }
.optional { color: var(--muted); font-weight: 400; font-size: .9rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { margin-bottom: .6rem; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: #FCFAF6;
  border: 1px solid #D8CDBB; border-radius: 8px; padding: .75rem .85rem; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(78, 136, 151, .2); outline: none; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--error); }
.field-error { min-height: 1.1em; margin: .25rem 0 0; color: var(--error); font-size: .88rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: .6rem; }
.form-status { margin: 0; font-size: .95rem; }
.form-status.is-error { color: var(--error); }
.form-status.is-success { color: #2E5A3C; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* Footer */
.site-footer { background: #03142A; color: #A9B7C4; padding: 2.6rem 0; font-size: .93rem; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 2.5rem; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: .8rem; }
.footer-brand img { width: 48px; height: 48px; }
.footer-name { font-family: var(--serif); font-size: 1.25rem; color: #fff; margin: 0; font-weight: 600; }
.footer-tag { margin: 0; font-size: .8rem; color: var(--sand); letter-spacing: .04em; }
.disclaimer { margin: 0; line-height: 1.55; max-width: 44rem; }
.footer-meta p { margin: 0; text-align: right; }
.footer-meta .parent a { color: var(--sand); font-weight: 600; text-decoration: none; }
.footer-meta .parent a:hover { text-decoration: underline; }
.legal { margin-top: .3rem !important; font-size: .85rem; }

/* Thank-you / 404 */
.simple-page { background: var(--cream); min-height: 100vh; }
.simple { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem 1.25rem; }
.simple img { width: min(300px, 80vw); height: auto; margin-bottom: .8rem; }
.simple p { color: var(--muted); }

/* Responsive */
@media (max-width: 1060px) {
  .service-grid { grid-template-columns: 1fr 1fr; }
  .country-grid { grid-template-columns: 1fr 1fr; }
  .country:nth-child(3) { grid-column: 1 / -1; }
  .site-nav ul { gap: 1.1rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.2rem; }
  .footer-meta p { text-align: left; }
}
@media (max-width: 900px) {
  :root { --header-h: 72px; }
  .hero { padding: 2.2rem 0 5rem; }
  .hero-inner, .split, .contact-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-logo { order: -1; }
  .mexico .split > div:first-child { position: static; }
  .hero-logo img { max-width: 360px; }
  .section { padding: 3.6rem 0; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .brand img { width: 46px; height: 46px; }
  .brand-name { font-size: 1.25rem; }
  .brand-sub { font-size: .72rem; }
  .nav-toggle-label { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
  .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
    display: block; width: 22px; height: 2px; background: var(--navy); position: relative; border-radius: 2px;
  }
  .nav-toggle-label span::before, .nav-toggle-label span::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-label span::before { top: -7px; }
  .nav-toggle-label span::after { top: 7px; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--cream); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1rem;
  }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: .15rem; }
  .site-nav a { display: inline-block; padding: .5rem 0; }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav a.nav-cta { margin-top: .35rem; }
}
@media (max-width: 680px) {
  .service-grid, .country-grid { grid-template-columns: 1fr; }
  .country:nth-child(3) { grid-column: auto; }
  .hero-facts { flex-direction: column; gap: .8rem; }
  .contact-list li { grid-template-columns: 1fr; gap: .2rem; }
  .form-card { padding: 1.6rem 1.25rem; }
  .mx-steps li { padding: 1.2rem 1.1rem 1.1rem 3.8rem; }
  .mx-steps li::before { left: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .service-grid li { transition: none; }
}
