:root{
  --bg:#080A0F;
  --panel:#11141C;
  --panel2:#171B25;
  --text:#F5F7FB;
  --muted:#A8B0C3;
  --line:rgba(255,255,255,.12);
  --brand:#FFB347;
  --brand2:#6C63FF;
  --accent:#00D4FF;
  --radius:24px;
  --max:1180px;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:
    radial-gradient(circle at 20% 0%,rgba(108,99,255,.22),transparent 32%),
    radial-gradient(circle at 82% 12%,rgba(0,212,255,.14),transparent 26%),
    linear-gradient(180deg,#080A0F,#0B0E15 45%,#080A0F);
  color:var(--text);
  line-height:1.5;
  opacity:0;
  transform:translateY(10px);
  transition:opacity .35s ease, transform .35s ease;
}

body.page-loaded{
  opacity:1;
  transform:translateY(0);
}

body.page-exit{
  opacity:0;
  transform:translateY(-10px);
}

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

.wrap{
  max-width:var(--max);
  margin:auto;
  padding:0 22px;
}

/* NAV */

.nav{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(8,10,15,.82);
  backdrop-filter:blur(18px);
  border-bottom:1px solid var(--line);
}

.nav .inner{
  height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  position:relative;
}

.logo{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:900;
  letter-spacing:-.04em;
  white-space:nowrap;
  transition:opacity .25s ease, transform .25s ease;
}

.logo:hover{
  opacity:.9;
  transform:translateY(-1px);
}

.logo-img{
  width:42px;
  height:42px;
  object-fit:contain;
  display:block;
  border-radius:5px;
  transition:transform .25s ease, filter .25s ease, border-radius .25s ease;
}

.logo:hover .logo-img{
  transform:rotate(-6deg) scale(1.06);
  border-radius:10px;
  filter:drop-shadow(0 8px 18px rgba(255,179,71,.25));
}

.links{
  display:flex;
  align-items:center;
  gap:20px;
  color:var(--muted);
  font-size:14px;
}

.links a{
  position:relative;
}

.links a:hover,
.links a.active{
  color:var(--text);
}

.links a{
  position:relative;
  padding-bottom:14px;
}

.links a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:0;
  height:2px;
  border-radius:999px;
  background:linear-gradient(
    90deg,
    var(--brand) 0%,
    var(--accent) 100%
  );
  transition:width .25s ease;
}

.links a:hover::after{
  width:100%;
}

.links a.active::after{
  width:100%;
}

.links a.active{
  color:#fff;
  font-weight:700;
}
.menu-toggle{
  display:none;
}

/* BOTONES */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 17px;
  border-radius:999px;
  background:var(--text);
  color:#07090E;
  font-weight:800;
  border:1px solid transparent;
  transition:
    background .25s ease,
    color .25s ease,
    border-color .25s ease,
    transform .18s ease,
    box-shadow .25s ease;
}

.btn:hover{
  transform:translateY(-2px);
}

.btn:active{
  transform:translateY(0);
}

.btn.ghost{
  background:rgba(255,255,255,.06);
  color:var(--text);
  border-color:var(--line);
}

.btn.ghost:hover{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.35);
  color:#fff;
  box-shadow:0 10px 28px rgba(0,0,0,.22);
}

.btn.brand,
.nav-cta{
  background:linear-gradient(135deg,var(--brand),var(--accent));
  color:#080A0F;
  border:0;
}

.btn.brand:hover,
.nav-cta:hover{
  background:linear-gradient(135deg,var(--accent),var(--brand));
  color:#080A0F;
  box-shadow:0 16px 42px rgba(0,212,255,.22);
}

/* HERO */

.hero{
  padding:92px 0 54px;
}

.eyebrow{
  display:inline-flex;
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
  background:rgba(255,255,255,.04);
  font-size:13px;
}

h1{
  font-size:clamp(44px,8vw,92px);
  line-height:.92;
  letter-spacing:-.075em;
  margin:22px 0 18px;
  max-width:980px;
}

.grad{
  background:linear-gradient(135deg,#fff,var(--brand) 55%,var(--accent));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.lead{
  font-size:clamp(18px,2.4vw,24px);
  color:#CED4E2;
  max-width:820px;
  margin:0 0 28px;
}

.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

/* SECCIONES */

.stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-top:44px;
}

