/* ========================================================================
   GIULIANI · Sitio web · estilos compartidos
   Tipografía masiva, naranja con intención, neutrales cálidos.
   Soporta modo dark/light.
   ======================================================================== */

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

:root {
  --accent: #e05a1e;
  --accent-soft: rgba(224, 90, 30, 0.12);
  --accent-line: rgba(224, 90, 30, 0.5);

  --bg: #0a0a0a;
  --bg-2: #111111;
  --surface: #161616;
  --surface-2: #1e1e1e;
  --ink: #f5f3ee;
  --ink-muted: rgba(245, 243, 238, 0.45);
  --ink-faint: rgba(245, 243, 238, 0.18);
  --border: rgba(245, 243, 238, 0.08);
  --border-strong: rgba(245, 243, 238, 0.18);

  --d: 1;
  --pad-section: calc(100px * var(--d));
  --pad-side: calc(40px * var(--d));
  --gap-row: calc(28px * var(--d));

  --f-display: 'Bricolage Grotesque', 'Arial Narrow', sans-serif;
  --f-body: 'Nunito', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
}

[data-theme="light"] {
  --bg: #f5f3ee;
  --bg-2: #ebe7df;
  --surface: #ffffff;
  --surface-2: #f0ece4;
  --ink: #0e1a2b;
  --ink-muted: rgba(14, 26, 43, 0.55);
  --ink-faint: rgba(14, 26, 43, 0.22);
  --border: rgba(14, 26, 43, 0.10);
  --border-strong: rgba(14, 26, 43, 0.22);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02";
  transition: background .35s ease, color .35s ease;
}

body.cursor-on { cursor: none; }
body.cursor-on a, body.cursor-on button, body.cursor-on input,
body.cursor-on textarea, body.cursor-on select { cursor: none; }

/* ============================ CURSOR ============================ */
.cursor, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity .25s ease;
}
.cursor {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  z-index: 9998;
  transition: width .3s ease, height .3s ease, border-color .25s ease, opacity .25s ease;
}
body:not(.cursor-on) .cursor,
body:not(.cursor-on) .cursor-ring { opacity: 0; }

/* ============================ NAV ============================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: 64px;
  padding: 0 var(--pad-side);
  display: flex; align-items: center; justify-content: space-between;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background .35s ease;
}
.nav-logo {
  display: inline-flex; align-items: center;
  height: 44px;
  color: var(--ink);
  text-decoration: none;
  transition: opacity .2s;
}
.nav-logo:hover { opacity: .85; }
.nav-logo svg { height: 40px; width: auto; display: block; }
.nav-right { display: flex; align-items: center; gap: 36px; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-muted); text-decoration: none;
  transition: color .2s;
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  height: 1px; width: 0; background: var(--accent);
  transition: width .25s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-controls { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 36px; height: 36px;
  background: transparent; color: var(--ink);
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  transition: border-color .2s, color .2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; }
.nav-cta {
  background: transparent; color: var(--ink);
  border: 1px solid var(--border-strong);
  padding: 9px 20px;
  font-family: var(--f-body);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: border-color .2s, color .2s, background .2s;
  text-decoration: none;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent); }

/* ============================ BUTTONS ============================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 32px;
  font-family: var(--f-body);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: none;
  text-decoration: none;
  transition: all .2s ease;
}
.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover {
  background: var(--ink); color: var(--bg);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============================ TIPOGRAFÍA ============================ */
.eyebrow {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--accent);
}
.display {
  font-family: var(--f-display);
  letter-spacing: 0.01em;
  line-height: 0.88;
  color: var(--ink);
  text-wrap: balance;
}
.display em { font-style: normal; color: var(--accent); }
.section-title {
  font-family: var(--f-display);
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.9;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-wrap: balance;
}
.muted { color: var(--ink-muted); font-weight: 300; }
.mono { font-family: var(--f-mono); }

/* ============================ SECCIONES base ============================ */
.section { padding: var(--pad-section) var(--pad-side); position: relative; }
.section + .section { border-top: 1px solid var(--border); }
.sec-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
  margin-bottom: calc(48px * var(--d));
}
.sec-header-right {
  max-width: 320px;
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.75;
  font-weight: 300;
}
.sec-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
}

