/* =========================================================
   AME NUTRITION PAGE — DARK GLASS SYSTEM
   Matches the current AME Index, Vision, Subjects, and Fitness style.
   ========================================================= */

html,
body {
  background: #02040a !important;
}

body {
  overflow-x: hidden;
}

.aurora {
  display: none !important;
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: block !important;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.045) 1px, transparent 1px);
  background-size: 86px 86px;
  opacity: 0.55;
}

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.nutrition-main {
  position: relative;
  z-index: 1;
  padding-top: clamp(122px, 14vh, 156px);
}

.nutrition-container {
  width: min(calc(100% - 48px), var(--max));
}

.nutrition-hero {
  position: relative;
  padding: 0 0 clamp(44px, 7vh, 82px);
  isolation: isolate;
}

.nutrition-hero-card,
.meal-system-card,
.tracker-card,
.cta-panel {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.055);
  border-radius: clamp(24px, 2.2vw, 35px);
  background: rgba(8, 14, 28, 0.70);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 80px rgba(0, 0, 0, 0.20);
}

.nutrition-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: clamp(24px, 4vw, 62px);
  align-items: center;
  min-height: clamp(420px, 54vh, 610px);
  padding: clamp(30px, 5vw, 70px);
}

.nutrition-kicker {
  margin: 0 0 clamp(18px, 2vw, 26px);
  color: rgba(142, 230, 255, 0.86);
  font-size: clamp(0.72rem, 0.82vw, 0.92rem);
  font-weight: 800;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(0, 220, 255, 0.28);
}

.nutrition-copy h1 {
  margin: 0;
  max-width: 940px;
  color: #f7fdff;
  font-size: clamp(2.25rem, 6vw, 7rem);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow:
    0 0 20px rgba(0, 240, 255, 0.10),
    0 0 52px rgba(0, 140, 255, 0.10);
}

.nutrition-copy h1 span,
.section-head h2 span {
  color: #8eeeff;
}

.nutrition-copy h1::after,
.section-head h2::after,
.meal-copy h2::after,
.tracker-copy h2::after {
  content: "";
  display: block;
  width: min(640px, 86%);
  height: 3px;
  margin: clamp(24px, 3vw, 34px) 0 0;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.74), rgba(255, 255, 255, 0.26), transparent);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.18);
}

.nutrition-lead,
.section-head p,
.meal-copy p,
.tracker-copy p,
.cta-panel p {
  color: rgba(216, 232, 244, 0.78);
  line-height: 1.82;
  font-weight: 650;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.nutrition-lead {
  max-width: 800px;
  margin: clamp(22px, 3vw, 32px) 0 0;
  font-size: clamp(0.88rem, 1.02vw, 1.08rem);
}

.nutrition-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(24px, 3vw, 38px);
}

.nutrition-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.026);
  color: rgba(230, 244, 252, 0.86);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.nutrition-btn::after {
  content: ">";
  margin-left: 10px;
}

