/* ══════════════════════════════════════════
   IA-CONSULTORIA · style.css
   Editorial de Precisión · v2
   ══════════════════════════════════════════ */

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #1c1c1c;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }

/* ─── Variables ─── */
:root {
  --c-primary:    #644276;
  --c-primary-dk: #4e3360;
  --c-accent:     #e7b97a;
  --c-accent-dk:  #d4a45f;
  --c-dark:       #0a0a0a;
  --c-body:       #1c1c1c;
  --c-muted:      #72737a;
  --c-light:      #f6f4f9;
  --c-border:     #e5dff0;
  --c-white:      #ffffff;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --max-w:        1100px;
  --radius:       2px;
  --ease:         220ms cubic-bezier(.4,0,.2,1);
}

/* ─── Layout ─── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}
.section        { padding: 6rem 0; }
.section--light { background: var(--c-light); }
.section--dark  { background: var(--c-primary); color: #fff; }

.section__header { margin-bottom: 3.5rem; }
.section__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 800;
  color: var(--c-dark);
  letter-spacing: -.04em;
  line-height: 1.05;
  margin-bottom: .65rem;
}
.section__sub {
  font-size: 1.05rem;
  color: var(--c-muted);
  max-width: 520px;
  font-weight: 300;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 2rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: .55rem 1.4rem; font-size: .75rem; }

.btn--primary     { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn--primary:hover { background: var(--c-primary-dk); border-color: var(--c-primary-dk); }

.btn--accent      { background: var(--c-accent); color: var(--c-dark); border-color: var(--c-accent); }
.btn--accent:hover { background: var(--c-accent-dk); border-color: var(--c-accent-dk); }

.btn--outline     { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn--outline:hover { background: rgba(255,255,255,.08); border-color: #fff; }

.btn--outline-dark { background: transparent; color: var(--c-dark); border-color: var(--c-dark); }
.btn--outline-dark:hover { background: var(--c-dark); color: #fff; }

.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--outline-light:hover { background: rgba(255,255,255,.1); border-color: #fff; }

.btn--ghost { background: transparent; color: rgba(255,255,255,.65); border-color: rgba(255,255,255,.25); }
.btn--ghost:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ─── Text link ─── */
.text-link { color: var(--c-primary); text-decoration: underline; text-underline-offset: 4px; }
.text-link:hover { color: var(--c-primary-dk); }

/* ─── Label pill ─── */
.label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 2rem;
}

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .75rem;
  border-radius: var(--radius);
}
.badge--active { background: rgba(100,66,118,.1);  color: var(--c-primary); }
.badge--free   { background: rgba(231,185,122,.2);  color: #7a5515; }
.badge--wip    { background: #eeebf4; color: #9e97b0; }

/* ─── Header ─── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* ─── Logo ─── */
.logo { display: flex; align-items: center; }
.logo__img { height: 42px; width: auto; }
.logo__text {
  display: none;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-body);
  letter-spacing: -.04em;
}
.logo__dot { color: var(--c-accent); }

/* ─── Nav ─── */
.nav { display: flex; align-items: center; gap: 2.5rem; }
.nav__link {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-muted);
  transition: color var(--ease);
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0; right: 0;
  height: 1.5px;
  background: var(--c-accent);
  transform: scaleX(0);
  transition: transform var(--ease);
  transform-origin: left;
}
.nav__link:hover { color: var(--c-dark); }
.nav__link:hover::after { transform: scaleX(1); }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--c-dark);
  transition: var(--ease);
}

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 92vh;
  background: var(--c-dark);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 5rem 0;
}

/* Dot grid texture */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(231,185,122,.12) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

/* Gold line animation at bottom */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--c-accent);
  animation: drawLine 1.8s cubic-bezier(.4,0,.2,1) forwards;
  animation-delay: .6s;
}
@keyframes drawLine { to { width: 100%; } }

.hero__inner { position: relative; z-index: 1; }

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.75rem, 9vw, 7.5rem);
  font-weight: 700;
  color: #fff;
  line-height: .98;
  letter-spacing: -.025em;
  margin-bottom: 2.5rem;
  animation: fadeUp .8s cubic-bezier(.4,0,.2,1) both;
  animation-delay: .1s;
}
.hero__accent { color: var(--c-accent); }

.hero__desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,.55);
  max-width: 500px;
  line-height: 1.75;
  margin-bottom: 3rem;
  font-weight: 300;
  animation: fadeUp .8s cubic-bezier(.4,0,.2,1) both;
  animation-delay: .25s;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp .8s cubic-bezier(.4,0,.2,1) both;
  animation-delay: .4s;
}
.label {
  animation: fadeUp .8s cubic-bezier(.4,0,.2,1) both;
  animation-delay: 0s;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── About ─── */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}
.about__text p {
  font-size: 1.05rem;
  color: #383838;
  margin-bottom: 1.25rem;
  line-height: 1.8;
  font-weight: 400;
}
.about__text p:last-child { margin-bottom: 0; }

.pillars { display: flex; flex-direction: column; }
.pillar {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--c-border);
}
.pillar:first-child { border-top: 1px solid var(--c-border); }
.pillar h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-dark);
  letter-spacing: -.01em;
  margin-bottom: .45rem;
  display: flex;
  align-items: center;
  gap: .65rem;
}
.pillar h3::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--c-accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.pillar p { font-size: .95rem; color: var(--c-muted); line-height: 1.7; font-weight: 300; }

