/* ===== Tokens (Wirall brand) ===== */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f4;
  --card: #ffffff;
  --border: #e6e7e2;
  --text: #2b2d28;
  --muted: #707070;
  --green: #9fc02e;       /* Wirall signature green */
  --green-deep: #84a31f;
  --blue: #0081c1;        /* Wirall secondary blue */
  --grad: linear-gradient(120deg, #9fc02e 0%, #5bb24e 45%, #0081c1 100%);
  --radius: 16px;
  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 18px 50px rgba(43, 45, 40, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: hidden; max-width: 100%; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 { font-family: "Inter", sans-serif; line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Header ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(43, 45, 40, 0.05);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.logo img { display: block; height: 66px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--text); font-size: 0.95rem; font-weight: 600; transition: color 0.2s; }
.nav a:hover { color: var(--green-deep); }
.nav__cta {
  padding: 9px 20px; border-radius: 999px;
  background: var(--green); color: #fff !important; border: 1px solid var(--green);
  transition: background 0.2s, transform 0.2s;
}
.nav__cta:hover { background: var(--green-deep); color: #fff !important; transform: translateY(-1px); }

.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--border); border-radius: 999px; padding: 3px;
}
.lang-opt {
  background: none; border: 0; border-radius: 999px; padding: 5px 11px;
  font: inherit; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.04em;
  color: var(--muted); cursor: pointer; transition: background 0.2s, color 0.2s;
}
.lang-opt:hover { color: var(--text); }
.lang-opt.is-active { background: var(--green); color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s var(--ease); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: 0.98rem; border: 0;
  transition: transform 0.2s var(--ease), box-shadow 0.3s, background 0.2s, border-color 0.2s; cursor: pointer;
}
.btn--primary { background: var(--green); color: #fff; box-shadow: 0 8px 24px rgba(159, 192, 46, 0.35); }
.btn--primary:hover { background: var(--green-deep); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(159, 192, 46, 0.45); }
.btn--ghost { border: 1px solid var(--border); color: var(--text); background: #fff; }
.btn--ghost:hover { border-color: var(--green); color: var(--green-deep); transform: translateY(-2px); }
.btn--lg { padding: 16px 34px; font-size: 1.1rem; }

/* ===== Hero ===== */
.hero { padding: 165px 0 80px; position: relative; overflow: hidden; }
.hero .container { position: relative; z-index: 1; }
.hero-canvas { position: absolute; inset: 0; z-index: 0; display: block; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 85% 12%, rgba(159, 192, 46, 0.18), transparent 42%),
    radial-gradient(circle at 8% 80%, rgba(0, 129, 193, 0.12), transparent 45%);
}
.hero__eyebrow { color: var(--green-deep); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 20px; }
.hero__title { font-size: clamp(2.2rem, 7vw, 5.2rem); overflow-wrap: break-word; }
.hero__title .grad {
  background: linear-gradient(115deg, #8a8d86 0%, #aeb3a6 38%, #9fc02e 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { max-width: min(600px, 100%); color: var(--muted); font-size: 1.18rem; margin: 24px 0 36px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 48px; margin-top: 64px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat__num { font-size: 2.4rem; font-weight: 800; color: var(--green-deep); }
.stat__label { color: var(--muted); font-size: 0.9rem; }

/* ===== Marquee ===== */
.marquee { overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 26px 0; background: var(--bg-soft); }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track { display: flex; align-items: center; width: max-content; animation: scroll 50s linear infinite; }
.marquee__group { display: flex; align-items: center; gap: 50px; padding-right: 50px; flex: 0 0 auto; }
.marquee__logo {
  height: 30px; width: auto; max-width: 150px; flex: 0 0 auto; object-fit: contain;
  opacity: 0.5; filter: grayscale(100%);
  transition: opacity 0.25s var(--ease), filter 0.25s var(--ease), transform 0.25s var(--ease);
}
.marquee__logo:hover { opacity: 1; filter: grayscale(0%); transform: scale(1.06); }
/* Per-logo optical normalization (different aspect ratios / ink weight) */
.marquee__logo[src*="rapsodia"]      { height: 14px; max-width: 128px; }
.marquee__logo[src*="despegar"]      { height: 21px; }
.marquee__logo[src*="bancogalicia"]  { height: 22px; }
.marquee__logo[src*="budweiser"]     { height: 30px; max-width: 120px; }
.marquee__logo[src*="quilmes"]       { height: 30px; }
.marquee__logo[src*="leoburnett"]    { height: 36px; }
.marquee__logo[src*="nike"]          { height: 40px; }
.marquee__logo[src*="ford"]          { height: 40px; }
.marquee__logo[src*="walmart"]       { height: 34px; }
.marquee__logo[src*="hsbc"]          { height: 32px; }
.marquee__logo[src*="mcdonalds"]     { height: 34px; }
.marquee__logo[src*="volkswagen"]    { height: 40px; }
.marquee__logo[src*="ypf"]           { height: 40px; }
.marquee__logo[src*="cartoonnetwork"]{ height: 38px; }
@keyframes scroll { to { transform: translateX(-50%); } }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__eyebrow { color: var(--green-deep); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 14px; }
.section__title { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 16px; }
.section__lead { color: var(--muted); max-width: 620px; font-size: 1.1rem; margin-bottom: 40px; }

/* ===== About ===== */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: center; }
.about__text p { color: var(--muted); margin-top: 18px; font-size: 1.08rem; }
.about__values { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.about__values li { background: var(--bg-soft); border: 1px solid var(--border); border-left: 4px solid var(--green); border-radius: var(--radius); padding: 20px 24px; transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.about__values li:hover { transform: translateX(6px); box-shadow: var(--shadow); }
.about__values strong { display: block; font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.about__values span { color: var(--muted); font-size: 0.96rem; }

/* ===== Cards (services) ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; position: relative; overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
}
.card::after { content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 4px; background: var(--grad); transform: scaleY(0); transform-origin: top; transition: transform 0.3s var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::after { transform: scaleY(1); }
.card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.98rem; }

/* ===== Portfolio filters + grid ===== */
.work-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 38px; }
.filter-btn {
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 18px; font: inherit; font-weight: 600; font-size: 0.92rem; color: var(--text);
  cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.filter-btn:hover { border-color: var(--green); color: var(--green-deep); }
.filter-btn.is-active { background: var(--green); border-color: var(--green); color: #fff; }

.work-more { display: flex; justify-content: center; margin-top: 40px; }
.work-more.hidden { display: none; }

.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow); line-height: 0;
  aspect-ratio: 4 / 3; background: var(--bg-soft);
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.project.in { opacity: 1; transform: none; }
.project[hidden] { display: none !important; }
.project img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.project:hover img { transform: scale(1.06); }
.project figcaption {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  display: flex; flex-direction: column; gap: 2px;
  padding: 38px 20px 18px; line-height: 1.35; text-align: left;
  color: #fff; background: linear-gradient(to top, rgba(20,22,18,0.92) 0%, rgba(20,22,18,0.55) 55%, transparent 100%);
  transform: translateY(8px); opacity: 0; transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.project:hover figcaption, .project:focus-within figcaption { transform: none; opacity: 1; }
.project__client { font-weight: 800; font-size: 1.02rem; }
.project__meta { font-size: 0.82rem; color: var(--green); font-weight: 600; }

/* ===== Tech ===== */
.tech-marquee { overflow: hidden; margin: 8px 0 12px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tech-marquee__track { display: flex; width: max-content; animation: scroll 70s linear infinite; }
.tech-marquee:hover .tech-marquee__track { animation-play-state: paused; }
.tech-marquee__group { display: flex; align-items: stretch; gap: 16px; padding-right: 16px; flex: 0 0 auto; }
.tech__logo {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  height: 112px; width: 132px; margin: 0; padding: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.tech__logo:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tech__logo img { height: 46px; max-width: 80px; width: auto; object-fit: contain; }
.tech__logo figcaption { font-size: 0.82rem; font-weight: 600; color: var(--muted); }

.tech__groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px 40px; margin-top: 44px; }
.tech__group h4 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-deep); margin-bottom: 16px; }
.tech__tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tech__tags span {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--text); font-weight: 600; font-size: 0.92rem;
  transition: transform 0.2s, border-color 0.2s, color 0.2s;
}
.tech__tags span:hover { transform: translateY(-3px); border-color: var(--blue); color: var(--blue); }
.tech__tags .tag--muted { color: var(--muted); border-style: dashed; }

/* ===== Team org chart ===== */
.tree { margin-top: 40px; overflow-x: auto; padding-bottom: 8px; }
.tree ul { display: flex; justify-content: center; padding-top: 26px; position: relative; }
.tree > ul { padding-top: 0; }
.tree li { list-style: none; text-align: center; position: relative; padding: 26px 12px 0; }
/* connectors */
.tree li::before, .tree li::after {
  content: ''; position: absolute; top: 0; right: 50%;
  border-top: 2px solid var(--border); width: 50%; height: 26px;
}
.tree li::after { right: auto; left: 50%; border-left: 2px solid var(--border); }
.tree li:only-child::before, .tree li:only-child::after { display: none; }
.tree li:only-child { padding-top: 0; }
.tree li:first-child::before, .tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 2px solid var(--border); border-radius: 0 7px 0 0; }
.tree li:first-child::after { border-radius: 7px 0 0 0; }
.tree ul ul::before {
  content: ''; position: absolute; top: 0; left: 50%;
  border-left: 2px solid var(--border); width: 0; height: 26px;
}

.node {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 22px; min-width: 130px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}
.node:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.node h3 { font-size: 1.2rem; }
.node h4 { font-size: 1.02rem; font-weight: 700; }
.node__role { color: var(--green-deep); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.node--lead { padding: 22px 30px; }
.node__photo { width: 92px; height: 92px; border-radius: 50%; overflow: hidden; border: 1px solid var(--border); margin-bottom: 4px; }
.node__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: filter 0.4s; }
.node--lead:hover .node__photo img { filter: grayscale(0%); }
.node__avatar {
  width: 56px; height: 56px; border-radius: 50%; margin-bottom: 2px;
  background: #e3e6df url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238a8d86'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E") center 9px / 70% no-repeat;
}
.node__avatar::after { content: none; }
.node--ai {
  flex-direction: row; min-width: auto; padding: 9px 16px; gap: 8px;
  background: var(--bg-soft); border-style: dashed; border-color: #c4c8c0;
  color: var(--muted); font-weight: 700; font-size: 0.82rem;
}

/* ===== Offices / Contact ===== */
.offices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 8px; }
.office { background: var(--card); border: 1px solid var(--border); border-top: 4px solid var(--blue); border-radius: var(--radius); padding: 28px 26px; transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.office:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.office h3 { font-size: 1.3rem; margin-bottom: 12px; }
.office p { color: var(--muted); margin-bottom: 14px; }
.office a { color: var(--blue); font-weight: 700; transition: color 0.2s; }
.office a:hover { color: var(--green-deep); }

/* ===== Contact ===== */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.contact__cities { color: var(--green-deep); font-weight: 700; font-size: 1.15rem; margin: 6px 0 18px; }
.contact__lead { color: var(--muted); font-size: 1.1rem; max-width: 420px; }
.contact__social { display: flex; gap: 14px; margin-top: 28px; }
.contact__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  color: var(--muted); background: #fff; transition: color 0.2s, border-color 0.2s, transform 0.2s, background 0.2s;
}
.contact__social a:hover { color: #fff; background: var(--green); border-color: var(--green); transform: translateY(-3px); }
.contact__social svg { display: block; }

.contact-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field span { font-weight: 600; font-size: 0.9rem; }
.field span em { color: var(--muted); font-weight: 400; font-style: normal; }
.field input, .field textarea {
  font: inherit; color: var(--text); background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input:focus, .field textarea:focus {
  outline: none; background: #fff; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(159, 192, 46, 0.18);
}
.field textarea { resize: vertical; min-height: 120px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.h-captcha { margin: 4px 0 20px; }
.contact-form .btn { width: 100%; }
.form-status { margin-top: 14px; font-weight: 600; font-size: 0.95rem; min-height: 1.2em; }
.form-status.ok { color: var(--green-deep); }
.form-status.err { color: #c0392b; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 34px 0; background: var(--bg-soft); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer__badges { display: flex; align-items: center; gap: 18px; }
.footer__badges img { height: 38px; width: auto; opacity: 0.7; transition: opacity 0.2s; }
.footer__badges img:hover { opacity: 1; }
.footer__meta { display: flex; flex-direction: column; align-items: flex-start; color: var(--muted); font-size: 0.88rem; gap: 4px; }
.footer__cities { color: var(--green-deep); font-weight: 600; }
.footer__links { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.footer__links a { color: var(--green-deep); font-weight: 600; transition: color 0.2s; }
.footer__links a:hover { color: var(--text); text-decoration: underline; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
/* Offcanvas backdrop */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(20, 22, 18, 0.55);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.nav-backdrop.show { opacity: 1; }

@media (max-width: 900px) {
  /* Offcanvas drawer */
  .nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 120;
    width: min(82vw, 320px); flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 92px 0 24px;
    box-shadow: -16px 0 50px rgba(43, 45, 40, 0.18);
    overflow-y: auto; display: none;
  }
  .nav.open { display: flex; animation: drawerIn 0.36s var(--ease); }
  .nav a { padding: 16px 28px; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
  .nav__cta { margin: 18px 28px 0; text-align: center; border-bottom: 0; }
  .lang-switch { align-self: flex-start; margin: 16px 28px 0; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    position: fixed; top: 16px; right: 20px; width: 44px; height: 44px; padding: 0;
    background: none; border: 0; box-shadow: none; z-index: 130;
  }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  body.nav-open { overflow: hidden; }

  .about { grid-template-columns: 1fr; gap: 36px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .tech__groups { grid-template-columns: 1fr; }
  .project figcaption { transform: none; opacity: 1; }
  .offices { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: 32px; }
  .footer__inner { justify-content: center; text-align: center; }
  .footer__meta { align-items: center; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .hero__stats { flex-direction: column; gap: 22px; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
  .hero { padding: 135px 0 64px; }
  .section { padding: 68px 0; }
  .tech__logo { width: 120px; height: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track, .tech-marquee__track { animation: none; }
  html { scroll-behavior: auto; }
}
