/* ============================================
   INFORMÁTICA CÁNDIDO
   Editorial técnica cercana
   ============================================ */

/* ----- Imports & Reset ----- */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300..700;1,6..72,300..700&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Variables ----- */
:root {
  /* Colors */
  --ink: #1a1814;
  --ink-soft: #4a463f;
  --paper: #f7f3ec;
  --paper-warm: #efe8db;
  --paper-pure: #fdfbf6;
  --accent: #1f4d3a;
  --accent-deep: #143226;
  --accent-soft: #d4dcd5;
  --rule: #d6cebc;
  --rule-soft: #e8e0cc;
  --warn: #b04020;

  /* Type */
  --display: 'Newsreader', 'Charter', 'Georgia', serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 10vw, 8rem);
}

/* ----- Base ----- */
body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.25rem, 5.5vw, 4.25rem);
  font-weight: 400;
}

h1 em {
  font-style: italic;
  font-weight: 400;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
}

h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  letter-spacing: -0.01em;
}

p { max-width: 65ch; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover { color: var(--accent-deep); }

/* ----- Layout ----- */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: var(--section-y) 0; }

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 243, 236, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
  max-width: 1240px;
  margin: 0 auto;
  gap: 1.5rem;
}

.logo {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-size: 0.85rem;
  font-family: var(--body);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a {
  color: var(--ink-soft);
  position: relative;
  padding: 0.25rem 0;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav a:hover { color: var(--ink); }
.nav a:hover::after,
.nav a.active::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--ink);
}

.btn-wa-header {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: var(--paper-pure);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-wa-header:hover {
  background: var(--accent-deep);
  color: var(--paper-pure);
  transform: translateY(-1px);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 0.97rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  border: none;
  text-align: center;
}

.btn--primary {
  background: var(--accent);
  color: var(--paper-pure);
}

.btn--primary:hover {
  background: var(--accent-deep);
  color: var(--paper-pure);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper-pure);
}

/* ----- Hero ----- */
.hero {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
  position: relative;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}

.hero__eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 1.75rem;
}

.hero__title {
}

.hero__title em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.hero__lead {
  margin-top: 1.75rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 30ch;
  line-height: 1.55;
}

.hero__actions {
  margin-top: 2.25rem;
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hero__meta {
  border-left: 1px solid var(--rule);
  padding-left: clamp(1.5rem, 3vw, 2.5rem);
  align-self: end;
}

.hero__meta-block {
  margin-bottom: 1.75rem;
}

.hero__meta-block:last-child { margin-bottom: 0; }

.hero__meta-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.hero__meta-value {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--ink);
  line-height: 1.2;
}

/* ----- Marquee / running text ----- */
.runner {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--body);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
  font-weight: 500;
  display: flex;
}

.runner__track {
  display: inline-flex;
  flex-shrink: 0;
  animation: scroll 45s linear infinite;
  padding-right: 2rem;
}

.runner__track span {
  display: inline-flex;
  align-items: center;
  margin: 0 2rem;
  flex-shrink: 0;
}

.runner__track span::before {
  content: '·';
  margin-right: 2rem;
  color: var(--accent);
  font-style: normal;
  font-size: 1.4rem;
  line-height: 0;
  vertical-align: middle;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ----- Section heading ----- */
.section-head {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  max-width: 720px;
}

.section-head__title {
  max-width: 18ch;
}

.section-head__lead {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 55ch;
  margin-top: 1.25rem;
}

/* ----- Services ----- */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--rule);
}

.service {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--rule);
  padding-right: 2rem;
  position: relative;
  transition: padding-left 0.3s ease;
}

.service:nth-child(odd) { padding-right: 3rem; }
.service:nth-child(even) { padding-left: 3rem; border-left: 1px solid var(--rule); }

.service:hover { color: var(--accent); }

.service__cat {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-bottom: 1rem;
  font-weight: 500;
  display: block;
}

.service__title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  font-weight: 400;
  margin-bottom: 0.9rem;
  letter-spacing: -0.015em;
}

.service__desc {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 42ch;
}

/* ----- How I work ----- */
.how {
  background: var(--paper-warm);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.step {
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  position: relative;
}

.step__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
  display: block;
}

.step__title {
  font-family: var(--display);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.step__desc {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ----- Why me ----- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.why-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.why-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  display: block;
}

.why-list li:first-child { border-top: 1px solid var(--rule); }

.why-list__title {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 0 0 0.4rem 0;
  display: block;
  font-weight: 500;
  width: 100%;
}

.why-list__desc {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
  display: block;
  width: 100%;
}

.why-portrait {
  position: sticky;
  top: 100px;
  aspect-ratio: 3 / 4;
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.why-portrait::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(26,24,20,0.012) 0 2px, transparent 2px 5px);
}

