:root {

  /* =========================
     FITPLATE BRAND SYSTEM
  ========================= */

  /* Fondos */
  --bg: #f4f6f1;
  --surface: #ffffff;
  --surface-soft: #eef7f1;
  --surface-warm: #f5f0e6;

  /* Texto */
  --text: #12241c;
  --muted: #66736c;

  /* Bordes */
  --border: #dce5de;

  /* Verdes de marca */
  --green-900: #0b3d2e;
  --green-800: #14513c;
  --green-700: #1f6b4b;
  --green-600: #2f9b63;
  --green-500: #49b879;
  --green-100: #e8f5ed;

  /* Acentos */
  --lime: #b8e36b;
  --lime-soft: #eef8d9;
  --cream: #f5f1e8;

  /* Sombras */
  --shadow:
    0 20px 60px rgba(11, 61, 46, 0.10);

  --shadow-soft:
    0 12px 30px rgba(11, 61, 46, 0.07);

  --shadow-strong:
    0 24px 70px rgba(11, 61, 46, 0.16);

  /* Radios */
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;

  /* Layout */
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background:
    radial-gradient(
      circle at top left,
      rgba(47, 143, 91, 0.08),
      transparent 30%
    ),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

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

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;

  background: rgba(248, 250, 247, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-bottom: 1px solid rgba(15, 76, 58, 0.08);

  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.header-content {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  text-decoration: none;
  color: var(--green-900);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo span {
  color: var(--green-600);
}

.header-badge {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

/* HERO */

.hero {
  padding: 72px 0 48px;
}

.hero-content {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: 64px;
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}

h1 {
  margin: 0;
  color: var(--green-900);
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

h1 span {
  color: var(--green-600);
}

.hero-description {
  margin: 28px 0 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-benefits span {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  color: var(--green-800);
  font-size: 0.82rem;
  font-weight: 800;
}

/* PLANNER CARD */

.planner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 34px;
  box-shadow: var(--shadow);
}

.step-indicator {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f0f4f1;
  color: var(--green-700);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  margin-bottom: 16px;
}

.planner-card h2 {
  margin: 0;
  color: var(--green-900);
  font-size: 2rem;
  letter-spacing: -0.035em;
}

.card-description {
  margin: 10px 0 24px;
  color: var(--muted);
  line-height: 1.6;
}

/* GOALS */

.goal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.goal-card {
  min-height: 174px;
  padding: 20px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #fbfcfa;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.goal-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 143, 91, 0.45);
  box-shadow: 0 12px 30px rgba(18, 63, 43, 0.08);
}

.goal-card.active {
  border-color: var(--green-600);
  background: var(--green-100);
  box-shadow: 0 12px 30px rgba(47, 143, 91, 0.12);
}

.goal-icon {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 18px;
}

.goal-title {
  display: block;
  color: var(--green-900);
  font-weight: 900;
  font-size: 1rem;
  margin-bottom: 8px;
}

.goal-text {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

/* BUTTON */

.primary-button {
  width: 100%;
  margin-top: 22px;
  min-height: 54px;
  border-radius: var(--radius-md);
  background: var(--green-900);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

.primary-button:not(:disabled):hover {
  background: var(--green-800);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

/* TABLET */

@media (max-width: 900px) {
  .hero {
    padding-top: 48px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-copy {
    max-width: 680px;
  }

  h1 {
    max-width: 700px;
  }
}

/* MOBILE */

@media (max-width: 640px) {
  .container {
    width: min(
      calc(100% - 22px),
      var(--container)
    );
  }

  

  .header-content {
    min-height: 64px;
  }

  .header-badge {
    display: none;
  }

  .hero {
    padding: 34px 0 28px;
  }

  .hero-content {
    gap: 28px;
  }

  .eyebrow {
    font-size: 0.66rem;
  }

  h1 {
    font-size: clamp(2.7rem, 15vw, 4rem);
  }

  .hero-description {
    font-size: 0.98rem;
    margin-top: 20px;
  }

  .planner-card {
    padding: 22px;
    border-radius: 22px;
  }

  .planner-card h2 {
    font-size: 1.6rem;
  }

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

  .goal-card {
    min-height: auto;
    padding: 18px;
  }

  .goal-icon {
    margin-bottom: 10px;
  }

  footer {
    padding-bottom: 24px;
  }
}
/* PROFILE STEP */

.form-group {
  margin-top: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--green-900);
  font-size: 0.8rem;
  font-weight: 900;
}

.sex-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.option-button {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fbfcfa;
  color: var(--green-900);
  font-weight: 800;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.option-button:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 143, 91, 0.4);
}

.option-button.active {
  background: var(--green-100);
  border-color: var(--green-600);
  color: var(--green-900);
}

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

.input-wrapper {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfcfa;
}

.input-wrapper input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  font-size: 0.95rem;
}

.input-wrapper span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fbfcfa;
  color: var(--text);
  outline: none;
  font-weight: 700;
}

input:focus,
select:focus {
  border-color: var(--green-600);
}

.form-actions {
  display: grid;
  grid-template-columns: 0.35fr 0.65fr;
  gap: 12px;
  margin-top: 24px;
}

.secondary-button {
  min-height: 54px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--green-900);
  font-weight: 900;
  cursor: pointer;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.secondary-button:hover {
  background: #f5f7f4;
  transform: translateY(-1px);
}

/* PROFILE STEP MOBILE */

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .sex-grid {
    grid-template-columns: 1fr 1fr;
  }
}
/* NUTRITION RESULT */

.calorie-result {
  margin-top: 24px;
  padding: 26px;
  border-radius: 22px;
  background: var(--green-900);
  color: #ffffff;
  text-align: center;
}

.calorie-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  opacity: 0.72;
}

.calorie-result strong {
  display: block;
  font-size: 3.3rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.calorie-unit {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  opacity: 0.75;
}

.macro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.macro-card {
  padding: 18px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfcfa;
  text-align: center;
}

.macro-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.macro-card strong {
  color: var(--green-900);
  font-size: 1.2rem;
}

.maintenance-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--green-100);
}

.maintenance-info span {
  color: var(--green-800);
  font-size: 0.78rem;
  font-weight: 700;
}

.maintenance-info strong {
  color: var(--green-900);
  font-size: 0.9rem;
  white-space: nowrap;
}

.result-note {
  margin: 16px 4px 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.55;
  text-align: center;
}

@media (max-width: 640px) {
  .calorie-result strong {
    font-size: 2.8rem;
  }

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

  .maintenance-info {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* FOOD SELECTION */

.food-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.food-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fbfcfa;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.food-card:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 143, 91, 0.45);
  box-shadow: 0 10px 24px rgba(18, 63, 43, 0.08);
}

.food-card.active {
  background: var(--green-100);
  border-color: var(--green-600);
  box-shadow: 0 10px 24px rgba(47, 143, 91, 0.12);
}

.food-icon {
  font-size: 1.7rem;
  margin-bottom: 12px;
}

.food-name {
  color: var(--green-900);
  font-size: 0.95rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.food-category {
  color: var(--green-700);
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.food-state {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.food-selection-info {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

/* FOOD SELECTION MOBILE */

@media (max-width: 640px) {
  .food-grid {
    grid-template-columns: 1fr;
  }

  .food-card {
    min-height: auto;
  }
}
/* GENERATED PLATE */

.plate-food-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.plate-food-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfcfa;
}

.plate-food-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.plate-food-icon {
  font-size: 1.6rem;
}

.plate-food-main strong {
  display: block;
  color: var(--green-900);
  font-size: 0.95rem;
}

.plate-food-main span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.plate-food-grams {
  flex-shrink: 0;
  color: var(--green-900);
  font-size: 1rem;
  font-weight: 900;
}

.plate-summary {
  margin-top: 18px;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.plate-calories {
  padding: 22px;
  background: var(--green-900);
  color: #ffffff;
  text-align: center;
}

.plate-calories span {
  display: block;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  opacity: 0.72;
}

.plate-calories strong {
  display: inline-block;
  margin-top: 6px;
  font-size: 2.8rem;
  line-height: 1;
}

.plate-calories small {
  margin-left: 4px;
  font-size: 0.8rem;
  font-weight: 800;
  opacity: 0.75;
}

.plate-macros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #ffffff;
}

.plate-macros div {
  padding: 16px 10px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.plate-macros div:last-child {
  border-right: 0;
}

.plate-macros span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.plate-macros strong {
  display: block;
  margin-top: 5px;
  color: var(--green-900);
  font-size: 1rem;
}

.plate-target-info {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 0.78rem;
  text-align: center;
}

.plate-target-info strong {
  color: var(--green-900);
}

.plate-calorie-warning {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(180, 120, 35, 0.22);
  border-radius: 14px;
  background: #fff8e8;
  color: #6f4b13;
  text-align: left;
}

.plate-calorie-warning strong {
  color: #5f3f0d;
  font-size: 0.82rem;
}

.plate-calorie-warning span {
  font-size: 0.76rem;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .plate-food-row {
    align-items: flex-start;
  }

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

  .plate-macros div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .plate-macros div:last-child {
    border-bottom: 0;
  }
}

/* FOOD GROUPS */

.food-groups {
  display: grid;
  gap: 28px;
  margin-top: 24px;
}

.food-group {
  padding-top: 4px;
}

.food-group + .food-group {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.food-group-header {
  margin-bottom: 14px;
}

.food-group-header h3 {
  margin: 0;
  color: var(--green-900);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.food-group-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.food-group .food-grid {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Ajuste para que las tarjetas sean algo más compactas
   ahora que tenemos más alimentos */

.food-group .food-card {
  min-height: 132px;
  padding: 16px;
}

/* TABLET */

@media (max-width: 900px) {
  .food-group .food-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* MOBILE */

@media (max-width: 640px) {
  .food-groups {
    gap: 24px;
  }

  .food-group + .food-group {
    padding-top: 20px;
  }

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

  .food-group .food-card {
    min-height: auto;
  }
}

/* =========================
   MEAL TYPE / FORM ACTIONS
========================= */

.meal-type-card {
  min-height: 180px;
}

/* Objetivo inicial: 3 tarjetas */
.goal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Tipo de comida: 2 x 2 */
.goal-grid:has(.meal-type-card) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Botones del plato generado */
.plate-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plate-actions #newPlateButton {
  grid-column: 1 / -1;
}

/* Botones de navegación del formulario */
.form-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.form-actions > button {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  margin: 0;
}

@media (max-width: 640px) {
  .goal-grid,
  .goal-grid:has(.meal-type-card),
  .plate-actions,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .plate-actions #newPlateButton {
    grid-column: auto;
  }
}

/* FOOD REQUIREMENT BADGES */

.food-group-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.food-requirement-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.food-requirement-badge.required {
  background: var(--green-100);
  color: var(--green-800);
  border: 1px solid rgba(47, 143, 91, 0.18);
}

.food-requirement-badge.optional {
  background: #f3f4f3;
  color: var(--muted);
  border: 1px solid var(--border);
}

.food-selection-status {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}

.food-selection-status.ready {
  color: var(--green-800);
  font-weight: 700;
}

/* ESTADO DE SELECCIÓN DE ALIMENTOS */

.food-selection-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  margin-top: 18px;
  margin-bottom: 14px;
}

#selectedFoodCount {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-900);
}

.food-selection-status {
  display: block;
  width: 100%;
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted);
}

.food-selection-status.ready {
  color: var(--green-800);
  font-weight: 700;
}

/* FOOD CATEGORY TABS */

.food-category-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.food-category-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 46px;
  padding: 10px 12px;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: #ffffff;
  color: var(--green-900);

  font-size: 0.78rem;
  font-weight: 800;

  cursor: pointer;

  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.food-category-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 143, 91, 0.35);
}

.food-category-tab.active {
  background: var(--green-900);
  color: #ffffff;
  border-color: var(--green-900);
}

/* TABLET */

@media (max-width: 900px) {
  .food-category-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* MOBILE */

@media (max-width: 640px) {
  .food-category-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .food-category-tab {
    font-size: 0.72rem;
    padding: 9px 8px;
  }
}

/* FOOD SELECTOR LAYOUT */

.planner-card:has(.food-category-tabs) {
  width: min(920px, calc(100vw - 48px));
  max-width: 920px;
}

.planner-card:has(.food-category-tabs) .food-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.planner-card:has(.food-category-tabs) .food-card {
  min-height: 118px;
  padding: 14px;
}

#foodCategoryContent {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

/* SCROLL INTERNO MÁS LIMPIO */

#foodCategoryContent::-webkit-scrollbar {
  width: 8px;
}

#foodCategoryContent::-webkit-scrollbar-thumb {
  background: rgba(15, 76, 58, 0.18);
  border-radius: 999px;
}

#foodCategoryContent::-webkit-scrollbar-track {
  background: transparent;
}

/* TABLET */

@media (max-width: 900px) {
  .planner-card:has(.food-category-tabs) {
    width: min(720px, calc(100vw - 32px));
  }

  .planner-card:has(.food-category-tabs) .food-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* MOBILE */

@media (max-width: 640px) {
  .planner-card:has(.food-category-tabs) {
    width: calc(100vw - 24px);
    padding: 22px;
  }

  .planner-card:has(.food-category-tabs) .food-grid {
    grid-template-columns: 1fr;
  }

  #foodCategoryContent {
    max-height: 430px;
  }
}

/* FOOD SEARCH */

.food-search-wrapper {
  position: relative;
  margin-bottom: 18px;
}

.food-search-wrapper::before {
  content: "🔎";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  pointer-events: none;
}

.food-search-input {
  width: 100%;
  height: 48px;

  padding: 0 16px 0 44px;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: #fbfcfa;
  color: var(--text);

  font-size: 0.9rem;
  font-family: inherit;

  outline: none;

  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.food-search-input::placeholder {
  color: var(--muted);
}

.food-search-input:hover {
  border-color: rgba(47, 143, 91, 0.35);
}

.food-search-input:focus {
  background: #ffffff;
  border-color: var(--green-700);
  box-shadow: 0 0 0 4px rgba(47, 143, 91, 0.10);
}

/* SELECTED FOODS SUMMARY */

.selected-foods-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 4px;
}

.selected-foods-summary:not(:empty) {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbf9;
  color: var(--green-900);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
}


.selected-food-chip {
  display: inline-flex;
  align-items: center;

  padding: 7px 10px;

  border-radius: 999px;
  border: 1px solid rgba(47, 143, 91, 0.16);

  background: #ffffff;
  color: var(--green-900);

  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
}
/* COMPACT HERO ON FOOD SELECTOR */

body:has(.food-category-tabs) .hero {
  padding-top: 48px;
}

body:has(.food-category-tabs) .hero h1 {
  font-size: clamp(3rem, 5vw, 5.2rem);
  line-height: 0.95;
  max-width: 520px;
}

body:has(.food-category-tabs) .hero p {
  max-width: 430px;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* =========================
   MAIN HEADER
========================= */

.header-content {
  min-height: 72px;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.logo {
  display: inline-flex;
  align-items: center;

  color: var(--green-900);
  text-decoration: none;

  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.logo span {
  color: var(--green-600);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.main-nav a {
  position: relative;

  color: var(--text);
  text-decoration: none;

  font-size: 0.88rem;
  font-weight: 700;

  transition: color 160ms ease;
}

.main-nav a::after {
  content: "";

  position: absolute;
  left: 0;
  bottom: -7px;

  width: 100%;
  height: 2px;

  background: var(--green-600);

  transform: scaleX(0);
  transform-origin: right;

  transition: transform 180ms ease;
}

.main-nav a:hover {
  color: var(--green-700);
}

.main-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 42px;
  padding: 0 18px;

  border-radius: 999px;

  background: var(--green-900);
  color: #ffffff;

  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;

  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.header-cta:hover {
  transform: translateY(-2px);

  box-shadow:
    0 10px 24px rgba(15, 76, 58, 0.16);
}

.header-cta span {
  transition: transform 160ms ease;
}

.header-cta:hover span {
  transform: translateX(3px);
}

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

  .header-content {
    grid-template-columns: auto 1fr;
  }

  .header-cta {
    justify-self: end;
  }
}

@media (max-width: 520px) {
  .header-content {
    min-height: 64px;
    gap: 16px;
  }

  .logo {
    font-size: 1.25rem;
  }

  .header-cta {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.76rem;
  }
}

/* =========================
   DYNAMIC HERO
========================= */

.hero-copy {
  position: relative;
}

.hero-title {
  margin: 20px 0 22px;
}

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

.hero-title-accent {
  color: var(--green-600);
}

.hero-description {
  max-width: 540px;
}

.hero-live-example {
  margin-top: 28px;
  padding: 16px 18px;

  border: 1px solid rgba(15, 76, 58, 0.10);
  border-radius: 18px;

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.92),
      rgba(234, 246, 238, 0.82)
    );

  box-shadow:
    0 14px 35px rgba(15, 76, 58, 0.06);
}

.hero-live-label {
  display: block;

  margin-bottom: 9px;

  color: var(--green-700);

  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.hero-live-foods {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;

  color: var(--text);

  font-size: 0.9rem;
  font-weight: 700;
}

.hero-live-foods strong {
  color: var(--green-700);
}

.hero-live-separator {
  color: var(--muted);
  font-weight: 500;
}

.hero-live-arrow {
  margin: 0 4px;

  color: var(--green-600);

  font-size: 1.1rem;
  font-weight: 900;
}


/* =========================
   HERO ENTRANCE ANIMATION
========================= */

.hero-reveal {
  opacity: 0;
  transform: translateY(22px);

  animation:
    heroReveal 700ms cubic-bezier(0.22, 1, 0.36, 1)
    forwards;
}

.hero-delay-1 {
  animation-delay: 80ms;
}

.hero-delay-2 {
  animation-delay: 170ms;
}

.hero-delay-3 {
  animation-delay: 260ms;
}

.hero-delay-4 {
  animation-delay: 350ms;
}

.hero-delay-5 {
  animation-delay: 440ms;
}

.hero-delay-6 {
  animation-delay: 530ms;
}

.hero-delay-7 {
  animation-delay: 620ms;
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ACCESIBILIDAD */

@media (prefers-reduced-motion: reduce) {
  .hero-reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}


/* MOBILE */

@media (max-width: 640px) {
  .hero-live-example {
    padding: 14px;
  }

  .hero-live-foods {
    font-size: 0.82rem;
    gap: 6px;
  }

  .hero-live-arrow {
    width: 100%;
    margin: 2px 0;
  }
}

/* =========================
   HERO BRAND UPGRADE
========================= */

.hero {
  position: relative;
  overflow: hidden;

  background:
    radial-gradient(
      circle at 14% 20%,
      rgba(184, 227, 107, 0.18),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      var(--surface-warm) 0%,
      var(--bg) 42%,
      var(--surface-soft) 100%
    );
}

.hero::before {
  content: "";

  position: absolute;
  width: 420px;
  height: 420px;

  left: -160px;
  bottom: -190px;

  border-radius: 50%;

  background:
    rgba(47, 155, 99, 0.08);

  filter: blur(10px);

  pointer-events: none;
}

.hero::after {
  content: "";

  position: absolute;
  width: 360px;
  height: 360px;

  right: -130px;
  top: -170px;

  border-radius: 50%;

  background:
    rgba(184, 227, 107, 0.12);

  pointer-events: none;
}

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

.eyebrow {
  background: var(--lime-soft);
  color: var(--green-900);

  border: 1px solid rgba(184, 227, 107, 0.55);

  box-shadow:
    0 8px 20px rgba(11, 61, 46, 0.05);
}

.hero-title {
  color: var(--green-900);
  letter-spacing: -0.055em;
}

.hero-title-accent {
  position: relative;
  display: inline-block;

  color: var(--green-600);
}

.hero-title-accent::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  bottom: -5px;

  height: 7px;

  border-radius: 999px;

  background: var(--lime);

  opacity: 0.55;

  transform: scaleX(0.82);
  transform-origin: left;
}

.hero-description {
  color: #56655e;
}

.hero-live-example {
  border:
    1px solid rgba(11, 61, 46, 0.10);

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.95),
      rgba(238, 248, 217, 0.82)
    );

  box-shadow: var(--shadow-soft);
}

.hero-live-label {
  color: var(--green-800);
}

.hero-live-foods strong {
  position: relative;

  color: var(--green-900);
}

.hero-live-foods strong::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  bottom: -3px;

  height: 3px;

  border-radius: 999px;

  background: var(--lime);
}


