/* ============================================================
   TecnoSnow - Prototipo SEO (CarpetaTesteo)
   Misma identidad visual que el sitio actual, ampliada para
   estructura multi-pagina.
   ============================================================ */

:root {
  --bg: #0f1117;
  --bg-alt: #161a23;
  --surface: #1c212e;
  --border: #2a3140;
  --text: #e6e9f0;
  --text-muted: #9aa3b2;
  --accent: #4f8cff;
  --accent-strong: #3a6fe0;
  --accent-soft: rgba(79, 140, 255, 0.12);
  --nav-bg: rgba(15, 17, 23, 0.85);
  --code-bg: #1c212e;
  --code-header-bg: #161a23;
  --code-border: #2a3140;
  --code-text: #e6e9f0;
  --code-kw: #c792ea;
  --code-str: #c3e88d;
  --code-cm: #61707d;
  --code-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: Consolas, "Courier New", monospace;
}

html[data-theme="light"] {
  --bg: #dfe3e8;
  --bg-alt: #d2d7de;
  --surface: #e9edf2;
  --border: #000000;
  --text: #12161d;
  --text-muted: #3f4752;
  --accent: #1f5fd0;
  --accent-strong: #1a4fb0;
  --accent-soft: rgba(31, 95, 208, 0.12);
  --nav-bg: rgba(223, 227, 232, 0.92);
  --code-bg: #161a23;
  --code-header-bg: #10141c;
  --code-border: #2a3140;
  --code-text: #e6e9f0;
  --code-kw: #c792ea;
  --code-str: #c3e88d;
  --code-cm: #61707d;
  --code-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .hero {
  background:
    radial-gradient(600px 300px at 80% -10%, rgba(79, 140, 255, 0.12), transparent),
    var(--bg);
}

html[data-theme="light"] .page-hero {
  background:
    radial-gradient(500px 260px at 85% -20%, rgba(79, 140, 255, 0.12), transparent),
    var(--bg);
}

html[data-theme="light"] .placeholder,
html[data-theme="light"] .blog-thumb {
  background: linear-gradient(135deg, #f0f3f7, #e3e8ef);
}

html[data-theme="light"] .invite-title { color: var(--text); }

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}

.logo-img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; }
.logo-text span { color: var(--accent); }

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); font-weight: 600; }

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

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 8px 24px rgba(79, 140, 255, 0.35);
}

.btn-primary:hover { box-shadow: 0 10px 28px rgba(79, 140, 255, 0.5); }

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

.btn-ghost:hover { background: var(--surface); }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #a8e600, #7fc900);
  color: #1a1a1a;
  box-shadow: 0 8px 24px rgba(168, 230, 0, 0.35);
}

.btn-whatsapp:hover { box-shadow: 0 10px 28px rgba(168, 230, 0, 0.5); }

/* ---------- Hero (home) ---------- */
.hero {
  padding: 84px 0 96px;
  background:
    radial-gradient(600px 300px at 80% -10%, rgba(79, 140, 255, 0.18), transparent),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

.tagline {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.15;
  margin-bottom: 18px;
}

.accent {
  background: linear-gradient(90deg, var(--accent), #7b5cff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin-bottom: 28px;
}

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

.code-card {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--code-shadow);
}

.code-header {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--code-header-bg);
  border-bottom: 1px solid var(--code-border);
}

.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-card pre {
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--code-text);
}

.kw { color: var(--code-kw); }
.str { color: var(--code-str); }
.cm { color: var(--code-cm); font-style: italic; }

/* ---------- Page hero (paginas interiores) ---------- */
.page-hero {
  padding: 60px 0 64px;
  background:
    radial-gradient(500px 260px at 85% -20%, rgba(79, 140, 255, 0.14), transparent),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.breadcrumbs {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 8px; opacity: 0.5; }

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.15;
  margin-bottom: 14px;
  max-width: 760px;
}

.page-hero .lead { max-width: 680px; margin-bottom: 0; }

/* ---------- Secciones ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  text-align: center;
  margin-bottom: 10px;
}

.section-subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 44px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Cards de servicio ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

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

.card-icon { font-size: 1.8rem; margin-bottom: 14px; }
.card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; flex: 1; }
.card .card-link { margin-top: 18px; color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.card .card-link:hover { text-decoration: underline; }

/* ---------- Invitaciones ---------- */
.invite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.invite-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s;
}

.invite-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }

.invite-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

.invite-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  padding: 5px 12px;
  border-radius: 999px;
}

.invite-name { font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; color: rgba(255, 255, 255, 0.9); }

.invite-body { background: var(--surface); padding: 26px 24px 30px; border-top: 1px solid var(--border); }

