/* ══════════════════════════════════════════════════════════════
   adrianmerah.com — sistema visual compartido
   Basado en el diseño original (Cormorant Garamond / DM Sans / DM Mono,
   tema oscuro con conmutador claro). Usado por las páginas internas
   (servicios, sobre mí). NO altera el diseño de la home.
══════════════════════════════════════════════════════════════ */

:root {
  --black:      #080808;
  --white:      #FAFAFA;
  --off-white:  #F0EEE9;
  --navy:       #0E2841;
  --blue:       #156082;
  --yellow:     #FED100;
  --yellow-dim: rgba(254,209,0,0.14);
  --yellow-glow:rgba(254,209,0,0.05);
  --mid:        #888888;
  --ink:        255, 255, 255;
  --bg:         #080808;
  --bg-2:       #0c0c0c;
  --bg-3:       #0a0a0a;
  --nav-scrim:  8, 8, 8;
  --border:     rgba(var(--ink), 0.07);
  --maxw:       860px;
}

html[data-theme="light"] {
  --ink:        24, 24, 32;
  --bg:         #F4F2EC;
  --bg-2:       #FBFAF7;
  --bg-3:       #FFFFFF;
  --nav-scrim:  244, 242, 236;
  --mid:        #6b6b6b;
}
html[data-theme="light"] .page-hero,
html[data-theme="light"] .cta-band,
html[data-theme="light"] .mobile-menu { --ink: 255, 255, 255; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: rgb(var(--ink));
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: inherit; }

/* Film grain */
body::after {
  content: ''; position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.022; pointer-events: none; z-index: 9999;
}

/* ── NAV ───────────────────────────── */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  padding: 1.75rem 5vw;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 500; transition: background 0.4s, padding 0.4s;
}
nav.site-nav.scrolled {
  background: rgba(var(--nav-scrim),0.93);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 1.2rem 5vw; border-bottom: 1px solid var(--border);
}
.nav-logo { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; flex-shrink: 0; }
.nav-logo svg { width: 38px; height: 38px; }
.nav-links { display: flex; align-items: center; gap: 3rem; list-style: none; }
.nav-links a {
  font-family: 'DM Mono', monospace; font-size: 0.63rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--mid); text-decoration: none; transition: color 0.3s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: rgb(var(--ink)); }
html:not([data-theme="light"]) .nav-links a:hover { color: var(--white); }
.nav-links a.nav-pulse { color: var(--yellow); }
.nav-links a.nav-pulse:hover { color: #FFE000; }
.nav-cta { color: var(--black) !important; background: var(--yellow); padding: 0.6rem 1.25rem; transition: background 0.3s !important; }
.nav-cta:hover { background: #FFE000 !important; }
html[data-theme="light"] nav.scrolled .nav-links a { color: #14141c; }
html[data-theme="light"] nav.scrolled .hamburger span { background: #14141c; }

.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 32px; height: 32px; background: none; border: none; cursor: pointer; padding: 4px; z-index: 601; }
.hamburger span { display: block; width: 100%; height: 1px; background: rgb(var(--ink)); transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.25s; transform-origin: center; }
html:not([data-theme="light"]) .hamburger span { background: var(--white); }
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu { position: fixed; inset: 0; z-index: 600; background: rgba(8,8,8,0.97); display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.35s cubic-bezier(0.16,1,0.3,1); }
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu a { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem, 8vw, 3.2rem); font-weight: 300; color: rgba(255,255,255,0.72); text-decoration: none; padding: 0.9rem 0; border-bottom: 1px solid rgba(255,255,255,0.07); width: 80vw; text-align: center; transition: color 0.3s; }
.mobile-menu a:hover { color: var(--white); }
.mobile-menu a.mobile-cta { color: var(--black); background: var(--yellow); margin-top: 2rem; border: none; padding: 1rem 2rem; font-family: 'DM Mono', monospace; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; width: auto; }

/* ── SECTION TAG ── */
.section-tag { font-family: 'DM Mono', monospace; font-size: 0.6rem; letter-spacing: 0.35em; text-transform: uppercase; color: var(--yellow); display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.section-tag::before { content: ''; display: block; width: 24px; height: 1px; background: var(--yellow); flex-shrink: 0; }

/* ── BUTTONS ── */
.btn-yellow { display: inline-flex; align-items: center; gap: 0.75rem; font-family: 'DM Mono', monospace; font-size: 0.63rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--black); background: var(--yellow); text-decoration: none; padding: 1rem 2rem; transition: background 0.3s; border: none; cursor: pointer; }
.btn-yellow:hover { background: #FFE000; }
.btn-ghost { display: inline-flex; align-items: center; gap: 0.5rem; font-family: 'DM Mono', monospace; font-size: 0.63rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(var(--ink),0.55); text-decoration: none; border: 1px solid var(--border); padding: 1rem 2rem; transition: color 0.3s, border-color 0.3s; }
.btn-ghost:hover { color: rgb(var(--ink)); border-color: rgba(var(--ink),0.22); }
.link-gold { color: var(--yellow); font-family: 'DM Mono', monospace; font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--yellow); padding-bottom: 2px; transition: opacity .2s; }
.link-gold:hover { opacity: 0.8; }

/* ── REVEAL (progressive enhancement: visible sin JS) ── */
.reveal { transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1); }
html.js .reveal { opacity: 0; transform: translateY(28px); }
html.js .reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; transition: none; } }

