/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:         #f6f4ee;   /* warm beige-white */
  --bg-soft:    #eeebe0;   /* deeper beige */
  --paper:      #fbfaf6;
  --ink:        #21261f;   /* near-black green-tinted */
  --ink-soft:   #3a4136;
  --ink-mute:   #6b7266;
  --green:      #4a5247;   /* primary dark green */
  --green-deep: #343b30;
  --green-soft: #6b7864;
  --beige:      #cdcabb;   /* primary beige */
  --beige-2:    #e3e0d2;
  --gold:       #a98b52;   /* warm metallic accent, sparingly */
  --line:       rgba(33,38,31,0.12);
  --line-soft:  rgba(33,38,31,0.07);

  --serif: "Libre Baskerville", "Times New Roman", serif;
  --sans:  "Open Sans", system-ui, -apple-system, sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --container: 1200px;
  --radius: 4px;
  --radius-lg: 8px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 600;
  text-wrap: balance;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--green-deep);
}
ul { list-style: none; padding: 0; }
::selection { background: var(--green); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--gold);
}
.section {
  padding-block: 4.5rem;
}
.section-head {
  max-width: 640px;
  margin-bottom: 3rem;
}
.section-head.is-center { margin-inline: auto; text-align: center; }
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
}
.section-sub {
  margin-top: 1rem;
  color: var(--ink-mute);
  font-size: 1.05rem;
  max-width: 60ch;
}
.section-head.is-center .section-sub { margin-inline: auto; }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--green); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* placeholder image blocks (real photos go here later) */
.ph {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(33,38,31,0.05) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, var(--beige-2), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: flex-end;
  min-height: 200px;
}
.ph-label {
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: rgba(251,250,246,0.85);
  padding: .5rem .75rem;
  margin: .75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.ph-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.96) contrast(1.02);
}
.ph-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(74,82,71,.08), rgba(205,202,187,.05));
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* =============================================================
   4. Buttons & components
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .95rem 1.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(33,38,31,0.06);
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background .3s var(--ease-out), color .3s var(--ease-out);
}
.btn-primary {
  background: var(--green);
  color: var(--bg);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -12px rgba(74,82,71,0.45);
}
.btn-outline {
  border: 1px solid var(--ink);
  color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--bg);
}
.btn-sm { padding: .65rem 1.3rem; font-size: .82rem; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: transform .4s var(--ease-soft), box-shadow .4s var(--ease-soft), border-color .4s var(--ease-soft);
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(74,82,71,0.3);
  box-shadow: 0 28px 60px -30px rgba(33,38,31,0.35);
}

/* =============================================================
   5. Reveal on scroll
   ============================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* =============================================================
   6. Nav
   ============================================================= */
.nav {
  position: fixed;
  top: 0; inset-inline: 0;
  z-index: 100;
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(246,244,238,0.9);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.nav-logo-mark { flex: none; color: var(--green-deep); }
.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.nav-logo-brand {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-deep);
  letter-spacing: .01em;
}
.nav-logo-sub {
  font-family: var(--sans);
  font-size: .56rem;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--ink-mute);
  margin-top: .2rem;
}
.nav-links {
  display: none;
  align-items: center;
  gap: 2.1rem;
}
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-link {
  position: relative;
  font-size: .88rem;
  font-weight: 600;
  padding-block: .25rem;
}
.nav-link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--green);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-soft);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-actions { display: flex; align-items: center; gap: 1rem; }

.lang-toggle {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: var(--paper);
  position: relative;
}
.lang-toggle button {
  position: relative;
  z-index: 1;
  padding: .35rem .75rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: 999px;
  color: var(--ink-mute);
  transition: color .3s var(--ease-out);
}
.lang-toggle button.is-active { color: var(--bg); }
.lang-toggle-pill {
  position: absolute;
  top: 3px; bottom: 3px; left: 3px;
  width: calc(50% - 3px);
  background: var(--green);
  border-radius: 999px;
  transition: transform .35s var(--ease-soft);
}
.lang-toggle[data-lang="es"] .lang-toggle-pill { transform: translateX(100%); }

.nav-burger {
  display: flex;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
}
@media (min-width: 960px) { .nav-burger { display: none; } }
.nav-burger span, .nav-burger::before, .nav-burger::after {
  content: ""; display: block;
  width: 18px; height: 1.5px; background: var(--ink);
  transition: transform .3s var(--ease-out), opacity .3s var(--ease-out);
}
.nav-burger { flex-direction: column; gap: 4px; }
.nav-burger::before, .nav-burger::after { content: none; }