.invite-labels { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); margin-bottom: 8px; }
.invite-title { font-size: 1.6rem; margin-bottom: 14px; color: #fff; }
.invite-date { font-weight: 600; color: var(--text); margin-bottom: 4px; }
.invite-place { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 20px; }

.invite-btn {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: center;
  display: block;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.invite-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.invite-card--boda .invite-top { background: linear-gradient(135deg, #b8860b, #6b3fa0); }
.invite-card--cumple .invite-top { background: linear-gradient(135deg, #e8503a, #f9a825); }
.invite-card--gradu .invite-top { background: linear-gradient(135deg, #1e6bd6, #00b8a9); }

.invite-cta {
  text-align: center;
  padding: 30px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.invite-cta p { color: var(--text-muted); font-size: 1.02rem; }

/* ---------- Portafolio ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.portfolio-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

.portfolio-item:hover { transform: translateY(-4px); border-color: var(--accent); }

.placeholder {
  height: 170px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  background: linear-gradient(135deg, #222a3a, #2a3346);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}

.placeholder img { width: 100%; height: 100%; object-fit: cover; display: block; }

.portfolio-item h3 { margin-bottom: 6px; }
.portfolio-item p { color: var(--text-muted); font-size: 0.9rem; flex: 1; }
.portfolio-item .card-link { margin-top: 14px; }

/* ---------- Testimonios ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.testimonial-stars { color: #f9a825; font-size: 1.05rem; letter-spacing: 2px; margin-bottom: 12px; }
.testimonial p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 16px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7b5cff);
  color: #fff; font-weight: 700; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
}
.testimonial-author strong { display: block; font-size: 0.92rem; }
.testimonial-author span { font-size: 0.78rem; color: var(--text-muted); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  list-style: none;
  position: relative;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 22px; color: var(--accent); font-size: 1.2rem; }
.faq-item[open] summary::after { content: "\2212"; }

.faq-item .faq-a { padding: 0 22px 18px; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px 34px;
  text-align: center;
}

.cta-band h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 10px; }
.cta-band p { color: var(--text-muted); margin-bottom: 22px; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Prosa (blog / contenido) ---------- */
.prose { max-width: 760px; margin: 0 auto; color: var(--text-muted); }
.prose p { margin-bottom: 16px; }
.prose h2 { color: var(--text); font-size: 1.5rem; margin: 32px 0 12px; }
.prose h3 { color: var(--text); font-size: 1.2rem; margin: 24px 0 10px; }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 16px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--accent); }
.prose strong { color: var(--text); }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 18px;
  margin: 20px 0;
  font-style: italic;
}

/* ---------- Blog ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

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

.blog-thumb {
  height: 170px;
  background: linear-gradient(135deg, #222a3a, #2a3346);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}

.blog-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.blog-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: var(--text);
}
.blog-meta { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.blog-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.blog-body p { color: var(--text-muted); font-size: 0.9rem; flex: 1; }
.blog-body .card-link { margin-top: 14px; }

.article-header { margin-bottom: 30px; }
.article-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 14px; }
.article-meta a { color: var(--text-muted); }
.article-meta a:hover { color: var(--accent); }

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 26px;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }

.contact-form .btn { align-self: flex-start; }

.form-status { margin-top: 8px; color: var(--accent); font-weight: 600; font-size: 0.92rem; min-height: 1.2em; }

.contact-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-info h3 { font-size: 1.05rem; margin-bottom: 14px; }

.contact-info-item { display: flex; gap: 12px; align-items: flex-start; }
.contact-info-item .ico { font-size: 1.3rem; line-height: 1.4; }
.contact-info-item a { color: var(--text); text-decoration: none; }
.contact-info-item a:hover { color: var(--accent); }
.contact-info-item .label { color: var(--text-muted); font-size: 0.8rem; display: block; }

.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s, border-color 0.2s;
}
.social-row a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 48px 0 26px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer h4 { font-size: 0.95rem; margin-bottom: 14px; }
.footer p, .footer a { color: var(--text-muted); font-size: 0.9rem; text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer .brand-line { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer .brand-line img { width: 30px; height: 30px; border-radius: 8px; }
.footer .brand-line strong { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ---------- Menú de ajustes ---------- */
.gear-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 90; }

.admin-fab {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s, border-color 0.2s;
}

.admin-fab:hover {
  transform: translateY(-2px) rotate(45deg);
  border-color: var(--accent);
}

.gear-menu {
  position: absolute;
  right: 0;
  bottom: 56px;
  width: 230px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.gear-menu[hidden] { display: none; }

.gear-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.gear-item:last-child { border-bottom: none; }
.gear-item:hover { background: var(--bg-alt); }

.gear-ico {
  width: 20px;
  text-align: center;
  color: var(--accent);
  font-size: 1.05rem;
}

/* ---------- Aparicion al hacer scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

[data-reveal].revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    gap: 14px;
    align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}
