:root {
  --bg: #0e1412;
  --bg-2: #15201c;
  --surface: #1a2823;
  --line: rgba(232, 220, 196, 0.12);
  --text: #f2ebe0;
  --muted: #a8b5ae;
  --accent: #e8a54b;
  --accent-2: #3d9b7a;
  --danger: #d9684a;
  --font-display: "Syne", sans-serif;
  --font-body: "Figtree", sans-serif;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(61, 155, 122, 0.22), transparent 55%),
    radial-gradient(900px 600px at 90% 0%, rgba(232, 165, 75, 0.18), transparent 50%),
    linear-gradient(165deg, #0c1210 0%, #132019 45%, #0e1412 100%);
  line-height: 1.5;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.04;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.topbar,
main,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 6vw;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  background: rgba(14, 20, 18, 0.75);
  z-index: 10;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--text);
  font-size: 1.05rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.25rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--accent);
}

.hero {
  min-height: min(92vh, 860px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4rem 6vw 5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero__glow {
  position: absolute;
  inset: auto -10% 10% 40%;
  height: 55%;
  background:
    radial-gradient(closest-side, rgba(232, 165, 75, 0.35), transparent 70%),
    radial-gradient(closest-side, rgba(61, 155, 122, 0.25), transparent 70%);
  filter: blur(10px);
  animation: pulse 7s ease-in-out infinite alternate;
}

@keyframes pulse {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
  to { transform: translate3d(-4%, 3%, 0) scale(1.08); opacity: 1; }
}

.hero__tag {
  margin: 0 0 0.75rem;
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  animation: fadeUp 0.7s ease both;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4.2rem, 14vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  animation: fadeUp 0.8s ease 0.08s both;
}

.hero__lead {
  max-width: 34rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  animation: fadeUp 0.8s ease 0.16s both;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
  animation: fadeUp 0.8s ease 0.24s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--accent);
  color: #1a1208;
}

.btn--ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.panel {
  padding: 4.5rem 6vw;
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

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

.stat {
  padding: 1.35rem 1.25rem;
  background: linear-gradient(160deg, rgba(26, 40, 35, 0.95), rgba(18, 28, 24, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat__label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.45rem;
}

.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
}

.stat__hint {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.note {
  margin-top: 1.5rem;
  padding: 1.2rem 1.3rem;
  border-left: 3px solid var(--accent);
  background: rgba(232, 165, 75, 0.08);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
}

.note strong {
  color: var(--text);
}

.week-tabs,
.day-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.week-tab,
.shop-tab,
.day-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.week-tab:hover,
.shop-tab:hover,
.day-tab:hover {
  color: var(--text);
  border-color: rgba(232, 165, 75, 0.35);
}

.week-tab.is-active,
.shop-tab.is-active,
.day-tab.is-active {
  background: var(--accent);
  color: #1a1208;
  border-color: var(--accent);
}

.day-card {
  background: linear-gradient(165deg, rgba(26, 40, 35, 0.98), rgba(15, 22, 19, 0.95));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.2rem, 3vw, 2rem);
  box-shadow: var(--shadow);
  animation: fadeUp 0.35s ease both;
}

.day-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.day-card__head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.day-card__meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(61, 155, 122, 0.15);
  color: #9fd9c2;
  font-size: 0.82rem;
  font-weight: 600;
}

.pill--kcal {
  background: rgba(232, 165, 75, 0.15);
  color: #f0c88a;
}

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

.meal {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
}

.meal__media {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  display: block;
  width: 100%;
  position: relative;
  cursor: zoom-in;
  background: #0a100e;
  text-align: left;
  font: inherit;
  color: inherit;
}

.meal__media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.meal__media:hover img {
  transform: scale(1.04);
}

.meal__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.6rem 0.85rem 0.7rem;
  background: linear-gradient(transparent, rgba(8, 12, 10, 0.92));
  color: #e8e0d4;
  font-size: 0.78rem;
  font-weight: 600;
}

.meal__body {
  padding: 1.15rem 1.2rem 1.25rem;
}

.meal__top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.meal__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.meal__time {
  color: var(--muted);
  font-size: 0.8rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 8, 7, 0.84);
  cursor: pointer;
}

.lightbox__figure {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(920px, 100%);
  width: 100%;
  animation: fadeUp 0.25s ease both;
}

.lightbox__figure img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 14px;
  background: #101816;
}

.lightbox__figure figcaption {
  margin-top: 0.75rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.lightbox__close {
  position: absolute;
  top: -0.4rem;
  right: -0.2rem;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(20, 28, 24, 0.95);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.meal__macros {
  display: flex;
  gap: 0.75rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.meal ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.meal li + li {
  margin-top: 0.35rem;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.shop-col {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: rgba(26, 40, 35, 0.7);
}

.shop-col h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--accent);
}

.shop-col ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.shop-col li + li {
  margin-top: 0.4rem;
}

.swap-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.swap-list li {
  display: grid;
  grid-template-columns: minmax(120px, 0.4fr) 1fr;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.swap-list li span:first-child {
  font-weight: 700;
  color: var(--accent);
}

.swap-list li span:last-child {
  color: var(--muted);
}

.tips-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  max-width: 46rem;
}

.tips-list li + li {
  margin-top: 0.75rem;
}

.footer {
  padding: 2.5rem 6vw 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer__sub {
  margin: 0.35rem 0 0;
  opacity: 0.75;
}

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

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

@media (max-width: 640px) {
  .topbar {
    padding: 1rem 5vw;
  }

  .nav {
    display: none;
  }

  .hero,
  .panel {
    padding-left: 5vw;
    padding-right: 5vw;
  }

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

  .swap-list li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
