/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  /* Has to outrank .menu-overlay's z-index (300): the header (logo + apple
     button) stays visible and clickable above the fullscreen menu, so the
     apple can be clicked again to close it. */
  z-index: 320;
  background: rgba(247, 243, 236, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.2s ease, border-color 0.2s ease;
}

html.menu-is-open .site-header {
  /* Pinned by position, not by `sticky`, while the menu is open — sticky
     only "sticks" relative to its normal-flow position once its own
     containing block has scrolled, which misbehaves the moment anything
     upstream of it changes how scrolling works (see the overflow note in
     global.css). Fixed is unaffected by any of that. */
  position: fixed;
  inset: 0 0 auto 0;
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-xs);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink-strong);
}

.brand__mark { width: 34px; height: 39px; }

html.menu-is-open .brand__name {
  color: var(--on-dark);
  transition: color 0.2s ease;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-cta { display: none; }

html.menu-is-open .header-cta { display: none !important; }

.apple-btn {
  --apple-skin: #899767;
  --apple-shine: #A9B58A;
  --apple-leaf: #47572A;
  --apple-stem: #5B412D;
  --apple-flesh: #DCCBB2;
  --apple-seed: #5B412D;
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
}

.apple-icon { width: 40px; height: 40px; overflow: visible; display: block; }

/* Knife cursor + cut: a hidden Easter egg, off unless `html.knife-mode` is
   toggled on (typing CORTAR — see animations.js), and even then gated on
   real hover+mouse so touch/hybrid devices never get a stuck cursor. */
@media (hover: hover) and (pointer: fine) {
  html.knife-mode .apple-btn { cursor: url("/resources/images/svg/faca-cursor.svg") 5 4, pointer; }
  html.knife-mode.menu-is-open .apple-btn { cursor: pointer; }
}

/* `cursor: none` while the knife graphic itself is animating the cut, so
   the CSS cursor and the SVG blade never show at once. */
.apple-btn.is-cutting { cursor: none; }

.apple-knife {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- fullscreen menu overlay ---------- */
/* visibility (not display:none) is the resting "closed" state, so the
   clip-path circle and getBoundingClientRect() measurements used to grow
   it from the apple button keep working. GSAP (resources/js/animations.js)
   owns every open/close transition — there is no separate CSS transition
   racing it.
   The circle's center/radius are CSS custom properties (--cx/--cy/--r),
   set directly by JS right before each open, not computed once inside the
   GSAP tween — a function-based tween value is only evaluated the first
   time the timeline ever plays, so a later reopen kept using the apple's
   very first position (which was wrong if the page had scrolled since). */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(var(--olive-rgb), 0.92);
  visibility: hidden;
  pointer-events: none;
  display: flex;
  align-items: safe center;
  justify-content: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-block: var(--header-h) var(--space-lg);
  clip-path: circle(var(--r, 0vmax) at var(--cx, 50%) var(--cy, 50%));
}

@supports (backdrop-filter: blur(1px)) {
  .menu-overlay { backdrop-filter: blur(10px); }
}

@supports not (backdrop-filter: blur(1px)) {
  .menu-overlay { background: rgba(var(--olive-rgb), 0.97); }
}

.menu-overlay__panel {
  width: 100%;
  max-width: 560px;
  margin-block: auto;
  padding-inline: var(--space-sm);
  text-align: center;
}

.menu-overlay__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.menu-overlay__links li { overflow: hidden; }

.menu-overlay__link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--on-dark);
  position: relative;
  padding-bottom: 0.1em;
}

.menu-overlay__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--sage);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}

.menu-overlay__link:hover::after,
.menu-overlay__link:focus-visible::after {
  transform: scaleX(1);
}

.menu-overlay__footer {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.menu-overlay__cta { border-color: var(--beige); color: var(--beige); }
.menu-overlay__cta::before { background: var(--beige); }
.menu-overlay__cta:hover { color: var(--olive); }

.menu-overlay__meta {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--beige);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-top: var(--space-lg);
  padding-bottom: var(--space-xl);
  overflow-x: clip;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.hero__title {
  font-size: var(--fs-hero);
  margin-top: var(--space-xs);
}

.hero__subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-h3);
  color: var(--olive);
  margin-top: var(--space-2xs);
}

