/* Porcigenia — sitio HTML estático */
:root {
  --bg: #f7f6f2;
  --bg-dark: #1a1f1c;
  --surface: #ffffff;
  --primary: #2d6a4f;
  --primary-dark: #1e4a38;
  --accent: #3d8f6c;
  --text: #1c211e;
  --muted: #5c6560;
  --border: rgba(30, 74, 56, 0.12);
  --hero-image: linear-gradient(135deg, #1e4a38 0%, #2d6a4f 45%, #4a8c6a 100%);
  --radius: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

main {
  min-height: 50vh;
}

/* ——— Cabecera y navegación ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

@media (min-width: 881px) {
  .header-inner {
    flex-wrap: nowrap;
  }

  .brand {
    order: 1;
  }

  .nav-toggle {
    display: none !important;
  }

  .nav-main {
    order: 2;
    flex: 1;
    justify-content: center;
    display: flex !important;
  }

  .header-actions {
    order: 3;
    margin-left: 0;
  }
}

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

.brand:hover {
  text-decoration: none;
  color: var(--primary);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), var(--primary-dark));
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.35);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--primary-dark);
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
}

.nav-main a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  padding: 0.35rem 0;
}

.nav-main a:hover {
  color: var(--primary);
  text-decoration: none;
}

.nav-main a[aria-current="page"] {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 880px) {
  .brand {
    order: 1;
  }

  .nav-toggle {
    display: inline-flex;
    order: 2;
    margin-left: auto;
  }

  .header-actions {
    order: 3;
  }

  .nav-main {
    display: none;
    width: 100%;
    order: 4;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0 0.75rem;
    border-top: 1px solid var(--border);
  }

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

.link-muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.link-muted:hover {
  color: var(--primary-dark);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(45, 106, 79, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: rgba(45, 106, 79, 0.08);
}

.btn-ghost {
  background: var(--surface);
  color: var(--primary-dark);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--primary);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover {
  background: #1fb855;
  color: #fff;
}

/* ——— Hero ——— */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  min-height: min(72vh, 680px);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: stretch;
  }
}

.hero-inner {
  padding: 2.5rem 1.25rem 2rem;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 900px) {
  .hero-inner {
    margin: 0;
    margin-left: max(1.25rem, calc((100vw - 1120px) / 2 + 1.25rem));
    padding-right: 2rem;
  }
}

.hero-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.5vw, 3.25rem);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero-title em {
  font-style: italic;
  color: var(--primary);
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 40ch;
}

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

.hero-media {
  position: relative;
  min-height: 220px;
  background: var(--hero-image);
  background-size: cover;
  background-position: center;
}

@media (min-width: 900px) {
  .hero-media {
    min-height: auto;
  }
}

.hero-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 31, 28, 0.5) 0%,
    transparent 45%
  );
  pointer-events: none;
}

/* ——— Bloques de contenido ——— */
.strip {
  padding: 2.5rem 1.25rem;
}

.strip-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}

@media (min-width: 720px) {
  .strip-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.strip-whatsapp {
  background: var(--bg-dark);
  color: #e8ebe9;
}

.strip-title {
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.strip-copy p {
  margin: 0;
  color: #b8c0bc;
  max-width: 52ch;
}

.inline-link {
  color: #8fd4b8;
  text-decoration: underline;
}

.inline-link:hover {
  color: #b5ebd4;
}

.features {
  padding: 3rem 1.25rem;
  max-width: 1120px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.2rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--primary-dark);
}

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

.social-block {
  padding: 3rem 1.25rem;
  text-align: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.section-sub {
  color: var(--muted);
  margin: 0 auto 1.5rem;
  max-width: 48ch;
}

.social-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.social-pill {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.social-pill:hover {
  text-decoration: none;
  background: var(--bg);
  border-color: var(--primary);
}

.modules {
  padding: 3rem 1.25rem 3.5rem;
  max-width: 1120px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 2rem;
}

.module-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .module-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: 0 8px 24px rgba(30, 74, 56, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.module-card:hover {
  border-color: rgba(45, 106, 79, 0.35);
  box-shadow: 0 12px 32px rgba(30, 74, 56, 0.1);
}

.module-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

.module-card p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.module-card .link-more {
  font-weight: 600;
  font-size: 0.9rem;
}

.cta-block {
  padding: 2.5rem 1.25rem 4rem;
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.cta-panel {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-radius: 20px;
  padding: 2rem 1.5rem;
}

.cta-panel h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  margin: 0 0 0.75rem;
}

.cta-panel p {
  margin: 0 0 1.25rem;
  opacity: 0.92;
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

.cta-panel .btn-primary {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: none;
}

.cta-panel .btn-primary:hover {
  background: #f0f4f2;
  color: var(--primary-dark);
}

/* ——— Páginas internas ——— */
.page-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 400;
  margin: 0 0 0.75rem;
  color: var(--primary-dark);
}

.page-hero .lead {
  margin: 0;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 60ch;
}

.content-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.content-wide {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.prose p {
  margin: 0 0 1rem;
}

.module-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  margin-bottom: 1.25rem;
}

.module-block h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.module-block ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.module-block li {
  margin-bottom: 0.35rem;
}

.app-preview {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .app-preview {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.phone-frame {
  aspect-ratio: 9 / 18;
  max-height: 420px;
  margin: 0 auto;
  border-radius: 28px;
  border: 10px solid #2a2f2c;
  background: linear-gradient(180deg, #e8ebe9 0%, #d4ddd8 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-grid label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--primary-dark);
}

.form-grid input,
.form-grid textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.form-grid textarea {
  min-height: 140px;
  resize: vertical;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

.form-msg {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  display: none;
}

.form-msg.is-ok {
  display: block;
  background: rgba(45, 106, 79, 0.12);
  color: var(--primary-dark);
}

.site-footer {
  background: var(--bg-dark);
  color: #9aa39e;
  padding: 2rem 1.25rem;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.footer-inner strong {
  color: #dce1dd;
}

.footer-links {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: center;
}

.footer-links a {
  color: #b8c0bc;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-note {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem;
  background: rgba(26, 31, 28, 0.97);
  color: #e8ebe9;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(100%);
  transition: transform 0.35s ease;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

@media (min-width: 720px) {
  .cookie-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #c5ccc8;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-banner[aria-hidden="true"] {
  pointer-events: none;
}

.cookie-banner .btn-ghost {
  background: transparent;
  color: #e8ebe9;
  border-color: rgba(255, 255, 255, 0.25);
}

.cookie-banner .btn-ghost:hover {
  border-color: #fff;
}
