/* RecipeHelp.site — colorful mobile-first recipes */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --brand: #ff4d6d;
  --brand-deep: #e63950;
  --mint: #2ec4b6;
  --mint-deep: #1fa896;
  --sun: #ffc857;
  --sun-deep: #f0a500;
  --grape: #7b61ff;
  --ink: #1c1635;
  --ink-soft: #4a4266;
  --cream: #fff8f2;
  --white: #ffffff;
  --shadow: 0 12px 32px rgba(28, 22, 53, 0.12);
  --radius: 22px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Nunito', sans-serif;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 80% at 10% -10%, #ffe0e8 0%, transparent 55%),
    radial-gradient(ellipse 100% 70% at 100% 0%, #d8fff8 0%, transparent 50%),
    radial-gradient(ellipse 80% 50% at 50% 100%, #fff3c4 0%, transparent 45%),
    var(--cream);
  background-attachment: fixed;
  min-height: 100dvh;
  line-height: 1.55;
  padding-bottom: calc(72px + var(--safe-b));
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  background: none;
}

ul {
  list-style: none;
}

/* —— Top bar —— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  min-height: var(--nav-h);
  backdrop-filter: blur(14px);
  background: rgba(255, 248, 242, 0.82);
  border-bottom: 1px solid rgba(255, 77, 109, 0.12);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: logoPop 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(255, 77, 109, 0.28);
  background: #fff;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.logo-text em {
  font-style: normal;
  color: var(--mint-deep);
  font-size: 0.82em;
}

.search-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--sun), #ffe8a3);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(255, 200, 87, 0.45);
  transition: transform 0.2s ease;
}

.search-btn:active {
  transform: scale(0.94);
}

/* —— Bottom nav —— */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 8px calc(8px + var(--safe-b));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(28, 22, 53, 0.08);
  box-shadow: 0 -8px 28px rgba(28, 22, 53, 0.06);
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-soft);
  border-radius: 14px;
  transition: color 0.2s, background 0.2s;
}

.bottom-nav a svg {
  width: 22px;
  height: 22px;
}

.bottom-nav a.active {
  color: var(--brand);
  background: rgba(255, 77, 109, 0.1);
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: calc(100dvh - var(--nav-h) - 72px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-color: #2a1f3d;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  animation: heroZoom 14s ease-in-out infinite alternate;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 28px 22px 36px;
  color: var(--white);
  animation: riseIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 11vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.hero-brand em {
  font-style: normal;
  color: var(--sun);
}

.hero p {
  font-size: 1.05rem;
  font-weight: 600;
  opacity: 0.95;
  max-width: 28ch;
  margin-bottom: 22px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--white);
  color: var(--brand-deep);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
}

.btn-solid {
  background: linear-gradient(135deg, var(--brand), var(--grape));
  color: var(--white);
  box-shadow: 0 8px 22px rgba(255, 77, 109, 0.35);
}

.btn-mint {
  background: linear-gradient(135deg, var(--mint), #3dd6c6);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(46, 196, 182, 0.35);
}

/* —— Sections —— */
.section {
  padding: 28px 18px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.section-head a {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--brand);
}

.section-sub {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-top: -8px;
  margin-bottom: 16px;
}

/* Category chips — interaction containers */
.chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 18px 12px;
  margin: 0 -18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 4px 14px rgba(28, 22, 53, 0.08);
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

a.chip {
  display: inline-flex;
  align-items: center;
}

.chip:nth-child(1) { --c: var(--brand); }
.chip:nth-child(2) { --c: var(--mint); }
.chip:nth-child(3) { --c: var(--sun-deep); }
.chip:nth-child(4) { --c: var(--grape); }
.chip:nth-child(5) { --c: #ff6b35; }
.chip:nth-child(6) { --c: #06d6a0; }

.chip.active,
.chip:active {
  border-color: var(--c, var(--brand));
  background: color-mix(in srgb, var(--c, var(--brand)) 14%, white);
  transform: translateY(-2px);
}

/* Recipe list — tap targets, not heavy cards */
.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recipe-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s;
  animation: riseIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.recipe-item:nth-child(1) { animation-delay: 0.05s; }
.recipe-item:nth-child(2) { animation-delay: 0.1s; }
.recipe-item:nth-child(3) { animation-delay: 0.15s; }
.recipe-item:nth-child(4) { animation-delay: 0.2s; }
.recipe-item:nth-child(5) { animation-delay: 0.25s; }
.recipe-item:nth-child(6) { animation-delay: 0.3s; }

.recipe-item:active {
  transform: scale(0.98);
}

.recipe-thumb {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  object-fit: cover;
  background: #f0e6ea;
}

.recipe-meta h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.25;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.recipe-meta p {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(123, 97, 255, 0.12);
  color: var(--grape);
}

.tag.time {
  background: rgba(46, 196, 182, 0.15);
  color: var(--mint-deep);
}

.tag.diff {
  background: rgba(255, 200, 87, 0.25);
  color: #b8860b;
}

/* Featured strip */
.featured {
  margin: 8px 0 4px;
  padding: 0 18px;
}

.featured-slide {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 220px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
  background-color: #3d2a55;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  animation: riseIn 0.7s ease both;
}

.featured-slide .label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin-bottom: 6px;
}

.featured-slide h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1.15;
  margin-bottom: 8px;
}

.featured-slide p {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.9;
  max-width: 22ch;
}

/* Page header (inner pages) */
.page-hero {
  padding: 24px 18px 8px;
  animation: riseIn 0.55s ease both;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 8vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.page-hero p {
  color: var(--ink-soft);
  font-weight: 600;
  max-width: 36ch;
}

/* Recipe detail */
.detail-hero {
  position: relative;
  margin: 0 0 8px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 20px 28px;
  color: var(--white);
  background-color: #2a1f3d;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.detail-hero .back {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  color: var(--white);
  z-index: 2;
}

.detail-hero h1 {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.3rem);
  line-height: 1.15;
  max-width: 14ch;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.detail-stats {
  display: flex;
  gap: 10px;
  padding: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.detail-stats::-webkit-scrollbar {
  display: none;
}

.stat {
  flex: 0 0 auto;
  min-width: 100px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(28, 22, 53, 0.08);
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--brand);
}

.stat span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.block {
  padding: 8px 18px 20px;
}

.block h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.ingredients li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(28, 22, 53, 0.1);
  font-weight: 600;
}

.ingredients li::before {
  content: '';
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--mint), var(--sun));
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.steps {
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 16px 16px 16px 56px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(28, 22, 53, 0.05);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  background: linear-gradient(135deg, var(--brand), var(--grape));
}

/* Legal / policy pages */
.legal {
  padding: 8px 18px 40px;
  max-width: 640px;
}

.legal h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 22px 0 8px;
  color: var(--brand-deep);
}

