/* =============================================
   TOKENS
   ============================================= */
:root {
  --bg:         #f7f5f0;
  --text:       #1a1a18;
  --accent:     #2e6b48;
  --accent-btn: #15803d;
  --muted:      #6a6a66;
  --muted-light:#9a9a96;
  --border:     #dedad3;

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-h: 72px;
  --max-w: 1280px;
  --ease:  0.25s ease;
}

/* =============================================
   RESET
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
ul { list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; font: inherit; }
textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* =============================================
   LAYOUT
   ============================================= */
.container {
  width: 100%;
  padding: 0 clamp(24px, 7vw, 96px);
}

.section {
  padding: clamp(80px, 12vh, 140px) 0;
  border-top: 1px solid var(--border);
}

/* =============================================
   SECTION LABEL + TITLE
   ============================================= */
.section-label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  margin-bottom: clamp(48px, 7vh, 88px);
}

/* =============================================
   HEADER / NAV
   ============================================= */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: background var(--ease), border-color var(--ease);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: var(--bg);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 clamp(24px, 6vw, 80px);
  gap: 36px;
}

.nav-logo {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  flex-shrink: 0;
  transition: opacity var(--ease);
}
.nav-logo:hover { opacity: 0.75; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-left: auto;
}

.nav-link {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.05em;
  transition: color var(--ease);
}
.nav-link:hover { color: var(--text); }

.nav-cta { flex-shrink: 0; }

.btn-wa {
  background: var(--accent-btn);
  color: #fff;
  padding: 9px 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--ease);
}
.btn-wa:hover { background: #166534; }

.icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0.5rem;
  margin-left: auto;
  width: 36px;
  height: 36px;
}
.nav-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] .nav-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(110px, 14vh, 168px) clamp(24px, 7vw, 96px) clamp(72px, 10vh, 108px);
  background: radial-gradient(at 6% 65%, rgba(46,107,72,0.06) 0%, transparent 52%), var(--bg);
  position: relative;
}

/* Badge */
.badge-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(40px, 6vh, 72px);
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.badge-text {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* H1 */
.hero-title { margin-bottom: clamp(40px, 6vh, 60px); }
.hero-line {
  font-family: var(--serif);
  font-size: clamp(54px, 9vw, 124px);
  font-weight: 700;
  line-height: 0.9;
  color: var(--text);
  letter-spacing: -0.02em;
  display: block;
}
.hero-line-2 { padding-left: clamp(0px, 9vw, 196px); }
.hero-tu {
  font-style: italic;
  color: rgb(184, 181, 174);
}

/* Divider */
.hero-divider {
  width: 64px;
  height: 1px;
  background: var(--accent);
  margin-bottom: clamp(40px, 6vh, 60px);
}

/* Hero bottom */
.hero-bottom {
  display: flex;
  align-items: flex-end;
  gap: 56px;
  flex-wrap: wrap;
}
.hero-sub {
  font-family: var(--sans);
  font-size: clamp(14px, 1.5vw, 17px);
  color: var(--muted);
  line-height: 1.85;
  max-width: 400px;
  flex: 1 1 260px;
}
.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--accent-btn);
  color: #fff;
  padding: 16px 28px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  border-radius: 3px;
  letter-spacing: 0.02em;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn-primary:hover {
  background: #166534;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(21,128,61,0.25);
}

.btn-link {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid rgb(204, 201, 194);
  padding-bottom: 3px;
  letter-spacing: 0.05em;
  align-self: flex-start;
  transition: color var(--ease);
}
.btn-link:hover { color: var(--text); }

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hero-scroll-track {
  width: 1px;
  height: 48px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.hero-scroll-track::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 1px;
  height: 50%;
  background: linear-gradient(to bottom, transparent, var(--accent));
  animation: scrollDown 2.2s ease-in-out infinite;
}
.scroll-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--muted-light);
  text-transform: uppercase;
}
@keyframes scrollDown {
  0%   { top: -50%; }
  100% { top: 150%; }
}