/* ============================ MARQUEE ============================ */
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  background: var(--bg-2);
}
.marquee-track {
  display: flex; width: max-content;
  animation: marquee 40s linear infinite;
  gap: 56px;
  padding-left: 56px;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.marquee-item {
  font-family: var(--f-display);
  font-size: 16px; letter-spacing: 0.14em;
  color: var(--ink-muted);
  display: inline-flex; align-items: center; gap: 56px;
  white-space: nowrap;
}
.marquee-item::after {
  content: "✦"; font-size: 9px; color: var(--accent);
}

/* ============================ FOOTER ============================ */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 64px var(--pad-side) 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.footer-logo {
  display: inline-flex; align-items: center;
  color: var(--ink); text-decoration: none;
  margin-bottom: 20px;
  transition: opacity .2s;
}
.footer-logo:hover { opacity: .85; }
.footer-logo svg { height: 44px; width: auto; display: block; }
.footer-tag { font-size: 13px; color: var(--ink-muted); max-width: 280px; line-height: 1.7; font-weight: 300; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.footer-col-head {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: 18px;
}
.footer-col-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col-links a {
  font-size: 13px; color: var(--ink); text-decoration: none;
  opacity: .75; transition: opacity .2s, color .2s;
}
.footer-col-links a:hover { opacity: 1; color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--ink-muted); letter-spacing: 0.05em;
}
.footer-bottom .footer-lang { display: flex; gap: 16px; }
.footer-bottom .footer-lang a {
  color: var(--ink-muted); text-decoration: none;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.footer-bottom .footer-lang a.active { color: var(--accent); }

/* ============================ CLIENTES STRIP ============================ */
.clients-strip {
  position: relative;
  overflow: hidden;
  padding: 32px 0;
  margin-top: 56px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.clients-track {
  display: flex; width: max-content;
  align-items: center;
  gap: 56px;
  padding-left: 56px;
  animation: clients-marquee 38s linear infinite;
}
.clients-strip:hover .clients-track { animation-play-state: paused; }
@keyframes clients-marquee {
  to { transform: translateX(-50%); }
}
.clients-strip .client-logo {
  height: 80px; width: auto; max-width: 280px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter .25s ease, opacity .25s ease, transform .25s ease;
  flex-shrink: 0;
}
.clients-strip .client-logo:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: translateY(-2px);
}
.clients-strip .sep {
  font-size: 9px;
  color: var(--accent);
  user-select: none;
  flex-shrink: 0;
}
[data-theme="dark"] .clients-strip .client-logo {
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.45;
}
[data-theme="dark"] .clients-strip .client-logo:hover {
  filter: grayscale(0) brightness(1) invert(0);
  opacity: 1;
}

/* ============================ REVEAL ============================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.16,.84,.3,1);
  transition-delay: var(--rd, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ============================ TAGS / CHIPS ============================ */
.tag {
  display: inline-flex; align-items: center;
  padding: 5px 11px;
  border: 1px solid var(--border-strong);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-muted);
  background: transparent;
}
.tag-active { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }

/* ============================ TRANSICIÓN PÁGINAS ============================ */
.page-curtain {
  position: fixed; inset: 0;
  background: var(--accent);
  z-index: 10000;
  transform: translateY(100%);
  pointer-events: none;
}
.page-curtain.in {
  animation: curtain-in .55s cubic-bezier(.7,0,.2,1) forwards;
}
.page-curtain.out {
  animation: curtain-out .55s cubic-bezier(.7,0,.2,1) forwards;
}
@keyframes curtain-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes curtain-out {
  from { transform: translateY(0); }
  to { transform: translateY(-100%); }
}

/* ============================ MEDIA ============================ */
@media (max-width: 900px) {
  :root { --pad-section: calc(64px * var(--d)); --pad-side: 20px; }
  .nav-links { display: none; }
  .sec-header { grid-template-columns: 1fr; }
  .sec-header-right { max-width: none; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  body.cursor-on { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
}
@media (max-width: 560px) {
  .nav { height: 56px; }
  .nav-logo { height: 32px; }
  .nav-logo svg { height: 28px; }
  .nav-cta { padding: 8px 14px; font-size: 10px; letter-spacing: 0.08em; }
  .nav-controls { gap: 8px; }
  .theme-toggle { width: 32px; height: 32px; }
  .footer-cols { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .btn { padding: 14px 22px; font-size: 11px; }
}
