/*
Theme Name: Ignacio Naveira
Theme URI: https://ignacionaveira.com
Author: Ignacio Naveira
Description: Tema a medida, ligero y optimizado para SEO. Sin builders ni dependencias.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: ignacionaveira
*/

/* ==========================================================
   1. Variables y reset
   ========================================================== */
:root {
  --bg: #0b0b12;
  --bg-alt: #12121c;
  --card: #171724;
  --border: #262636;
  --text: #ffffff;
  --text-muted: #b3b3c0;
  --cyan: #13f2f2;
  --violet: #7a5fff;
  --pink: #ff0ac0;
  --grad: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink));
  --radius: 14px;
  --container: 1200px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: 88px; }
.section--alt { background: var(--bg-alt); }
.section__intro { max-width: 720px; margin-inline: auto; text-align: center; margin-bottom: 56px; }
.section__intro p { color: var(--text-muted); }

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
  padding-bottom: 4px;
}

.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 999;
  width: auto; height: auto; clip-path: none;
  background: var(--cyan); color: #000; padding: 10px 16px; border-radius: 8px;
}

/* ==========================================================
   2. Botones
   ========================================================== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.btn--primary { background: var(--grad); color: #000; }
.btn--primary:hover { box-shadow: 0 0 24px rgba(19, 242, 242, .35); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--cyan); }

/* ==========================================================
   3. Cabecera y navegación
   ========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 11, 18, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 68px;
}
.site-logo { font-size: 1.25rem; font-weight: 800; text-decoration: none; }

.site-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  color: var(--text); text-decoration: none; font-weight: 500;
  padding-block: 6px; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a:focus-visible { border-bottom-color: var(--cyan); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; color: var(--text); cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 16px 24px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 12px; }
  .header-cta { display: none; }
}

/* ==========================================================
   4. Hero
   ========================================================== */
.hero {
  position: relative;
  min-height: 82vh;
  display: grid; place-items: center;
  text-align: center;
  overflow: hidden;
  padding-block: 96px;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__content { position: relative; z-index: 1; max-width: 820px; }
.hero__content p { color: var(--text-muted); font-size: 1.15rem; }
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* ==========================================================
   5. Métricas
   ========================================================== */
.stats { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; text-align: center; }
.stat { min-width: 180px; }
.stat__number { font-size: 2.6rem; font-weight: 800; }
.stat__number span { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat__label { color: var(--text-muted); }

/* ==========================================================
   6. Tarjetas (servicios / proyectos)
   ========================================================== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 980px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 16px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--cyan); transform: translateY(-4px); }
.card p { color: var(--text-muted); margin: 0; }
.card__results strong { color: var(--cyan); }
.card__results ul { margin: 8px 0 0; padding-left: 20px; color: var(--text); }
.card__results li { margin-bottom: 6px; }
.card .btn { margin-top: auto; align-self: flex-start; }

/* ==========================================================
   7. Sobre mí / experiencia
   ========================================================== */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }
.about__text p { color: var(--text-muted); }
.about__img img { border-radius: var(--radius); border: 1px solid var(--border); }

.chips { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.chip {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 10px 22px; font-weight: 600;
}
a.chip { color: var(--text); text-decoration: none; }
a.chip:hover { border-color: var(--cyan); }

/* ==========================================================
   8. Contacto
   ========================================================== */
.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

.contact-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
}
.contact-card + .contact-card { margin-top: 24px; }
.contact-card h3 { margin-bottom: 4px; }
.contact-card ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.contact-card li strong { display: block; }
.contact-card li span, .contact-card a { color: var(--text-muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

label { display: block; font-weight: 600; margin-bottom: 6px; }
input, textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  font: inherit;
}
input:focus, textarea:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
.hp-field { position: absolute; left: -9999px; }

.form-notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.form-notice--ok { background: rgba(19,242,242,.12); border: 1px solid var(--cyan); }
.form-notice--error { background: rgba(255,10,192,.12); border: 1px solid var(--pink); }

/* ==========================================================
   9. Pie de página
   ========================================================== */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding-top: 64px; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
@media (max-width: 820px) { .footer-cols { grid-template-columns: 1fr; } }
.footer-cols h2 { font-size: 1.05rem; }
.footer-cols p { color: var(--text-muted); }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-cols a { color: var(--text-muted); text-decoration: none; }
.footer-cols a:hover { color: var(--cyan); }
.footer-logo { width: 72px; margin-bottom: 16px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: 20px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  color: var(--text-muted); font-size: .9rem;
}
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal a { color: var(--text-muted); }
.footer-social { display: flex; gap: 14px; }
.footer-social a { color: var(--text-muted); display: inline-flex; }
.footer-social a:hover { color: var(--cyan); }
.footer-social svg { width: 22px; height: 22px; fill: currentColor; }