.hero__note {
  margin-top: var(--space-sm);
}

.hero__cta {
  margin-top: var(--space-lg);
}

.hero__visual {
  position: relative;
}

.hero__photo {
  aspect-ratio: 4 / 5;
  max-width: 420px;
  margin-inline: auto;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.hero__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: var(--beige);
  color: var(--brown);
  font-size: 0.78rem;
  line-height: 1.25;
  padding: var(--space-xs);
  justify-content: center;
}

.hero__badge span {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--olive);
}

.hero__badge--2 { background: var(--olive); color: var(--on-dark); }
.hero__badge--2 span { color: var(--on-dark); }

.hero__ingredients {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero__ingredient {
  position: absolute;
  opacity: 0.9;
}

.hero__ingredient--basil { top: 2%; left: 2%; }
.hero__ingredient--lemon { bottom: 6%; left: 8%; }
.hero__ingredient--rosemary { top: 6%; right: 4%; }

/* ---------- marquee ---------- */
.marquee {
  background: var(--olive);
  color: var(--beige);
  overflow: hidden;
  overflow-x: clip;
  padding-block: var(--space-xs);
  transform: rotate(-1.5deg) scale(1.03);
}

.marquee__track {
  display: flex;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: var(--fs-marquee);
  font-style: italic;
  will-change: transform;
}

/* ---------- about ---------- */
.about {
  padding-block: var(--space-xl);
  overflow-x: clip;
}

.about__grid {
  display: grid;
  gap: var(--space-lg);
  /* start, not center: with long copy the text column is taller than the
     photo, and centering stranded the photo and heading mid-scroll */
  align-items: start;
}

.about__media {
  position: relative;
  isolation: isolate;
  width: min(360px, 70vw);
  margin-inline: auto;
}

.about__photo-main img {
  width: 100%;
  max-height: 60vh;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  /* objectBoundingBox (0-1) so the organic mask scales with the image
     instead of a fixed-pixel path clipping the wrong area at other sizes */
  clip-path: url(#aboutLeafMask);
}

.about__photo-secondary {
  display: none;
}

.about__content .section-heading { margin-bottom: var(--space-sm); }

.paragraph {
  margin-bottom: var(--space-sm);
  max-width: 62ch;
  font-size: max(1.0625rem, var(--fs-body));
  line-height: 1.65;
}

.highlight {
  color: var(--olive);
  font-weight: 700;
}

/* ---------- plans ---------- */
.plans {
  padding-block: var(--space-xl);
  background: var(--surface-alt);
}

.plan-grid {
  margin-top: var(--space-lg);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
  .plan-grid { grid-template-columns: repeat(4, 1fr); }
}

.plan-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.plan-card__icon { width: 40px; height: 40px; margin-bottom: var(--space-xs); }

/* stacked, not space-between: side by side it collided into
   "Premium3 consultas" around 800px */
.plan-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--space-2xs);
}

.plan-header h3 { font-size: var(--fs-h3); }

.price-details {
  font-size: var(--fs-small);
  color: var(--brown);
}

.features {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  margin-bottom: var(--space-sm);
}

.features li {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: 0.95rem;
}

.check { width: 20px; height: 20px; color: var(--sage); flex-shrink: 0; }

.plan-card__dots {
  display: block;
  letter-spacing: 0.1em;
  color: var(--sage);
  font-size: 0.8rem;
  margin-bottom: var(--space-sm);
}

.plan-card.black { background: var(--olive); color: var(--on-dark); }
.plan-card.black h3,
.plan-card.black .price-details { color: var(--on-dark); }
.plan-card.black .plan-card__dots { color: var(--beige); }

.features { flex-grow: 1; }

