/* Healthy Eating Routine for Men: dark professional theme, preset A */

:root {
  --ration-bg: #0D1117;
  --ration-surface: #161D2A;
  --ration-surface-alt: #1D2636;
  --ration-tone: #5EEAD4;
  --ration-tone-hover: #2DD4BF;
  --ration-ink: #E8EEF5;
  --ration-mute: #A9B4C4;
  --ration-violet: #A78BFA;
  --ration-gold: #F5C26B;
  --ration-line: rgba(94, 234, 212, 0.22);
  --ration-gradient: linear-gradient(135deg, #5EEAD4 0%, #A78BFA 100%);
  --ration-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --ration-radius: 16px;
  --ration-pad: 10dvh;
  --ration-wrap: 1160px;
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ration-bg);
  color: var(--ration-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ration-tone); }
a:hover { color: var(--ration-tone-hover); }
:focus-visible { outline: 2px solid var(--ration-tone); outline-offset: 3px; }
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 600;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.1rem, 5.6vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ol, ul { margin: 0; }
[hidden] { display: none !important; }
.rx-wrap { max-width: var(--ration-wrap); margin: 0 auto; padding: 0 20px; }
.rx-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.rx-ico {
  width: 40px; height: 40px; flex: none; margin-bottom: 14px;
  fill: none; stroke: var(--ration-tone); stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.rx-eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.82rem;
  color: var(--ration-tone);
  margin-bottom: 12px;
}

/* ---------- Scroll-driven progress and view transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.35s ease both vt-out; }
::view-transition-new(root) { animation: 0.45s ease both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

@keyframes rx-grow { to { transform: scaleX(1); } }
@keyframes rx-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Motion: stagger reveal (JS adds .js and .is-in) ---------- */
.js .rx-stagger { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .rx-stagger.is-in { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.rx-top {
  position: sticky; top: 0; z-index: 50;
  background: var(--ration-surface);
  border-bottom: 1px solid var(--ration-line);
}
.rx-top-inner {
  position: relative;
  max-width: var(--ration-wrap);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.rx-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ration-ink); text-decoration: none;
  font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.02em;
}
.rx-brand span { line-height: 1.2; }
.rx-brand:hover { color: var(--ration-tone); }
.rx-logo-mark { width: 34px; height: 34px; flex: 0 0 34px; }
.rx-logo-mark circle { stroke: var(--ration-tone); }
.rx-logo-mark path { fill: var(--ration-tone); }
.rx-links { display: flex; gap: 28px; }
.rx-links a {
  color: var(--ration-ink); text-decoration: none; font-weight: 600;
  font-size: 0.95rem; padding: 6px 0; border-bottom: 2px solid transparent;
}
.rx-links a:hover,
.rx-links a[aria-current="page"] { color: var(--ration-tone); border-bottom-color: var(--ration-tone); }
.rx-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rx-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; cursor: pointer;
}
.rx-burger span:not(.rx-sr) { display: block; height: 2px; width: 24px; background: var(--ration-ink); border-radius: 2px; }
.rx-toggle:focus-visible ~ .rx-burger { outline: 2px solid var(--ration-tone); outline-offset: 2px; }
.rx-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--ration-gradient);
  transform: scaleX(0); transform-origin: 0 50%;
}
@supports (animation-timeline: scroll()) {
  .rx-progress { animation: rx-grow linear both; animation-timeline: scroll(root); }
}

