/* ─── Reset & base ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Paleta Quedamos — inspirada en Canarias */
  --lava-900:    #1A1614;
  --lava-700:    #3D2E27;
  --magma-500:   #D94A1F;
  --magma-300:   #E87B4A;
  --sol-400:     #F2B544;

  --oceano-700: #0B4F6C;
  --oceano-400: #3E9EB8;
  --pino-600:   #2D5F3F;
  --pino-300:   #7BAA85;

  --arena-50:   #F7F1E8;
  --arena-100:  #EDE3D2;
  --arena-300:  #C7B59A;
  --arena-600:  #6B5A48;

  --bg-primary:  #FBF7EF;
  --bg-surface:  #FFFFFF;
  --bg-elevated: #F7F1E8;

  /* Sombras tintadas de picón, nunca grises puras */
  --shadow-sm: 0 1px 2px rgba(61, 46, 39, 0.08);
  --shadow-md: 0 4px 12px rgba(61, 46, 39, 0.10);
  --shadow-lg: 0 12px 32px rgba(61, 46, 39, 0.14);

  /* Radios orgánicos */
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 999px;

  --border-warm: 1px solid rgba(107, 90, 72, 0.18);

  --container:  880px;

  --font-display: "Fraunces", "Times New Roman", Georgia, serif;
  --font-ui: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-accent: "Caveat", "Fraunces", cursive;

  font-family: var(--font-ui);
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--lava-900);
  background-color: var(--bg-primary);
  /* Textura granulada sutil (basalto/arena) sobre crema cálida */
  background-image:
    radial-gradient(circle at 12% -10%, rgba(242, 181, 68, 0.22), transparent 45%),
    radial-gradient(circle at 110% 8%, rgba(217, 74, 31, 0.10), transparent 50%),
    radial-gradient(circle at 50% 110%, rgba(62, 158, 184, 0.10), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.42  0 0 0 0 0.35  0 0 0 0 0.28  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.35'/></svg>");
  background-attachment: fixed;
  background-size: auto, auto, auto, 160px 160px;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Layout ─────────────────────────────────────────────── */
.page {
  padding:
    max(24px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(40px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}

.container {
  width: min(100%, var(--container));
  margin: 0 auto;
}

/* ─── Topbar ─────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0 2.5rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--magma-500);
}

.wip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(217, 74, 31, 0.22);
  background: rgba(255, 255, 255, 0.75);
  color: var(--lava-700);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.wip-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: var(--radius-full);
  background: var(--pino-600);
  box-shadow: 0 0 0 4px rgba(45, 95, 63, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(45, 95, 63, 0.18); }
  50%      { box-shadow: 0 0 0 7px rgba(45, 95, 63, 0.06); }
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 2.75rem 2.75rem 3rem;
  background: var(--bg-surface);
  border: var(--border-warm);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

/* Atardecer canario sutil en la esquina */
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -30% auto auto;
  width: 70%;
  height: 140%;
  background: radial-gradient(circle at 70% 30%,
    rgba(217, 74, 31, 0.20) 0%,
    rgba(242, 181, 68, 0.18) 35%,
    transparent 65%);
  pointer-events: none;
}

/* Silueta de relieve insular como guiño */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22px;
  background:
    radial-gradient(20px 14px at 12% 100%, var(--arena-100) 60%, transparent 62%),
    radial-gradient(30px 22px at 28% 100%, var(--arena-100) 60%, transparent 62%),
    radial-gradient(40px 28px at 52% 100%, var(--arena-100) 60%, transparent 62%),
    radial-gradient(26px 18px at 76% 100%, var(--arena-100) 60%, transparent 62%),
    radial-gradient(34px 22px at 92% 100%, var(--arena-100) 60%, transparent 62%);
  pointer-events: none;
  opacity: 0.7;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-sticker {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  font-family: var(--font-accent);
  font-size: 1.6rem;
  color: var(--magma-500);
  transform: rotate(-6deg);
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oceano-700);
  margin-bottom: 1.1rem;
  padding: 0.35rem 0.8rem;
  background: rgba(62, 158, 184, 0.15);
  border-radius: var(--radius-full);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--lava-900);
  max-width: 16ch;
  margin-bottom: 1.4rem;
}

.hero-lead {
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.75;
  color: var(--lava-700);
  max-width: 60ch;
}

