/* ===== Tokens ===== */
:root {
  --dark: #141414;
  --dark-2: #1c1c1a;
  --light: #f5f4f1;
  --light-2: #eae7df;
  --accent: #3a6ea5;
  --accent-dark: #2b5680;
  --font-display: "Archivo", sans-serif;
  --font-body: "Sora", sans-serif;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 16px 32px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }

.btn-solid-light { background: var(--accent); color: var(--light); }
.btn-solid-light:hover { background: var(--accent-dark); color: var(--light); }

.btn-outline-light { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline-light:hover { background: var(--accent); color: var(--light); }

.btn-solid-dark { background: var(--accent); color: var(--light); }
.btn-solid-dark:hover { background: var(--accent-dark); }

.btn-outline-dark { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline-dark:hover { background: var(--accent); color: var(--light); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--light);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo span { display: block; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--light);
  opacity: 0.85;
}
.main-nav a:hover { opacity: 1; }
.nav-cta { padding: 8px 18px; font-size: 12px; }
.main-nav a.nav-cta { color: var(--accent); opacity: 1; }
.main-nav a.nav-cta:hover { color: var(--light); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  width: 32px;
  height: 24px;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--light);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  background: var(--dark);
  padding: 14px 0 0;
  overflow-x: clip;
}
.hero-inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  /* Shared left offset for the name and the row below it, so the tagline
     and buttons line up with the "F" of FACUNDO instead of being centered. */
  --hero-indent: clamp(16px, 7vw, 90px);
}

/* The name runs the full width of the container, exactly like the
   reference: two stacked lines, huge display type, no side column. */
.hero-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(46px, 11.5vw, 158px);
  line-height: 0.98;
  color: var(--light);
  margin: 0;
  margin-left: var(--hero-indent);
  letter-spacing: 0;
}
.hero-title .line { display: block; }
/* Second line starts further right than the first, like the reference
   (GUNNAR flush left, PETERSON indented) — creates the staggered look. */
.hero-title .line:last-child { margin-left: clamp(30px, 9vw, 140px); }

/* Entrance animation: FACUNDO slides in from the left, LEDESMA from the right.
   The 55% stop covers almost the whole trip fast, then the last stretch
   into place happens over the remaining 45% of the time — a quick launch
   that visibly decelerates as it settles, instead of one constant speed. */
