/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* base */
  --bg:        #0a0a0c;
  --bg-2:      #111113;
  --bg-card:   rgba(255,255,255,0.035);
  --bg-card-hover: rgba(255,255,255,0.06);
  --ink:       #f2f2ef;
  --ink-soft:  rgba(242,242,239,0.76);
  --ink-mute:  rgba(242,242,239,0.5);
  --line:      rgba(242,242,239,0.12);
  --line-soft: rgba(242,242,239,0.07);

  /* especialidades — colores del logo */
  --blue:       #3577dd;
  --light-blue: #6ecbe3;
  --red:        #d43c50;
  --yellow:     #f0c239;

  /* type */
  --display: "Barlow Condensed", -apple-system, BlinkMacSystemFont, sans-serif;
  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --radius: 3px;
  --nav-h: 78px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; font-family: var(--display); font-weight: 700; }
ul { list-style: none; padding: 0; }
::selection { background: var(--yellow); color: #0a0a0c; }

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 600;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* =============================================================
   3. Utilities
   ============================================================= */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 1rem;
}
.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex-shrink: 0; }

/* blueprint technical background */
.blueprint {
  position: fixed; inset: 0; z-index: -2;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 75%);
}
.vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(10,10,12,0.55) 85%, rgba(10,10,12,0.9) 100%);
}

/* =============================================================
   4. Typography helpers
   ============================================================= */
.hl { font-style: normal; }
.hl-blue       { color: var(--blue); }
.hl-lightblue  { color: var(--light-blue); }
.hl-red        { color: var(--red); }
.hl-yellow     { color: var(--yellow); font-style: italic; }

/* =============================================================
   5. Components
   ============================================================= */

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .35s var(--ease-out), border-color .35s var(--ease-out);
  white-space: nowrap;
}
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn-primary {
  background: var(--yellow); color: #171205;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(240,194,57,0.45);
}
.btn-ghost {
  background: rgba(242,242,239,0.14);
  color: var(--ink);
  border-color: rgba(242,242,239,0.3);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(242,242,239,0.5);
  background: rgba(242,242,239,0.2);
}

.btn-instagram {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600; font-size: 0.9rem;
  transition: transform .35s var(--ease-out), border-color .35s var(--ease-out), background .35s var(--ease-out);
}
.btn-instagram:hover {
  transform: translateY(-2px);
  border-color: rgba(242,242,239,0.4);
  background: rgba(255,255,255,0.05);
}

/* nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(10,10,12,0.55);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease-out), border-color .3s var(--ease-out), backdrop-filter .3s var(--ease-out);
}
@supports (backdrop-filter: blur(16px)) {
  .nav { backdrop-filter: blur(16px) saturate(140%); }
}
.nav.is-scrolled {
  background: rgba(10,10,12,0.82);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
}
.nav-brand { display: flex; align-items: center; gap: 0.65rem; }
.nav-logo { border-radius: 6px; }
.nav-brand-text {
  font-family: var(--display); font-weight: 700; font-size: 1.15rem;
  letter-spacing: 0.01em;
  display: flex; flex-direction: column; line-height: 1;
}
.nav-brand-text em {
  font-style: normal; font-family: var(--mono); font-weight: 400;
  font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute); margin-top: 0.15rem;
}
.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: 0.3rem 0;
  transition: color .25s var(--ease-out);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--yellow);
  transition: right .3s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }
.nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active::after { right: 0; background: var(--yellow); }

.nav-actions { display: flex; align-items: center; gap: 1rem; }
.nav-actions .btn-primary { display: none; }

.nav-burger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px;
}
.nav-burger span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  transition: transform .3s var(--ease-out), opacity .3s var(--ease-out);
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links.is-open {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: rgba(10,10,12,0.97);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.5rem 1.5rem;
}
.nav-links.is-open a { width: 100%; padding: 0.9rem 0; border-bottom: 1px solid var(--line-soft); }

/* cards base */
.service-card, .value-card, .project-card, .profile-card, .process-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .45s var(--ease-out), border-color .45s var(--ease-out), background .45s var(--ease-out), box-shadow .45s var(--ease-out);
}

/* trust strip */
.trust-strip {
  position: relative; z-index: 1;
  padding: 2.25rem 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.015);
}
.trust-strip-inner {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 1.5rem 3rem;
}
.trust-item {
  display: flex; align-items: center; gap: 0.65rem;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.03em;
  color: var(--ink-soft); white-space: nowrap;
}
.trust-item .icon { width: 18px; height: 18px; color: var(--yellow); }

/* =============================================================
   6. Sections
   ============================================================= */
