/* Macro Cheat Sheet lander
   Brand colors, fonts and spacing live in the variables below.
   Change them here rather than in individual rules. */

:root {
  /* Colors from the Macro Shred logo */
  --charcoal: #2D2D2D;    /* text, dark sections */
  --red: #ED232A;         /* protein, main buttons */
  --red-hover: #D41A21;
  --red-text: #B5161C;    /* small red text on light backgrounds (readable contrast) */
  --amber: #FCBF15;       /* carbs, focus outlines */
  --orange: #F76F21;      /* fats */
  --paper: #F8F8F8;       /* page background */
  --white: #FFFFFF;
  --ink: #1C1C1C;         /* dark action cards and the dark band */
  --ink-line: #3A3A3A;
  --ink-text: #D9D9D9;
  --shadow-dark: 0 0 0 1px rgba(247, 111, 33, 0.15), 0 0 60px 4px rgba(247, 111, 33, 0.22), 0 30px 60px -24px rgba(0, 0, 0, 0.55);

  /* Greys */
  --text-2: #4D4D4D;
  --text-3: #5C5C5C;
  --text-4: #6B6B6B;
  --border: #D4D4D4;
  --line: #E3E3E3;
  --line-soft: #ECECEC;

  /* Type */
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;

  /* Layout */
  --page-max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-pad: clamp(64px, 8vw, 120px);
  --focus-ring: 0 0 0 3px rgba(252, 191, 21, 0.7);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--text-4);
}

.dot {
  display: inline-block;
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot--protein { background: var(--red); }
.dot--carbs { background: var(--amber); }
.dot--fats { background: var(--orange); }

/* ---------- Section headings ---------- */

.h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 3.8vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 0 34px;
  border: 0;
  border-radius: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.btn:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--red);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--red-hover);
}

.btn--primary:disabled {
  opacity: 0.7;
  cursor: progress;
}

.btn--block {
  width: 100%;
}

.btn--outline {
  min-height: 54px;
  padding: 0 22px;
  border: 1.5px solid var(--charcoal);
  background: transparent;
  color: var(--charcoal);
  font-size: 20px;
}

.btn--outline:hover {
  background: var(--charcoal);
  color: var(--white);
}

/* ---------- Header ---------- */

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}

.site-header__logo {
  display: block;
  width: auto;
  height: clamp(22px, 2.1vw, 30px);
}

/* Lander: logo alone in the middle, like metabafit.com/z1 */
.site-header--center .site-header__inner {
  justify-content: center;
}

/* ---------- Hero ---------- */

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: clamp(8px, 2vw, 28px);
  padding-bottom: clamp(56px, 6.5vw, 96px);
}

.hero__title {
  margin: 0;
  max-width: 13em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(42px, 5.6vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero__accent,
.accent {
  color: var(--red);
}

.accent--orange {
  color: var(--orange);
}

.hero__lede {
  margin: 18px 0 0;
  max-width: 30em;
  font-size: clamp(20px, 1.6vw, 23px);
  color: var(--text-2);
  text-wrap: balance;
}

/* ---------- Opt-in form (dark action card) ---------- */

.optin {
  width: 100%;
  max-width: 540px;
  margin-top: clamp(32px, 3.4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(22px, 2.6vw, 34px);
  background: var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow-dark);
  color: var(--white);
  text-align: left;
  scroll-margin-top: 24px;
}

.optin__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.optin__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.optin__urgency {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 600;
  color: #FF6B6F;
  text-wrap: balance;
}

.optin__urgency::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 8px 2px 0;
  border-radius: 50%;
  background: var(--red);
  vertical-align: middle;
}

.step {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.step__legend {
  padding: 0;
  margin: 0 0 12px;
}

.step__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
}

.step__num {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

/* Woman / Man choice: two large buttons. lander.js adds .is-selected to the chosen one. */
.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 16px;
  border: 2px solid var(--ink-line);
  border-radius: 14px;
  background: #262626;
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.choice:hover {
  border-color: #6A6A6A;
}

.choice:has(input:focus-visible) {
  box-shadow: var(--focus-ring);
}

/* Empty circle; becomes a red tick when chosen */
.choice__mark {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
  border: 2px solid #8A8A8A;
  border-radius: 50%;
}

.choice__text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
}

.choice__sub {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  color: #A8A8A8;
}

/* Chosen: the whole button turns red, with a white circle and red tick */
.choice.is-selected {
  border-color: var(--red);
  background: var(--red);
}

.choice.is-selected .choice__mark {
  border-color: var(--white);
  background: var(--white);
}

.choice.is-selected .choice__mark::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 7px;
  width: 6px;
  height: 11px;
  border: solid var(--red);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.choice.is-selected .choice__sub {
  color: var(--white);
}

/* Phones: one choice per row so the larger text fits. */
@media (max-width: 420px) {
  .choices {
    grid-template-columns: minmax(0, 1fr);
  }

  .choice {
    min-height: 64px;
  }
}

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

.field {
  flex: 1 1 170px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-text);
}