.nav-mobile {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-soft);
}
.nav-mobile[data-open="true"] { clip-path: inset(0); }
.nav-mobile a { font-family: var(--sans); font-weight: 700; font-size: 1.6rem; }
.nav-mobile-close {
  position: absolute; top: 1.3rem; right: 1.5rem;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 8px;
}

/* =============================================================
   7. Hero
   ============================================================= */
.hero {
  padding-block: 6rem 4rem;
  background: linear-gradient(180deg, var(--beige-2) 0%, var(--bg) 60%);
}
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 3.5rem; }
}
.hero-title {
  font-weight: 400;
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  max-width: 16ch;
}
.hero-title em {
  font-style: normal;
  color: var(--green);
}
.hero-sub {
  font-family: var(--serif);
  margin-top: 1.5rem;
  font-size: .96rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 42ch;
}
.hero-actions {
  margin-top: 2.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.hero-trust-item {
  display: flex;
  flex-direction: column;
}
.hero-trust-item strong {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--green-deep);
}
.hero-trust-item span {
  font-size: .78rem;
  color: var(--ink-mute);
  letter-spacing: .02em;
}
.hero-media .ph { aspect-ratio: 4 / 5; min-height: 320px; }

/* =============================================================
   8. Savings / charts
   ============================================================= */
.savings { background: var(--green-deep); color: var(--beige-2); }
.savings .section-title, .savings h3 { color: var(--bg); }
.savings .eyebrow { color: var(--gold); }
.savings .section-sub { color: rgba(227,224,210,0.75); }

.savings-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { .savings-grid { grid-template-columns: 1fr 1fr; } }

.chart-card {
  background: rgba(246,244,238,0.05);
  border: 1px solid rgba(227,224,210,0.16);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.chart-stat {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--bg);
  margin-bottom: .35rem;
}
.chart-stat em { color: var(--gold); font-style: normal; }
.chart-caption {
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(227,224,210,0.6);
  margin-bottom: 1.75rem;
}
.chart {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2.5rem;
  height: 200px;
  padding-top: 1.5rem;
  margin-top: auto;
  margin-bottom: auto;
}
.chart-title-below {
  margin-top: auto;
  padding-top: 1.5rem;
  text-align: center;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(227,224,210,0.55);
}
.chart-bar-wrap {
  flex: 0 0 132px;
  width: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.chart-bar {
  width: 100%;
  max-width: 88px;
  border-radius: 6px 6px 3px 3px;
  position: relative;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 1.1s var(--ease-soft);
}
.chart-bar.is-grown { transform: scaleY(1); }
.chart-bar-value {
  position: absolute;
  top: -1.9rem;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--bg);
  white-space: nowrap;
}
.chart-bar--baseline { background: rgba(227,224,210,0.28); height: 100%; }
.chart-bar--altavia  { background: var(--gold); height: 33%; }
.chart-bar--baseline.chart-bar--time { height: 100%; }
.chart-bar--altavia.chart-bar--time { height: 17%; }
.chart-bar-label {
  margin-top: .85rem;
  font-size: .82rem;
  text-align: center;
  color: rgba(227,224,210,0.75);
  line-height: 1.3;
}

/* =============================================================
   9. Services
   ============================================================= */
.services-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.service-icon {
  width: 3rem; height: 3rem;
  border-radius: 10px;
  background: var(--beige-2);
  display: grid; place-items: center;
  margin-bottom: 1.25rem;
  color: var(--green-deep);
}
.service-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.25rem; margin-bottom: .6rem; }
.card p { color: var(--ink-mute); font-size: .95rem; }

/* Industries — compact cards */
.industries { background: var(--bg-soft); }
.industries-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .industries-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .industries-grid { grid-template-columns: repeat(3, 1fr); } }
.industry-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.industry-icon {
  flex: none;
  width: 2.5rem; height: 2.5rem;
  border-radius: 8px;
  background: var(--green);
  color: var(--bg);
  display: grid; place-items: center;
}
.industry-icon svg { width: 18px; height: 18px; }
.industry-card h3 { font-size: 1.02rem; font-family: var(--sans); font-weight: 700; margin-bottom: .35rem; color: var(--ink); }
.industry-card p { font-size: .86rem; color: var(--ink-mute); line-height: 1.55; }

