/* ============================================================
   Giachero Sistemas — site.css
   Layouts y componentes compartidos entre todas las páginas.
   ============================================================ */

@import url('./tokens.css');

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--duration-base) var(--ease-out-quart),
              color var(--duration-base) var(--ease-out-quart);
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

/* ---------- Container ---------- */
.container {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }

.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--brand);
}
.eyebrow--muted { color: var(--text-muted); }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-base) var(--ease-out-quart),
              background-color var(--duration-base) var(--ease-out-quart);
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 24px;
}
.nav__brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-weight: 800; letter-spacing: -0.02em; font-size: 15px;
}
.nav__brand-mark { width: 28px; height: 28px; }
.nav__brand-text span { color: var(--text-muted); font-weight: 500; }

.nav__menu {
  display: none; gap: 4px; list-style: none; margin: 0; padding: 0;
}
@media (min-width: 960px) { .nav__menu { display: flex; } }
.nav__link {
  padding: 8px 12px; border-radius: 999px;
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: color var(--duration-fast), background-color var(--duration-fast);
}
.nav__link:hover { color: var(--text); background: var(--surface-muted); }
.nav__link.is-current { color: var(--text); }
.nav__link.is-current::after {
  content: ''; display: block; height: 2px; width: 16px;
  background: var(--brand); margin: 4px auto 0; border-radius: 2px;
}

.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px;
  cursor: pointer;
  transition: all var(--duration-fast);
}
.nav__icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface); }
.nav__icon-btn svg { width: 16px; height: 16px; }
.theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }

.nav__hamburger { display: grid; }
@media (min-width: 960px) { .nav__hamburger { display: none; } }

/* Mobile drawer */
.nav__drawer {
  display: none;
  position: fixed; inset: 68px 0 0 0; z-index: 90;
  background: var(--bg);
  padding: 24px;
  border-top: 1px solid var(--border);
  flex-direction: column; gap: 4px;
}
.nav__drawer.is-open { display: flex; }
.nav__drawer a {
  padding: 14px 12px; border-radius: 10px;
  text-decoration: none; color: var(--text);
  font-size: 16px; font-weight: 500;
  border-bottom: 1px solid var(--border);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px;
  font: 600 14px/1 var(--font-sans); letter-spacing: -0.01em;
  cursor: pointer; border: 1px solid transparent;
  text-decoration: none; white-space: nowrap;
  transition: transform var(--duration-fast) var(--ease-out-quart),
              background-color var(--duration-fast),
              border-color var(--duration-fast),
              box-shadow var(--duration-fast);
}
.btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.btn--primary { background: var(--brand); color: var(--brand-foreground); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--brand-hover); box-shadow: var(--shadow-brand); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0); background: var(--brand-active); }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--secondary:hover { background: var(--surface-muted); border-color: var(--text-muted); }
.btn--ghost { background: transparent; color: var(--text); }
.btn--ghost:hover { background: var(--surface-muted); }
.btn--lg { padding: 15px 26px; font-size: 15px; border-radius: 12px; }
.btn--sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }

/* ---------- SECTIONS ---------- */
.section { padding: 96px 0; position: relative; }
@media (min-width: 1024px) { .section { padding: 128px 0; } }
.section--alt { background: var(--bg-subtle); }
.section--dark {
  background: var(--zinc-950); color: var(--zinc-50);
}
.section--dark .section__title { color: #fff; }
.section--dark .section__lead { color: rgb(255 255 255 / 0.7); }

.section__head { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.section__head--left { margin-left: 0; text-align: left; }
.section__eyebrow { color: var(--brand); font: 700 12px/1 var(--font-sans); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; display: block; }
.section__title {
  font: 800 clamp(30px, 4vw, 48px)/1.1 var(--font-sans);
  letter-spacing: -0.03em; color: var(--text);
  margin: 0 0 16px; text-wrap: balance;
}
.section__lead {
  font-size: 18px; color: var(--text-muted);
  line-height: 1.5; margin: 0; text-wrap: pretty;
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  padding: 64px 0 24px;
}
.footer__grid { display: grid; gap: 40px; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer__brand { max-width: 320px; }
.footer__tagline { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin: 12px 0 20px; }
.footer__heading {
  font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.08em; font-weight: 700;
  color: var(--text); margin: 0 0 16px;
}
.footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer__list a {
  color: var(--text-muted); font-size: 14px; text-decoration: none;
  transition: color var(--duration-fast);
}
.footer__list a:hover { color: var(--brand); }
.footer__bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 12px; color: var(--text-subtle); font-size: 12px;
}
.footer__social { display: flex; gap: 8px; margin-top: 8px; }
.footer__social a {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); display: grid; place-items: center;
  color: var(--text-muted); transition: all var(--duration-fast);
}
.footer__social a:hover { border-color: var(--brand); color: var(--brand); }
.footer__social svg { width: 16px; height: 16px; }

/* ---------- REVEAL ---------- */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 700ms var(--ease-out-quart),
              transform 700ms var(--ease-out-quart);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- UTIL ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font: 600 11px/1.4 var(--font-sans);
  text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--brand-subtle); color: var(--brand-subtle-fg);
}
.tag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
}

/* Placeholder pattern (for client logos) */
.ph-logo {
  display: grid; place-items: center;
  height: 56px; border: 1px dashed var(--border-strong);
  border-radius: 10px; background: var(--surface);
  font: 500 11px/1.2 var(--font-mono); color: var(--text-subtle);
  letter-spacing: 0.04em; text-transform: uppercase;
  text-align: center; padding: 6px 12px;
}
