/* =========================
   OPTILUS — COTIZADOR
========================= */

:root {
  --navy: #003d4c;
  --teal: #0e818f;
  --cyan: #16b8c8;
  --cyan-light: #5ee0f0;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.16);
  --text-muted: rgba(255, 255, 255, 0.8);
  --shadow-teal: rgba(14, 129, 143, 0.32);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.94)),
    url("assets/cotizador.jpg") center center / cover no-repeat fixed;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(22, 184, 200, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 80%, rgba(14, 129, 143, 0.1), transparent 45%);
  pointer-events: none;
}

/* TOPBAR */

.topbar {
  width: 100%;
  padding: 6px clamp(18px, 4vw, 56px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
}

.logo-link {
  display: block;
  line-height: 0;
}

.logo {
  height: 140px;
  transition: transform 0.25s ease;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35));
}

.logo:hover {
  transform: scale(1.04);
}

.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 65px;
  height: 65px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.help-btn:hover {
  transform: scale(1.04);
  filter: drop-shadow(0 8px 24px rgba(22, 184, 200, 0.45));
}

.help-btn-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transform: scale(1.2);
  flex-shrink: 0;
}

/* MAIN */

.container {
  --s: 0.9025;
  width: 100%;
  max-width: 1180px;
  margin: -28px auto 0;
  padding: 0 clamp(18px, 4vw, 48px) clamp(12px, 2vh, 36px);
  text-align: center;
  position: relative;
  z-index: 1;
}

.page-intro {
  margin-top: clamp(calc(-40px * var(--s)), calc(-5.5vh * var(--s)), calc(-24px * var(--s)));
  margin-bottom: clamp(calc(28px * var(--s)), calc(4.5vh * var(--s)), calc(44px * var(--s)));
}

.page-badge {
  display: inline-block;
  margin-bottom: 20px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-light);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.page-intro h1 {
  font-size: clamp(calc(24px * var(--s)), calc(4.28vw * var(--s)), calc(44px * var(--s)));
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.subtitle {
  margin-top: 18px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
}

/* OPTIONS */

.options {
  --card-s: calc(0.9 * var(--s));
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: calc(20px * var(--card-s));
  text-align: left;
}

.option-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: calc(300px * var(--card-s));
  padding: 0;
  border-radius: calc(28px * var(--card-s));
  border: 2px solid transparent;
  background: transparent;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.option-card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  z-index: 0;
  pointer-events: none;
}

.option-card-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    100deg,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.2) 36%,
    rgba(6, 8, 14, 0.82) 50%,
    rgba(4, 6, 12, 0.94) 100%
  );
  pointer-events: none;
}

.option-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  width: 100%;
  max-width: 100%;
  text-align: center;
  margin-bottom: calc(10px * var(--s));
}

.option-card-header h3 {
  margin-bottom: 0;
}

.option-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(6px * var(--s));
  margin-bottom: calc(10px * var(--s));
  padding: calc(7px * var(--s)) calc(16px * var(--s));
  border-radius: 999px;
  font-size: calc(10px * var(--s));
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.option-card-badge--ia {
  color: #f0e8ff;
  background: rgba(116, 96, 242, 0.45);
  border: 1px solid rgba(247, 0, 162, 0.45);
  box-shadow: 0 4px 20px rgba(116, 96, 242, 0.35);
}

.option-card-badge--manual {
  color: #e8fcff;
  background: rgba(14, 129, 143, 0.45);
  border: 1px solid rgba(94, 224, 240, 0.45);
  box-shadow: 0 4px 20px rgba(22, 184, 200, 0.3);
}

