/* =========================================================
   Sin Cookies - Asesorias gratuitas en energia electrica
   Paleta:
     Blanco:        #FFFFFF
     Azul claro:    #E0F2FE
     Azul medio:    #3B82F6
     Azul oscuro:   #1E3A8A
     Acento cyan:   #06B6D4
   ========================================================= */

:root {
  --color-white: #FFFFFF;
  --color-blue-50: #E0F2FE;
  --color-blue-100: #BAE6FD;
  --color-blue-500: #3B82F6;
  --color-blue-700: #1D4ED8;
  --color-blue-900: #1E3A8A;
  --color-cyan-500: #06B6D4;
  --color-text: #0F172A;
  --color-text-muted: #475569;
  --color-border: #DBEAFE;
  --color-danger: #DC2626;
  --color-success: #059669;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(30, 58, 138, 0.08);
  --shadow-lg: 0 20px 50px rgba(30, 58, 138, 0.18);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --container-max: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-blue-500);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  margin: 0 0 0.5em;
  color: var(--color-blue-900);
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.5vw + 1rem, 2.25rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0 0 1em; }

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--color-cyan-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ----------- Header ----------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-blue-900);
  font-weight: 800;
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-blue-500), var(--color-cyan-500));
  color: var(--color-white);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.brand-text {
  font-size: 1.05rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--color-blue-900);
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--color-blue-500);
  text-decoration: none;
}

/* ----------- Hero ----------- */
.hero {
  position: relative;
  padding: 5rem 0 4.5rem;
  background: linear-gradient(160deg, var(--color-blue-50) 0%, #ffffff 70%);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.eyebrow {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: var(--color-white);
  color: var(--color-blue-700);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.hero-title {
  color: var(--color-blue-900);
  margin-bottom: 0.5em;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 0.6vw + 0.9rem, 1.25rem);
  color: var(--color-text-muted);
  max-width: 65ch;
  margin-bottom: 1.75rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.hero-bullets li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-bullets li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--color-cyan-500);
  color: var(--color-white);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
}

.hero-decor {
  position: absolute;
  right: -120px;
  top: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18) 0%, rgba(59, 130, 246, 0.0) 70%);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

/* ----------- Buttons ----------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-blue-500);
  color: var(--color-white);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover { background: var(--color-blue-700); }

.btn-ghost {
  background: transparent;
  color: var(--color-blue-900);
  border-color: var(--color-blue-500);
}

.btn-ghost:hover {
  background: var(--color-blue-50);
  color: var(--color-blue-900);
}

.btn-ghost-dark {
  background: var(--color-white);
  color: var(--color-blue-900);
  border-color: var(--color-white);
}

.btn-ghost-dark:hover { background: var(--color-blue-50); }

.btn-link {
  background: transparent;
  color: var(--color-blue-500);
  padding: 0.4rem 0;
  border-radius: 0;
  border: none;
  font-weight: 700;
}

.btn-link:hover { color: var(--color-blue-700); text-decoration: underline; }

/* ----------- Sections ----------- */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--color-blue-50);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ----------- Cards grid ----------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.cards-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-blue-100);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--color-blue-50);
  color: var(--color-blue-500);
  margin-bottom: 1rem;
}

.card h3 {
  color: var(--color-blue-900);
  margin-bottom: 0.4rem;
}

.card p {
  color: var(--color-text-muted);
  font-size: 0.97rem;
  margin: 0;
}

/* ----------- Two-column info ----------- */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.info-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-blue-900);
  margin-bottom: 0.6rem;
}

.info-card ul {
  margin: 0 0 0.6rem;
  padding-left: 1.25rem;
  color: var(--color-text-muted);
}

.info-card ul li { margin-bottom: 0.25rem; }

