/* =========================================================
   TOKENS — TEMA OSCURO (por defecto) Y CLARO
   Los colores de acento (--accent, --accent-2, --gradient-brand)
   se usan ÚNICAMENTE en botones. Todo lo demás usa --bg / --text
   y sus variaciones neutras (grises).
   ========================================================= */
:root,
[data-theme="dark"] {
  --bg: #0B0B0D;
  --bg-alt: #131316;
  --surface: #18181C;
  --surface-hover: #1F1F24;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text: #FFFFFF;
  --muted: rgba(255, 255, 255, 0.62);
  --inverse: #0B0B0D;

  --accent: #6C63FF;
  --accent-2: #35D6C0;
  --gradient-brand: linear-gradient(135deg, #6C63FF 0%, #35D6C0 100%);
}

[data-theme="light"] {
  --bg: #FFFFFF;
  --bg-alt: #F4F4F5;
  --surface: #FFFFFF;
  --surface-hover: #F2F2F3;
  --border: rgba(0, 0, 0, 0.10);
  --border-strong: rgba(0, 0, 0, 0.20);
  --text: #0B0B0D;
  --muted: rgba(0, 0, 0, 0.62);
  --inverse: #FFFFFF;

  --accent: #6C63FF;
  --accent-2: #1FA694;
  --gradient-brand: linear-gradient(135deg, #6C63FF 0%, #1FA694 100%);
}

:root {
  --font-display: "Sora", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --container-w: 1140px;
  --radius: 12px;
  --radius-sm: 8px;
}

/* =========================================================
   RESET / BASE
   ========================================================= */
* {
  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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.2s ease, color 0.2s ease;
}

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

p {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}

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

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

/* Frase destacada del hero: mismo color que el resto del título */
.text-gradient {
  color: var(--text);
}

/* Barra de progreso de lectura (usa color de acento, es un indicador de acción) */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient-brand);
  z-index: 100;
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   BUTTONS (únicos elementos con color de marca)
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

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

.btn-primary {
  background: var(--gradient-brand);
  color: #0B0B0D;
}
.btn-primary:hover {
  box-shadow: 0 14px 30px -12px rgba(108, 99, 255, 0.55);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-outline {
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.site-header.is-scrolled {
  border-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-right: auto;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--text);
  color: var(--inverse);
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav a:not(.nav-cta) {
  position: relative;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
  padding-bottom: 4px;
}

.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--text);
  transition: width 0.2s ease;
}

.nav a:not(.nav-cta):hover {
  color: var(--text);
}

.nav a:not(.nav-cta):hover::after {
  width: 100%;
}

.nav-cta {
  color: #0B0B0D !important;
  background: var(--gradient-brand);
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -10px rgba(108, 99, 255, 0.6);
}

/* Botón de cambio de tema */
.theme-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover {
  background: var(--surface-hover);
}

.theme-toggle svg {
  position: absolute;
}

.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* =========================================================
   HERO
   ========================================================= */
.hero-section {
  position: relative;
}

.hero {
  position: relative;
  padding: 108px 24px 100px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
}

.hero-copy {
  max-width: 560px;
}

.hero-kicker {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.5rem);
  margin-bottom: 22px;
}

.hero-text {
  font-size: 1.05rem;
  margin-bottom: 34px;
}

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

/* --- Mockups apilados --- */
.hero-visual {
  display: flex;
  justify-content: center;
}

.mock-stack {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 380px;
}

.browser-mock {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.browser-mock--desktop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: rotate(-2deg);
}

.browser-mock--mobile {
  position: absolute;
  bottom: -10px;
  right: 0;
  width: 150px;
  transform: rotate(3deg);
  z-index: 2;
}

.browser-bar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.browser-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.browser-body {
  padding: 26px 24px 30px;
}