.option-card-content {
  position: relative;
  z-index: 3;
  width: 52%;
  min-height: calc(300px * var(--card-s));
  margin-left: auto;
  padding: calc(28px * var(--card-s)) calc(26px * var(--card-s)) calc(28px * var(--card-s)) calc(12px * var(--card-s));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

.option-card h3 {
  font-size: clamp(calc(20px * var(--s)), calc(2.4vw * var(--s)), calc(26px * var(--s)));
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.option-card-desc {
  font-size: calc(13px * var(--s));
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: calc(18px * var(--s));
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.option-cta-badge {
  display: block;
  width: 100%;
  padding: calc(14px * var(--s)) calc(20px * var(--s));
  border-radius: 999px;
  font-size: calc(11px * var(--s));
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 8px 28px var(--shadow-teal);
}

.option-cta-badge::after {
  content: " ›";
  font-size: calc(14px * var(--s));
  font-weight: 700;
}

.option-card--manual {
  border-color: transparent;
  background:
    linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)) padding-box,
    linear-gradient(135deg, rgba(94, 224, 240, 0.9), rgba(22, 184, 200, 0.95), var(--teal)) border-box;
  box-shadow:
    0 0 28px rgba(22, 184, 200, 0.22),
    0 16px 48px rgba(0, 0, 0, 0.35);
}

.option-card--manual .option-card-scrim {
  background: linear-gradient(
    100deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.18) 34%,
    rgba(0, 28, 38, 0.84) 50%,
    rgba(0, 18, 28, 0.95) 100%
  );
}

.option-card--manual:hover:not(:disabled),
.option-card--manual.active {
  box-shadow:
    0 0 36px rgba(94, 224, 240, 0.35),
    0 20px 56px rgba(0, 0, 0, 0.4);
}

.option-card--ia {
  background:
    linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)) padding-box,
    linear-gradient(135deg, #7460f2, #f700a2) border-box;
  box-shadow:
    0 0 32px rgba(247, 0, 162, 0.22),
    0 0 48px rgba(116, 96, 242, 0.18),
    0 16px 48px rgba(0, 0, 0, 0.35);
}

.option-card--ia .option-card-scrim {
  background: linear-gradient(
    100deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(30, 10, 50, 0.25) 34%,
    rgba(18, 8, 32, 0.86) 50%,
    rgba(8, 4, 18, 0.96) 100%
  );
}

.option-card--ia:hover:not(:disabled),
.option-card--ia.active {
  box-shadow:
    0 0 40px rgba(247, 0, 162, 0.35),
    0 0 56px rgba(116, 96, 242, 0.25),
    0 20px 56px rgba(0, 0, 0, 0.4);
}

.option-card--ia .option-cta-badge {
  background: linear-gradient(135deg, #7460f2, #f700a2);
  box-shadow: 0 8px 28px rgba(247, 0, 162, 0.4);
}

.option-card:hover:not(:disabled) {
  transform: translateY(-4px);
}

/* PERKS */

.perks-row {
  list-style: none;
  margin-top: calc(28px * var(--s));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(12px * var(--s)) calc(20px * var(--s));
  text-align: left;
}

.perk {
  display: flex;
  align-items: flex-start;
  gap: calc(12px * var(--s));
}

.perk-icon {
  flex-shrink: 0;
  width: calc(44px * var(--s));
  height: calc(44px * var(--s));
  border-radius: 50%;
  border: 1.5px solid rgba(94, 224, 240, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-light);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 20px rgba(22, 184, 200, 0.15);
}

.perk-icon svg {
  width: calc(22px * var(--s));
  height: calc(22px * var(--s));
}

.perk-icon .perk-check {
  stroke: #4ade80;
}

.perk-icon .perk-bolt,
.perk-icon .perk-mic {
  stroke: var(--cyan-light);
}

.perk-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.perk-text strong {
  font-size: calc(13px * var(--s));
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.perk-text span {
  font-size: calc(12px * var(--s));
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.62);
}

/* TAGLINE */

.site-tagline {
  margin-top: calc(14px * var(--s));
  max-width: calc(720px * var(--s));
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: calc(11px * var(--s));
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.65;
}

.tagline-accent {
  display: inline-block;
  font-weight: 400;
  /* Orden L→R: lila → fucsia → blanco (punta) → celeste → ciclo */
  background-image: linear-gradient(
    90deg,
    #7460f2 0%,
    #f700a2 25%,
    #ffffff 50%,
    #5ee0f0 75%,
    #7460f2 100%
  );
  background-size: 200% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: taglineGradientFlow 6s linear infinite;
  filter:
    drop-shadow(0 0 5px rgba(116, 96, 242, 0.4))
    drop-shadow(0 0 10px rgba(247, 0, 162, 0.28))
    drop-shadow(0 0 14px rgba(94, 224, 240, 0.3));
}

@keyframes taglineGradientFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tagline-accent {
    animation: none;
    background-size: 100% 100%;
    background-position: 0% 50%;
  }
}