/* Hero vertical text */
.hero-vertical-text {
  display: none;
  position: absolute;
  right: clamp(16px, 2.5vw, 44px);
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: center;
  white-space: nowrap;
  pointer-events: none;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: #bfbcb5;
  text-transform: uppercase;
  user-select: none;
}

/* =============================================
   SERVICIOS — GRID 2×2
   ============================================= */
.grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.service-card {
  background: var(--bg);
  padding: clamp(28px, 4vw, 52px);
  display: flex;
  flex-direction: column;
  transition: background 0.3s;
}
.service-card .card-num {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 300;
  color: rgba(46, 107, 72, 0.4);
  line-height: 1;
  margin-bottom: 20px;
  user-select: none;
}
.service-card .card-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 14px;
}
.service-card .card-desc {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.85;
}

/* =============================================
   POR QUÉ YO — GRID 2×2
   ============================================= */
.why-card {
  background: var(--bg);
  padding: clamp(28px, 4vw, 52px);
  display: flex;
  flex-direction: column;
  transition: background 0.3s;
}
.why-card .card-num {
  font-family: var(--serif);
  font-size: 68px;
  font-weight: 300;
  color: rgb(232, 229, 222);
  line-height: 1;
  margin-bottom: 16px;
  user-select: none;
}
.why-card .card-title {
  font-family: var(--sans);
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 12px;
}
.why-card .card-desc {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.85;
}

/* =============================================
   PROYECTOS
   ============================================= */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: clamp(64px, 10vh, 112px);
  padding: 0 clamp(24px, 7vw, 96px);
}

.project {
  display: flex;
  gap: clamp(24px, 5vw, 64px);
  align-items: flex-start;
}
.project-reverse { flex-direction: row-reverse; }

.project-img-wrap { flex: 0 0 56%; }

.project-img-border {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 2px;
}

.project-img {
  position: relative;
  aspect-ratio: 16/10;
  background: rgb(240, 237, 232);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.project:hover .project-img { transform: scale(1.03); }

.project-img:not(.project-img--preview)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 14px,
    rgba(0,0,0,0.04) 14px,
    rgba(0,0,0,0.04) 28px
  );
}

.project-img-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}

.project-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 900px;
  border: none;
  pointer-events: none;
  transform-origin: top left;
}
.project-img span {
  position: relative;
  z-index: 1;
  font-family: monospace;
  font-size: 10px;
  color: rgb(176, 173, 168);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
}

.project-content {
  flex: 1;
  padding-top: clamp(8px, 5vw, 72px);
  display: flex;
  flex-direction: column;
}

.project-num {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.project-title {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.05;
  margin-bottom: 16px;
}
.project-desc {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 24px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.tag {
  font-family: var(--sans);
  font-size: 11px;
  color: rgb(138, 138, 134);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.project-link {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--accent);
  border-bottom: 1px solid rgba(46, 107, 72, 0.2);
  padding-bottom: 3px;
  letter-spacing: 0.08em;
  align-self: flex-start;
  transition: border-color var(--ease);
}
.project-link:hover { border-color: var(--accent); }

/* =============================================
   CONTACTO
   ============================================= */
.contact-cols {
  display: flex;
  gap: clamp(48px, 7vw, 96px);
  align-items: flex-start;
  flex-wrap: wrap;
}
.wa-col { flex: 1 1 300px; max-width: 480px; }

a.wa-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--border);
  background: rgb(242, 239, 233);
  border-radius: 2px;
  text-decoration: none;
  transition: border-color 0.3s, background 0.3s;
}
a.wa-card:hover { border-color: var(--accent); }

.wa-card-header { display: flex; align-items: center; gap: 16px; }

