/* FraguaSoft (fraguasoft.com). Sistema de Fragua Consultoría (Bricolage
   Grotesque, Hanken Grotesk, JetBrains Mono, casi negro con brasa). Cada
   producto trae su luz: FraguaGym la brasa naranja, Anima el azul. */

:root {
  --bg: #0a0908;
  --bg-2: #100e0c;
  --card: #141210;
  --border: #2a2521;
  --border-strong: #3a332c;
  --fg: #ece7e1;
  --fg-muted: #a8a099;
  --fg-dim: #746b64;
  --ember: #ff6a1a;
  --ember-bright: #ff8a3d;
  --ember-deep: #c2410c;
  --ember-glow: rgba(255, 106, 26, 0.45);
  --gym-bg: #120904;
  --anima-bg: #0e1238;
  --anima-blue: #455cff;
  --anima-soft: #8aa8f5;
  --anima-ink: #e9ebff;
  --radius: 4px;
  --maxw: 1180px;
  --font-display: 'Bricolage Grotesque', Georgia, serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-serif: 'EB Garamond', Garamond, Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ember-bright); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; position: relative; z-index: 2; }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 200; background: var(--ember); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; }
.tag { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ember); margin-bottom: 1.2rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 48px; padding: 0.85rem 1.5rem; border-radius: var(--radius); font-weight: 700; font-size: 1rem; text-decoration: none; border: 1px solid transparent; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s; }
.btn-sm { min-height: 40px; padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn-primary { background: linear-gradient(135deg, var(--ember) 0%, var(--ember-deep) 100%); color: #fff; box-shadow: 0 8px 24px -8px var(--ember-glow), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -10px var(--ember-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-anima { background: var(--anima-blue); color: #fff; box-shadow: 0 8px 26px -8px rgba(69, 92, 255, 0.7); }
.btn-anima:hover { transform: translateY(-2px); background: #5a6eff; }

/* ── Encabezado (el de fraguaconsultoria.com) ── */
#site-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 50; border-bottom: 1px solid transparent; transition: background 0.4s var(--ease), border-color 0.4s; }
#site-header.scrolled { background: rgba(10, 9, 8, 0.84); backdrop-filter: blur(14px) saturate(120%); -webkit-backdrop-filter: blur(14px) saturate(120%); border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.85rem; padding-bottom: 0.85rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--fg); }
.brand-mark { width: 46px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: 0.02em; text-transform: uppercase; }
.brand-sub { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ember); margin-top: 3px; }
.main-nav { display: flex; gap: 2rem; }
.main-nav a { position: relative; color: var(--fg-muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color 0.25s; }
.main-nav a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 1.5px; background: var(--ember); transition: width 0.3s var(--ease); }
.main-nav a:hover { color: var(--fg); }
.main-nav a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 1.1rem; }
.lang-switch { display: flex; align-items: center; gap: 0.35rem; font-family: var(--font-mono); font-size: 0.82rem; }
.lang-btn { color: var(--fg-dim); text-decoration: none; padding: 0.4rem 0.2rem; letter-spacing: 0.05em; transition: color 0.2s; }
.lang-btn.is-active { color: var(--ember); font-weight: 700; }
.lang-btn:hover { color: var(--fg); }
.lang-sep { color: var(--fg-dim); }
.menu-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; background: none; border: none; cursor: pointer; padding: 10px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--fg); transition: transform 0.3s var(--ease), opacity 0.3s; }
.menu-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav[hidden] { display: none; }
.mobile-nav { display: flex; flex-direction: column; background: rgba(10, 9, 8, 0.97); backdrop-filter: blur(14px); border-top: 1px solid var(--border); padding: 0.4rem 1.25rem 1.25rem; }
.mobile-nav a { color: var(--fg); text-decoration: none; padding: 0.85rem 0; border-bottom: 1px solid var(--border); font-size: 1.05rem; }