.accent {
  color: var(--magma-500);
  font-weight: 600;
}

/* ─── Cards row ──────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.card {
  padding: 1.85rem;
  background: var(--bg-surface);
  border: var(--border-warm);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(217, 74, 31, 0.14), rgba(242, 181, 68, 0.22));
  color: var(--magma-500);
  margin-bottom: 1.15rem;
}

.card:nth-child(2) .card-icon {
  background: linear-gradient(135deg, rgba(11, 79, 108, 0.12), rgba(62, 158, 184, 0.22));
  color: var(--oceano-700);
}

.card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--lava-900);
  margin-bottom: 0.65rem;
}

.card p {
  font-size: 0.97rem;
  line-height: 1.75;
  color: var(--lava-700);
}

/* ─── Problem ────────────────────────────────────────────── */
.problem {
  position: relative;
  padding: 2.25rem 2.5rem 2.5rem;
  background: var(--bg-surface);
  border: var(--border-warm);
  border-left: 4px solid var(--magma-500);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.problem-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--lava-900);
  margin-bottom: 1.1rem;
  max-width: 24ch;
}

.problem p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--lava-700);
  max-width: 64ch;
}

.problem p + p {
  margin-top: 1rem;
}

/* ─── Differences ────────────────────────────────────────── */
.differences {
  padding: 2.25rem 2.5rem 2.5rem;
  background: var(--bg-elevated);
  border: var(--border-warm);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.25rem;
}

.differences-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--lava-900);
  margin-bottom: 1.75rem;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1.5rem 2rem;
}

.diff-item {
  position: relative;
  padding-left: 0.85rem;
  border-left: 2px solid var(--sol-400);
}

.diff-item:nth-child(4n+2) { border-left-color: var(--oceano-400); }
.diff-item:nth-child(4n+3) { border-left-color: var(--pino-300); }
.diff-item:nth-child(4n)   { border-left-color: var(--magma-300); }

.diff-item h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--lava-900);
  margin-bottom: 0.4rem;
  letter-spacing: -0.015em;
}

.diff-item p {
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--lava-700);
}

/* ─── Summary ────────────────────────────────────────────── */
.summary {
  position: relative;
  padding: 2rem 2.5rem;
  background:
    linear-gradient(135deg,
      rgba(217, 74, 31, 0.92) 0%,
      rgba(232, 123, 74, 0.92) 45%,
      rgba(242, 181, 68, 0.92) 100%);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.summary::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.18'/></svg>");
  pointer-events: none;
}

.summary > * {
  position: relative;
  z-index: 1;
}

.summary p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: rgba(251, 247, 239, 0.95);
  max-width: 72ch;
}

.summary-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--bg-primary);
  margin-bottom: 1.1rem;
  max-width: 22ch;
}

.summary-cta-line {
  margin-top: 1.25rem;
}

.summary-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding: 14px 24px;
  background: var(--lava-900);
  color: var(--bg-primary);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1),
              background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.summary-cta:hover {
  transform: translateY(-2px);
  background: #2a211d;
  box-shadow: var(--shadow-lg);
}

.summary-cta svg {
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.summary-cta:hover svg {
  transform: translateX(3px);
}

.summary-foot {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(251, 247, 239, 0.25);
  font-size: 0.92rem;
}

.summary-foot .accent {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--bg-primary);
  font-weight: 600;
}

.summary .accent {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--bg-primary);
  font-weight: 600;
}

.summary strong {
  color: var(--bg-primary);
  font-weight: 700;
}

.summary a {
  color: var(--bg-primary);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  font-weight: 600;
}

.summary a:hover {
  text-decoration-color: var(--lava-900);
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
  padding: 1.25rem 1.5rem;
  border: var(--border-warm);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
}

.footer p {
  font-size: 0.9rem;
  color: var(--arena-600);
  line-height: 1.6;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 2rem;
  }

  .hero {
    padding: 1.75rem 1.5rem 2rem;
  }

  .hero-sticker {
    top: 1rem;
    right: 1.1rem;
    font-size: 1.3rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .differences {
    padding: 1.75rem 1.5rem;
  }

  .diff-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .problem {
    padding: 1.75rem 1.5rem;
  }

  .summary {
    padding: 1.5rem;
  }
}

@media (max-width: 500px) {
  .hero-title {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0ms !important;
  }
}