/* FORM MODAL */

.form-modal {
  --s: 1.038;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  display: none;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: clamp(2px, 0.5vh, 8px) clamp(8px, 1.5vw, 16px);
  z-index: 9999;
}

.form-modal.active {
  display: flex;
}

.form-box {
  width: 100%;
  max-width: min(920px, calc(100vw - 24px));
  max-height: calc(100dvh - 4px);
  overflow: hidden;
  margin: auto;
  background: linear-gradient(135deg, rgba(18, 20, 21, 0.94) 0%, rgba(26, 29, 30, 0.88) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: calc(var(--radius-xl) * var(--s));
  padding: calc(22px * var(--s)) clamp(calc(18px * var(--s)), 4vw, calc(36px * var(--s)));
  position: relative;
  box-shadow:
    0 calc(40px * var(--s)) calc(100px * var(--s)) rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: modalIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.close-form {
  position: absolute;
  top: calc(18px * var(--s, 1));
  right: calc(20px * var(--s, 1));
  width: calc(42px * var(--s, 1));
  height: calc(42px * var(--s, 1));
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #e8eaed;
  font-size: calc(26px * var(--s, 1));
  line-height: 1;
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.close-form:hover {
  background: rgba(14, 129, 143, 0.14);
  color: var(--teal);
  transform: scale(1.06);
}

.form-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin-bottom: calc(16px * var(--s, 1));
}

.form-badge {
  display: inline-block;
  padding: calc(8px * var(--s, 1)) calc(16px * var(--s, 1));
  border-radius: 999px;
  background: rgba(14, 129, 143, 0.1);
  border: 1px solid rgba(14, 129, 143, 0.2);
  color: var(--teal);
  font-size: calc(11px * var(--s, 1));
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: calc(14px * var(--s, 1));
}

.form-header-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(10px * var(--s, 1));
  width: 100%;
  max-width: min(880px, 100%);
}

.form-header h2 {
  font-size: clamp(calc(42.5px * var(--s, 1)), 6.25vw, calc(62.5px * var(--s, 1)));
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #f5f5f5;
  margin: 0;
  line-height: 1.05;
}

.form-header-desc {
  margin: 0;
  font-size: clamp(calc(12px * var(--s, 1)), 1.15vw, calc(15px * var(--s, 1)));
  color: #a8aeb4;
  line-height: 1.4;
  white-space: nowrap;
}

.recipe-help-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.recipe-help-link:hover {
  color: var(--cyan);
}

.help-btn.is-highlighted .help-btn-img {
  box-shadow:
    0 0 0 4px rgba(22, 184, 200, 0.35),
    0 12px 40px var(--shadow-teal);
}

.help-btn.is-highlighted {
  animation: helpPulse 1.2s ease-in-out 2;
}

@keyframes helpPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.eye-card {
  background: #fff;
  border: 1px solid rgba(14, 129, 143, 0.1);
  border-radius: calc(var(--radius-lg) * var(--s, 1));
  padding: calc(22px * var(--s, 1));
  margin-bottom: calc(10px * var(--s, 1));
  text-align: left;
  box-shadow: 0 calc(8px * var(--s, 1)) calc(28px * var(--s, 1)) rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.eye-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 calc(16px * var(--s, 1)) calc(40px * var(--s, 1)) rgba(14, 129, 143, 0.1);
}

.eye-top {
  display: flex;
  align-items: center;
  gap: calc(14px * var(--s, 1));
  margin-bottom: calc(16px * var(--s, 1));
}

.eye-icon {
  width: calc(52px * var(--s, 1));
  height: calc(52px * var(--s, 1));
  border-radius: calc(14px * var(--s, 1));
  background: linear-gradient(145deg, rgba(14, 129, 143, 0.12), rgba(22, 184, 200, 0.08));
  border: 1px solid rgba(14, 129, 143, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
}

.eye-icon svg {
  width: calc(26px * var(--s, 1));
  height: calc(26px * var(--s, 1));
}

.eye-top h3 {
  font-size: calc(24px * var(--s, 1));
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111418;
  text-transform: capitalize;
}

.eye-desc {
  font-size: calc(14px * var(--s, 1));
  color: #6b7c82;
  margin-top: calc(2px * var(--s, 1));
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: calc(14px * var(--s, 1));
}

.field {
  display: flex;
  flex-direction: column;
  gap: calc(8px * var(--s, 1));
  min-width: 0;
}

.field label {
  font-size: calc(12px * var(--s, 1));
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5a6770;
}

.field label span {
  color: var(--teal);
}

.form-box select {
  width: 100%;
  min-width: 0;
  padding: calc(15px * var(--s, 1)) calc(16px * var(--s, 1));
  border-radius: calc(14px * var(--s, 1));
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f4f7f8;
  color: #111418;
  font-size: calc(17px * var(--s, 1));
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230e818f' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right calc(14px * var(--s, 1)) center;
  padding-right: calc(36px * var(--s, 1));
}

.form-box select:hover {
  border-color: rgba(14, 129, 143, 0.35);
  background-color: #fff;
}

.form-box select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 calc(3px * var(--s, 1)) rgba(14, 129, 143, 0.12);
  background-color: #fff;
}

.quote-btn {
  display: block;
  width: min(50%, 420px);
  margin-top: calc(12px * var(--s, 1));
  margin-inline: auto;
  height: calc(58px * var(--s, 1));
  border: none;
  border-radius: calc(18px * var(--s, 1));
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #fff;
  font-family: inherit;
  font-size: calc(15px * var(--s, 1));
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 calc(16px * var(--s, 1)) calc(40px * var(--s, 1)) var(--shadow-teal);
}

.quote-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 52px rgba(22, 184, 200, 0.4);
}