.stat,
.card{
  background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.03));
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:22px;
  box-shadow:0 20px 60px rgba(0,0,0,.22);
  transition:transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.card:hover,
.stat:hover{
  transform:translateY(-4px);
  border-color:rgba(255,255,255,.22);
  box-shadow:0 26px 70px rgba(0,0,0,.32);
}

.stat strong{
  font-size:28px;
  display:block;
}

.stat span{
  color:var(--muted);
  font-size:13px;
}

section{
  padding:58px 0;
}

.section-title{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:22px;
  margin-bottom:22px;
}

h2{
  font-size:clamp(30px,4vw,48px);
  line-height:1;
  letter-spacing:-.05em;
  margin:0;
}

.muted{
  color:var(--muted);
}

.grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}

.grid.two{
  grid-template-columns:repeat(2,1fr);
}

.card h3{
  margin:0 0 10px;
  font-size:20px;
}

.card p,
.card li{
  color:#C2C8D6;
}

.tagrow{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}

.tag{
  font-size:12px;
  color:#DCE2EF;
  border:1px solid var(--line);
  border-radius:999px;
  padding:6px 9px;
  background:rgba(255,255,255,.04);
}

.timeline{
  display:grid;
  gap:14px;
}

.job{
  display:grid;
  grid-template-columns:240px 1fr;
  gap:20px;
}

.job .date{
  color:var(--brand);
  font-weight:800;
}

ul{
  padding-left:18px;
}

.tools{
  columns:4;
}

.tools li{
  break-inside:avoid;
  margin:0 0 8px;
  color:#D5DBE8;
}