.legal p,
.legal li {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.legal ul {
  padding-left: 1.2rem;
  list-style: disc;
  margin-bottom: 12px;
}

.legal a {
  color: var(--mint-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.updated {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(46, 196, 182, 0.15);
  color: var(--mint-deep);
  margin-bottom: 8px;
}

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(28, 22, 53, 0.45);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.search-overlay.open {
  opacity: 1;
  visibility: visible;
}

.search-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: 16px 16px 20px;
  background: var(--cream);
  border-radius: 0 0 28px 28px;
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow);
}

.search-overlay.open .search-panel {
  transform: translateY(0);
}

.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-row input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid rgba(255, 77, 109, 0.25);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  background: var(--white);
  outline: none;
}

.search-row input:focus {
  border-color: var(--brand);
}

.search-close {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 700;
}

.search-results {
  margin-top: 14px;
  max-height: 50vh;
  overflow-y: auto;
}

.search-results a,
.search-hit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.search-hit img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.search-results a:active,
.search-hit:active {
  background: rgba(255, 77, 109, 0.1);
}

.empty-msg {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-soft);
  font-weight: 600;
}

.footer-mini {
  text-align: center;
  padding: 24px 18px 12px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.footer-mini a {
  color: var(--brand);
  font-weight: 800;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 800;
  font-size: 0.85rem;
}

.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid rgba(255, 77, 109, 0.2);
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--brand);
}

.form-ok,
.form-err {
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.form-ok {
  background: rgba(46, 196, 182, 0.16);
  color: var(--mint-deep);
}

.form-err {
  background: rgba(255, 77, 109, 0.12);
  color: var(--brand-deep);
}

/* Animations */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logoPop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes heroZoom {
  from { transform: scale(1.04); }
  to { transform: scale(1.12); }
}

/* Desktop: keep mobile feel, centered phone column */
@media (min-width: 640px) {
  body {
    max-width: 480px;
    margin: 0 auto;
    border-left: 1px solid rgba(28, 22, 53, 0.06);
    border-right: 1px solid rgba(28, 22, 53, 0.06);
    box-shadow: 0 0 60px rgba(28, 22, 53, 0.06);
  }

  .bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
  }

  .search-panel {
    max-width: 480px;
    left: 50%;
    transform: translate(-50%, -100%);
    width: 100%;
  }

  .search-overlay.open .search-panel {
    transform: translate(-50%, 0);
  }
}