/* RECIPE MODAL */

.help-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 24px;
  z-index: 99999;
}

.help-modal.active {
  display: flex;
}

.recipe-modal-content {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow: hidden;
  background: linear-gradient(180deg, #fafcfd, #eef4f6);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  padding: 24px 28px 22px;
  position: relative;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.3);
  animation: modalIn 0.3s ease;
}

.modal-eyebrow--dark {
  color: var(--teal);
}

.close-help {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: #1a2228;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease;
}

.close-help:hover {
  background: rgba(14, 129, 143, 0.12);
  color: var(--teal);
  transform: scale(1.06);
}

.recipe-title {
  font-size: clamp(24px, 3.6vw, 30px);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-align: center;
  color: #1a2228;
  margin-bottom: 14px;
}

.recipe-image {
  width: 100%;
  max-height: min(42vh, 280px);
  object-fit: contain;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
}

.recipe-info-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--teal);
  margin-bottom: 10px;
}

.recipe-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recipe-list li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.4;
  color: #5a6770;
  font-weight: 500;
}

.recipe-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 800;
}

.recipe-list li strong {
  color: #1a2228;
  font-weight: 700;
}

@media (max-height: 640px) {
  .form-modal {
    --s: 0.92;
    padding: 4px 10px;
  }

  .form-box {
    max-height: calc(100dvh - 8px);
    padding: calc(18px * var(--s)) calc(16px * var(--s));
  }

  .form-header {
    margin-bottom: calc(14px * var(--s, 1));
  }

  .form-badge {
    margin-bottom: calc(8px * var(--s, 1));
  }

  .form-header h2 {
    font-size: calc(30px * var(--s, 1));
    margin-bottom: calc(6px * var(--s, 1));
  }

  .eye-card {
    padding: calc(14px * var(--s, 1));
    margin-bottom: calc(8px * var(--s, 1));
  }

  .eye-top {
    margin-bottom: calc(12px * var(--s, 1));
  }

  .quote-btn {
    margin-top: calc(10px * var(--s, 1));
    height: calc(48px * var(--s, 1));
  }
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .logo {
    height: 100px;
  }

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

  .perks-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 16px;
  }

  .option-card-content {
    width: 58%;
    padding-right: 22px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  body {
    background:
      linear-gradient(rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.94)),
      url("assets/fondo.jpeg") center center / cover no-repeat scroll;
  }
}