.section { padding: 6.5rem 0; position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,0.015), transparent); }
.section-head { max-width: 640px; margin-bottom: 3.5rem; }
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: 0;
}

/* hero */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 4rem;
  position: relative;
  overflow: hidden;
}
.hero-bg-logo {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 10vh 2vw 0 0;
  perspective: 850px;
  pointer-events: none;
}
.hero-bg-logo-inner {
  width: min(95vw, 920px);
  transform-style: preserve-3d;
  transform: rotateY(-48deg);
}
.hero-bg-logo img {
  width: 100%;
  display: block;
  opacity: 0.55;
}
.hero-bg-scrim {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 55% at 72% 62%, transparent 30%, rgba(10,10,12,0.55) 75%, rgba(10,10,12,0.92) 100%),
    linear-gradient(100deg, rgba(10,10,12,0.96) 0%, rgba(10,10,12,0.8) 34%, rgba(10,10,12,0.4) 62%, rgba(10,10,12,0.65) 100%);
}
.hero-inner {
  position: relative; z-index: 2;
}
.hero-title {
  font-size: clamp(2.4rem, 6.8vw, 5rem);
  max-width: 20ch;
  margin-bottom: 1.6rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 2.2rem;
  font-weight: 300;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.1rem; }
.hero-meta {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em;
  color: var(--ink-mute); margin-bottom: 3rem;
}

.stats { display: flex; flex-wrap: wrap; gap: 2.5rem 3.5rem; }
.stat { display: flex; flex-direction: column; }
.stat-num, .stat-suffix {
  font-family: var(--display); font-weight: 700;
  font-size: 2.6rem; line-height: 1; color: var(--yellow);
  display: inline;
}
.stat-suffix { font-size: 1.6rem; }
.stat-label {
  margin-top: 0.5rem; font-size: 0.85rem; color: var(--ink-mute);
  max-width: 18ch;
}

.scroll-hint {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  width: 24px; height: 38px; border: 1.5px solid var(--line);
  border-radius: 20px;
}
.scroll-hint span {
  display: block; width: 4px; height: 8px; margin: 6px auto 0;
  background: var(--ink-mute); border-radius: 2px;
  animation: scrollHint 1.8s infinite var(--ease-soft);
}
@keyframes scrollHint {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* services */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.service-card { padding: 2rem 1.75rem; position: relative; overflow: hidden; }
.service-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--card-accent);
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--card-accent) 50%, var(--line));
  box-shadow: 0 24px 48px -24px color-mix(in srgb, var(--card-accent) 45%, transparent);
}
.service-icon {
  width: 46px; height: 46px; margin-bottom: 1.4rem;
  color: var(--card-accent);
}
.service-icon svg { width: 100%; height: 100%; fill: currentColor; }
.service-eyebrow {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--card-accent); margin-bottom: 0.6rem;
}
.service-title { font-size: 1.35rem; margin-bottom: 0.75rem; letter-spacing: 0; }
.service-desc { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 1.4rem; }
.service-list { display: flex; flex-direction: column; gap: 0.5rem; }
.service-list li {
  font-size: 0.85rem; color: var(--ink-mute); padding-left: 1.1rem; position: relative;
}
.service-list li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 6px; height: 1px; background: var(--card-accent);
}

/* projects */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.project-card { overflow: hidden; }
.project-card img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  filter: saturate(1.02) contrast(1.02);
  transition: transform .6s var(--ease-out), filter .6s var(--ease-out);
}
.project-card:hover img { transform: scale(1.06); filter: saturate(1.12) contrast(1.05); }
.project-card:hover { transform: translateY(-6px); border-color: rgba(242,242,239,0.3); }
.project-card figcaption { padding: 1.3rem 1.4rem 1.5rem; }
.project-title { font-family: var(--display); font-size: 1.15rem; font-weight: 700; margin-bottom: 0.4rem; }
.project-desc { font-size: 0.85rem; color: var(--ink-mute); }

/* about */
.about-grid {
  display: grid; gap: 3rem;
  align-items: center;
}
.about-figure img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: top;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.about-text { color: var(--ink-soft); margin-bottom: 1.1rem; max-width: 56ch; }
.about-quote {
  margin-top: 1.8rem; padding-left: 1.4rem;
  border-left: 2px solid var(--yellow);
  font-family: var(--display); font-size: 1.3rem; font-weight: 600;
  color: var(--ink);
}
.about-quote cite {
  display: block; margin-top: 0.8rem; font-family: var(--mono);
  font-style: normal; font-size: 0.75rem; letter-spacing: 0.08em;
  color: var(--ink-mute); text-transform: uppercase;
}