.browser-body--mobile {
  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mock-line {
  border-radius: 4px;
  background: var(--text);
}

.mock-line--title {
  width: 68%;
  height: 14px;
  opacity: 0.9;
  margin-bottom: 12px;
}

.mock-line--sub {
  width: 46%;
  height: 8px;
  opacity: 0.3;
  margin-bottom: 28px;
}

.mock-grid {
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
}

.mock-box {
  flex: 1;
  height: 58px;
  border-radius: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.mock-box--accent {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.mock-btn {
  width: 96px;
  height: 26px;
  border-radius: 20px;
  background: var(--gradient-brand);
}

/* =========================================================
   SECTIONS (shared)
   ========================================================= */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 620px;
  margin-bottom: 56px;
}

.section-head h2 {
  position: relative;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  padding-top: 22px;
}

.section-head h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: var(--text);
  opacity: 0.4;
}

.section-lead {
  margin-top: 14px;
  font-size: 1.02rem;
}

/* =========================================================
   FEATURES (Sobre mí)
   ========================================================= */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.92rem;
}

/* =========================================================
   SERVICIOS / PLANS
   ========================================================= */
.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 34px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.plan:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.plan-featured {
  border: 2px solid var(--text);
}

.plan-badge {
  position: absolute;
  top: -13px;
  left: 34px;
  background: var(--text);
  color: var(--inverse);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
}

.plan-name {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.plan-desc {
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.plan-price {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
}

.plan-price span {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.plan-features {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 34px;
}

.plan-features li {
  position: relative;
  padding-left: 24px;
  font-size: 0.93rem;
  color: var(--text);
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0.5;
}

.plan .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* =========================================================
   PROCESO
   ========================================================= */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.process-step {
  padding-top: 8px;
}

.process-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  opacity: 0.35;
  margin-bottom: 14px;
}

.process-step h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.process-step p {
  font-size: 0.92rem;
}

/* =========================================================
   PORTFOLIO GRID
   ========================================================= */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.work-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: var(--bg-alt);
  color: var(--text);
}

.work-thumb svg {
  width: 100%;
  height: 100%;
}

.work-info {
  padding: 22px 24px 26px;
}

.work-info h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.work-tag {
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  transition: color 0.15s ease;
}

.work-link span {
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

.work-link svg {
  transition: transform 0.18s ease;
}

.work-link:hover {
  color: var(--accent-2);
}

.work-link:hover span {
  border-color: var(--accent-2);
}

.work-link:hover svg {
  transform: translate(2px, -2px);
}

/* =========================================================
   CTA BANNER
   ========================================================= */
.cta-banner-inner {
  text-align: left;
  max-width: 640px;
}

.cta-banner h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 14px;
}

.cta-banner p {
  font-size: 1.05rem;
  margin-bottom: 30px;
}

/* =========================================================
   CONTACTO
   ========================================================= */
.contact-inner {
  max-width: 640px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 28px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  font-weight: 600;
  color: var(--text);
  transition: color 0.15s ease, gap 0.15s ease;
}

.contact-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.contact-row svg {
  color: var(--text);
  opacity: 0.6;
  flex-shrink: 0;
}

.contact-row:hover {
  color: var(--accent);
  gap: 18px;
}

.contact-row:hover svg {
  color: var(--accent);
  opacity: 1;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 26px 24px;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-top {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-top:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .process {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 72px;
  }
  .hero-copy {
    max-width: none;
  }
  .hero-visual {
    order: -1;
    margin-bottom: 12px;
  }
  .mock-stack {
    max-width: 340px;
    height: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 800px) {
  .plans {
    grid-template-columns: 1fr;
  }
  .work-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    display: none;
  }

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

  .nav a:not(.nav-cta) {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-cta {
    margin-top: 14px;
    text-align: center;
    width: 100%;
  }

  .features {
    grid-template-columns: 1fr;
  }
  .process {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   MODAL: elegir red social
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.modal-overlay.is-open .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease;
}

.modal-close:hover {
  background: var(--surface-hover);
}

.modal h3 {
  font-size: 1.2rem;
  padding-right: 24px;
  margin-bottom: 8px;
}

.modal-plan-text {
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.modal-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.modal-option:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.modal-option svg {
  flex-shrink: 0;
}

.modal-option span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-option strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.modal-option small {
  font-size: 0.8rem;
  color: var(--muted);
}