.plan-card__cta { width: 100%; justify-content: center; margin-top: auto; }
.plan-card.black .plan-card__cta { border-color: var(--beige); color: var(--beige); }
.plan-card.black .plan-card__cta::before { background: var(--beige); }
.plan-card.black .plan-card__cta:hover { color: var(--olive); }

/* ---------- journey ---------- */
.journey { padding-block: var(--space-xl); text-align: center; }

.journey .section-intro { margin-inline: auto; }

.journey__toggle {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  margin-top: var(--space-sm);
  border: 1.5px solid var(--olive);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
}

.journey__tab {
  padding: 0.55em 1.2em;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--olive);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.journey__tab[aria-selected="true"] {
  background: var(--olive);
  color: var(--on-dark);
}

.journey__layout {
  margin-top: var(--space-lg);
  max-width: 720px;
  margin-inline: auto;
  text-align: left;
}

.journey__panel + .journey__panel {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px dashed var(--border-soft);
}

.journey__panel[hidden] { display: none; }

.journey__panel h3 { font-size: var(--fs-h3); margin-bottom: var(--space-sm); }

.steps {
  /* one source of truth for both the bullet size and the rail it sits on,
     so the connecting line can never drift off their center again */
  --marker: 24px;
  --line: 2px;
  --rail: calc(var(--marker) / 2);
  --step-gap: var(--space-md);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: var(--step-gap);
  list-style: none;
}

.step {
  position: relative;
  padding-left: calc(var(--marker) + 16px);
}

/* One segment per step, running from this step's bullet to the next one's.
   Using the step's own bottom edge (not a fixed height) is what keeps it
   centered no matter how much text is in between — and now stopping just
   short of each bullet (not reaching their center) with the bullet itself
   explicitly above it in paint order (z-index), so the line can never
   visually cross through a number again. */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(var(--rail) - var(--line) / 2);
  top: calc(var(--marker) + 4px);
  bottom: calc(-1 * var(--step-gap) - 4px);
  width: var(--line);
  background: var(--sage);
  transform: scaleY(var(--seg-grow, 0));
  transform-origin: top;
  z-index: 0;
}

.step-division {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.step-number {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: var(--marker);
  height: var(--marker);
  border-radius: 50%;
  background: var(--beige);
  color: var(--brown);
  font-size: 0.8rem;
  font-weight: 700;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}

.step.is-active .step-number {
  background: var(--olive);
  color: var(--on-dark);
}

.step-division h3 {
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 700;
}

.step ul {
  margin-top: var(--space-2xs);
  padding-left: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.92rem;
  color: var(--ink);
}

.step li { list-style: disc; }

/* ---------- app section ---------- */
.app-section {
  padding-block: var(--space-xl);
  background: var(--olive);
  color: var(--on-dark);
  overflow-x: clip;
}

.app-section h2 { color: var(--on-dark); }

.app-section__grid {
  display: grid;
  gap: var(--space-lg);
}

.app-section__chips {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.app-section__chips li {
  background: rgba(247, 243, 236, 0.12);
  border-radius: var(--radius-pill);
  padding: 0.6em 1em;
  font-size: 0.9rem;
  width: fit-content;
}

.app-section__visual {
  position: relative;
  max-width: 320px;
  margin-inline: auto;
}

.phone-mock {
  border: 6px solid var(--beige);
  border-radius: 1.4rem;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

/* dietbox.webp's natural size is 429x514 — match that ratio and use
   `contain` so the real screenshot is never cropped or stretched */
.phone-mock img { aspect-ratio: 429 / 514; object-fit: contain; }

/* ---------- testimonials ---------- */
.testimonials {
  position: relative;
  padding-block: var(--space-xl);
  overflow: hidden;
}

.testimonials__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(137, 151, 103, 0.18), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(220, 203, 178, 0.14), transparent 55%),
    var(--olive);
}

.testimonials__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M20 60C20 36 36 20 60 20C60 44 44 60 20 60Z' fill='%23F7F3EC'/%3E%3Cpath d='M100 20C100 44 84 60 60 60C60 36 76 20 100 20Z' fill='%23F7F3EC'/%3E%3Cpath d='M20 100C20 76 36 60 60 60C60 84 44 100 20 100Z' fill='%23F7F3EC'/%3E%3Cpath d='M100 100C100 76 84 60 60 60C60 84 76 100 100 100Z' fill='%23F7F3EC'/%3E%3C/svg%3E");
  background-size: 120px 120px;
}

