:root {
  --bg: #fff8ef;
  --surface: #ffffff;
  --text: #26170f;
  --muted: #715a4a;
  --brand: #e4572e;
  --brand-dark: #7b2c18;
  --green: #23734a;
  --cream: #ffe9bd;
  --line: #ead3bd;
  --shadow: 0 24px 60px rgba(83, 44, 19, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 218, 150, 0.45), transparent 32rem),
    linear-gradient(180deg, #fff8ef 0%, #fff3e3 42%, #fff8ef 100%);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px min(6vw, 72px);
  background: rgba(255, 248, 239, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--brand-dark);
}

.brand span {
  color: var(--brand);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-weight: 800;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 34px;
  align-items: center;
  padding: 54px min(6vw, 72px) 36px;
}

.hero-media {
  position: relative;
  min-height: 560px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(38, 23, 15, 0.06), rgba(38, 23, 15, 0.28)),
    url("assets/hero-recetas.png") center / cover;
  box-shadow: var(--shadow);
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  pointer-events: none;
}

.hero-badge {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: 160px;
  gap: 2px;
  padding: 18px;
  color: var(--brand-dark);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 35px rgba(38, 23, 15, 0.18);
}

.hero-badge strong {
  font-size: 3rem;
  line-height: 1;
}

.hero-badge span {
  font-weight: 900;
  line-height: 1.2;
}

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

.eyebrow,
.category {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.5rem, 5vw, 5.3rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.1;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.38rem;
  line-height: 1.18;
}

.hero p,
.section-heading p,
.tool-band p,
.newsletter p {
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions,
.newsletter form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button,
button {
  border: 0;
  border-radius: 8px;
  padding: 14px 20px;
  font-weight: 900;
  cursor: pointer;
}

.primary,
button {
  color: #ffffff;
  background: var(--brand);
}

.secondary {
  color: var(--brand-dark);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.ad-slot {
  margin: 0 min(6vw, 72px);
  padding: 22px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #c99975;
  border-radius: 8px;
  background: #fff3e2;
}

.ad-slot span {
  display: block;
  font-weight: 900;
  color: var(--brand-dark);
}

.ad-slot p {
  margin-bottom: 0;
}

.section {
  padding: 74px min(6vw, 72px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.recipe-card {
  min-height: 330px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(38, 23, 15, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.recipe-card a {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(38, 23, 15, 0.88)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 42%);
  color: #ffffff;
}

.recipe-card .category {
  color: #ffd9ad;
}

.recipe-card p {
  color: #ffeede;
}

.recipe-card small {
  margin-top: auto;
  font-weight: 900;
}

.card-budget {
  background: linear-gradient(135deg, #f8b84e, #814112);
}

.card-fast {
  background: linear-gradient(135deg, #e5522f, #741e14);
}

.card-healthy {
  background: linear-gradient(135deg, #54a45e, #174d2c);
}

.card-latin {
  background: linear-gradient(135deg, #f2c14e, #c54228 48%, #2c6f42);
}

.tool-band {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
  background: linear-gradient(135deg, #fff0d3, #ffe1bd);
}

.calculator {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

label {
  display: grid;
  gap: 6px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d9bfa7;
  border-radius: 8px;
  padding: 13px 14px;
  font: inherit;
  background: #ffffff;
  color: var(--text);
}

textarea {
  resize: vertical;
}

output {
  display: block;
  padding: 14px;
  color: var(--brand-dark);
  border-radius: 8px;
  background: #ffe4bd;
  font-weight: 900;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(280px, 1fr);
  gap: 34px;
}

.upload-section {
  background: #fffaf2;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.recipe-form,
.recipe-preview-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(83, 44, 19, 0.08);
}

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

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.image-preview {
  display: grid;
  min-height: 300px;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  border: 1px dashed #c99975;
  border-radius: 8px;
  background: #fff3e2;
  font-weight: 900;
  text-align: center;
}

.image-preview img,
.saved-recipe img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.saved-recipes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
}

.secondary-action {
  color: var(--brand-dark);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.saved-recipes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 18px;
  color: var(--muted);
  border: 1px dashed #c99975;
  border-radius: 8px;
  background: #fff3e2;
}

.saved-recipe {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(83, 44, 19, 0.08);
}

.saved-recipe-media {
  height: 180px;
  background: linear-gradient(135deg, #f7c46b, #e4572e);
}

.saved-recipe-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.saved-recipe-meta {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.saved-recipe-body p {
  margin-bottom: 0;
  color: var(--muted);
}

.delete-recipe {
  justify-self: start;
  padding: 10px 12px;
  color: var(--brand-dark);
  background: #fff0d3;
}

.check-list {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.check-list li {
  margin-bottom: 12px;
}

.newsletter {
  margin: 20px min(6vw, 72px) 72px;
  padding: 34px;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(123, 44, 24, 0.96), rgba(35, 115, 74, 0.92)),
    url("assets/hero-recetas.png") center / cover;
}

.newsletter p {
  color: #ffdcc9;
}

.newsletter input {
  max-width: 360px;
}

.newsletter button {
  background: #ffffff;
  color: var(--brand-dark);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px min(6vw, 72px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

footer div {
  display: flex;
  gap: 14px;
}

.article-page {
  max-width: 900px;
  padding: 58px min(6vw, 72px);
  margin: 0 auto;
}

.article-page h1 {
  font-size: clamp(2.1rem, 5vw, 3.8rem);
}

.article-page p,
.article-page li {
  font-size: 1.08rem;
}

.article-page .ad-slot {
  margin: 34px 0;
}

.recipe-list {
  display: grid;
  gap: 18px;
  padding: 0;
  list-style: none;
}

.recipe-list li {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

@media (max-width: 980px) {
  .recipe-grid,
  .saved-recipes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-header,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .tool-band,
  .split,
  .upload-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-media {
    min-height: 360px;
  }

  .hero-badge {
    left: 18px;
    right: auto;
    bottom: 18px;
  }
}

@media (max-width: 560px) {
  .recipe-grid,
  .saved-recipes,
  .form-row {
    grid-template-columns: 1fr;
  }
}