/* values */
.values-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.value-card { padding: 2rem 1.75rem; }
.value-card:hover { transform: translateY(-4px); border-color: rgba(242,242,239,0.25); background: var(--bg-card-hover); }
.value-num {
  font-family: var(--mono); color: var(--ink-mute); font-size: 0.85rem;
  letter-spacing: 0.1em; display: block; margin-bottom: 1rem;
}
.value-card h3 { font-size: 1.15rem; margin-bottom: 0.65rem; letter-spacing: 0; }
.value-card p { color: var(--ink-soft); font-size: 0.9rem; }

/* profiles (a quién atendemos) */
.profiles-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}
.profile-card { padding: 2rem 1.75rem; }
.profile-card:hover { transform: translateY(-4px); border-color: rgba(242,242,239,0.25); background: var(--bg-card-hover); }
.profile-card h3 { font-size: 1.1rem; margin-bottom: 0.65rem; letter-spacing: 0; }
.profile-card p { color: var(--ink-soft); font-size: 0.88rem; }

/* process (cómo trabajamos) */
.process-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.process-card { padding: 2rem 1.75rem; position: relative; }
.process-card:hover { transform: translateY(-4px); border-color: rgba(242,242,239,0.25); background: var(--bg-card-hover); }
.process-num {
  font-family: var(--mono); color: var(--yellow); font-size: 0.85rem;
  letter-spacing: 0.1em; display: block; margin-bottom: 1rem;
}
.process-card h3 { font-size: 1.1rem; margin-bottom: 0.65rem; letter-spacing: 0; }
.process-card p { color: var(--ink-soft); font-size: 0.88rem; }
.process-cta { display: flex; justify-content: center; margin-top: 3rem; }

/* faq */
.faq-list { max-width: 780px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.5rem 0; text-align: left;
  font-family: var(--display); font-size: 1.15rem; font-weight: 600; letter-spacing: 0;
}
.faq-question:hover span:first-child { color: var(--yellow); }
.faq-question span:first-child { transition: color .25s var(--ease-out); }
.faq-icon { position: relative; width: 18px; height: 18px; flex-shrink: 0; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; background: var(--ink);
  transition: transform .35s var(--ease-out), opacity .35s var(--ease-out);
}
.faq-icon::before { top: 50%; left: 0; width: 100%; height: 1.5px; transform: translateY(-50%); }
.faq-icon::after { left: 50%; top: 0; width: 1.5px; height: 100%; transform: translateX(-50%); }
.faq-item.is-open .faq-icon::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease-out); }
.faq-answer p { padding-bottom: 1.6rem; color: var(--ink-soft); font-size: 0.95rem; max-width: 64ch; }

/* cta */
.cta-section { padding: 7rem 0; }
.cta-inner { max-width: 720px; margin-inline: auto; text-align: center; }
.cta-inner .kicker { display: flex; justify-content: center; }
.cta-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.cta-sub { color: var(--ink-soft); margin-bottom: 2.2rem; }
.cta-inner .hero-actions { justify-content: center; }

/* footer */
.footer { border-top: 1px solid var(--line); padding-top: 4rem; background: var(--bg-2); }
.footer-grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr;
  padding-bottom: 3rem;
}
.footer-col h4 {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 1rem; font-weight: 500;
}
.footer-col a { display: block; padding: 0.35rem 0; color: var(--ink-soft); font-size: 0.92rem; transition: color .25s var(--ease-out); }
.footer-col a:hover { color: var(--ink); }
.footer-zone { margin-top: 0.35rem; color: var(--ink-mute); font-size: 0.85rem; }
.footer-brand p { color: var(--ink-mute); font-size: 0.88rem; margin-top: 1rem; max-width: 32ch; }
.footer-bottom { border-top: 1px solid var(--line-soft); padding: 1.75rem 0; }
.footer-bottom-inner {
  display: flex; flex-direction: column; gap: 1.25rem; align-items: center; text-align: center;
}
.footer-bottom-inner p { color: var(--ink-mute); font-size: 0.8rem; }

/* =============================================================
   7. Effects (reveal, tilt, reduced-motion)
   ============================================================= */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.is-visible {
  opacity: 1; transform: translateY(0);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}

[data-tilt] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .scroll-hint span { animation: none; }
}

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .stats { gap: 3rem 4rem; }
}

@media (min-width: 720px) {
  .about-grid { grid-template-columns: 0.85fr 1.15fr; }
  .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); }
}

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-actions .btn-primary { display: inline-flex; }
  .nav-burger { display: none; }
  .services-grid { grid-template-columns: repeat(4, 1fr); }
  .values-grid { grid-template-columns: repeat(4, 1fr); }
  .process-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1280px) {
  .section { padding: 8rem 0; }
}