/* =============================================================
   10. About
   ============================================================= */
.about-grid {
  display: grid;
  gap: 3rem;
}
@media (min-width: 960px) {
  .about-grid { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
  .about-media { position: sticky; top: 6.5rem; }
}
.about-media .ph { aspect-ratio: 4/5; }
.about-copy p { margin-bottom: 1.15rem; color: var(--ink-soft); }
.about-copy p:last-child { margin-bottom: 0; }

.pillars {
  margin-top: 3rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .pillars { grid-template-columns: 1fr 1fr; } }
.pillar {
  border-top: 2px solid var(--green);
  padding-top: 1.25rem;
}
.pillar h4 {
  font-size: 1.35rem;
  margin-bottom: .6rem;
}
.pillar p { color: var(--ink-mute); font-size: .95rem; }

/* =============================================================
   11. Testimonials
   ============================================================= */
.testimonials-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) { .testimonials-grid { grid-template-columns: repeat(3, 1fr); } }
.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.testimonial-quote {
  font-family: var(--sans);
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.testimonial-quote::before { content: "\201C"; color: var(--gold); }
.testimonial-quote::after { content: "\201D"; color: var(--gold); }
.testimonial-author {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: auto;
}
.testimonial-author strong { display: block; font-size: .95rem; font-weight: 700; }
.testimonial-author span { display: block; font-size: .78rem; color: var(--ink-mute); }

/* =============================================================
   12. Contact
   ============================================================= */
.contact { background: var(--bg-soft); }
.contact-grid {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-info-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.contact-info-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-info-icon {
  flex: none; width: 2.25rem; height: 2.25rem;
  border-radius: 8px; background: var(--green);
  color: #ffffff; display: grid; place-items: center;
}
.contact-info-icon svg { width: 18px; height: 18px; stroke-width: 1.8; }
.contact-info-item strong { display: block; font-size: .88rem; }
.contact-info-item > div span { font-size: .88rem; color: var(--ink-mute); }

.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
}
.field { position: relative; margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: .45rem;
}
.field input, .field textarea {
  width: 100%;
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: inherit;
  font: inherit;
  font-size: .92rem;
  transition: border-color .25s var(--ease-out);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green);
}
.field textarea { min-height: 110px; resize: vertical; }
.field-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-form.is-sending .form-submit-label { opacity: 0; }
.contact-form.is-sending .form-spinner { opacity: 1; }
.form-submit { position: relative; width: 100%; }
.form-spinner {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: 0; pointer-events: none;
}
.form-spinner::after {
  content: ""; width: 16px; height: 16px;
  border: 2px solid rgba(246,244,238,0.35); border-top-color: var(--bg);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-error {
  margin-top: 1rem;
  font-size: .85rem;
  color: #a13a2f;
  text-align: center;
}
.form-error[hidden] { display: none; }

.contact-form.is-sent { display: none; }
.form-success {
  display: none;
  text-align: center;
  padding: 2rem 0;
}
.form-success.is-visible { display: block; }
.form-success h3 { margin-bottom: .5rem; }
.form-success p { color: var(--ink-mute); }

/* =============================================================
   13. Footer
   ============================================================= */
.footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  font-size: .82rem;
  color: var(--ink-mute);
}
@media (min-width: 720px) {
  .footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: left; gap: 1.5rem; }
  .footer-inner > *:first-child { justify-self: start; }
  .footer-inner > *:nth-child(2) { justify-self: center; }
  .footer-inner > *:last-child { justify-self: end; }
}
.footer-social {
  display: flex;
  gap: .75rem;
}
.footer-social a {
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink-mute);
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out), background .3s var(--ease-out);
}
.footer-social a:hover {
  color: var(--bg);
  background: var(--green);
  border-color: var(--green);
}
.footer-social svg { width: 16px; height: 16px; }

/* =============================================================
   14. Responsive tweaks
   ============================================================= */
@media (min-width: 720px) {
  .hero-actions { align-items: center; }
}
@media (min-width: 1280px) {
  .section { padding-block: 6.5rem; }
  .hero { padding-block: 7.5rem 5rem; }
}

/* =============================================================
   15. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