/* =========================
   PREMIUM PLANNER CARD
========================= */

.hero .planner-card {
  position: relative;

  border:
    1px solid rgba(11, 61, 46, 0.10);

  background:
    rgba(255, 255, 255, 0.92);

  box-shadow: var(--shadow-strong);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.hero .planner-card::before {
  content: "";

  position: absolute;

  top: 0;
  left: 28px;
  right: 28px;

  height: 4px;

  border-radius:
    0 0 999px 999px;

  background:
    linear-gradient(
      90deg,
      var(--green-600),
      var(--lime)
    );
}

.hero .primary-button {
  box-shadow:
    0 12px 30px rgba(11, 61, 46, 0.16);
}

.hero .primary-button:not(:disabled):hover {
  transform: translateY(-2px);

  box-shadow:
    0 16px 36px rgba(11, 61, 46, 0.22);
}

/* =========================
   HERO FOOD ROTATION
========================= */

#heroFoodProtein,
#heroFoodCarbs,
#heroFoodVegetable {
  display: inline-block;

  transition:
    opacity 220ms ease,
    transform 220ms ease,
    filter 220ms ease;
}

.hero-food-changing {
  opacity: 0;
  transform: translateY(6px);
  filter: blur(2px);
}

/* =========================
   SCROLL REVEAL SYSTEM
========================= */