@media (max-width: 520px) {
  .help-btn {
    width: 58px;
    height: 58px;
  }

  .option-card {
    min-height: calc(280px * var(--card-s, 0.9));
  }

  .option-card-content {
    width: 100%;
    min-height: auto;
    padding: 52px 22px 24px;
    margin-left: 0;
    text-align: center;
    align-items: center;
  }

  .option-card-scrim {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.15) 0%,
      rgba(0, 0, 0, 0.55) 42%,
      rgba(4, 6, 12, 0.94) 100%
    ) !important;
  }

  .option-card--ia .option-card-scrim,
  .option-card--manual .option-card-scrim {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.12) 0%,
      rgba(0, 0, 0, 0.5) 40%,
      rgba(4, 6, 12, 0.94) 100%
    ) !important;
  }

  .perks-row {
    grid-template-columns: 1fr;
    margin-top: calc(24px * var(--s));
  }

  .site-tagline {
    font-size: calc(9px * var(--s));
    letter-spacing: 0.16em;
    padding: 0 8px;
  }

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

  .form-box {
    padding: calc(20px * var(--s, 1)) calc(16px * var(--s, 1));
    max-height: calc(100dvh - 12px);
    overflow: hidden;
  }

  .form-modal {
    padding: 8px 10px;
    overflow: hidden;
    align-items: center;
  }

  .form-header {
    margin-bottom: calc(16px * var(--s, 1));
  }

  .form-header h2 {
    font-size: clamp(calc(35px * var(--s, 1)), 9.375vw, calc(50px * var(--s, 1)));
  }

  .form-header-desc {
    font-size: clamp(8px, 1.75vw, calc(13px * var(--s, 1)));
    letter-spacing: -0.01em;
  }

  .help-modal {
    padding: 12px;
    align-items: center;
    overflow: hidden;
  }

  .recipe-modal-content {
    padding: 18px 16px 20px;
    max-height: calc(100vh - 24px);
    overflow: hidden;
    margin-top: 0;
    border-radius: 20px;
  }

  .recipe-title {
    font-size: 20px;
    margin-bottom: 12px;
    padding-right: 36px;
    text-align: left;
  }

  .recipe-image {
    max-height: min(38vh, 220px);
    margin-bottom: 14px;
  }

  .recipe-info-title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .recipe-list {
    gap: 6px;
  }

  .recipe-list li {
    font-size: 12px;
    line-height: 1.38;
  }

  .ai-status-modal {
    padding: 16px;
  }

  .ai-status-card {
    padding: 24px 20px;
    border-radius: 20px;
  }
}

/* AI UPLOAD STATUS */

.ai-status-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(12px);
}

.ai-status-modal.active {
  display: flex;
}

.ai-status-card {
  width: min(100%, 420px);
  border-radius: 24px;
  padding: 32px 28px;
  text-align: center;
  position: relative;
  color: #0f172a;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  animation: modalIn 0.28s ease;
}

