/* ============================================================
   Volcabyte — Design tokens
   Basalto (isla) + lava (marca) + circuito (tecnología)
   ============================================================ */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-grotesque-variable.woff2") format("woff2-variations");
  font-weight: 500 700;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-variable.woff2") format("woff2-variations");
  font-weight: 400 600;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --basalt: #0d0a08;
  --basalt-raised: #18130f;
  --basalt-raised-2: #221b15;
  --rock: #332a22;
  --rock-soft: #241d17;
  --pumice: #a89c8e;
  --pumice-dim: #8f8276;
  --foam: #f7f3ec;

  --lava: #e2683c;
  --lava-dim: #a5471f;
  --ember: #ff9a5c;
  --atlantic: #4c8f87;
  --atlantic-dim: #2f5a55;

  --focus: #ffb787;

  --font-display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --content-width: 1120px;
  --edge: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--basalt);
  background-image: radial-gradient(ellipse 900px 600px at 15% -10%, rgba(226, 104, 60, 0.10), transparent 60%);
  color: var(--foam);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

::selection {
  background: var(--lava);
  color: var(--basalt);
}

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

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

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

p {
  margin: 0;
}

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

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 10, 8, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rock-soft);
}

nav.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--edge);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: cover;
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--foam);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a:not(.btn) {
  text-decoration: none;
  color: var(--pumice);
  font-size: 0.94rem;
  transition: color 0.15s ease;
}

.nav-links a:not(.btn):hover {
  color: var(--foam);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rock);
  border-radius: 8px;
  color: var(--foam);
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.96rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ember), var(--lava));
  color: #200e05;
}

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

.btn-ghost {
  border-color: var(--rock);
  color: var(--foam);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--pumice-dim);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 64px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.hero-copy {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  max-width: 15ch;
}

.hero .lede {
  margin-top: 22px;
  color: var(--pumice);
  font-size: 1.12rem;
  max-width: 46ch;
  line-height: 1.65;
}

.hero .cta-row {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-proof {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--rock-soft);
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.proof-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proof-number {
  font-family: var(--font-mono);
  color: var(--lava);
  font-size: 1.3rem;
  font-weight: 600;
}

.proof-label {
  color: var(--pumice-dim);
  font-size: 0.85rem;
}

.hero-art {
  position: relative;
  opacity: 0;
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.28s forwards;
}

.hero-art svg {
  width: 100%;
  height: auto;
}

/* ---------- Section scaffolding ---------- */
section {
  padding: 84px 0;
  border-top: 1px solid var(--rock-soft);
}

.section-head {
  max-width: 54ch;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.section-head p {
  margin-top: 12px;
  color: var(--pumice);
  font-size: 1.05rem;
}

.section-index {
  font-family: var(--font-mono);
  color: var(--lava);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 10px;
}

/* ---------- Servicios (listado editorial, no cards) ---------- */
.service-clusters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0 48px;
}

.service-cluster {
  padding: 28px 0;
  border-top: 1px solid var(--rock-soft);
}

.service-clusters .service-cluster:nth-child(-n+1) {
  border-top: none;
}

.service-cluster h3 {
  font-size: 1.05rem;
  color: var(--ember);
  margin-bottom: 16px;
}

.service-row {
  padding: 14px 0;
  border-top: 1px solid var(--rock-soft);
}

.service-row:first-of-type {
  border-top: none;
}

.service-row h4 {
  margin: 0 0 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--foam);
}

.service-row p {
  color: var(--pumice);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ---------- Proceso: senda de ascenso ---------- */
.ascent {
  position: relative;
  padding-left: 36px;
}

.ascent::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--lava), var(--atlantic));
  opacity: 0.55;
}

.ascent-step {
  position: relative;
  padding-bottom: 40px;
}

.ascent-step:last-child {
  padding-bottom: 0;
}

.ascent-step::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--basalt);
  border: 2px solid var(--lava);
}

.ascent-step h3 {
  font-size: 1.08rem;
}

.ascent-step p {
  margin-top: 6px;
  color: var(--pumice);
  font-size: 0.96rem;
  max-width: 52ch;
}

/* ---------- Casos ---------- */
.case-list {
  display: flex;
  flex-direction: column;
}

.case-row {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--rock-soft);
}

.case-row:first-child {
  border-top: none;
}

.case-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.case-sector {
  display: block;
  margin-top: 6px;
  color: var(--pumice-dim);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.case-row p.finding {
  color: var(--pumice);
  font-size: 0.98rem;
  line-height: 1.6;
}

.case-disclaimer {
  margin-top: 28px;
  color: var(--pumice-dim);
  font-size: 0.84rem;
  max-width: 68ch;
}

/* ---------- Identidad ---------- */
.identity {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
}

.identity-quote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.35;
  color: var(--foam);
}

.identity-body p + p {
  margin-top: 16px;
}

.identity-body p {
  color: var(--pumice);
  font-size: 1rem;
  line-height: 1.7;
}

/* ---------- Portfolio demos ---------- */
.demo-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.demo-card {
  border: 1px solid var(--rock-soft);
  border-radius: 10px;
  padding: 22px;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.demo-card:hover {
  border-color: var(--lava-dim);
  background: var(--basalt-raised);
}

.demo-card .demo-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--atlantic);
}

.demo-card h4 {
  margin: 10px 0 6px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--foam);
}

.demo-card p {
  color: var(--pumice);
  font-size: 0.9rem;
}

.demo-card .demo-visit {
  display: block;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--lava);
}

/* ---------- Contacto ---------- */
.contact-panel {
  background: var(--basalt-raised);
  border: 1px solid var(--rock-soft);
  border-radius: 14px;
  padding: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 32px;
  align-items: center;
}

.contact-panel h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.contact-panel p {
  margin-top: 12px;
  color: var(--pumice);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-actions .btn {
  justify-content: center;
}

.contact-meta {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--pumice-dim);
}

footer {
  padding: 32px 0;
  border-top: 1px solid var(--rock-soft);
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--pumice-dim);
  font-size: 0.85rem;
}

footer a {
  text-decoration: none;
  color: var(--pumice-dim);
}

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

footer a:hover {
  color: var(--foam);
}

footer a:hover {
  color: var(--foam);
}

/* ---------- Legal pages (prose) ---------- */
.legal-page {
  padding: 56px 0 96px;
}

.legal-page .wrap {
  max-width: 760px;
}

.legal-page h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  margin-bottom: 6px;
}

.legal-updated {
  color: var(--pumice-dim);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--foam);
  margin-top: 40px;
  margin-bottom: 12px;
  border-left: 3px solid var(--lava);
  padding-left: 12px;
}

.legal-page p {
  color: var(--pumice);
  font-size: 0.98rem;
  line-height: 1.75;
  margin: 0 0 16px;
}

.legal-page ul {
  color: var(--pumice);
  font-size: 0.98rem;
  line-height: 1.75;
  margin: 0 0 16px;
  padding-left: 20px;
}

.legal-page li {
  margin-bottom: 6px;
}

.legal-page strong {
  color: var(--foam);
  font-weight: 600;
}

.legal-page a {
  color: var(--ember);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-nav {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--rock-soft);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
    max-width: 320px;
    margin: 0 auto;
  }

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

  .contact-panel {
    grid-template-columns: 1fr;
    padding: 36px 24px;
  }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--basalt);
    flex-direction: column;
    align-items: flex-start;
    padding: 28px var(--edge);
    gap: 22px;
    display: none;
    overflow-y: auto;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .case-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  section {
    padding: 56px 0;
  }
}