.why-portrait__placeholder {
  font-family: var(--body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  opacity: 0.7;
  font-weight: 500;
  text-align: center;
  padding: 0 2rem;
  line-height: 1.6;
}

.why-portrait__caption {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  font-family: var(--display);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ink-soft);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

/* ----- Zones ----- */
.zones {
  background: var(--ink);
  color: var(--paper);
}

.zones h2 { color: var(--paper); }
.zones .section-head__num { color: var(--paper-warm); opacity: 0.7; }
.zones .section-head__lead { color: rgba(247,243,236,0.7); }
.zones .section-head__title em { color: var(--paper-warm); }

.zones-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.zones-block h3 {
  color: var(--paper);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-family: var(--body);
  font-weight: 500;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(247,243,236,0.2);
}

.zones-block ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.zones-block li {
  font-family: var(--display);
  font-size: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px dotted rgba(247,243,236,0.12);
}

.zones-block li:last-child { border-bottom: none; }

.zones-block .price {
  font-family: var(--body);
  font-size: 0.9rem;
  color: var(--paper-warm);
  font-weight: 500;
  letter-spacing: 0;
}

.zones-block .price.free {
  color: var(--accent-soft);
}

/* ----- Pricing strip ----- */
.pricing-strip {
  padding: 4rem 0;
  border-top: 1px solid var(--rule);
}

.pricing-strip__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.price-item {
  padding-right: 2rem;
  border-right: 1px solid var(--rule);
}

.price-item:last-child { border-right: none; }

.price-item__label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.price-item__price {
  font-family: var(--display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.price-item__price sup {
  font-size: 0.45em;
  vertical-align: top;
  margin-left: 0.1em;
  color: var(--ink);
}

.price-item__note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  max-width: 28ch;
}

/* ----- FAQ ----- */
.faq {
  background: var(--paper-warm);
}

.faq-list {
  margin-top: 2.5rem;
}

.faq-item {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  font-family: var(--display);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  color: var(--ink);
  line-height: 1.3;
  padding-right: 0.5rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--accent);
  font-weight: 300;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  line-height: 1;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item__body {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 65ch;
}

/* ----- CTA strip ----- */
.cta-strip {
  background: var(--accent);
  color: var(--paper-pure);
  text-align: center;
}

.cta-strip__inner {
  padding: clamp(4rem, 8vw, 6rem) var(--gutter);
  max-width: 700px;
  margin: 0 auto;
}

.cta-strip h2 {
  color: var(--paper-pure);
  margin-bottom: 1.5rem;
}

.cta-strip h2 em {
  font-style: italic;
  color: var(--paper-warm);
  font-weight: 300;
}

.cta-strip p {
  color: rgba(247,243,236,0.85);
  font-size: 1.1rem;
  margin: 0 auto 2rem;
  max-width: 45ch;
}

.cta-strip .btn--primary {
  background: var(--paper-pure);
  color: var(--accent-deep);
}

.cta-strip .btn--primary:hover {
  background: var(--paper-warm);
  color: var(--accent-deep);
}

/* ----- Footer ----- */
.site-footer {
  background: var(--ink);
  color: var(--paper-warm);
  padding: 4rem 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand h3 {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--paper);
  margin-bottom: 1rem;
}

.footer__brand p {
  font-size: 0.95rem;
  color: rgba(247,243,236,0.65);
  max-width: 32ch;
  line-height: 1.5;
}

.footer__col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--paper-warm);
  font-family: var(--body);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer__col a {
  color: rgba(247,243,236,0.7);
  font-size: 0.93rem;
  transition: color 0.2s ease;
}

.footer__col a:hover { color: var(--paper); }

.footer__bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(247,243,236,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(247,243,236,0.5);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__teide {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(247,243,236,0.55);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__teide svg {
  width: 22px;
  height: 14px;
  opacity: 0.7;
}

/* ----- Floating WhatsApp ----- */
.fab-wa {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  z-index: 40;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab-wa:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

.fab-wa svg { width: 28px; height: 28px; }

/* ----- Page hero (for inner pages) ----- */
.page-hero {
  padding-top: clamp(3rem, 7vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--rule);
}

.page-hero__eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 1.5rem;
  display: block;
}

.page-hero__title {
  max-width: 16ch;
}

.page-hero__title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 300;
}

.page-hero__lead {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 56ch;
}

.article-meta {
  margin-top: 2rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.article-meta a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}

.article-meta a:hover {
  text-decoration-color: var(--accent);
  color: var(--accent);
}

/* ----- Prose (article/sobre-mi) ----- */
.prose {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--ink);
}

.prose p { margin-bottom: 1.5rem; }
.prose h2 { margin-top: 3.5rem; margin-bottom: 1.25rem; }
.prose h3 { margin-top: 2.5rem; margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 1.5rem 0 1.5rem 1.5rem; }
.prose li { margin-bottom: 0.5rem; }

.prose .dropcap::first-letter {
  font-family: var(--display);
  font-size: 4.2rem;
  font-weight: 400;
  float: left;
  line-height: 0.9;
  padding-right: 0.6rem;
  padding-top: 0.3rem;
  color: var(--accent);
}

/* ----- Animations ----- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  animation: fadeUp 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.18s; }
.reveal-3 { animation-delay: 0.32s; }
.reveal-4 { animation-delay: 0.45s; }

/* Scroll reveal con clases */
.to-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.to-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .nav.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--paper);
    padding: 1.5rem var(--gutter);
    border-bottom: 1px solid var(--rule);
    gap: 1.25rem;
  }
  .btn-wa-header { display: none; }
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__meta { border-left: none; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 2rem; }
  .services { grid-template-columns: 1fr; }
  .service:nth-child(even) { padding-left: 0; border-left: none; }
  .service:nth-child(odd) { padding-right: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .why-grid { grid-template-columns: 1fr; }
  .why-portrait { aspect-ratio: 4 / 3; max-width: 400px; margin: 0 auto; position: relative; top: 0; }
  .zones-list { grid-template-columns: 1fr; }
  .pricing-strip__grid { grid-template-columns: 1fr; gap: 2rem; }
  .price-item { border-right: none; border-bottom: 1px solid var(--rule); padding-right: 0; padding-bottom: 2rem; }
  .price-item:last-child { border-bottom: none; padding-bottom: 0; }
  .section-head { max-width: 100%; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }
}

/* ----- Print ----- */
@media print {
  .site-header, .fab-wa, .cta-strip, .runner { display: none; }
}

/* ----- Reduce motion ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .runner__track { animation: none; }
}