/* ─── Projects ─── */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-top: 3px solid transparent;
  border-radius: var(--radius);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  transition: box-shadow var(--ease), border-top-color var(--ease), transform var(--ease);
}
.card:hover {
  box-shadow: 0 12px 40px rgba(100,66,118,.1);
  border-top-color: var(--c-primary);
  transform: translateY(-3px);
}
.card--featured {
  border-top-color: var(--c-accent);
}
.card--featured:hover {
  border-top-color: var(--c-accent-dk);
}
.card--wip {
  opacity: .55;
  pointer-events: none;
}

.card__meta { margin-bottom: .15rem; }
.card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-dark);
  letter-spacing: -.02em;
}
.card__desc { font-size: .9rem; color: var(--c-muted); line-height: 1.7; flex: 1; font-weight: 300; }
.card__link {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--c-primary);
  transition: color var(--ease), letter-spacing var(--ease);
  align-self: flex-start;
  text-transform: uppercase;
}
.card__link:hover { color: var(--c-primary-dk); letter-spacing: .08em; }

/* ─── Collaborate ─── */
.collab__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 4rem;
  align-items: center;
}
.collab__block { display: flex; flex-direction: column; gap: 1.5rem; }
.collab__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.collab__block p { color: rgba(255,255,255,.65); font-size: .95rem; line-height: 1.75; font-weight: 300; }
.collab__sep {
  width: 1px;
  height: 150px;
  background: rgba(255,255,255,.12);
}

/* ─── Footer ─── */
.footer {
  background: #080808;
  color: rgba(255,255,255,.45);
  padding-top: 5rem;
}
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.footer__brand { display: flex; flex-direction: column; gap: .75rem; }
.footer__name {
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #fff;
}
.footer__brand p, .footer__brand address {
  font-size: .82rem;
  line-height: 1.75;
  font-weight: 300;
}
.footer__email {
  font-size: .85rem;
  color: var(--c-accent);
  transition: opacity var(--ease);
  font-family: var(--font-display);
  font-weight: 600;
}
.footer__email:hover { opacity: .7; }

.footer__nav { display: flex; flex-direction: column; gap: .7rem; padding-top: .2rem; }
.footer__nav a {
  font-size: .82rem;
  color: rgba(255,255,255,.38);
  transition: color var(--ease);
}
.footer__nav a:hover { color: #fff; }

.footer__bottom { padding: 1.5rem 0; }
.footer__bottom p {
  font-size: .7rem;
  color: rgba(255,255,255,.2);
  text-align: center;
  letter-spacing: .04em;
}

/* ─── Cookie Banner ─── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #111;
  border-top: 2px solid var(--c-accent);
  padding: 1.1rem 2rem;
  transform: translateY(110%);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cookie-banner p {
  font-size: .82rem;
  color: rgba(255,255,255,.65);
  flex: 1;
  min-width: 240px;
  line-height: 1.6;
  font-weight: 300;
}
.cookie-banner a { color: var(--c-accent); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: .75rem; flex-shrink: 0; }

/* ─── Legal pages ─── */
.legal { padding: 4.5rem 0 7rem; }
.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--c-dark);
  letter-spacing: -.04em;
  margin-bottom: .5rem;
}
.legal .updated {
  font-size: .8rem;
  color: var(--c-muted);
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--c-border);
  font-weight: 300;
}
.legal h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-dark);
  margin: 3rem 0 .85rem;
  letter-spacing: -.02em;
}
.legal p, .legal li {
  font-size: .97rem;
  color: #383838;
  line-height: 1.8;
  margin-bottom: .85rem;
  font-weight: 300;
}
.legal ul { padding-left: 1.5rem; margin-bottom: .85rem; }
.legal li { margin-bottom: .5rem; }
.legal strong { color: var(--c-dark); font-weight: 600; }
.legal a { color: var(--c-primary); text-decoration: underline; }
.legal code {
  font-family: 'Courier New', monospace;
  font-size: .85rem;
  background: var(--c-light);
  padding: .15rem .45rem;
  border-radius: 2px;
  color: var(--c-primary);
}

/* ─── Responsive ─── */
@media (max-width: 960px) {
  .about__grid    { grid-template-columns: 1fr; gap: 3.5rem; }
  .projects__grid { grid-template-columns: repeat(2, 1fr); }
  .collab__grid   { grid-template-columns: 1fr; gap: 3rem; }
  .collab__sep    { width: 60px; height: 1px; }
  .footer__inner  { grid-template-columns: 1fr 1fr; }
  .footer__brand  { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .header__inner { position: relative; }
  .nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: #fff;
    padding: 2rem;
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 12px 40px rgba(0,0,0,.1);
  }
  .nav--open   { display: flex; }
  .nav__toggle { display: flex; }
  .projects__grid { grid-template-columns: 1fr; }
  .hero        { min-height: 80vh; padding: 4rem 0 5rem; }
  .hero__title { letter-spacing: -.04em; }
  .section     { padding: 4rem 0; }
  .footer__inner { grid-template-columns: 1fr; }
  .collab__grid  { gap: 2.5rem; }
}