.nutrition-btn:hover,
.nutrition-btn:focus-visible {
  transform: translateY(-3px);
  outline: none;
  border-color: rgba(0, 240, 255, 0.28);
  background: rgba(0, 240, 255, 0.045);
  color: #f5fdff;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.nutrition-command {
  display: grid;
  align-content: center;
  gap: 22px;
  min-height: 360px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: clamp(20px, 2vw, 35px);
  background: rgba(7, 17, 31, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 44px rgba(0, 180, 255, 0.026);
}

.command-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.command-head span,
.command-head strong {
  color: rgba(142, 230, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.command-head strong {
  color: #31ff8a;
}

.fuel-ring {
  display: grid;
  place-items: center;
  width: min(260px, 82vw);
  aspect-ratio: 1;
  justify-self: center;
  border: 2px solid rgba(0, 240, 255, 0.14);
  border-radius: 50%;
  background:
    conic-gradient(from 220deg, rgba(49, 255, 138, 0.65), rgba(0, 240, 255, 0.78), rgba(58, 141, 255, 0.35), rgba(255, 255, 255, 0.05) 76%),
    rgba(3, 10, 22, 0.82);
  box-shadow: 0 0 38px rgba(0, 240, 255, 0.11), inset 0 0 50px rgba(0, 0, 0, 0.38);
}

.fuel-core {
  display: grid;
  place-items: center;
  width: 68%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #06101e;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fuel-core strong {
  color: #f5fcff;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.9;
  font-weight: 900;
}

.fuel-core span {
  color: rgba(142, 230, 255, 0.72);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.22em;
}

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

.fuel-grid div,
.foundation-card,
.goal-card,
.day-card {
  border: 2px solid rgba(0, 240, 255, 0.11);
  border-radius: 20px;
  background: rgba(7, 17, 31, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 24px rgba(0, 240, 255, 0.02);
}

.fuel-grid div {
  min-height: 96px;
  padding: 16px;
}

.fuel-grid strong,
.foundation-card h3,
.goal-card h3,
.day-card h3 {
  display: block;
  margin: 0;
  color: #f5fcff;
  font-size: 0.78rem;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.fuel-grid span,
.foundation-card p,
.goal-card p,
.day-card p,
.plate-line span {
  display: block;
  margin: 8px 0 0;
  color: rgba(185, 210, 230, 0.72);
  font-size: 0.62rem;
  line-height: 1.58;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nutrition-section {
  position: relative;
  padding: clamp(48px, 7vh, 84px) 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.section-head h2,
.meal-copy h2,
.tracker-copy h2,
.cta-panel h2 {
  margin: 0;
  color: #f7fdff;
  font-size: clamp(2rem, 3.8vw, 4.6rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-wrap: balance;
}

.section-head p {
  max-width: 620px;
  margin: 0;
  font-size: 0.86rem;
}

.foundation-grid,
.goal-grid,
.day-grid {
  display: grid;
  gap: 16px;
}

.foundation-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.foundation-card,
.goal-card,
.day-card {
  min-height: 230px;
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.foundation-card:hover,
.goal-card:hover,
.day-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 240, 255, 0.22);
  background: rgba(10, 18, 32, 0.76);
}

.foundation-card span,
.day-card span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: 14px;
  color: #c8f9ff;
  background: rgba(0, 240, 255, 0.05);
  font-size: 0.78rem;
  font-weight: 900;
}

.foundation-card h3,
.goal-card h3,
.day-card h3 {
  font-size: 1rem;
}

.foundation-card p,
.goal-card p,
.day-card p {
  font-size: 0.76rem;
  line-height: 1.72;
}

.meal-system-card,
.tracker-card,
.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
  padding: clamp(30px, 4.2vw, 62px);
}

.plate-builder {
  display: grid;
  gap: 12px;
}

.plate-line {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  border: 2px solid rgba(255, 255, 255, 0.055);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.022);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.plate-line::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 70%);
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.10), transparent);
  pointer-events: none;
}

.plate-line strong,
.plate-line span {
  position: relative;
  z-index: 1;
}

.plate-line strong {
  color: #31ff8a;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.plate-line.protein { --fill: 78%; }
.plate-line.carbs { --fill: 68%; }
.plate-line.colour { --fill: 88%; }
.plate-line.fats { --fill: 52%; }
.plate-line.water { --fill: 94%; }

.goal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.goal-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  color: #8eeeff;
  font-size: 1.4rem;
  box-shadow: inset 0 0 24px rgba(0, 240, 255, 0.025);
}

.goal-card ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.goal-card li {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  color: rgba(200, 249, 255, 0.9);
  background: rgba(0, 240, 255, 0.04);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.tracker-dashboard {
  display: grid;
  gap: 18px;
}

.tracker-row {
  display: grid;
  grid-template-columns: 170px 54px 1fr;
  align-items: center;
  gap: 12px;
}

.tracker-row span,
.tracker-row strong {
  color: rgba(237, 251, 255, 0.86);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.tracker-row strong {
  color: #8eeeff;
  text-align: right;
}

.tracker-row i {
  position: relative;
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.tracker-row i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--level);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(58, 141, 255, 0.78), rgba(0, 240, 255, 0.82), rgba(49, 255, 138, 0.7));
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.16);
}

.day-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nutrition-cta {
  padding: clamp(36px, 6vh, 70px) 0 clamp(92px, 10vh, 130px);
}

.cta-panel {
  grid-template-columns: minmax(0, 1fr) auto;
}

.cta-panel p {
  max-width: 880px;
  margin: 18px 0 0;
}

.cta-actions {
  margin-top: 0;
  justify-content: flex-end;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

footer {
  position: relative;
  z-index: 1;
}

@media (max-width: 1180px) {
  .nutrition-hero-card,
  .meal-system-card,
  .tracker-card,
  .cta-panel,
  .section-head {
    grid-template-columns: 1fr;
  }

  .nutrition-copy,
  .section-head,
  .meal-copy,
  .tracker-copy,
  .cta-panel {
    text-align: center;
  }

  .nutrition-copy h1::after,
  .section-head h2::after,
  .meal-copy h2::after,
  .tracker-copy h2::after {
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.74), rgba(255, 255, 255, 0.26), transparent);
  }

  .nutrition-actions,
  .cta-actions {
    justify-content: center;
  }

  .nutrition-command,
  .plate-builder,
  .tracker-dashboard {
    width: min(760px, 100%);
    justify-self: center;
  }

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

@media (max-width: 860px) {
  .nutrition-main {
    padding-top: clamp(132px, 16vh, 178px);
  }

  .nutrition-container {
    width: min(calc(100% - 28px), var(--max));
  }

  .nutrition-hero-card,
  .meal-system-card,
  .tracker-card,
  .cta-panel {
    padding: 34px 18px;
    border-radius: 24px;
  }

  .nutrition-copy h1 {
    font-size: clamp(2.65rem, 13vw, 5.8rem);
    line-height: 0.92;
  }

  .foundation-grid,
  .goal-grid,
  .day-grid,
  .fuel-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
    text-align: center;
  }

  .tracker-row {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: left;
  }

  .tracker-row strong {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .nutrition-main {
    padding-top: clamp(122px, 15vh, 154px);
  }

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

  .nutrition-hero-card,
  .meal-system-card,
  .tracker-card,
  .cta-panel {
    padding: 30px 12px;
    border-radius: 20px;
  }

  .nutrition-kicker {
    letter-spacing: 0.24em;
  }

  .nutrition-copy h1 {
    font-size: clamp(2.25rem, 14vw, 4rem);
    letter-spacing: -0.055em;
  }

  .nutrition-lead,
  .section-head p,
  .meal-copy p,
  .tracker-copy p,
  .cta-panel p {
    font-size: 0.82rem;
    letter-spacing: 0.055em;
  }

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

  .nutrition-btn {
    width: 100%;
  }

  .foundation-card,
  .goal-card,
  .day-card {
    padding: 20px;
    min-height: auto;
  }

  .fuel-ring {
    width: min(230px, 78vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}