/* ---------- Hero ---------- */
.rx-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; align-items: center;
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url("img/bg.webp") center / cover no-repeat;
  overflow: clip;
  padding: 12dvh 0 16dvh;
}
.rx-hero-min { min-height: 62dvh; padding: 10dvh 0 12dvh; }
.rx-hero-copy {
  position: relative; z-index: 1;
  max-width: 780px; margin: 0 auto; text-align: center; padding: 0 20px;
}
.rx-kicker {
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--ration-tone); font-size: 0.85rem; margin-bottom: 16px;
}
.rx-hero-title span { display: block; animation: rx-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rx-hero-title span:nth-child(2) { animation-delay: 0.12s; }
.rx-hero-title span:nth-child(3) { animation-delay: 0.24s; }
.rx-hero-lead { font-size: 1.1rem; color: var(--ration-mute); max-width: 620px; margin: 18px auto 30px; }

.rx-pill-cta {
  display: inline-block; padding: 16px 34px; border-radius: 999px;
  background: var(--ration-tone); color: #0D1117; font-weight: 700;
  text-decoration: none; box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.4);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.rx-pill-cta:hover {
  background: var(--ration-tone-hover); color: #0D1117;
  box-shadow: 0 0 0 8px rgba(94, 234, 212, 0.15);
}

/* ---------- Floating principles bar ---------- */
.rx-float { position: relative; z-index: 10; margin-top: -60px; padding: 0 20px; }
.rx-float-grid {
  max-width: var(--ration-wrap); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  background: var(--ration-surface-alt);
  border: 1px solid var(--ration-line);
  border-radius: var(--ration-radius);
  box-shadow: var(--ration-shadow);
  padding: 24px;
}
.rx-float-card { padding: 8px 12px; text-align: left; }
.rx-float-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.rx-float-card p { font-size: 0.92rem; color: var(--ration-mute); margin: 0; }

/* ---------- Sections ---------- */
.rx-sec { position: relative; padding: var(--ration-pad) 0; overflow: clip; }
.rx-sec-alt { background: var(--ration-surface); }
.rx-head { max-width: 720px; margin: 0 0 48px; }
.rx-head p:not(.rx-eyebrow) { color: var(--ration-mute); }

/* Zigzag with clip-path edges */
.rx-zig { display: grid; grid-template-columns: 45% 1fr; gap: 56px; align-items: center; }
.rx-zig-rev { grid-template-columns: 1fr 45%; }
.rx-zig-body p:not(.rx-eyebrow) { color: var(--ration-mute); }
.rx-zig-media { margin: 0; overflow: hidden; border-radius: var(--ration-radius); }
.rx-zig-media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.rx-skew-r { clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); }
.rx-skew-l { clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%); }
@supports (animation-timeline: view()) {
  .rx-skew-r {
    animation: rx-clip-r linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 45%;
  }
  .rx-skew-l {
    animation: rx-clip-l linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 45%;
  }
}
@keyframes rx-clip-r {
  from { clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); }
  to { clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); }
}
@keyframes rx-clip-l {
  from { clip-path: polygon(12% 0, 100% 0, 100% 0, 12% 0); }
  to { clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%); }
}

.rx-list-check { list-style: none; padding: 0; margin: 20px 0 0; }
.rx-list-check li { position: relative; padding-left: 28px; margin-bottom: 10px; color: var(--ration-ink); }
.rx-list-check li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 10px; height: 10px; border-radius: 50%; background: var(--ration-gold);
}
.rx-list-check li:nth-child(2n)::before { background: var(--ration-violet); }
.rx-list-check li:nth-child(3n)::before { background: var(--ration-tone); }

/* Feature cards */
.rx-feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.rx-feat-card {
  background: var(--ration-surface);
  border-left: 4px solid var(--ration-tone);
  border-radius: var(--ration-radius);
  padding: 28px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.rx-feat-card:nth-child(2) { border-left-color: var(--ration-violet); }
.rx-feat-card:nth-child(3) { border-left-color: var(--ration-gold); }
.rx-feat-card:nth-child(4) { border-left-color: var(--ration-tone-hover); }
.rx-feat-card p { color: var(--ration-mute); margin: 0; }
.rx-feat-card.is-in:hover { box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45); transform: translateY(-4px); }

/* Timeline */
.rx-tl { position: relative; list-style: none; padding: 0; margin: 0; }
.rx-tl::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; margin-left: -1px; background: var(--ration-line);
}
.rx-tl-item { position: relative; width: 50%; padding-bottom: 44px; }
.rx-tl-item:nth-child(odd) { text-align: right; padding-right: 48px; }
.rx-tl-item:nth-child(even) { margin-left: 50%; text-align: left; padding-left: 48px; }
.rx-tl-item p { color: var(--ration-mute); margin: 0; }
.rx-tl-dot {
  position: absolute; top: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ration-gradient); color: #0D1117; font-weight: 700;
  display: grid; place-items: center; font-size: 0.85rem;
}
.rx-tl-item:nth-child(odd) .rx-tl-dot { right: -17px; }
.rx-tl-item:nth-child(even) .rx-tl-dot { left: -17px; }

