/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #ffffff;
  --bg-2:      #f1efe9;
  --ink:       #0d0d0d;
  --ink-mute:  #5c5a56;
  --accent:    #ff5500;
  --accent-ink:#ffffff;
  --accent-2:  #f4c400;
  --line:      #0d0d0d;

  --display: "Archivo Black", "Arial Black", sans-serif;
  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:    "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

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

  --nav-h: 76px;
}

@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* =============================================================
   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.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  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 { text-wrap: balance; line-height: 1.02; letter-spacing: -0.01em; font-family: var(--display); text-transform: uppercase; }
ul { list-style: none; padding: 0; }
input, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  font-family: var(--mono); font-size: .8rem;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { max-width: 1360px; margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 960px) { .container { padding-inline: 2.5rem; } }

.kicker {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute); display: flex; align-items: center; gap: .5em; margin-bottom: 1.1rem;
}
.kicker::before { content: ""; width: 10px; height: 10px; background: var(--accent); display: inline-block; }

.hairline-top    { border-top: 1px solid var(--line); }
.hairline-bottom { border-bottom: 1px solid var(--line); }

[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; }
[data-reveal][data-split-hero] { opacity: 1; transform: none; } /* defensive: never hide split-text parent */

/* =============================================================
   4. Typography
   ============================================================= */
.eyebrow-num {
  font-family: var(--mono); font-size: .82rem; color: var(--ink-mute); letter-spacing: .06em;
}
.mark {
  background: var(--ink); color: var(--bg); padding: .04em .18em;
}
.mark-accent { color: var(--accent); }

/* =============================================================
   5. Components
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--mono); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase;
  padding: 1rem 1.5rem; border: 1px solid var(--ink);
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .4s var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: translateX(-101%);
  transition: transform .45s var(--ease-out);
}
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: translateX(0); }

.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-primary::before { background: var(--ink); }
.btn-primary:hover { color: var(--bg); }

.btn-block { width: 100%; justify-content: center; }

/* =============================================================
   6. Sections — Nav
   ============================================================= */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 500;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease-out);
}
.nav.is-scrolled { border-color: var(--line); }
.nav-inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; flex-direction: column; line-height: .9; }
.nav-logo strong { font-family: var(--display); font-size: 1.15rem; letter-spacing: -0.01em; }
.nav-logo span { font-family: var(--mono); font-size: .58rem; letter-spacing: .28em; color: var(--ink-mute); margin-top: .3rem; }

.nav-links { display: none; align-items: center; gap: 2.2rem; }
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-link {
  font-family: var(--mono); font-size: .82rem; letter-spacing: .03em;
  position: relative; padding: .25rem 0;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-out);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-cta { display: none; }
@media (min-width: 960px) { .nav-cta { display: inline-flex; padding: .7rem 1.2rem; font-size: .78rem; } }

.nav-toggle {
  display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--ink);
}
@media (min-width: 960px) { .nav-toggle { display: none; } }
.nav-toggle-bars { position: relative; width: 20px; height: 12px; }
.nav-toggle-bars span {
  position: absolute; left: 0; right: 0; height: 2px; background: var(--ink);
  transition: transform .3s var(--ease-out), opacity .2s;
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 5px; }
.nav-toggle-bars span:nth-child(3) { top: 10px; }
.nav-open .nav-toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-open .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 400;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-soft);
  padding-top: var(--nav-h);
}
.nav-mobile[aria-hidden="false"] { clip-path: inset(0); }
.nav-mobile ul { display: flex; flex-direction: column; gap: 1.6rem; text-align: center; }
.nav-mobile a { font-family: var(--display); font-size: 2rem; text-transform: uppercase; }
.nav-mobile .nav-mobile-cta { margin-top: 1rem; }

/* =============================================================
   6. Sections — Splash
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .7s var(--ease-out), clip-path .8s var(--ease-soft);
  animation: splashSafety .01s 3.6s forwards;
}
.splash.is-out { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); } }
.splash-mark { font-family: var(--display); font-size: clamp(1.6rem, 6vw, 3rem); letter-spacing: -0.02em; }
.splash-mark span { color: var(--accent); }
.splash-bar { width: 160px; height: 2px; background: var(--bg-2); margin-top: 1.4rem; overflow: hidden; }
.splash-bar::after {
  content: ""; display: block; width: 40%; height: 100%; background: var(--accent);
  animation: splashLoad 1.4s var(--ease-out) infinite;
}
@keyframes splashLoad { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* =============================================================
   6. Sections — Hero
   ============================================================= */