.ai-status-card--loading {
  background: linear-gradient(180deg, #ffffff 0%, #eef6f8 100%);
}

.ai-status-card--error {
  background: linear-gradient(180deg, #ffffff 0%, #fff3f1 100%);
}

.ai-status-card h2 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #0f172a;
}

.ai-status-card p {
  font-size: 15px;
  line-height: 1.55;
  color: #475569;
}

.ai-status-hint {
  margin-top: 10px;
  font-size: 13px;
  color: #64748b;
}

.ai-status-spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 4px solid rgba(14, 129, 143, 0.18);
  border-top-color: #0e818f;
  animation: aiSpin 0.9s linear infinite;
}

@keyframes aiSpin {
  to {
    transform: rotate(360deg);
  }
}

.ai-status-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ai-status-action {
  margin-top: 22px;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
}

.option-card--ia.is-processing {
  pointer-events: none;
  opacity: 0.88;
}

@media (max-width: 640px) and (orientation: portrait) {
  .page-intro h1 {
    font-size: clamp(calc(39px * var(--s)), calc(9.63vw * var(--s)), calc(66px * var(--s)));
    line-height: 1.05;
    letter-spacing: -0.03em;
    white-space: normal;
  }

  .page-title-line--sub {
    display: block;
  }

  .perks-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(16px * var(--s));
    margin-top: calc(24px * var(--s));
    width: 100%;
    text-align: left;
  }

  .perk {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: calc(12px * var(--s));
    width: min(100%, calc(300px * var(--s)));
    max-width: calc(100% - 32px);
  }

  .perk-icon {
    flex-shrink: 0;
  }

  .perk-text {
    align-items: flex-start;
    text-align: left;
  }

  .form-modal {
    overflow-x: hidden;
    overflow-y: auto;
    align-items: flex-start;
    -webkit-overflow-scrolling: touch;
  }

  .form-box {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100dvh - 16px);
    -webkit-overflow-scrolling: touch;
  }

  .form-header-desc {
    white-space: normal;
    font-size: clamp(calc(11px * var(--s, 1)), 2.35vw, calc(15px * var(--s, 1)));
    line-height: 1.45;
    letter-spacing: -0.005em;
  }

  .form-header-desc-line--break {
    display: block;
    margin-top: 4px;
  }

  .quote-btn {
    width: min(100%, calc(100vw - 48px));
    max-width: none;
    font-size: calc(15px * var(--s, 1) * 1.2);
    white-space: nowrap;
    letter-spacing: 0.08em;
    padding: 0 18px;
    height: calc(52px * var(--s, 1));
  }
}