[data-reveal] {
  opacity: 0;
  transform: translateY(32px);

  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal="left"] {
  transform: translateX(-36px);
}

[data-reveal="right"] {
  transform: translateX(36px);
}

[data-reveal="scale"] {
  transform: scale(0.96);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

[data-reveal-delay="1"] {
  transition-delay: 100ms;
}

[data-reveal-delay="2"] {
  transition-delay: 200ms;
}

[data-reveal-delay="3"] {
  transition-delay: 300ms;
}

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

/* =========================
   HOW IT WORKS
========================= */

.how-it-works-section {
  padding: 110px 0;

  background:
    linear-gradient(
      180deg,
      var(--bg) 0%,
      var(--surface-warm) 100%
    );
}

.section-heading {
  max-width: 680px;
  margin-bottom: 54px;
}

.section-eyebrow {
  display: inline-flex;

  margin-bottom: 16px;

  color: var(--green-700);

  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.section-heading h2 {
  margin: 0 0 18px;

  color: var(--green-900);

  font-size: clamp(2.4rem, 4vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.section-heading h2 span {
  color: var(--green-600);
}

.section-heading p {
  margin: 0;

  max-width: 580px;

  color: var(--muted);

  font-size: 1rem;
  line-height: 1.7;
}

.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.how-step-card {
  position: relative;

  min-height: 280px;
  padding: 28px;

  border: 1px solid rgba(11, 61, 46, 0.08);
  border-radius: var(--radius-lg);

  background: rgba(255, 255, 255, 0.84);

  box-shadow: var(--shadow-soft);

  overflow: hidden;

  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.how-step-card:hover {
  transform: translateY(-6px);

  border-color: rgba(47, 155, 99, 0.22);

  box-shadow: var(--shadow);
}

.how-step-number {
  position: absolute;

  top: 18px;
  right: 22px;

  color: rgba(11, 61, 46, 0.12);

  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.how-step-icon {
  width: 52px;
  height: 52px;

  display: grid;
  place-items: center;

  margin-bottom: 28px;

  border-radius: 16px;

  background: var(--lime-soft);

  font-size: 1.55rem;
}

.how-step-card h3 {
  margin: 0 0 12px;

  color: var(--green-900);

  font-size: 1.15rem;
}

.how-step-card p {
  margin: 0;

  color: var(--muted);

  font-size: 0.9rem;
  line-height: 1.65;
}


/* TABLET */

@media (max-width: 900px) {
  .how-it-works-grid {
    grid-template-columns: 1fr;
  }

  .how-step-card {
    min-height: auto;
  }
}


/* MOBILE */

@media (max-width: 640px) {
  .how-it-works-section {
    padding: 76px 0;
  }

  .section-heading {
    margin-bottom: 36px;
  }

  .how-step-card {
    padding: 24px;
  }
}

/* =========================
   IMPACT SECTION
========================= */

.impact-section {
  padding: 110px 0;

  background:
    linear-gradient(
      135deg,
      #082f24 0%,
      var(--green-900) 55%,
      #124d39 100%
    );

  color: #ffffff;
}

.impact-content {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 70px;
  align-items: center;
}

.impact-copy {
  max-width: 620px;
}

.impact-eyebrow {
  display: inline-flex;

  margin-bottom: 18px;

  color: var(--lime);

  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.impact-copy h2 {
  margin: 0 0 20px;

  font-size: clamp(2.7rem, 4vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.impact-copy h2 span {
  color: var(--lime);
}

.impact-copy p {
  margin: 0;

  max-width: 560px;

  color: rgba(255, 255, 255, 0.72);

  font-size: 1rem;
  line-height: 1.7;
}

.impact-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.impact-stat {
  min-height: 150px;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  padding: 24px;

  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;

  background: rgba(255, 255, 255, 0.06);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.impact-stat:hover {
  transform: translateY(-5px);

  background: rgba(255, 255, 255, 0.10);

  border-color: rgba(184, 227, 107, 0.35);
}

.impact-stat strong {
  margin-bottom: 6px;

  color: var(--lime);

  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.impact-stat span {
  color: rgba(255, 255, 255, 0.78);

  font-size: 0.86rem;
  line-height: 1.4;
}


/* TABLET */

@media (max-width: 900px) {
  .impact-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}


/* MOBILE */

@media (max-width: 640px) {
  .impact-section {
    padding: 76px 0;
  }

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

  .impact-stat {
    min-height: 125px;
    padding: 20px;
  }

  .impact-stat strong {
    font-size: 2.1rem;
  }
}


/* =========================
   PLANNER STEP TRANSITIONS
========================= */

.planner-card.step-enter {
  animation:
    plannerStepEnter 480ms
    cubic-bezier(0.22, 1, 0.36, 1)
    both;
}

@keyframes plannerStepEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    filter: blur(2px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .planner-card.step-enter {
    animation: none;
  }
}

/* =========================
   HEADER SCROLL STATE
========================= */

.site-header.is-scrolled {
  background: rgba(248, 250, 247, 0.96);

  border-bottom-color:
    rgba(11, 61, 46, 0.12);

  box-shadow:
    0 10px 30px rgba(11, 61, 46, 0.08);
}

.site-header.is-scrolled .header-content {
  min-height: 64px;
}

/* =========================
   HERO PLANNER DEPTH
========================= */

.hero .planner-card {
  transform-style: preserve-3d;

  animation:
    plannerFloat 6s ease-in-out infinite;

  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

@keyframes plannerFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero .planner-card {
    animation: none;
  }
}

/* =========================
   HERO AMBIENT MOTION
========================= */

.hero-ambient {
  position: absolute;
  inset: 0;

  overflow: hidden;
  pointer-events: none;

  z-index: 0;
}

.hero-orb {
  position: absolute;

  border-radius: 50%;

  filter: blur(4px);

  opacity: 0.55;

  animation:
    heroOrbFloat 12s ease-in-out infinite;
}

.hero-orb-one {
  width: 240px;
  height: 240px;

  left: 4%;
  top: 12%;

  background:
    radial-gradient(
      circle,
      rgba(184, 227, 107, 0.28),
      rgba(184, 227, 107, 0)
    );
}

.hero-orb-two {
  width: 300px;
  height: 300px;

  right: 2%;
  bottom: 6%;

  background:
    radial-gradient(
      circle,
      rgba(47, 155, 99, 0.16),
      rgba(47, 155, 99, 0)
    );

  animation-delay: -5s;
}

.hero-flow-line {
  position: absolute;

  width: 520px;
  height: 2px;

  left: 50%;
  top: 76%;

  transform:
    translateX(-50%)
    rotate(-8deg);

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(184, 227, 107, 0.15),
      rgba(47, 155, 99, 0.55),
      rgba(184, 227, 107, 0.15),
      transparent
    );

  filter: blur(0.3px);

  animation:
    heroFlowLine 6s ease-in-out infinite;
}

@keyframes heroOrbFloat {
  0%,
  100% {
    transform:
      translate3d(0, 0, 0)
      scale(1);
  }

  50% {
    transform:
      translate3d(18px, -14px, 0)
      scale(1.05);
  }
}

@keyframes heroFlowLine {
  0%,
  100% {
    opacity: 0.25;
    transform:
      translateX(-50%)
      rotate(-8deg)
      scaleX(0.92);
  }

  50% {
    opacity: 0.8;
    transform:
      translateX(-50%)
      rotate(-8deg)
      scaleX(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orb,
  .hero-flow-line {
    animation: none;
  }
}

@media (max-width: 640px) {
  .hero-flow-line {
    width: 320px;
  }

  .hero-orb-one {
    width: 180px;
    height: 180px;
  }

  .hero-orb-two {
    width: 220px;
    height: 220px;
  }
}

/* =========================
   HERO TITLE COLOR HIERARCHY
========================= */

.hero-title-goal {
  color: var(--green-900);
}

.hero-title-foods {
  color: var(--green-700);
}

.hero-title-plate {
  color: var(--green-600);
}

/* Elimina el antiguo subrayado de Tu plato */
.hero-title-accent::after,
.hero-title-plate::after {
  content: none;
  display: none;
}



/* =========================
   WHY FITPLATE — V2
========================= */

.why-fitplate-section {
  padding: 110px 0;

  background:
    linear-gradient(
      180deg,
      var(--surface-warm) 0%,
      var(--bg) 100%
    );
}

.why-fitplate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.why-feature-card {
  position: relative;

  min-height: 330px;
  padding: 28px;

  border-radius: 24px;

  border:
    1px solid rgba(11, 61, 46, 0.08);

  background: #ffffff;

  box-shadow: var(--shadow-soft);

  overflow: hidden;

  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.why-feature-card:hover {
  transform: translateY(-6px);

  border-color:
    rgba(47, 155, 99, 0.24);

  box-shadow: var(--shadow);
}

.why-feature-number {
  position: absolute;

  top: 18px;
  right: 20px;

  color:
    rgba(11, 61, 46, 0.09);

  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;

  letter-spacing: -0.06em;
}

.why-feature-card .why-card-tag {
  display: inline-flex;

  margin-bottom: 22px;

  color: var(--green-700);

  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.why-feature-card h3 {
  margin: 0 0 14px;

  color: var(--green-900);

  font-size: 1.4rem;
  line-height: 1.15;

  letter-spacing: -0.035em;
}

.why-feature-card p {
  margin: 0;

  color: var(--muted);

  font-size: 0.9rem;
  line-height: 1.7;
}


/* =========================
   CARD 01 — FOODS
========================= */

.why-feature-foods {
  background:
    linear-gradient(
      145deg,
      var(--green-900),
      var(--green-800)
    );

  color: #ffffff;
}

.why-feature-foods .why-card-tag {
  color: var(--lime);
}

.why-feature-foods h3 {
  color: #ffffff;
}

.why-feature-foods p {
  color:
    rgba(255, 255, 255, 0.72);
}

.why-feature-foods .why-feature-number {
  color:
    rgba(255, 255, 255, 0.08);
}

.why-feature-food-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;

  margin-top: 30px;
}

.why-feature-food-cloud span {
  padding: 9px 12px;

  border-radius: 999px;

  background:
    rgba(255, 255, 255, 0.08);

  border:
    1px solid rgba(255, 255, 255, 0.10);

  color: #ffffff;

  font-size: 0.76rem;
  font-weight: 800;

  transition:
    transform 160ms ease,
    background 160ms ease;
}

.why-feature-food-cloud span:hover {
  transform: translateY(-2px);

  background:
    rgba(255, 255, 255, 0.13);
}


/* =========================
   CARD 02 — CALCULATION
========================= */

.why-feature-calculation {
  background:
    linear-gradient(
      180deg,
      #ffffff,
      var(--surface-soft)
    );
}

.why-feature-macros {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;

  margin-top: 28px;
}

.why-feature-macros span {
  display: flex;
  flex-direction: column;
  gap: 4px;

  padding: 14px;

  border-radius: 16px;

  background: #ffffff;

  border:
    1px solid rgba(11, 61, 46, 0.08);
}

.why-feature-macros strong {
  color: var(--green-600);

  font-size: 1rem;
  font-weight: 900;
}

.why-feature-macros span {
  color: var(--muted);

  font-size: 0.75rem;
  line-height: 1.3;
}


/* =========================
   CARD 03 — RESULT
========================= */

.why-feature-result {
  background:
    linear-gradient(
      180deg,
      var(--surface-warm),
      #ffffff
    );
}

.why-result-visual {
  margin-top: 30px;

  display: flex;
  align-items: center;
  gap: 18px;
}

.why-result-plate {
  width: 118px;
  aspect-ratio: 1;

  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;

  border-radius: 50%;

  background: #ffffff;

  border:
    8px solid #ffffff;

  box-shadow:
    0 16px 30px rgba(11, 61, 46, 0.12);

  overflow: hidden;

  transform: rotate(-3deg);

  transition:
    transform 180ms ease;
}

.why-feature-result:hover .why-result-plate {
  transform:
    rotate(0deg)
    translateY(-3px);
}

.why-result-plate span:nth-child(1) {
  grid-row: 1 / 3;

  background:
    var(--green-100);

  border-right:
    1px solid rgba(11, 61, 46, 0.08);
}

.why-result-plate span:nth-child(2) {
  background:
    var(--surface-warm);

  border-bottom:
    1px solid rgba(11, 61, 46, 0.08);
}

.why-result-plate span:nth-child(3) {
  background:
    var(--lime-soft);
}

.why-result-visual > strong {
  color: var(--green-900);

  font-size: 1rem;
  font-weight: 900;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
  .why-fitplate-grid {
    grid-template-columns: 1fr;
  }

  .why-feature-card {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .why-fitplate-section {
    padding: 76px 0;
  }

  .why-feature-card {
    padding: 24px;
  }
}

/* =========================
   WHY FITPLATE — SPEED
========================= */

.why-speed-card {
  margin-top: 22px;
  padding: 30px 34px;

  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 50px;

  border-radius: 24px;

  background:
    linear-gradient(
      135deg,
      var(--green-900),
      var(--green-800)
    );

  border:
    1px solid rgba(255, 255, 255, 0.08);

  box-shadow: var(--shadow);

  color: #ffffff;
}

.why-speed-copy {
  max-width: 560px;
}

.why-speed-card .why-card-tag {
  display: inline-flex;

  margin-bottom: 12px;

  color: var(--lime);

  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.why-speed-card h3 {
  margin: 0 0 10px;

  color: #ffffff;

  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

.why-speed-card h3 span {
  color: var(--lime);
}

.why-speed-card p {
  margin: 0;

  color: rgba(255, 255, 255, 0.68);

  font-size: 0.88rem;
  line-height: 1.6;
}

.why-speed-flow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.why-speed-step {
  min-width: 105px;

  display: flex;
  flex-direction: column;
  gap: 4px;

  padding: 14px 16px;

  border-radius: 16px;

  background:
    rgba(255, 255, 255, 0.08);

  border:
    1px solid rgba(255, 255, 255, 0.10);
}

.why-speed-step span {
  color: var(--lime);

  font-size: 0.62rem;
  font-weight: 900;
}

.why-speed-step strong {
  color: #ffffff;

  font-size: 0.78rem;
}

.why-speed-arrow {
  color: var(--lime);

  font-size: 1rem;
  font-weight: 900;
}


/* TABLET / MOBILE */

@media (max-width: 900px) {
  .why-speed-card {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .why-speed-flow {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .why-speed-card {
    padding: 24px;
  }

  .why-speed-flow {
    flex-direction: column;
    align-items: stretch;
  }

  .why-speed-step {
    min-width: 0;
  }

  .why-speed-arrow {
    transform: rotate(90deg);
    align-self: center;
  }
}

/* =========================
   FINAL CTA
========================= */

.final-cta-section {
  padding: 90px 0 100px;

  background:
    linear-gradient(
      180deg,
      var(--bg),
      var(--surface-soft)
    );
}

.final-cta-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 48px;

  padding: 44px 48px;

  border-radius: 28px;

  background:
    linear-gradient(
      135deg,
      var(--green-900),
      var(--green-800)
    );

  box-shadow: var(--shadow-strong);
}

.final-cta-copy {
  max-width: 650px;
}

.final-cta-card .section-eyebrow {
  color: var(--lime);
}

.final-cta-card h2 {
  margin: 0 0 16px;

  color: #ffffff;

  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.final-cta-card h2 span {
  color: var(--lime);
}

.final-cta-card p {
  margin: 0;

  color: rgba(255, 255, 255, 0.72);

  font-size: 0.95rem;
  line-height: 1.65;
}

.final-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-height: 50px;
  padding: 0 22px;

  border-radius: 999px;

  background: var(--lime);
  color: var(--green-900);

  text-decoration: none;
  font-weight: 900;

  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.final-cta-button:hover {
  transform: translateY(-2px);

  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.16);
}

.final-cta-button span {
  transition: transform 160ms ease;
}

.final-cta-button:hover span {
  transform: translateX(3px);
}

@media (max-width: 800px) {
  .final-cta-card {
    grid-template-columns: 1fr;
    padding: 36px;
  }

  .final-cta-button {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .final-cta-section {
    padding: 70px 0 80px;
  }

  .final-cta-card {
    padding: 28px 24px;
  }
}

/* =========================
   FOOTER
========================= */

.site-footer {
  padding: 56px 0 24px;
  margin-top: 0;
  background: var(--green-900);
  color: #ffffff;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.footer-logo {
  display: inline-flex;
  color: #ffffff;
  text-decoration: none;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.footer-logo span {
  color: var(--lime);
}

.footer-brand p {
  margin: 14px 0 0;
  max-width: 360px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: left;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  transition: color 160ms ease;
}

.footer-links a:hover {
  color: var(--lime);
}

.footer-disclaimer strong {
  display: block;
  margin-bottom: 10px;
  color: var(--lime);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.footer-disclaimer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: left;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.74rem;
}

@media (max-width: 800px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 640px) {
  .site-footer {
    padding: 38px 0 22px;
  }

  .footer-content {
    gap: 26px;
  }

  .footer-brand p {
    margin-top: 10px;
    max-width: 100%;
  }

  .footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 4px;
  }

  .footer-disclaimer {
    padding-top: 4px;
  }

  .footer-disclaimer p {
    max-width: 100%;
    font-size: 0.76rem;
    line-height: 1.7;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 24px;
    padding-top: 16px;
    gap: 8px;
  }
}

/* =========================
   FINAL LANDING SPACING
========================= */

.why-fitplate-section {
  padding-bottom: 58px;
}

.final-cta-section {
  padding: 34px 0 64px;
}

/* =========================
   REAL GENERATED PLATE
========================= */

.generated-plate-visual {
  margin: 26px 0 28px;
}

.generated-plate {
  width: min(310px, 78%);
  aspect-ratio: 1;

  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;

  border: 12px solid #ffffff;
  border-radius: 50%;

  overflow: hidden;

  background: #ffffff;

  box-shadow:
    0 20px 50px rgba(11, 61, 46, 0.15);

  transform: rotate(-2deg);

  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.generated-plate:hover {
  transform:
    rotate(0deg)
    translateY(-4px);

  box-shadow:
    0 28px 60px rgba(11, 61, 46, 0.20);
}

.generated-plate-section {
  min-width: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 16px 12px;

  text-align: center;
}

.generated-plate-protein {
  grid-row: 1 / 3;

  background:
    linear-gradient(
      180deg,
      #e8f5ed,
      #dcefe3
    );

  border-right:
    1px solid rgba(11, 61, 46, 0.08);
}

.generated-plate-carbs {
  background: var(--surface-warm);

  border-bottom:
    1px solid rgba(11, 61, 46, 0.08);
}

.generated-plate-vegetable {
  background: var(--lime-soft);
}

.generated-plate-icon {
  margin-bottom: 5px;

  font-size: 1.55rem;
}

.generated-plate-category {
  margin-bottom: 5px;

  color: var(--muted);

  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.generated-plate-section strong {
  max-width: 100%;

  color: var(--green-900);

  font-size: 0.78rem;
  line-height: 1.2;
}

.generated-plate-section small {
  margin-top: 4px;

  color: var(--green-700);

  font-size: 0.72rem;
  font-weight: 800;
}

.generated-plate-fat {
  width: fit-content;
  max-width: 100%;

  margin: 16px auto 0;
  padding: 10px 14px;

  display: flex;
  align-items: center;
  gap: 10px;

  border:
    1px solid rgba(11, 61, 46, 0.10);

  border-radius: 999px;

  background: #ffffff;

  box-shadow: var(--shadow-soft);
}

.generated-plate-fat > span {
  font-size: 1.1rem;
}

.generated-plate-fat div {
  display: flex;
  flex-direction: column;
}

.generated-plate-fat small {
  color: var(--muted);

  font-size: 0.58rem;
  font-weight: 700;
}

.generated-plate-fat strong {
  color: var(--green-900);

  font-size: 0.72rem;
}


/* MOBILE */

@media (max-width: 640px) {
  .generated-plate {
    width: min(250px, 88%);
  }

  .generated-plate-section {
    padding: 12px 8px;
  }

  .generated-plate-icon {
    font-size: 1.3rem;
  }

  .generated-plate-section strong {
    font-size: 0.7rem;
  }
}
#crear-plato {
  scroll-margin-top: 110px;
}

/* =========================
   GENERATED RESULT POLISH
========================= */

.generated-plate-visual {
  margin: 18px 0 22px;
}

.generated-plate {
  width: min(330px, 82%);
}

.plate-food-list {
  margin-top: 18px;
  gap: 10px;
}

.plate-food-row {
  padding: 13px 16px;
}

.plate-food-main strong {
  font-size: 0.9rem;
}

.plate-food-grams {
  font-size: 0.95rem;
}

.plate-summary {
  margin-top: 16px;
}

/* =========================
   MOBILE FINAL FIXES
========================= */

@media (max-width: 640px) {

  .plate-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .plate-actions #changeMealTypeButton,
  .plate-actions #changeFoodsButton,
  .plate-actions #newPlateButton {
    width: 100%;
    grid-column: 1 / -1;
  }

  .plate-actions #newPlateButton {
    margin-top: 0;
  }
}