.wa-icon-wrap {
  width: 48px;
  height: 48px;
  background: var(--accent-btn);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wa-icon-wrap svg { width: 24px; height: 24px; color: #fff; }

.wa-title {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.wa-sub {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}

.wa-quote {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 23px);
  font-style: italic;
  color: rgb(184, 181, 174);
  line-height: 1.55;
}

.wa-badge-wrap { display: flex; align-items: center; gap: 10px; }
.wa-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(34, 197, 94);
}
.wa-badge-text {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(22, 163, 74);
}

/* Separador "o bien" */
.contact-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0;
}
.contact-divider-line { flex: 1; height: 1px; background: var(--border); }
.contact-divider-text {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted-light);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Form */
.form-col { flex: 1 1 300px; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  background: rgb(240, 237, 232);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 16px;
  font-family: var(--sans);
  font-size: 14px;
  border-radius: 2px;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
  -webkit-appearance: none;
}
.form-input::placeholder { color: #b5b2aa; }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46, 107, 72, 0.1);
}
.form-textarea { resize: vertical; min-height: 120px; }

.form-feedback {
  display: none;
  padding: 0.8rem 1rem;
  border-radius: 2px;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}
.form-feedback.success {
  display: block;
  background: rgba(46, 107, 72, 0.08);
  color: #1e5c1e;
  border: 1px solid rgba(46, 107, 72, 0.2);
}
.form-feedback.error {
  display: block;
  background: rgba(185, 28, 28, 0.07);
  color: #991b1b;
  border: 1px solid rgba(185, 28, 28, 0.18);
}

.btn-submit {
  background: rgb(229, 226, 219);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 14px 24px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 2px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), transform 0.15s;
}
.btn-submit:hover { background: var(--border); }
.btn-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  padding: clamp(32px, 5vh, 52px) clamp(24px, 7vw, 96px);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-logo {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}
.footer-tagline {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted-light);
  letter-spacing: 0.04em;
}
.footer-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-link {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted-light);
  letter-spacing: 0.04em;
  transition: color var(--ease);
}
.footer-link:hover { color: var(--text); }
.footer-copy {
  font-family: var(--sans);
  font-size: 11px;
  color: rgb(176, 173, 168);
}

/* =============================================
   FLOATING WA
   ============================================= */
.wa-float {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 58px;
  height: 58px;
  background: #25D366;
  border-radius: 50%;
  box-shadow: 0 4px 18px rgba(0,0,0,0.22);
  z-index: 90;
  transition: transform var(--ease), box-shadow var(--ease);
}
.wa-float svg { width: 30px; height: 30px; color: #fff; }
.wa-float:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(0,0,0,0.28); }
.wa-float:focus-visible { outline: 3px solid #25D366; outline-offset: 4px; }

/* =============================================
   FADE-IN
   ============================================= */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.85s cubic-bezier(0.16,1,0.3,1), transform 0.85s cubic-bezier(0.16,1,0.3,1);
}

.service-card.fade-in,
.why-card.fade-in {
  transform: translateY(52px) scale(0.97);
  transition-duration: 0.95s;
}

.project.fade-in:not(.project-reverse) { transform: translateX(-40px); }
.project-reverse.fade-in               { transform: translateX(40px); }

.fade-in.visible         { opacity: 1; transform: none; }
.project.fade-in.visible { transform: none; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (min-width: 801px) {
  .hero-vertical-text { display: block; }
  .wa-float { display: none; }
}

@media (max-width: 800px) {
  .hero-bottom { flex-direction: column !important; gap: 36px !important; align-items: flex-start !important; }
  .grid-2x2 { grid-template-columns: 1fr !important; }
  .project, .project-reverse { flex-direction: column !important; }
  .project-img-wrap { flex: none !important; width: 100%; }
  .project-content { padding-top: 0 !important; }
  .contact-cols { flex-direction: column !important; }
  .footer-inner { flex-direction: column !important; gap: 20px !important; align-items: flex-start !important; }
}

@media (max-width: 1023px) {
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    flex-direction: column;
    padding: 0.5rem 1.5rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-link { display: block; padding: 1rem 0; font-size: 16px; }
}

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .nav-links { display: flex !important; }
  .nav-cta { display: inline-flex; }
}