.testimonials .container { position: relative; z-index: 1; }

.testimonials h2 { color: var(--on-dark); }

.carousel { margin-top: var(--space-lg); }

.carousel__viewport { overflow: hidden; }

.carousel__track {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}

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

.carousel__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.testimonial-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
  height: 100%;
}

.quote-icon {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--sage);
  line-height: 1;
}

.testimonial-text {
  margin-top: var(--space-2xs);
  font-size: 0.98rem;
}

.user-info {
  margin-top: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.user-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.user-details h4 { font-size: 1rem; }

.carousel__controls {
  margin-top: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.carousel__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--beige);
  color: var(--on-dark);
  font-size: 1.3rem;
  display: grid;
  place-items: center;
}

.carousel__dots { display: flex; gap: 8px; }

.carousel__dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(247, 243, 236, 0.4);
}

.carousel__dots button[aria-current="true"] { background: var(--on-dark); }

.carousel__pause {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(247, 243, 236, 0.5);
  color: var(--on-dark);
  font-size: 0.85rem;
}

/* ---------- location ---------- */
.location { padding-block: var(--space-xl); }

.location-grid {
  margin-top: var(--space-lg);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 1024px) {
  .location-grid { grid-template-columns: repeat(3, 1fr); }
}

.location-card {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.location-heading { display: flex; gap: var(--space-xs); }

.location-icon { width: 26px; height: 26px; color: var(--olive); flex-shrink: 0; }

.location-label { font-weight: 700; color: var(--ink-strong); margin-bottom: 2px; }

.location-address { font-size: 0.92rem; }

.location-note { font-size: 0.85rem; font-style: italic; margin-top: 2px; }

.location-btn {
  display: inline-block;
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--olive);
  text-decoration: underline;
}

/* ---------- faq ---------- */
.faq { padding-block: var(--space-xl); background: var(--surface-alt); }

.faq__list {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item__icon {
  width: 24px;
  height: 24px;
  color: var(--olive);
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-out);
}

.faq-item[open] .faq-item__icon { transform: rotate(180deg); }

/* Overrides the UA rule that hides details content with display:none when
   closed (can't transition to/from that) — grid-template-rows 0fr/1fr does
   the open/close animation instead, driven purely by the [open] attribute. */
.faq-item__content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-base) var(--ease-out);
}

.faq-item[open] .faq-item__content {
  grid-template-rows: 1fr;
}

.faq-item__content > p {
  overflow: hidden;
  margin: 0;
  padding-top: var(--space-xs);
  color: var(--ink);
}

/* ---------- final cta ---------- */
.final-cta {
  position: relative;
  padding-block: var(--space-xl) var(--space-lg);
  background: var(--olive);
  color: var(--on-dark);
  overflow: hidden;
}

.final-cta__grid {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

.final-cta .hand-note { color: var(--beige); }

.final-cta__btn {
  margin-top: var(--space-sm);
  border-color: var(--beige);
  color: var(--beige);
}

.final-cta__btn::before { background: var(--beige); }
.final-cta__btn:hover { color: var(--olive); }

.final-cta__portrait { display: none; }

.final-cta__wordmark {
  margin: var(--space-lg) 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-wordmark);
  line-height: 0.9;
  text-align: center;
  color: var(--beige);
  white-space: nowrap;
}

/* ---------- footer ---------- */
.site-footer { padding-block: var(--space-lg); }

.site-footer__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.site-footer__brand { display: flex; flex-direction: column; gap: var(--space-2xs); }

.site-footer__social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.site-footer__social svg {
  width: 26px;
  height: 26px;
  color: var(--olive);
}

.site-footer__copy {
  margin-top: var(--space-md);
  font-size: 0.82rem;
  color: var(--brown);
}