.project{
  position:relative;
  overflow:hidden;
  transition:transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.project:hover{
  transform:translateY(-4px);
  border-color:rgba(255,255,255,.22);
  box-shadow:0 26px 70px rgba(0,0,0,.32);
}

.form{
  display:grid;
  gap:12px;
}

input,
textarea,
select{
  width:100%;
  padding:14px 16px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#0D1018;
  color:var(--text);
  font:inherit;
}

textarea{
  min-height:130px;
}

.footer{
  padding:38px 0;
  border-top:1px solid var(--line);
  color:var(--muted);
}

/* MOBILE */

@media (max-width:820px){

  body{
    overflow-x:hidden;
    background:
      linear-gradient(180deg,#071426 0%,#00314f 55%,#01263b 100%);
  }

  .wrap{
    padding:0 20px;
  }

  .nav .inner{
    height:98px;
    display:grid;
    grid-template-columns:48px 1fr auto;
    grid-template-rows:52px 32px;
    align-items:center;
    gap:0 12px;
  }

  .menu-toggle{
    display:grid;
    place-items:center;
    grid-column:1;
    grid-row:1;
    width:42px;
    height:42px;
    border-radius:8px;
    border:1px solid rgba(255,255,255,.45);
    background:rgba(255,255,255,.04);
    color:#fff;
    font-size:24px;
    cursor:pointer;
  }

  .logo{
    grid-column:1 / 4;
    grid-row:2;
    justify-self:center;
    gap:6px;
    transform:scale(.72);
    transform-origin:center;
  }

  .logo:hover{
    transform:scale(.72);
  }

  .logo-img{
    width:30px;
    height:30px;
  }

  .logo span{
    font-size:12px;
    line-height:1;
  }

  .nav-cta{
    display:inline-flex;
    grid-column:3;
    grid-row:1;
    padding:10px 22px;
    min-height:42px;
    border-radius:999px;
    font-size:15px;
    background:#f4f7fb;
    color:#080A0F;
  }

  .links{
    display:none;
    position:absolute;
    top:98px;
    left:20px;
    right:20px;
    z-index:999;
    padding:14px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:18px;
    background:rgba(5,10,22,.98);
  }

  .links.open{
    display:grid !important;
    gap:8px;
  }

  .links a{
    display:block;
    padding:13px 14px;
    border-radius:12px;
    color:#fff;
    font-weight:700;
    background:rgba(255,255,255,.06);
  }

  .links a::after{
    display:none;
  }

  .hero{
    padding:52px 0 38px;
  }

  .eyebrow{
    max-width:100%;
    padding:12px 14px;
    font-size:14px;
    line-height:1.35;
  }

  h1{
    max-width:340px;
    font-size:46px;
    line-height:.93;
    letter-spacing:-.075em;
  }

  .grad{
    background:linear-gradient(135deg,#FFC96D 0%,#D7CF70 45%,#00D4FF 100%);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
  }

  .lead{
    max-width:340px;
    font-size:17px;
    line-height:1.45;
  }

  .hero-actions{
    max-width:280px;
    gap:10px;
  }

  .stats,
  .grid,
  .grid.two{
    grid-template-columns:1fr;
  }

  .job{
    grid-template-columns:1fr;
  }

  .tools{
    columns:2;
  }

  section{
    padding:44px 0;
  }

  .section-title{
    display:block;
  }
}
.links a.active{
  color:#fff !important;
  font-weight:700 !important;
}

.links a.active::after{
  width:100% !important;
}
/* LINEA FIJA EN SECCIÓN ACTIVA */

.links a.active{
  color:#fff !important;
  font-weight:700 !important;
}

.links a.active::after{
  display:block !important;
  width:100% !important;
  opacity:1 !important;
}

/* ===========================
   TOPBAR MOBILE DEFINITIVO
   =========================== */

@media (max-width:820px){

  .nav .inner{
    display:grid;
    grid-template-columns:52px 1fr auto;
    align-items:center;
    gap:10px;

    height:72px;
    padding:8px 16px;
  }

  .menu-toggle{
    display:grid;
    place-items:center;

    width:42px;
    height:42px;

    margin:0;
    justify-self:start;
  }

  .logo{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    margin:0;
    transform:none;
  }

  .logo:hover{
    transform:none;
  }

  .logo-img{
    width:34px;
    height:34px;
  }

  .logo span{
    font-size:11px;
    white-space:nowrap;
    line-height:1;
  }

  .nav-cta{
    justify-self:end;

    height:36px;
    padding:0 16px;

    font-size:13px;

    background:linear-gradient(135deg,var(--brand),var(--accent));
    color:#080A0F;
  }

  .links{
    top:72px;
  }
}
/* FIX LOGO MOBILE EN UNA SOLA LÍNEA */

@media (max-width:820px){

  .logo{
    grid-column:2 !important;
    grid-row:1 !important;
    align-self:center !important;
    justify-self:center !important;

    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:center !important;

    gap:8px !important;
    margin:0 !important;
    transform:none !important;
  }

  .logo-img{
    width:32px !important;
    height:32px !important;
  }

  .logo span{
    display:inline-block !important;
    margin:0 !important;
    font-size:11px !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }
}
/* AJUSTE HERO MOBILE */

@media (max-width:820px){

  /* Reduce el espacio entre el menú y el contenido */
  .hero{
    padding-top:8px !important;
  }

  /* Badge superior */
  .eyebrow{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;

    max-width:330px !important;
    margin:0 auto 18px auto !important;
    padding:8px 14px !important;

    font-size:10px !important;
    line-height:1.3 !important;
    text-align:center !important;
  }

}
.behance-btn{
    display:inline-flex;
    align-items:center;
    margin-top:28px;
    padding:14px 24px;
    border:1px solid rgba(255,255,255,.15);
    border-radius:999px;
    color:#fff;
    text-decoration:none;
    font-weight:600;
    transition:.3s ease;
}

.behance-btn:hover{
    border-color:#1769FF;
    background:#1769FF;
    transform:translateY(-2px);
}
/* ==========================
   FOOTER
========================== */

.footer{
  padding:32px 20px;
  border-top:1px solid rgba(255,255,255,.08);
  text-align:center;
}

.footer p{
  margin:0 0 12px;
  color:var(--muted);
  font-size:.95rem;
}

.footer strong{
  color:var(--text);
}

.footer-links{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.footer-links a{
  color:var(--muted);
  text-decoration:none;
  transition:.25s;
}

.footer-links a:hover{
  color:var(--brand);
}

.footer-links span{
  color:var(--muted);
}