.hero { padding-top: calc(var(--nav-h) + 2.5rem); padding-bottom: 3rem; }
.hero-grid {
  display: grid; gap: 2.5rem;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 7fr 5fr; align-items: center; gap: 3rem; }
}
.hero-title {
  font-size: clamp(2.4rem, 7vw, 5rem);
  margin-bottom: 1.6rem;
}
.split-word { display: inline-block; will-change: transform, opacity; }
.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--ink-mute); max-width: 46ch; margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.2rem; }
.hero-meta {
  font-family: var(--mono); font-size: .85rem; color: var(--ink-mute);
  display: flex; flex-wrap: wrap; gap: .4rem 1.2rem;
}
.hero-meta a { border-bottom: 1px solid transparent; transition: border-color .3s; }
.hero-meta a:hover { border-color: currentColor; }

.hero-figure {
  aspect-ratio: 4 / 5; overflow: hidden; position: relative; border: 1px solid var(--line);
}
.hero-figure img {
  width: 100%; height: 100%; object-fit: cover; filter: grayscale(.15) contrast(1.08);
}
.hero-figure::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(13,13,13,.55) 100%);
}
.hero-figure-tag {
  position: absolute; left: 0; bottom: 0; z-index: 2; padding: .8rem 1rem;
  font-family: var(--mono); font-size: .72rem; color: var(--bg); letter-spacing: .04em;
}

/* =============================================================
   6. Sections — generic section head
   ============================================================= */
section { padding-block: 4.5rem; }
@media (min-width: 960px) { section { padding-block: 6.5rem; } }
.section-head { margin-bottom: 2.5rem; max-width: 62ch; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.section-alt { background: var(--bg-2); }

/* =============================================================
   6. Sections — About
   ============================================================= */
.about-grid { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .about-grid { grid-template-columns: 1.1fr .9fr; gap: 4rem; align-items: start; } }
.about-quote {
  font-family: var(--display); text-transform: none; font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  line-height: 1.28; letter-spacing: -0.01em; margin-bottom: 1.6rem;
}
.about-quote span { color: var(--accent); }
.about-text p { color: var(--ink-mute); max-width: 58ch; }
.about-figure { aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid var(--line); }
.about-figure img { width: 100%; height: 100%; object-fit: cover; }

/* =============================================================
   6. Sections — Mission / Vision
   ============================================================= */
.mv-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 720px) { .mv-grid { grid-template-columns: 1fr 1fr; } }
.mv-block { background: var(--bg); padding: 2.2rem; }
.mv-block h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.mv-block p { color: var(--ink-mute); max-width: 52ch; }

/* =============================================================
   6. Sections — Services grid
   ============================================================= */
.services-grid {
  display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line);
}
@media (min-width: 720px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  background: var(--bg); position: relative; isolation: isolate; overflow: hidden;
  transition: background-color .45s var(--ease-out), color .45s var(--ease-out);
}
.service-card:hover { background: var(--ink); color: var(--bg); }
.service-img { aspect-ratio: 16 / 10; overflow: hidden; }
.service-img img {
  width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05);
  transition: filter .55s var(--ease-out), transform .8s var(--ease-out);
}
.service-card:hover .service-img img { filter: grayscale(0) contrast(1.05); transform: scale(1.06); }
.service-body { padding: 1.6rem; }
.service-num {
  font-family: var(--mono); font-size: .82rem; color: var(--accent); display: block; margin-bottom: .6rem;
}
.service-body h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.service-body p { font-size: .92rem; color: var(--ink-mute); }
.service-card:hover .service-body p { color: rgba(255,255,255,.72); }

/* =============================================================
   6. Sections — Gestión list
   ============================================================= */