/* ── Teléfonos: capturas completas, sin recortar ── */
.phone {
  aspect-ratio: 780 / 1688; padding: 7px; border-radius: 38px;
  background: linear-gradient(155deg, #3a3029 0%, #120f0c 50%, #2a221c 100%); border: 1px solid #4a3f37;
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 31px; }

/* ── Portada: dos luces, una por producto ── */
.hero { position: relative; padding: 8rem 0 4.5rem; overflow: hidden; }
.hero-light { position: absolute; z-index: 0; width: 760px; height: 760px; max-width: 120vw; border-radius: 50%; filter: blur(30px); pointer-events: none; }
.light-ember { right: 14%; top: 4%; background: radial-gradient(circle, rgba(255, 106, 26, 0.3) 0%, transparent 62%); }
.light-blue { right: -12%; top: 22%; background: radial-gradient(circle, rgba(69, 92, 255, 0.32) 0%, transparent 62%); }
.hero-grid { display: grid; gap: 3.5rem; align-items: center; }
.hero h1 { font-size: clamp(2.9rem, 10vw, 5.6rem); margin-bottom: 1.5rem; }
.lead { color: var(--fg-muted); font-size: 1.15rem; max-width: 33rem; margin-bottom: 2.25rem; }
.hero-index { list-style: none; display: grid; gap: 0.75rem; max-width: 30rem; }
.hero-index a {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.75rem 1rem; min-height: 64px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: rgba(20, 18, 16, 0.72); color: var(--fg); text-decoration: none;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.hero-index a::after { content: '→'; margin-left: auto; color: var(--fg-dim); transition: transform 0.25s var(--ease), color 0.25s; }
.hero-index a:hover { transform: translateX(4px); }
.hero-index li:first-child a:hover { border-color: var(--ember); }
.hero-index li:last-child a:hover { border-color: var(--anima-blue); }
.hero-index a:hover::after { color: var(--fg); transform: translateX(3px); }
.hero-index img { width: 40px; height: 40px; border-radius: 10px; }
.hero-index strong { display: block; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.2; }
.hero-index small { display: block; color: var(--fg-muted); font-size: 0.88rem; }
.hero-stage { position: relative; height: 440px; width: min(100%, 420px); justify-self: center; }
.hero-stage .phone { position: absolute; width: 196px; }
.phone-gym { left: 0; top: 0; transform: rotate(-5deg); z-index: 2; box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.95), 0 0 60px -10px rgba(255, 106, 26, 0.35); }
.phone-anima { right: 0; top: 46px; transform: rotate(5deg); background: linear-gradient(155deg, #3b4396 0%, #0f1236 50%, #283070 100%); border-color: #4a55b8; box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.95), 0 0 60px -10px rgba(69, 92, 255, 0.45); }

/* ── Productos: cada uno en su color, a todo el ancho ── */
.product { position: relative; padding: 5.5rem 0; overflow: hidden; border-top: 1px solid var(--border); }
.product-gym { background: radial-gradient(900px 600px at 80% 40%, rgba(255, 106, 26, 0.18), transparent 70%), var(--gym-bg); }
.product-anima { background: radial-gradient(900px 600px at 20% 40%, rgba(100, 130, 255, 0.28), transparent 70%), var(--anima-bg); border-top-color: #232a6e; }
.product-grid { display: grid; gap: 3.5rem; align-items: center; }
.product-kind { display: flex; align-items: center; gap: 0.7rem; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 1.25rem; }
.product-kind img { width: 32px; height: 32px; border-radius: 8px; }
.product-anima .product-kind { color: var(--anima-soft); }
.product h2 { font-size: clamp(3rem, 11vw, 5.4rem); margin-bottom: 1.25rem; }
.product h2.serif { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.01em; color: var(--anima-ink); }
.product-lead { color: var(--fg-muted); font-size: 1.12rem; max-width: 34rem; }
.product-anima .product-lead { color: #c3c8ef; }
.facts { display: grid; margin: 2rem 0 2.25rem; max-width: 34rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.facts dt { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-dim); padding-top: 0.2rem; }
.product-anima .facts dt { color: #7f88c9; }
.facts dd { font-weight: 600; }
.product-media { display: flex; justify-content: center; align-items: flex-start; gap: 1.25rem; }
.product-media .phone { width: 46%; max-width: 270px; }
.product-anima .product-media .phone { width: 62%; max-width: 290px; background: linear-gradient(155deg, #3b4396 0%, #0f1236 50%, #283070 100%); border-color: #4a55b8; }
.phone-low { margin-top: 3rem; }

/* ── El estudio ── */
.studio { padding: 5.5rem 0; border-top: 1px solid var(--border); background: var(--bg); }
.studio h2 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin-bottom: 2.75rem; }
.principles { display: grid; gap: 2rem; }
.principle { border-top: 2px solid var(--border-strong); padding-top: 1.25rem; position: relative; }
.principle::before { content: ''; position: absolute; top: -2px; left: 0; width: 40px; height: 2px; background: var(--ember); }
.principle h3 { font-size: 1.4rem; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.principle p { color: var(--fg-muted); }

/* ── Cierre ── */
.closing { padding: 4.5rem 0; border-top: 1px solid var(--border); background: radial-gradient(800px 300px at 50% 120%, rgba(255, 106, 26, 0.14), transparent 70%), var(--bg-2); }
.closing-inner { display: grid; gap: 1.75rem; align-items: center; }
.closing h2 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin-bottom: 0.6rem; }
.closing p { color: var(--fg-muted); font-size: 1.08rem; }

/* ── Pie ── */
#site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0 2rem; position: relative; z-index: 2; background: var(--bg); }
.footer-inner { display: grid; gap: 1.5rem; }
#site-footer .brand-mark { width: 40px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.footer-nav a { color: var(--fg-muted); text-decoration: none; font-size: 0.95rem; }
.footer-nav a:hover { color: var(--fg); }
.footer-bottom { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); color: var(--fg-dim); font-size: 0.85rem; font-family: var(--font-mono); }

/* ── Movimiento ── */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }

@media (max-width: 899px) {
  .main-nav, .nav-cta { display: none; }
  .menu-toggle { display: flex; }
}
@media (max-width: 420px) {
  .hero-stage { height: 380px; }
  .hero-stage .phone { width: 168px; padding: 6px; border-radius: 30px; }
  .hero-stage .phone img { border-radius: 25px; }
  .btn { width: 100%; }
}
@media (min-width: 720px) {
  .principles { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .closing-inner { grid-template-columns: 1fr auto; }
  .footer-inner { grid-template-columns: auto 1fr; align-items: center; }
  .footer-nav { justify-content: flex-end; }
}
@media (min-width: 960px) {
  .hero { padding: 9.5rem 0 6rem; min-height: 92vh; display: flex; align-items: center; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
  .hero-stage { height: 560px; width: 460px; }
  .hero-stage .phone { width: 240px; }
  .product { padding: 7.5rem 0; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 5rem; }
  .product-grid.reverse .product-copy { order: 2; }
  .studio { padding: 7rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