/* CTA strip */
.rx-cta-strip, .rx-cta-block {
  text-align: center;
}
.rx-cta-strip {
  background: linear-gradient(rgba(13, 17, 23, 0.72), rgba(13, 17, 23, 0.72)), url("img/bg.webp") center / cover fixed;
  padding: var(--ration-pad) 0;
  overflow: clip;
}
.rx-cta-strip p { color: var(--ration-ink); max-width: 640px; margin: 0 auto 28px; font-size: 1.1rem; }
.rx-cta-block { padding: var(--ration-pad) 0; background: var(--ration-bg); }
.rx-cta-block p { color: var(--ration-mute); max-width: 620px; margin: 0 auto 28px; }
.rx-note-strip { background: linear-gradient(rgba(13, 17, 23, 0.8), rgba(13, 17, 23, 0.8)), url("img/bg2.webp") center / cover; }
.rx-note-strip p { font-size: 1rem; color: var(--ration-ink); }

/* About: principles, split, steps */
.rx-principle-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.rx-principle-card {
  background: var(--ration-surface);
  border-top: 3px solid var(--ration-tone);
  border-radius: var(--ration-radius);
  padding: 24px;
}
.rx-principle-card:nth-child(2) { border-top-color: var(--ration-violet); }
.rx-principle-card:nth-child(3) { border-top-color: var(--ration-gold); }
.rx-principle-card:nth-child(4) { border-top-color: var(--ration-tone-hover); }
.rx-principle-card p { color: var(--ration-mute); margin: 0; font-size: 0.95rem; }
.rx-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.rx-split-media { margin: 0; overflow: hidden; border-radius: var(--ration-radius); }
.rx-split-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.rx-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.rx-step-card {
  background: var(--ration-surface-alt);
  border: 1px solid var(--ration-line);
  border-radius: var(--ration-radius);
  padding: 26px 22px;
}
.rx-step-num {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--ration-gradient); color: #0D1117; font-family: var(--font-display);
  font-weight: 700; margin-bottom: 14px;
}
.rx-step-card p { color: var(--ration-mute); margin: 0; font-size: 0.95rem; }

/* Reserve: plan cards */
.rx-plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.rx-plan-card {
  background: var(--ration-surface);
  border-top: 3px solid var(--ration-tone);
  border-radius: var(--ration-radius);
  padding: 28px;
}
.rx-plan-card p { color: var(--ration-mute); }
.rx-plan-card ol { list-style: none; padding: 0; margin: 16px 0 0; }
.rx-plan-card li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; color: var(--ration-ink); }
.rx-dot {
  flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 0.8rem; color: #0D1117;
}
.rx-dot-a { background: var(--ration-tone); }
.rx-dot-b { background: var(--ration-violet); }
.rx-dot-c { background: var(--ration-gold); }
.rx-dot-d { background: var(--ration-tone-hover); }

/* Forms (static: no transform, no animation on the container) */
.rx-form {
  background: var(--ration-surface);
  border: 1px solid var(--ration-line);
  border-radius: var(--ration-radius);
  padding: 32px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--ration-shadow);
}
.rx-field { display: block; margin-bottom: 18px; }
.rx-field > span { display: block; font-weight: 600; margin-bottom: 6px; }
.rx-field input,
.rx-field textarea {
  width: 100%; font: inherit; color: var(--ration-ink);
  background: var(--ration-bg);
  border: 1px solid var(--ration-mute);
  border-radius: 10px;
  padding: 12px 14px;
}
.rx-check {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 6px 0 22px; font-size: 0.93rem; color: var(--ration-mute);
}
.rx-check input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 4px; accent-color: var(--ration-tone); }
.rx-submit {
  width: 100%; font: inherit; font-weight: 700; padding: 16px;
  border: 0; border-radius: 999px;
  background: var(--ration-tone); color: #0D1117; cursor: pointer;
}
.rx-submit:hover { background: var(--ration-tone-hover); box-shadow: 0 0 0 6px rgba(94, 234, 212, 0.15); }

/* FAQ */
.rx-faq { max-width: 780px; margin: 0 auto; }
.rx-faq details {
  background: var(--ration-surface);
  border: 1px solid var(--ration-line);
  border-radius: var(--ration-radius);
  padding: 18px 22px;
  margin-bottom: 14px;
}
.rx-faq summary {
  cursor: pointer; font-family: var(--font-display);
  font-weight: 600; font-size: 1.1rem; color: var(--ration-ink);
}
.rx-faq details p { color: var(--ration-mute); margin: 12px 0 0; }

