/* =========================================================
   Cyber Valtorix - Proyectos
   Design tokens derived from the agency's real brand (shield
   mark: chrome + electric blue) and locked for the whole page.
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root{
  --bg:            #0a0b0d;
  --bg-raised:     #101216;
  --bg-panel:      #14161b;
  --line:          rgba(255,255,255,0.08);
  --line-strong:   rgba(255,255,255,0.14);

  --text-primary:  #eef1f5;
  --text-secondary:#9aa3ad;
  --text-muted:    #656d76;

  --accent:        #3d8bff;
  --accent-soft:   rgba(61,139,255,0.14);
  --accent-line:   rgba(61,139,255,0.35);
  --chrome:        #c7ccd3;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*{ box-sizing:border-box; }
html{ background:var(--bg); }
html,body{ margin:0; padding:0; }

body{
  background:var(--bg);
  color:var(--text-primary);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

::selection{ background:var(--accent); color:#fff; }

img{ max-width:100%; display:block; }

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

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

h1,h2,h3,h4{
  font-family:var(--font-display);
  font-weight:600;
  letter-spacing:-0.01em;
  margin:0;
  color:var(--text-primary);
}

p{ margin:0; }

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

/* ---------- Nav ---------- */
.nav{
  position:sticky;
  top:0;
  z-index:50;
  height:72px;
  display:flex;
  align-items:center;
  background:rgba(10,11,13,0.78);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.nav .wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  width:100%;
}
.nav-brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-family:var(--font-display);
  font-weight:600;
  font-size:15px;
  letter-spacing:0.01em;
  white-space:nowrap;
}
.nav-brand img{ height:28px; width:28px; }
.nav-links{
  display:flex;
  align-items:center;
  gap:28px;
  font-size:14px;
  color:var(--text-secondary);
  white-space:nowrap;
}
.nav-links a{ transition:color .2s var(--ease); }
.nav-links a:hover{ color:var(--text-primary); }
.nav-cta{
  padding:9px 18px;
  border-radius:999px;
  background:var(--accent);
  color:#fff;
  font-size:14px;
  font-weight:600;
  transition:transform .2s var(--ease), background .2s var(--ease);
}
.nav-cta:hover{ background:#5a9dff; transform:translateY(-1px); }
.nav-toggle{ display:none; }

/* ---------- Hero ---------- */
.hero{
  padding:64px 0 96px;
  position:relative;
}
.hero-grid{
  display:grid;
  grid-template-columns:1.05fr 0.95fr;
  gap:56px;
  align-items:center;
}
.hero-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12.5px;
  letter-spacing:0.06em;
  color:var(--accent);
  font-weight:600;
  margin-bottom:20px;
}
.hero-eyebrow .dot{
  width:6px; height:6px; border-radius:999px; background:var(--accent);
  box-shadow:0 0 10px var(--accent);
}
.hero h1{
  font-size:clamp(2.1rem, 4vw, 3.4rem);
  line-height:1.08;
  max-width:15ch;
}
.hero h1 em{
  font-style:italic;
  color:var(--chrome);
}
.hero-sub{
  margin-top:22px;
  max-width:46ch;
  font-size:1.05rem;
  color:var(--text-secondary);
}
.hero-actions{
  margin-top:32px;
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:13px 24px;
  border-radius:999px;
  font-size:14.5px;
  font-weight:600;
  white-space:nowrap;
  transition:transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.btn-primary{ background:var(--accent); color:#fff; }
.btn-primary:hover{ background:#5a9dff; transform:translateY(-1px); }
.btn-ghost{
  background:transparent;
  border:1px solid var(--line-strong);
  color:var(--text-primary);
}
.btn-ghost:hover{ border-color:var(--accent-line); background:var(--accent-soft); }

.hero-visual{
  position:relative;
  border-radius:var(--radius-lg);
  border:1px solid var(--line);
  background:
    radial-gradient(circle at 30% 20%, rgba(61,139,255,0.16), transparent 55%),
    var(--bg-raised);
  padding:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:360px;
  overflow:hidden;
}
.hero-visual::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size:36px 36px;
  -webkit-mask-image:radial-gradient(circle at center, black 30%, transparent 75%);
          mask-image:radial-gradient(circle at center, black 30%, transparent 75%);
}
.hero-visual img{
  position:relative;
  width:min(280px, 60%);
  filter:drop-shadow(0 20px 60px rgba(61,139,255,0.25));
}

/* ---------- Sections shared ---------- */
section{ padding:96px 0; }
.section-head{
  max-width:60ch;
  margin-bottom:48px;
}
.section-head h2{
  font-size:clamp(1.6rem, 2.6vw, 2.2rem);
  line-height:1.2;
}
.section-head p{
  margin-top:14px;
  color:var(--text-secondary);
  font-size:1.02rem;
}
.divider{
  border:0;
  border-top:1px solid var(--line);
  margin:0;
}

/* ---------- Featured project ---------- */
.project{
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  background:var(--bg-panel);
  overflow:hidden;
}
.project-top{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
}
.project-info{
  padding:52px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:20px;
  border-right:1px solid var(--line);
}
.project-tag{
  display:inline-flex;
  align-self:flex-start;
  align-items:center;
  gap:8px;
  padding:6px 12px;
  border-radius:999px;
  background:var(--accent-soft);
  border:1px solid var(--accent-line);
  color:var(--accent);
  font-size:12.5px;
  font-weight:600;
  letter-spacing:0.03em;
}
.project-info h3{
  font-size:clamp(1.5rem, 2.4vw, 2rem);
  line-height:1.18;
}
.project-info .desc{
  color:var(--text-secondary);
  font-size:1rem;
  max-width:48ch;
}
.project-stats{
  display:grid;
  grid-template-columns:repeat(3, auto);
  gap:28px;
  margin-top:6px;
}
.stat b{
  display:block;
  font-family:var(--font-display);
  font-size:1.5rem;
  font-weight:600;
  color:var(--text-primary);
}
.stat span{
  font-size:12.5px;
  color:var(--text-muted);
}
.project-links{
  margin-top:10px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.project-shot{
  position:relative;
  min-height:340px;
  background:#000;
}
.project-shot img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:top left;
  opacity:0.94;
}

.project-gallery{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
}
.project-gallery figure{
  margin:0;
  border-top:1px solid var(--line);
  border-right:1px solid var(--line);
  overflow:hidden;
}
.project-gallery figure:last-child{ border-right:none; }
.project-gallery img{
  width:100%;
  height:220px;
  object-fit:cover;
  object-position:top;
  transition:transform .5s var(--ease);
}
.project-gallery a:hover img{ transform:scale(1.04); }
.project-gallery figcaption{
  padding:14px 18px;
  font-size:13px;
  color:var(--text-secondary);
  border-top:1px solid var(--line);
}

/* ---------- Capabilities bento ---------- */
.bento{
  display:grid;
  grid-template-columns:1.3fr 1fr 1fr;
  grid-template-rows:auto auto;
  gap:1px;
  background:var(--line);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  overflow:hidden;
}
.bento-cell{
  background:var(--bg-panel);
  padding:32px;
  display:flex;
  flex-direction:column;
  gap:12px;
  justify-content:space-between;
  min-height:190px;
}
.bento-cell.wide{ grid-column:span 1; grid-row:span 2; background:linear-gradient(160deg, rgba(61,139,255,0.10), var(--bg-panel) 60%); }
.bento-cell.tint{ background:linear-gradient(160deg, rgba(199,204,211,0.07), var(--bg-panel) 65%); }
.bento-icon{
  width:38px; height:38px;
  border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  background:var(--accent-soft);
  color:var(--accent);
}
.bento-cell h4{ font-size:1.05rem; font-weight:600; }
.bento-cell p{ font-size:0.92rem; color:var(--text-secondary); }
.bento-cell .go{ font-size:13px; color:var(--accent); font-weight:600; }

/* ---------- Process ---------- */
.process{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:0;
  border-top:1px solid var(--line);
}
.process-step{
  padding:28px 24px 28px 0;
  border-right:1px solid var(--line);
}
.process-step:last-child{ border-right:none; }
.process-step .n{
  font-family:var(--font-display);
  color:var(--text-muted);
  font-size:13px;
  margin-bottom:10px;
  display:block;
}
.process-step h4{ font-size:1rem; margin-bottom:8px; }
.process-step p{ font-size:0.9rem; color:var(--text-secondary); }

/* ---------- CTA band ---------- */
.cta-band{
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:64px 56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:32px;
  background:
    radial-gradient(circle at 90% 0%, rgba(61,139,255,0.14), transparent 55%),
    var(--bg-panel);
  flex-wrap:wrap;
}
.cta-band h2{ font-size:clamp(1.5rem, 2.6vw, 2.1rem); max-width:16ch; }
.cta-band p{ margin-top:10px; color:var(--text-secondary); max-width:42ch; }

/* ---------- Footer ---------- */
footer{
  border-top:1px solid var(--line);
  padding:56px 0 40px;
}
.footer-grid{
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr;
  gap:40px;
}
.footer-brand{ display:flex; align-items:center; gap:10px; font-family:var(--font-display); font-weight:600; margin-bottom:14px; }
.footer-brand img{ height:24px; width:24px; }
footer h5{
  font-size:12.5px;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:16px;
  font-weight:600;
}
footer ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
footer a{ color:var(--text-secondary); font-size:14px; transition:color .2s var(--ease); }
footer a:hover{ color:var(--text-primary); }
.footer-bottom{
  margin-top:48px;
  padding-top:24px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  font-size:13px;
  color:var(--text-muted);
}

/* ---------- Reveal on scroll ---------- */
.reveal{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.in{ opacity:1; transform:none; }

@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
  .project-gallery a:hover img{ transform:none; }
}

/* ---------- Case study page ---------- */
.breadcrumb{
  display:flex; align-items:center; gap:8px;
  font-size:13.5px; color:var(--text-muted);
  margin-bottom:28px;
}
.breadcrumb a{ color:var(--text-secondary); }
.breadcrumb a:hover{ color:var(--text-primary); }
.case-hero{ padding:56px 0 64px; }
.case-meta{
  display:flex; gap:32px; flex-wrap:wrap;
  margin-top:28px; padding-top:28px;
  border-top:1px solid var(--line);
}
.case-meta div span{ display:block; font-size:12.5px; color:var(--text-muted); margin-bottom:4px; }
.case-meta div b{ font-size:14.5px; font-weight:600; }

.case-shot{
  border-radius:var(--radius-lg);
  overflow:hidden;
  border:1px solid var(--line);
  margin:64px 0;
}
.case-shot img{ width:100%; display:block; }

.two-col{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:48px;
}
.module-list{
  list-style:none;
  margin:0; padding:0;
  border-top:1px solid var(--line);
}
.module-list li{
  display:flex;
  gap:18px;
  padding:20px 0;
  border-bottom:1px solid var(--line);
}
.module-list .num{
  font-family:var(--font-display);
  color:var(--text-muted);
  font-size:13px;
  min-width:26px;
  padding-top:2px;
}
.module-list h4{ font-size:0.98rem; margin-bottom:4px; }
.module-list p{ font-size:0.88rem; color:var(--text-secondary); }

.quote-block{
  border-left:2px solid var(--accent);
  padding-left:24px;
  margin:0;
}
.quote-block p{ font-size:1.15rem; line-height:1.5; color:var(--text-primary); font-family:var(--font-display); font-weight:500; }
.quote-block cite{ display:block; margin-top:16px; font-style:normal; font-size:13.5px; color:var(--text-muted); }

.tech-pills{ display:flex; flex-wrap:wrap; gap:10px; }
.pill{
  padding:8px 14px;
  border-radius:999px;
  border:1px solid var(--line-strong);
  font-size:13px;
  color:var(--text-secondary);
}

/* ---------- Mobile ---------- */
@media (max-width: 860px){
  .nav-links{ display:none; }
  .hero-grid{ grid-template-columns:1fr; gap:40px; }
  .hero{ padding:40px 0 64px; }
  section{ padding:64px 0; }
  .project-top{ grid-template-columns:1fr; }
  .project-info{ border-right:none; border-bottom:1px solid var(--line); padding:36px 24px; }
  .project-shot{ min-height:240px; }
  .project-gallery{ grid-template-columns:1fr; }
  .project-gallery figure{ border-right:none; }
  .bento{ grid-template-columns:1fr; }
  .bento-cell.wide{ grid-row:auto; }
  .process{ grid-template-columns:1fr; }
  .process-step{ border-right:none; border-bottom:1px solid var(--line); padding:24px 0; }
  .cta-band{ padding:40px 24px; flex-direction:column; align-items:flex-start; }
  .footer-grid{ grid-template-columns:1fr; gap:32px; }
  .two-col{ grid-template-columns:1fr; gap:32px; }
  .project-stats{ grid-template-columns:repeat(3, auto); gap:18px; }
}