/* ══════════════════════════════════════════
   PAGE HERO (interior)
══════════════════════════════════════════ */
.page-hero { position: relative; padding: 12rem 5vw 5rem; overflow: hidden; background: var(--bg); }
.page-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; filter: grayscale(100%) brightness(0.18) contrast(1.05); z-index: 0; }
.page-hero::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to right, rgba(8,8,8,0.94) 0%, rgba(8,8,8,0.7) 60%, rgba(8,8,8,0.4) 100%); }
.page-hero::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: linear-gradient(to right, var(--yellow), rgba(254,209,0,0.3), transparent); z-index: 2; }
.page-hero-inner { position: relative; z-index: 2; max-width: 900px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-family: 'DM Mono', monospace; font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 2rem; }
.breadcrumb a { color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--yellow); }
.breadcrumb span.sep { color: rgba(255,255,255,0.25); }
.page-hero h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 300; line-height: 1.02; letter-spacing: -0.01em; color: #FAFAFA; margin-bottom: 1.5rem; }
.page-hero h1 em { font-style: italic; color: rgba(240,238,233,0.6); }
.page-hero .lead { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 300; color: var(--yellow); max-width: 620px; line-height: 1.4; border-left: 1px solid var(--yellow); padding-left: 1.4rem; }

/* ══════════════════════════════════════════
   PROSE / CONTENT
══════════════════════════════════════════ */
.section { padding: 6rem 5vw; position: relative; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.prose { max-width: var(--maxw); margin: 0 auto; }
.prose h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 300; line-height: 1.1; margin: 0 0 1.4rem; color: rgb(var(--ink)); }
.prose h2 em { font-style: italic; color: var(--yellow); }
.prose h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 400; margin: 2.6rem 0 0.8rem; color: rgb(var(--ink)); }
.prose p { font-size: 1rem; line-height: 1.95; color: rgba(var(--ink),0.72); margin-bottom: 1.4rem; }
.prose p.answer-first { font-size: 1.08rem; color: rgba(var(--ink),0.9); border-left: 2px solid var(--yellow); padding-left: 1.2rem; }
.prose strong { color: rgba(var(--ink),0.9); font-weight: 400; }
.prose ul { margin: 0 0 1.6rem; padding-left: 0; list-style: none; }
.prose ul li { position: relative; padding-left: 1.6rem; margin-bottom: 0.85rem; font-size: 0.98rem; line-height: 1.8; color: rgba(var(--ink),0.72); }
.prose ul li::before { content: ''; position: absolute; left: 0; top: 0.7em; width: 7px; height: 7px; background: var(--yellow); }
.prose a.inline { color: var(--yellow); text-decoration: none; border-bottom: 1px solid rgba(254,209,0,0.4); }
.prose a.inline:hover { border-color: var(--yellow); }

/* Callout */
.callout { border: 1px solid var(--border); border-left: 3px solid var(--yellow); background: rgba(var(--ink),0.02); padding: 1.5rem 1.8rem; margin: 2rem 0; }
.callout .k { font-family: 'DM Mono', monospace; font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--yellow); margin-bottom: 0.6rem; }
.callout p { margin: 0; font-size: 0.95rem; color: rgba(var(--ink),0.78); }