.field--wide {
  flex: 1.5 1 220px;
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--charcoal);
  font: inherit;
  font-size: 19px;
  font-weight: 500;
}

.field input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: var(--focus-ring);
}

.field input[aria-invalid="true"] {
  border-color: var(--red);
}

.optin__error {
  margin: -8px 0 0;
  font-size: 17px;
  font-weight: 600;
  color: #FF6B6F;
}

.optin__submit {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.optin__fine {
  margin: 0;
  text-align: center;
  font-size: 16px;
  color: #A8A8A8;
}

/* ---------- Full-width bands ---------- */

.band {
  border-top: 1px solid var(--line-soft);
}

.band--white { background: var(--white); }
.band--paper { background: var(--paper); }
.band--dark {
  border-top: 0;
  background: var(--ink) url("/images/patterns/waves.svg") center / cover no-repeat;
  color: var(--white);
}

/* ---------- Why section (dark band, everything centered) ---------- */

.why {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(36px, 4vw, 56px);
  padding-block: var(--section-pad);
  text-align: center;
}

.why .h2 {
  max-width: 15em;
}

/* iPad frame around the animated cheat sheet */
.tablet {
  position: relative;
  width: min(100%, 400px);
  margin: 0;
  padding: clamp(12px, 3.4%, 16px);
  background: #0A0A0A;
  border-radius: clamp(26px, 8%, 36px);
  box-shadow:
    0 0 0 2px #5A5A5A,
    0 0 0 4px #2B2B2B,
    0 40px 70px -24px rgba(0, 0, 0, 0.7);
}

/* Front camera */
.tablet::before {
  content: "";
  position: absolute;
  top: clamp(4px, 1.4%, 6px);
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: #262626;
}

.tablet__screen {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: clamp(10px, 3%, 14px);
  background: #0B0B0B;
}

.tablet__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.benefits {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--font-display);
  font-size: clamp(21px, 1.8vw, 25px);
  font-weight: 600;
  line-height: 1.3;
}

.benefits svg {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 3px;
  border-radius: 6px;
  background: var(--white);
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cta-row__note {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #A8A8A8;
}

/* ---------- Editions section (plate graphic, centered) ---------- */

.editions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-block: var(--section-pad);
  text-align: center;
}

.editions__plate {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin-bottom: 8px;
}

.editions__text {
  margin: 0;
  max-width: 30em;
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-2);
}

.editions__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.editions__fine {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-3);
}

/* ---------- Results section ---------- */

.results {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4vw, 56px);
  padding-block: var(--section-pad);
}

.results .h2 {
  text-align: center;
}

/* Masonry: photos keep their own shape, nothing is cropped */
.results__note {
  margin: 20px 0 0;
  font-size: 17px;
  font-style: italic;
  color: var(--text-4);
  text-align: center;
}

.results__grid {
  columns: 3 260px;
  column-gap: 16px;
}

.result {
  margin: 0 0 16px;
  break-inside: avoid;
  overflow: hidden;
  background: var(--white);
  border: 1px solid #E6E6E6;
  border-radius: 14px;
  box-shadow: 0 14px 30px -22px rgba(45, 45, 45, 0.35);
}

.result img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 560px) {
  .results__grid {
    columns: 2;
    column-gap: 10px;
  }

  .result {
    margin-bottom: 10px;
    border-radius: 10px;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--charcoal);
  color: #BDBDBD;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-block: clamp(48px, 5vw, 72px);
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid #454545;
}

.site-footer__logo {
  display: block;
  width: auto;
  height: 40px;
}

.site-footer__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 17px;
  color: #D6D6D6;
}

.site-footer__meta a {
  color: var(--paper);
  text-underline-offset: 3px;
}

.site-footer__meta a:hover {
  color: var(--amber);
}

.site-footer__legal {
  max-width: 72em;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 15px;
  line-height: 1.6;
}

.site-footer__legal p {
  margin: 0;
}

/* ---------- Thank-you pages (local stand-ins) ---------- */

.thanks {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding-block: clamp(48px, 8vw, 120px);
}

.thanks__ring {
  width: 48px;
  height: 48px;
}

.thanks__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.thanks__text {
  margin: 0;
  font-size: 21px;
  color: var(--text-2);
}

.thanks__note {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px dashed #C9C9C9;
  border-radius: 12px;
  font-size: 17px;
  color: var(--text-3);
}

.thanks__back {
  font-weight: 600;
  text-underline-offset: 3px;
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* VSL and cheat sheet pages: a smaller logo in the middle */
.site-header--vsl .site-header__inner {
  padding-block: 18px;
}

.site-header--vsl .site-header__logo {
  height: clamp(18px, 1.5vw, 22px);
}