/* Thank you page */
.rx-thanks { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; padding: 12dvh 0; }
.rx-thanks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.rx-thanks-title { font-family: var(--font-display); font-size: clamp(2rem, 4.6vw, 3.4rem); }
.rx-thanks-grid p:not(.rx-eyebrow) { color: var(--ration-mute); }
.rx-thanks-media { margin: 0; overflow: hidden; border-radius: var(--ration-radius); }
.rx-thanks-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Legal pages */
.rx-legal-page { min-height: 100vh; min-height: 100dvh; }
.rx-legal { max-width: 820px; margin: 0 auto; padding: 10dvh 20px 12dvh; }
.rx-legal h1 { margin-bottom: 24px; }
.rx-legal h2 { font-size: 1.5rem; margin-top: 36px; }
.rx-legal p { color: var(--ration-mute); }
.rx-cookie-section {
  margin-top: 48px; padding-top: 12px;
  border-top: 1px solid var(--ration-line);
  scroll-margin-top: 90px;
}

/* ---------- Footer ---------- */
.rx-foot { background: var(--ration-surface); border-top: 1px solid var(--ration-line); padding: 56px 0 0; }
.rx-foot-grid {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px;
  padding-bottom: 32px;
}
.rx-foot-brand { max-width: 420px; }
.rx-foot-brand p { color: var(--ration-mute); font-size: 0.95rem; margin: 14px 0 0; }
.rx-foot-links { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: flex-start; }
.rx-foot-links a { color: var(--ration-ink); text-decoration: none; font-weight: 600; }
.rx-foot-links a:hover { color: var(--ration-tone); text-decoration: underline; }
.rx-foot-base {
  border-top: 1px solid var(--ration-line);
  padding-top: 20px; padding-bottom: 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
}
.rx-disclaimer { color: var(--ration-mute); font-size: 0.9rem; margin: 0; }
.rx-copy { color: var(--ration-mute); font-size: 0.9rem; margin: 0; }

/* ---------- Cookie banner (index only) ---------- */
.rx-cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9999;
  max-width: 720px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  background: var(--ration-surface-alt);
  border: 1px solid var(--ration-line);
  border-radius: var(--ration-radius);
  padding: 18px 20px;
  box-shadow: var(--ration-shadow);
  color: var(--ration-ink);
}
.rx-cookie p { margin: 0; font-size: 0.95rem; flex: 1 1 260px; }
.rx-cookie-actions { display: flex; gap: 10px; }
.rx-cookie button {
  font: inherit; font-weight: 700; padding: 10px 20px; border-radius: 999px;
  cursor: pointer; border: 2px solid var(--ration-tone);
}
#accept-cookie { background: var(--ration-tone); color: #0D1117; }
#accept-cookie:hover { background: var(--ration-tone-hover); border-color: var(--ration-tone-hover); }
#decline-cookie { background: transparent; color: var(--ration-ink); border-color: var(--ration-mute); }
#decline-cookie:hover { border-color: var(--ration-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .rx-float-grid { grid-template-columns: repeat(2, 1fr); }
  .rx-principle-row { grid-template-columns: repeat(2, 1fr); }
  .rx-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .rx-zig,
  .rx-zig-rev,
  .rx-split,
  .rx-thanks-grid { grid-template-columns: 1fr; gap: 36px; }
  .rx-zig-media img { aspect-ratio: 16 / 10; }
  .rx-plan-grid { grid-template-columns: 1fr; }
  .rx-feat-grid { grid-template-columns: 1fr; }
  .rx-tl::before { left: 17px; margin-left: 0; }
  .rx-tl-item,
  .rx-tl-item:nth-child(odd),
  .rx-tl-item:nth-child(even) {
    width: 100%; margin-left: 0; text-align: left; padding: 0 0 36px 60px;
  }
  .rx-tl-item:nth-child(odd) .rx-tl-dot,
  .rx-tl-item:nth-child(even) .rx-tl-dot { left: 0; right: auto; }
}

@media (max-width: 860px) {
  .rx-burger { display: flex; }
  .rx-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--ration-surface);
    padding: 8px 20px 20px;
    border-bottom: 1px solid var(--ration-line);
  }
  .rx-links a { padding: 12px 0; }
  .rx-toggle:checked ~ .rx-links { display: flex; }
  .rx-cta-strip { background-attachment: scroll; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .rx-float { margin-top: -40px; }
  .rx-float-grid { grid-template-columns: 1fr; padding: 18px; }
  .rx-principle-row,
  .rx-steps { grid-template-columns: 1fr; }
  .rx-form { padding: 22px; }
  .rx-hero-lead { font-size: 1rem; }
  .rx-pill-cta { padding: 14px 26px; }
  .rx-foot-grid { flex-direction: column; }
}

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