/* ── FAQ (acordeón) ── */
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-question { width: 100%; background: none; border: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.8rem 0; font-family: 'DM Sans', sans-serif; font-size: clamp(0.9rem, 1.6vw, 1.02rem); font-weight: 300; color: rgb(var(--ink)); text-align: left; line-height: 1.6; transition: color 0.3s; }
.faq-question:hover, .faq-question[aria-expanded="true"] { color: var(--yellow); }
.faq-icon { flex-shrink: 0; width: 20px; height: 20px; position: relative; }
.faq-icon::before, .faq-icon::after { content: ''; position: absolute; background: currentColor; transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.25s; }
.faq-icon::before { width: 12px; height: 1px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.faq-icon::after { width: 1px; height: 12px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.faq-question[aria-expanded="true"] .faq-icon::after { transform: translate(-50%,-50%) rotate(90deg); opacity: 0; }
.faq-answer { overflow: hidden; max-height: 0; transition: max-height 0.45s cubic-bezier(0.16,1,0.3,1); }
.faq-answer[hidden] { display: block !important; max-height: 0; }
.faq-answer.open { max-height: 1200px; }
.faq-answer p { font-size: 0.92rem; line-height: 1.9; color: rgba(var(--ink),0.72); padding-bottom: 1.2rem; margin: 0; max-width: none; }
.faq-answer p.answer-first { border-left: none; padding-left: 0; color: rgba(var(--ink),0.85); }
.faq-answer strong { color: rgba(var(--ink),0.9); font-weight: 400; }

/* ══════════════════════════════════════════
   COMPARISON TABLE (ES vs MX) — formato AEO
══════════════════════════════════════════ */
.tw { overflow-x: auto; margin: 2rem 0; border: 1px solid var(--border); }
table.cmp { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.9rem; }
table.cmp th, table.cmp td { text-align: left; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--border); vertical-align: top; color: rgba(var(--ink),0.75); }
table.cmp thead th { font-family: 'DM Mono', monospace; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--yellow); font-weight: 500; background: rgba(var(--ink),0.03); }
table.cmp tbody tr:last-child td { border-bottom: none; }
table.cmp td:first-child { color: rgba(var(--ink),0.9); }

/* ══════════════════════════════════════════
   PROCESS STEPS ("cómo trabajo")
══════════════════════════════════════════ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--border); border-left: 1px solid var(--border); margin: 2rem 0; }
.step { padding: 2.2rem 1.8rem 2.6rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); position: relative; }
.step .n { font-family: 'Cormorant Garamond', serif; font-size: 3rem; font-weight: 300; line-height: 1; color: rgba(var(--ink),0.1); margin-bottom: 1.2rem; }
.step h4 { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 400; color: rgb(var(--ink)); margin-bottom: 0.6rem; }
.step p { font-size: 0.85rem; line-height: 1.75; color: rgba(var(--ink),0.6); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════
   CREDIBILITY (sin testimonios inventados)
══════════════════════════════════════════ */
.cred-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); margin: 2rem 0; }
.cred-cell { background: var(--bg); padding: 2rem 1.6rem; text-align: center; }
.cred-cell .big { font-family: 'Cormorant Garamond', serif; font-size: 2.6rem; font-weight: 300; color: var(--yellow); line-height: 1; margin-bottom: 0.5rem; }
.cred-cell .lbl { font-size: 0.82rem; color: rgba(var(--ink),0.6); line-height: 1.5; }
@media (max-width: 700px) { .cred-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════
   RELATED ARTICLES
══════════════════════════════════════════ */
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 2rem; }
.related a { background: var(--bg); padding: 1.6rem 1.5rem; text-decoration: none; display: block; transition: background 0.3s; }
.related a:hover { background: var(--yellow-glow); }
.related .cat { font-family: 'DM Mono', monospace; font-size: 0.55rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--yellow); margin-bottom: 0.6rem; display: block; }
.related .t { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 400; color: rgb(var(--ink)); line-height: 1.25; }