.gestion-grid { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .gestion-grid { grid-template-columns: .9fr 1.1fr; } }
.gestion-figure { aspect-ratio: 3/4; overflow: hidden; border: 1px solid var(--line); }
.gestion-figure img { width: 100%; height: 100%; object-fit: cover; }
.gestion-list { border-top: 1px solid var(--line); }
.gestion-item {
  display: grid; grid-template-columns: 3rem 1fr; gap: 1rem;
  padding: 1.4rem 0; border-bottom: 1px solid var(--line);
}
.gestion-item .eyebrow-num { padding-top: .1rem; }
.gestion-item h4 { font-family: var(--sans); text-transform: none; font-weight: 600; font-size: 1rem; margin-bottom: .3rem; letter-spacing: 0; }
.gestion-item p { color: var(--ink-mute); font-size: .92rem; }

/* =============================================================
   6. Sections — Why us
   ============================================================= */
.why-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 720px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .why-grid { grid-template-columns: repeat(4, 1fr); } }
.why-block { background: var(--bg); padding: 2rem 1.6rem; }
.why-stat {
  font-family: var(--display); font-size: 3rem; color: var(--accent); display: block; line-height: 1; margin-bottom: 1rem;
}
.why-block p { color: var(--ink-mute); font-size: .92rem; }

/* =============================================================
   6. Sections — Divider (full-bleed image + statement)
   ============================================================= */
.divider {
  position: relative; min-height: 60vh; display: flex; align-items: flex-end;
  overflow: hidden; padding-block: 0;
}
.divider img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
  filter: grayscale(.35) contrast(1.1) brightness(.75);
}
.divider::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, rgba(13,13,13,.92) 0%, rgba(13,13,13,.25) 55%, rgba(13,13,13,.15) 100%);
}
.divider-content { position: relative; z-index: 2; color: var(--bg); padding-block: 3rem; }
.divider-content h2 {
  font-size: clamp(1.8rem, 4.5vw, 3.4rem); max-width: 18ch;
}
.divider-content h2 span { color: var(--accent-2); }

/* =============================================================
   6. Sections — Contact
   ============================================================= */
.contact-actions { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 3rem; }
@media (min-width: 720px) { .contact-actions { grid-template-columns: repeat(3, 1fr); } }
.contact-action {
  background: var(--bg); padding: 1.8rem; display: block;
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out);
}
.contact-action:hover { background: var(--ink); color: var(--bg); }
.contact-action .eyebrow-num { display: block; margin-bottom: .8rem; color: var(--accent); }
.contact-action h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.contact-action p { font-size: .88rem; color: var(--ink-mute); }
.contact-action:hover p { color: rgba(255,255,255,.72); }

.contact-form-wrap { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .contact-form-wrap { grid-template-columns: .8fr 1.2fr; } }
.contact-note h3 { font-size: 1.6rem; margin-bottom: 1rem; max-width: 16ch; }
.contact-note p { color: var(--ink-mute); max-width: 42ch; }

.field { margin-bottom: 1.4rem; }
.field label {
  display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: .5rem;
}
.field input, .field textarea {
  width: 100%; padding: .9rem 1rem; border: 1px solid var(--line); background: var(--bg);
  transition: border-color .3s, background-color .3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; gap: 1.4rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

/* =============================================================
   6. Footer
   ============================================================= */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-brand strong { font-family: var(--display); font-size: 1.3rem; display: block; }
.footer-brand span { font-family: var(--mono); font-size: .68rem; letter-spacing: .24em; color: var(--ink-mute); }
.footer-brand p { color: var(--ink-mute); margin-top: 1rem; max-width: 34ch; font-size: .9rem; }
.footer-col h4 {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 400; margin-bottom: .9rem;
}
.footer-col a, .footer-col p { display: block; font-family: var(--mono); font-size: .88rem; margin-bottom: .5rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: .76rem; color: var(--ink-mute);
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
}

/* =============================================================
   7. Effects
   ============================================================= */
.cursor-coord {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  font-family: var(--mono); font-size: 11px; color: var(--bg); background: var(--ink);
  padding: 2px 7px; transform: translate(18px, 18px);
  opacity: 0; transition: opacity .2s;
  display: none;
}
.has-cursor-coord .cursor-coord { display: block; }

/* =============================================================
   8. Responsive helpers
   ============================================================= */
@media (max-width: 719px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
}

/* =============================================================
   9. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .splash-bar::after { animation: none; }
  /* Do NOT disable: reveals, hover invert, split-word transitions, nav underline */
}