@keyframes slide-in-left {
  0% { transform: translateX(-115vw); opacity: 0; }
  55% { transform: translateX(2.5%); opacity: 1; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes slide-in-right {
  0% { transform: translateX(115vw); opacity: 0; }
  55% { transform: translateX(-2.5%); opacity: 1; }
  100% { transform: translateX(0); opacity: 1; }
}
.hero-title .line:first-child {
  animation: slide-in-left 1.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-title .line:last-child {
  animation: slide-in-right 1.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.15s;
}

/* Below the name: the photo, with the tagline/CTA lined up under the F
   of FACUNDO instead of centered. It starts sliding up at the same moment
   as the name, but slower, so it's still gliding into place after the
   name has already landed. */
@keyframes slide-up {
  from { transform: translateY(45vh); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 40px;
  padding: 8px 0 48px;
  margin-left: var(--hero-indent);
  flex-wrap: wrap;
  animation: slide-up 1.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-lead {
  flex: 0 1 360px;
  padding-top: 10px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  margin: 0 0 18px;
}

.hero-tagline {
  font-size: clamp(18px, 2vw, 24px);
  color: var(--light-2);
  margin: 0 0 22px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; }

.hero-photo {
  position: relative;
  z-index: 2;
  flex: 1 1 420px;
  max-width: 580px;
  text-align: left;
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 480 / 220;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

/* ===== Section heading helpers ===== */
.section-kicker {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  margin: 0 0 16px;
}
.section-kicker-dark { color: var(--accent); }

.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  color: var(--light);
  margin: 0 0 24px;
  letter-spacing: 0.005em;
}
.section-heading-dark { color: var(--dark); }

/* ===== Method band ===== */
.method-band {
  background: var(--dark-2);
  padding: 100px 0;
}
.method-inner {
  display: flex;
  justify-content: center;
  opacity: 0;
  transition: opacity 1s ease;
}
.method-inner.is-visible { opacity: 1; }

/* Generic scroll-reveal utility: pick a direction, add .reveal + a modifier.
   JS toggles .is-visible the first time the element scrolls into view. */
.reveal {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-left { transform: translateX(-70px); }
.reveal-up { transform: translateY(60px); }
.reveal-down { transform: translateY(-60px); }

/* Slower reveal for the service cards specifically. */
.service-card.reveal {
  transition: opacity 1.6s ease, transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.method-copy { max-width: 760px; text-align: left; }
.method-lead {
  color: var(--light-2);
  font-size: 18px;
  max-width: 620px;
  margin: 0 0 20px;
}

/* ===== Services ===== */
.services {
  background: var(--light);
  padding: 110px 0;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 56px;
}
.service-card {
  position: relative;
  background: var(--dark);
  border-radius: 20px;
  padding: 40px 32px;
  transition: transform 0.2s ease;
}
.service-card:hover { transform: translateY(-6px); }
.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--light);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 0 0 12px;
}
.service-card p { margin: 0; color: #b3b0a6; font-size: 15px; }

/* ===== About ===== */
.about {
  background: var(--dark);
  padding: 110px 0;
}
.about-inner {
  display: flex;
  align-items: flex-start;
  gap: 64px;
}
.about-graphic {
  flex: 0 0 320px;
  max-width: 320px;
  aspect-ratio: 380 / 460;
  border-radius: 20px;
  overflow: hidden;
}
.about-graphic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.about-copy { flex: 1 1 480px; }
.about-copy p { color: var(--light-2); font-size: 17px; max-width: 560px; }
.about-copy .btn { margin-top: 12px; }

/* ===== Testimonials ===== */
.testimonials {
  position: relative;
  background: var(--dark-2);
  padding: 110px 0;
  overflow: hidden;
}
.testimonials::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/image3.jpg") center / cover no-repeat;
  opacity: 0.18;
  z-index: 0;
}
.testimonials .container {
  position: relative;
  z-index: 1;
}
.testimonial-carousel {
  position: relative;
  margin-top: 48px;
}
.testimonial-viewport {
  overflow: hidden;
  padding: 0 11%;
}
.testimonial-track {
  display: flex;
  gap: 20px;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
.testimonial-card {
  flex: 0 0 100%;
  max-width: 100%;
  background: rgba(36, 36, 32, 0.55);
  border-radius: 20px;
  padding: 48px min(64px, 8vw);
  text-align: center;
  opacity: 0.35;
  transition: opacity 0.5s ease;
}
.testimonial-card.is-active { opacity: 1; }
.testimonial-card p {
  color: var(--light-2);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  max-width: 640px;
  margin: 0 auto 24px;
}
.testimonial-author {
  color: var(--light);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--light-2);
  background: var(--dark-2);
  color: var(--light);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.carousel-arrow:hover { background: var(--light); color: var(--dark); }
.carousel-arrow.prev { left: 0; }
.carousel-arrow.next { right: 0; }

/* ===== Contact ===== */
.contact {
  background: var(--light);
  padding: 110px 0;
}
.contact-inner {
  display: flex;
  gap: 64px;
  align-items: flex-start;
}
.contact-copy { flex: 1 1 420px; }
.contact-lead { font-size: 17px; color: #444; max-width: 480px; }
.contact-details {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
}
.contact-details li {
  margin-bottom: 14px;
  font-size: 15px;
}
.contact-details a {
  text-decoration: none;
  transition: color 0.2s ease;
}
.contact-details a:hover { color: var(--accent); }

.contact-form {
  flex: 1 1 420px;
  background: var(--dark);
  padding: 40px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--light); }
.form-row input, .form-row select, .form-row textarea {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid #45453f;
  border-radius: 10px;
  background: var(--dark-2);
  color: var(--light);
  resize: vertical;
}
.form-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5f4f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}
.form-row select option { background: var(--dark-2); color: var(--light); }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form .btn { align-self: flex-start; border: none; }
.form-note { font-size: 13px; color: var(--accent); margin: 0; }

/* ===== Footer ===== */
.site-footer {
  background: var(--dark);
  padding: 48px 0 24px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid #2a2a26;
}
.logo-footer { font-size: 16px; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a, .footer-social a { color: var(--light-2); font-size: 14px; font-weight: 600; }
.footer-nav a:hover, .footer-social a:hover { color: var(--light); }
.footer-social { display: flex; gap: 20px; }
.footer-copy {
  max-width: var(--container);
  margin: 24px auto 0;
  padding: 0 24px;
  color: #6f6f68;
  font-size: 13px;
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-inner, .contact-inner { flex-direction: column; align-items: flex-start; }
  .about-graphic { max-width: 220px; margin-top: 32px; }
  .services-grid { grid-template-columns: 1fr; }
  .contact-form, .contact-copy { flex: 1 1 100%; width: 100%; }

  /* Row stacks: name, then photo, then the phrase — nothing overlaps
     on small screens. */
  .hero-title .line:last-child { margin-left: 8vw; }
  .hero-row { flex-direction: column; align-items: center; justify-content: center; margin-left: 0; padding: 24px 0 48px; gap: 24px; }
  .hero-photo {
    order: -1;
    flex: none;
    transform: none;
    width: min(420px, 90vw);
  }
  .hero-lead { flex: none; padding-top: 0; max-width: 100%; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }

  .main-nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
  }
  .main-nav.open ul { flex-direction: column; gap: 18px; }
  .main-nav.open .nav-cta { align-self: flex-start; }

  .method-band, .services, .about, .testimonials, .contact { padding: 72px 0; }
  .service-card { padding: 32px 24px; }
}