/* ══════════════════════════════════════════
   OTHER SERVICES NAV
══════════════════════════════════════════ */
.svc-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
@media (max-width: 640px){ .svc-nav { grid-template-columns: 1fr; } }
.svc-nav a { background: var(--bg); padding: 1.5rem 1.4rem; text-decoration: none; transition: background 0.3s; display: flex; flex-direction: column; gap: 0.4rem; }
.svc-nav a:hover { background: var(--yellow-glow); }
.svc-nav a[aria-current="page"] { background: var(--yellow-dim); }
.svc-nav .num { font-family: 'DM Mono', monospace; font-size: 0.55rem; letter-spacing: 0.16em; color: rgba(var(--ink),0.35); }
.svc-nav .nm { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; color: rgb(var(--ink)); line-height: 1.2; }

/* ══════════════════════════════════════════
   CTA BAND
══════════════════════════════════════════ */
.cta-band { background: var(--navy); text-align: center; padding: 7rem 5vw; position: relative; overflow: hidden; }
.cta-band::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(to right, transparent, var(--yellow) 35%, rgba(254,209,0,0.3) 70%, transparent); }
.cta-band h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 300; font-style: italic; color: var(--white); margin-bottom: 1.2rem; line-height: 1.05; }
.cta-band p { font-size: 0.9rem; color: rgba(255,255,255,0.72); max-width: 480px; margin: 0 auto 2.5rem; line-height: 1.8; }
.cta-band .actions { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
.cta-band .email { margin-top: 1.6rem; font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.cta-band .email a { color: var(--yellow); text-decoration: none; border-bottom: 1px solid rgba(254,209,0,0.4); }

/* ── FOOTER ── */
footer.site-footer { background: var(--bg); padding: 2.4rem 5vw; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 0.9rem; }
.footer-brand { font-family: 'Cormorant Garamond', serif; font-size: 0.9rem; color: rgba(var(--ink),0.22); }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; align-items: center; }
.footer-links a { font-family: 'DM Mono', monospace; font-size: 0.58rem; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(var(--ink),0.32); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--yellow); }
.footer-copy { font-family: 'DM Mono', monospace; font-size: 0.58rem; letter-spacing: 0.15em; color: rgba(var(--ink),0.12); }

/* ── THEME TOGGLE ── */
.theme-toggle { position: fixed; left: 1.25rem; bottom: 1.25rem; z-index: 450; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(var(--nav-scrim), 0.88); border: 1px solid var(--border); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: rgb(var(--ink)); cursor: pointer; transition: transform 0.25s ease, background 0.4s ease, border-color 0.3s ease; }
.theme-toggle:hover { transform: translateY(-2px); border-color: var(--yellow); }
.theme-toggle svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: block; } .theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; } html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ── COOKIE BAR ── */
.cookie-bar { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 700; max-width: 660px; margin: 0 auto; background: rgba(11,11,14,0.97); border: 1px solid rgba(255,255,255,0.12); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 12px; padding: 1rem 1.2rem; display: none; align-items: center; gap: 1rem 1.4rem; flex-wrap: wrap; box-shadow: 0 12px 44px rgba(0,0,0,0.45); }
.cookie-bar.show { display: flex; }
.cookie-bar p { flex: 1 1 280px; margin: 0; font-size: 0.8rem; line-height: 1.65; color: rgba(240,238,233,0.82); }
.cookie-bar a { color: var(--yellow); }
.cookie-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }
.cookie-btn { font-family: 'DM Mono', monospace; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.65rem 1.15rem; cursor: pointer; border: 1px solid rgba(255,255,255,0.18); border-radius: 7px; background: transparent; color: rgba(240,238,233,0.72); transition: color 0.25s, background 0.25s, border-color 0.25s; }
.cookie-btn:hover { color: #fff; border-color: rgba(255,255,255,0.35); }
.cookie-btn.accept { background: var(--yellow); color: var(--black); border-color: var(--yellow); font-weight: 500; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav.site-nav { padding: 1.5rem 6vw; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .page-hero { padding: 9rem 6vw 4rem; }
  .section { padding: 4.5rem 6vw; }
  .cta-band { padding: 5rem 6vw; }
  footer.site-footer { flex-direction: column; text-align: center; }
  .theme-toggle { left: 1rem; bottom: 1rem; width: 42px; height: 42px; }
}
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