/* Móvil en horizontal — celular con rotación activa */
@media (orientation: landscape) and (max-height: 540px) and (max-width: 1100px) {
  .page-intro h1 {
    font-size: clamp(
      calc(24px * var(--s) * 1.1),
      calc(4.28vw * var(--s) * 1.1),
      calc(44px * var(--s) * 1.1)
    );
  }

  .perks-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(20px, 5vw, 40px);
    row-gap: calc(16px * var(--s));
  }

  .perk:nth-child(1),
  .perk:nth-child(3) {
    justify-self: start;
    justify-content: flex-start;
  }

  .perk:nth-child(2),
  .perk:nth-child(4) {
    justify-self: end;
    flex-direction: row-reverse;
    justify-content: flex-end;
  }

  .perk:nth-child(2) .perk-text,
  .perk:nth-child(4) .perk-text {
    align-items: flex-end;
    text-align: right;
  }

  .help-modal {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .recipe-modal-content {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "title title"
      "image info";
    gap: 8px 16px;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    overflow: hidden;
    box-sizing: border-box;
  }

  .recipe-title {
    grid-area: title;
    font-size: clamp(18px, 4.2dvh, 24px);
    margin-bottom: 0;
    padding-right: 40px;
    text-align: left;
  }

  .recipe-image {
    grid-area: image;
    width: 100%;
    height: 100%;
    max-height: none;
    margin-bottom: 0;
    object-fit: contain;
    align-self: stretch;
  }

  .recipe-info {
    grid-area: info;
    align-self: stretch;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .recipe-info-title {
    font-size: clamp(14px, 3.2dvh, 18px);
    margin-bottom: 8px;
  }

  .recipe-list {
    gap: clamp(5px, 1.2dvh, 8px);
  }

  .recipe-list li {
    font-size: clamp(11px, 2.4dvh, 13.5px);
    line-height: 1.4;
  }

  .close-help {
    top: max(10px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .form-modal {
    overflow-x: hidden;
    overflow-y: auto;
    align-items: flex-start;
    padding: 4px 8px;
    -webkit-overflow-scrolling: touch;
  }

  .form-box {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100dvh - 8px);
    -webkit-overflow-scrolling: touch;
  }
}

/* Landscape ancho (iPhone Pro Max, etc.) — >920px no entra el A52 (~915px) */
@media (orientation: landscape) and (max-height: 540px) and (min-width: 920px) and (max-width: 1100px) {
  .topbar {
    padding: 2px max(14px, env(safe-area-inset-right)) 2px max(14px, env(safe-area-inset-left));
  }

  .logo {
    height: clamp(64px, 14dvh, 80px);
  }

  .help-btn {
    width: 48px;
    height: 48px;
  }

  .container {
    --s: 0.74;
    margin-top: -10px;
    padding: 0 16px max(10px, env(safe-area-inset-bottom, 8px));
  }

  .page-intro {
    margin-top: -6px;
    margin-bottom: 8px;
  }

  .page-intro h1 {
    font-size: clamp(calc(20px * var(--s)), 3.6vw, calc(28px * var(--s)));
    line-height: 1.05;
    white-space: normal;
  }

  .page-title-line {
    display: block;
  }

  .options {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .option-card {
    min-height: clamp(132px, 34dvh, 156px);
  }

  .option-card-content {
    width: 54%;
    min-height: clamp(132px, 34dvh, 156px);
    margin-left: auto;
    padding: 12px 14px 12px 8px;
    text-align: left;
    align-items: stretch;
  }

  .option-card-scrim {
    background: linear-gradient(
      100deg,
      rgba(0, 0, 0, 0.08) 0%,
      rgba(0, 0, 0, 0.2) 36%,
      rgba(6, 8, 14, 0.82) 50%,
      rgba(4, 6, 12, 0.94) 100%
    ) !important;
  }

  .option-card--ia .option-card-scrim,
  .option-card--manual .option-card-scrim {
    background: linear-gradient(
      100deg,
      rgba(0, 0, 0, 0.1) 0%,
      rgba(0, 0, 0, 0.22) 34%,
      rgba(6, 8, 14, 0.86) 50%,
      rgba(4, 6, 12, 0.96) 100%
    ) !important;
  }

  .option-card-header {
    margin-bottom: 6px;
  }

  .option-card-badge {
    padding: 4px 10px;
    font-size: 8px;
    margin-bottom: 6px;
  }

  .option-card h3 {
    font-size: clamp(calc(15px * var(--s)), 2.8vw, calc(18px * var(--s)));
  }

  .option-card-desc {
    font-size: 10px;
    line-height: 1.32;
    margin-bottom: 8px;
  }

  .option-cta-badge {
    padding: 8px 12px;
    font-size: 9px;
  }

  .perks-row {
    column-gap: clamp(12px, 4vw, 28px);
    row-gap: 8px;
    margin-top: 10px;
  }

  .perk-icon {
    width: calc(32px * var(--s));
    height: calc(32px * var(--s));
  }

  .perk-icon svg {
    width: calc(16px * var(--s));
    height: calc(16px * var(--s));
  }

  .perk-text strong {
    font-size: calc(11px * var(--s));
  }

  .perk-text span {
    font-size: calc(10px * var(--s));
    line-height: 1.3;
  }

  .site-tagline {
    margin-top: 8px;
    font-size: calc(8px * var(--s));
    letter-spacing: 0.14em;
    padding: 0 8px;
  }
}