.info-card .hint {
  font-size: 0.9rem;
  color: var(--color-blue-700);
  background: var(--color-blue-50);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  margin: 0;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-blue {
  background: var(--color-blue-50);
  color: var(--color-blue-700);
}

.badge-cyan {
  background: #CFFAFE;
  color: #0E7490;
}

.callout {
  background: var(--color-white);
  border-left: 4px solid var(--color-cyan-500);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.callout h3 {
  color: var(--color-blue-900);
  margin-bottom: 0.5rem;
}

.callout p {
  color: var(--color-text-muted);
  margin: 0;
}

/* ----------- Form ----------- */
.form {
  max-width: 760px;
  margin: 0 auto;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.form-help {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.25rem;
}

.form-field { display: flex; flex-direction: column; }
.form-field-full { grid-column: 1 / -1; }

.form-field label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-blue-900);
  margin-bottom: 0.35rem;
}

.form-field input[type="text"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--color-blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  outline: none;
}

.form-field textarea { resize: vertical; min-height: 120px; }

.form-field input.is-invalid,
.form-field select.is-invalid,
.form-field textarea.is-invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.error-msg {
  display: none;
  margin-top: 0.3rem;
  color: var(--color-danger);
  font-size: 0.85rem;
}

.error-msg.is-visible { display: block; }

.checkbox-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--color-blue-500);
  flex-shrink: 0;
}

.form-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: right;
}

/* ----------- Contact cards ----------- */
.contact-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-blue-50);
  color: var(--color-blue-500);
  margin: 0 auto 0.85rem;
}

.contact-card p {
  color: var(--color-text);
  font-weight: 600;
  word-break: break-word;
  margin-bottom: 0.85rem;
}

.creator-box {
  margin-top: 2rem;
  text-align: center;
  color: var(--color-text-muted);
}

.creator-box p { margin: 0; }

/* ----------- Footer ----------- */
.site-footer {
  background: var(--color-blue-900);
  color: var(--color-blue-50);
  padding: 1.5rem 0;
  margin-top: 1rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-inner p { margin: 0; font-size: 0.9rem; }

.footer-link {
  background: transparent;
  border: none;
  color: var(--color-blue-50);
  font-size: 0.9rem;
  text-decoration: underline;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.footer-link:hover { color: var(--color-white); }

/* =========================================================
   Privacy Banner
   ========================================================= */
.privacy-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--color-blue-900), var(--color-blue-700));
  color: var(--color-white);
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.18);
  border-top: 3px solid var(--color-cyan-500);
  padding: 1rem 1.25rem;
  transform: translateY(120%) scale(0.96);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.privacy-banner.is-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.privacy-banner.is-hiding {
  transform: translateY(120%) scale(0.96);
  opacity: 0;
}

.privacy-banner-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.privacy-banner-text {
  flex: 1 1 360px;
  min-width: 260px;
}

.privacy-banner-title {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
  color: var(--color-white);
}

.privacy-banner-text p {
  margin: 0 0 0.5rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
}

.link-button {
  background: transparent;
  border: none;
  color: var(--color-cyan-500);
  text-decoration: underline;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.link-button:hover { color: #67E8F9; }

.privacy-banner-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.privacy-banner .btn-primary {
  background: var(--color-cyan-500);
  color: var(--color-blue-900);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.35);
}

.privacy-banner .btn-primary:hover { background: #22D3EE; }

.privacy-banner .btn-ghost-dark {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.5);
}

.privacy-banner .btn-ghost-dark:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
}

/* =========================================================
   Modal
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  animation: fadeIn 0.25s ease;
}

.modal-content {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h2 { margin: 0; color: var(--color-blue-900); }

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--color-text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.modal-close:hover { background: var(--color-blue-50); color: var(--color-blue-900); }

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  color: var(--color-text);
  font-size: 0.97rem;
}

.modal-body h3 {
  color: var(--color-blue-900);
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.modal-body p { color: var(--color-text-muted); }

.modal-body a { color: var(--color-blue-500); }

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .hero { padding: 4rem 0 3.5rem; }
}

@media (max-width: 768px) {
  .site-nav { display: none; }

  .header-inner { padding-top: 0.65rem; padding-bottom: 0.65rem; }

  .hero { padding: 3.25rem 0 3rem; }
  .hero-decor { width: 320px; height: 320px; right: -100px; top: -100px; }

  .form-grid { grid-template-columns: 1fr; }
  .form { padding: 1.25rem; }
  .form-actions { justify-content: stretch; }
  .form-actions .btn { flex: 1; }

  .privacy-banner { padding: 0.9rem 1rem; }
  .privacy-banner-actions { width: 100%; }
  .privacy-banner-actions .btn { flex: 1; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero-bullets { flex-direction: column; gap: 0.4rem; }
  .section { padding: 3rem 0; }
}

/* Reduce motion preferences */
@media (prefers-reduced-motion: reduce) {
  .privacy-banner,
  .modal-content,
  .modal-backdrop,
  .card,
  .contact-card,
  .btn { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
