/* HOJA DE VIDA design system: components
   Only what the home page uses, each with its states. */

/* ---------------------------------------------------------------
   SITE HEADER
   Use when: every page; it stays fixed at the top, the page starts
   under it (pad the first band by --header-height).
   Not when: never more than one per page.
   Wide: nav left, logo centered, social icons and cart right.
   Phone: logo left, cart and a two-line menu button right; the
   button opens the full-screen menu below.
   States: link rest, hover (underline), current page (underline),
   focus (ring); menu button closed, open (lines cross).
   --------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-height);
  background: var(--color-ground-raised);
  border-bottom: var(--header-rule) solid var(--color-rule);
  color: var(--color-text);
}
.site-header__inner {
  position: relative; height: 100%;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding-inline: var(--gutter);
  padding-top: 12px; /* the live header sits its row 6 px below center */
}
.site-header__nav { display: flex; gap: 0 21px; }
.site-header__nav a { position: relative; display: inline-block; }
.site-header__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--duration-base) var(--ease);
}
.site-header__nav a:hover::after,
.site-header__nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-header__logo { display: block; justify-self: center; }
.site-header__logo img { width: 372px; height: 150px; object-fit: contain; }
.site-header__actions { justify-self: end; display: flex; align-items: center; }
.icon-link {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-text);
  transition: opacity var(--duration-fast) var(--ease);
}
.icon-link:hover { opacity: 0.6; }
.icon-link svg { width: var(--icon-s); height: var(--icon-s); fill: currentColor; }
.site-header__social { display: flex; gap: 22px; margin-right: 36px; }
.cart-link { display: inline-flex; align-items: center; gap: 4px; }
.cart-link svg {
  width: var(--icon-m); height: var(--icon-m);
  fill: none; stroke: currentColor; stroke-width: 1px;
}
.cart-link__count { font-family: var(--font-ui); font-size: var(--size-nav); letter-spacing: var(--tracking-ui); line-height: 25px; }

/* menu button: two thin lines that cross when open */
.menu-button {
  display: none; position: relative;
  width: var(--target-min); height: var(--target-min);
  margin-right: -5px;
}
.menu-button__line {
  position: absolute; left: 5px; right: 4px; height: 1px; background: currentColor;
  transition: transform var(--duration-base) var(--ease), top var(--duration-base) var(--ease);
}
.menu-button__line:nth-child(2) { top: 15px; }
.menu-button__line:nth-child(3) { top: 29px; }
.menu-button[aria-expanded="true"] .menu-button__line:nth-child(2) { top: 22px; transform: rotate(45deg); }
.menu-button[aria-expanded="true"] .menu-button__line:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* the phone menu: covers the page under the header */
.site-menu {
  position: fixed; inset: var(--header-height) 0 0 0; z-index: 49;
  background: var(--color-ground-raised);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--space-3xl) var(--gutter) var(--space-2xl);
  overflow-y: auto;
}
.site-menu__links { display: flex; flex-direction: column; align-items: center; gap: var(--space-m); }
.site-menu__links a {
  font-family: var(--font-ui); font-size: var(--size-menu); line-height: 1.4;
  letter-spacing: var(--tracking-ui); text-transform: uppercase;
}
.site-menu__links a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.site-menu__social { display: flex; justify-content: center; gap: var(--space-l); }
.site-menu__social .icon-link { width: var(--target-min); height: var(--target-min); }
.site-menu__social svg { width: 30px; height: 30px; }

@media screen and (max-width: 767px) {
  .site-header { background: rgba(245, 245, 243, 0.992); }
  .site-header__inner { grid-template-columns: auto 1fr; padding-top: 0; }
  .site-header__nav, .site-header__social { display: none; }
  .site-header__logo { justify-self: start; grid-row: 1; grid-column: 1; }
  .site-header__logo img { width: 218px; height: 88px; }
  .site-header__actions { grid-column: 2; gap: 28px; }
  .menu-button { display: block; }
}
@media screen and (min-width: 768px) {
  .site-menu { display: none !important; }
}

/* ---------------------------------------------------------------
   BUTTON (outline pill)
   Use when: the one action a band asks for (SHOP).
   Not when: inline in a sentence; use a text link there.
   Measured: aktiv-grotesk 500, 16 px, 0.02em, ink text, 2 px ink
   outline, transparent fill, full pill. It stretches to the width of
   its slot on the live site (156 px wide, 57 tall at 1440; 167 by 48
   on a phone).
   States: rest; hover and active fill with ink, text turns paper;
   focus adds the ring; disabled fades to 40%.
   --------------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--target-min);
  padding: 18px 2.2rem;
  font-family: var(--font-ui); font-weight: var(--weight-medium);
  font-size: var(--size-button); line-height: 1.2;
  letter-spacing: var(--tracking-ui);
  color: var(--color-text);
  background: transparent;
  border: var(--stroke) solid var(--color-text);
  border-radius: var(--radius-pill);
  transition: background-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}
.button:hover, .button:active { background: var(--color-text); color: var(--color-ground-raised); }
.button:focus-visible { outline-offset: 4px; }
.button[aria-disabled="true"], .button:disabled { opacity: 0.4; pointer-events: none; }
.button--stretch { display: flex; width: 100%; }

/* ---------------------------------------------------------------
   TYPE STRIP (marquee)
   Use when: a brand line repeats across the full width as a band
   divider: ENERGY DRINK on a straight line, RIDE THE WIND on a wave.
   Not when: for anything a visitor must read to act; it moves.
   Measured: pragmatica-extended 700 uppercase, -0.08em; items spaced
   0.7em apart; drifting to the right.
   States: moving; paused on hover and keyboard focus and with the
   pause button; still for visitors who ask for less motion.
   The words are read once by screen readers (the moving copies are
   hidden from them).
   --------------------------------------------------------------- */
.strip { position: relative; overflow: hidden; color: var(--color-text); }
.strip text { font-family: var(--font-display); font-weight: var(--weight-bold); letter-spacing: var(--tracking-heading); text-transform: uppercase; fill: currentColor; }
.strip__track {
  display: flex; width: max-content; white-space: nowrap;
  animation: strip-drift var(--marquee-cycle) linear infinite;
}
.strip__item { padding-right: 0.7em; }
.strip--paused .strip__track, .strip:hover .strip__track { animation-play-state: paused; }
@keyframes strip-drift {
  from { transform: translateX(calc(-1 * var(--strip-step, 25%))); }
  to   { transform: translateX(0); }
}
/* the wave variant draws its words along a curve in an svg */
.strip--wave { color: var(--color-heading); }
.strip svg { display: block; width: 100%; overflow: visible; }
.strip--wave text {
  font-family: var(--font-display); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-heading); text-transform: uppercase;
  fill: currentColor;
}
.strip__pause {
  position: absolute; right: var(--gutter); bottom: 0;
  width: var(--target-min); height: var(--target-min);
  display: grid; place-items: center;
  opacity: 0; transition: opacity var(--duration-fast) var(--ease);
}
.strip__pause:focus-visible, .strip:hover .strip__pause { opacity: 1; }
.strip__pause svg { width: 14px; height: 14px; fill: currentColor; }
@media (prefers-reduced-motion: reduce) {
  .strip__track { animation: none; }
}

/* ---------------------------------------------------------------
   MEDIA (cover picture)
   Use when: a product photograph or a designed panel fills a slot of
   a set height; the picture is cropped to the slot from its center.
   Not when: the picture carries words that must not be cut; give the
   slot the picture's own proportions then.
   States: still; as a link, the picture dims slightly on hover and
   the whole slot takes the focus ring.
   --------------------------------------------------------------- */
.media { position: relative; display: block; overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
a.media img { transition: opacity var(--duration-base) var(--ease); }
a.media:hover img { opacity: 0.92; }
a.media:focus-visible { outline-offset: 0; }

/* ---------------------------------------------------------------
   FITTED WORD
   Use when: one brand word is the band's headline and should run
   edge to edge (INGREDIENTS, #BEALEAF).
   Not when: more than one or two words; it stops being legible.
   The size follows the column: set --fit-width to the column width
   and --fit to the word's ratio from the tokens.
   --------------------------------------------------------------- */
.fit-word {
  font-size: calc(var(--fit-width, 100vw) * var(--fit, 0.14));
  text-align: center;
}

/* ---------------------------------------------------------------
   SITE FOOTER
   Use when: every page, last.
   Not when: never more than one per page.
   Measured: night ground, #BEALEAF fitted to the full width in paper,
   then one centered courier line with the company facts; its links
   are underlined in a 1 px rule.
   States: link rest (underlined), hover (underline drops), focus
   (white ring).
   --------------------------------------------------------------- */
.site-footer { overflow: hidden; }
.site-footer__tag {
  color: var(--hoja-paper);
  margin-left: -0.02em;
}
.site-footer__line {
  font-family: var(--font-body); font-size: var(--size-footer-line);
  line-height: 1; text-transform: none; white-space: nowrap;
  text-align: center; color: var(--color-text-on-dark);
}
.site-footer__line a {
  color: var(--color-link-on-dark);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px;
}
.site-footer__line a:hover { text-decoration: none; }

/* in a short window the live header takes the lightest ground */
@media screen and (min-width: 768px) and (max-height: 800px) {
  .site-header { background: var(--hoja-white); }
}

/* ---------------------------------------------------------------
   2026-12-05: the product-led home page
   --------------------------------------------------------------- */

/* SITE HEADER, slim: same parts, 96 px tall; the main action (SHOP)
   is a filled pill at the right, where the social icons were (they
   stay in the phone menu and the footer line). */
.site-header__inner { padding-top: 0; }
.site-header__logo img { width: 173px; height: 70px; }
.site-header__nav { gap: 0 28px; }
.site-header__nav a { padding-block: 10px; }
.site-header__actions { gap: 22px; }
.site-header__social { display: none; }
.site-header__shop { min-height: var(--target-min); padding: 11px 1.6rem; }
@media screen and (max-width: 767px) {
  .site-header__logo img { width: 119px; height: 48px; }
  .site-header__actions { gap: 10px; }
  .site-header__shop { padding: 10px 1.1rem; font-size: 0.875rem; }
  .cart-link { min-width: var(--target-min); min-height: var(--target-min); justify-content: center; }
}

/* BUTTON, filled. Use when: the page's main action (SHOP). Rest: ink
   fill, paper text. Hover: leaf fill, ink text. On dark grounds use
   --leaf, which rests on leaf and turns white on hover. */
.button--solid { background: var(--color-text); color: var(--hoja-white); }
.button--solid:hover, .button--solid:active { background: var(--hoja-leaf); border-color: var(--hoja-leaf); color: var(--hoja-ink); }
.button--leaf { background: var(--hoja-leaf); border-color: var(--hoja-leaf); color: var(--hoja-ink); }
.button--leaf:hover, .button--leaf:active { background: var(--hoja-white); border-color: var(--hoja-white); color: var(--hoja-ink); }
.button--large { padding: 20px 2.4rem; }

/* TEXT LINK with an arrow. Use when: the second, quieter action. */
.text-link {
  display: inline-flex; align-items: center; gap: 0.6em; min-height: var(--target-min);
  font-family: var(--font-ui); font-weight: var(--weight-medium); font-size: var(--size-button);
  letter-spacing: var(--tracking-ui); text-transform: uppercase;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.35em;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* LABEL: small aktiv capitals over a heading or beside a number. */
.t-label {
  font-family: var(--font-ui); font-weight: var(--weight-medium); font-size: var(--size-label);
  line-height: 1.4; letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--color-muted);
}
.tone-dark .t-label { color: var(--color-muted-on-dark); }
.t-hero, .t-title, .t-item {
  font-family: var(--font-display); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-heading); text-transform: uppercase; color: var(--color-heading);
}
.t-hero  { font-size: var(--size-hero); line-height: var(--leading-hero); letter-spacing: -0.065em; word-spacing: 0.1em; }
.t-title { font-size: var(--size-title); line-height: 1.08; letter-spacing: -0.055em; word-spacing: 0.12em; }
.t-item  { font-size: var(--size-item); line-height: 1.2; letter-spacing: -0.045em; word-spacing: 0.1em; }
.t-note  { font-family: var(--font-body); font-size: var(--size-note); line-height: var(--leading-note); }
.tone-dark .t-hero, .tone-dark .t-title, .tone-dark .t-item { color: var(--hoja-white); }
.measure { width: 100%; max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* THE LABEL: the ingredient table. Use when: the twelve ingredients
   are listed with why each is here and what it brings. Wide: three
   ruled columns. Phone: each row stacks. */
.label-table { width: 100%; border-collapse: collapse; text-align: left; }
.label-table th, .label-table td { padding: 17px 24px 17px 0; vertical-align: baseline; border-top: 1px solid var(--color-hairline); }
.label-table thead th { border-top: 0; padding-block: 0 14px; }
.label-table tbody th { width: 30%; font-weight: var(--weight-bold); }
.label-table td { font-family: var(--font-body); font-size: var(--size-note); line-height: 1.4; }
.label-table td:last-child { padding-right: 0; color: var(--color-muted); }
.label-table tbody tr:last-child > * { border-bottom: 1px solid var(--color-hairline); }
.tone-dark .label-table th, .tone-dark .label-table td { border-color: var(--color-hairline-on-dark); }
.tone-dark .label-table td:last-child { color: var(--color-muted-on-dark); }
@media screen and (max-width: 767px) {
  .label-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .label-table tbody tr { display: grid; grid-template-columns: 1fr; padding: 16px 0; border-top: 1px solid var(--color-hairline); }
  .label-table tbody th, .label-table tbody td { display: block; width: auto; padding: 0; border: 0; }
  .label-table tbody td { margin-top: 4px; }
  .label-table tbody tr:last-child > * { border-bottom: 0; }
  .label-table tbody tr:last-child { border-bottom: 1px solid var(--color-hairline); }
}

/* BUY BAND: the last ask before the footer. Night ground, the pack
   name, one line, the filled leaf button, the guarantee. */
.buy { padding-block: clamp(72px, 9vw, 136px); overflow: hidden; }
.buy__inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: var(--space-3xl); }
.buy__title { margin-top: var(--space-l); }
.buy__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-l) var(--space-xl); margin-top: var(--space-2xl); }
.buy__note { color: var(--color-muted-on-dark); }
.buy__note a { color: var(--hoja-white); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.buy__can { justify-self: center; width: min(100%, 300px); margin-block: -40px -200px; transform: rotate(9deg); }
@media screen and (max-width: 767px) {
  .buy__inner { grid-template-columns: 1fr; }
  .buy__can { width: 210px; margin-block: 0 -150px; }
}

/* the wave strip as a divider between two bands */
.wave-divider { padding-block: 56px 40px; }
.wave-divider svg { height: 124px; }
@media screen and (max-width: 767px) { .wave-divider { padding-block: 36px 24px; } }

/* footer on the new page: the line wraps on a phone, at a size a person can read */
.site-footer--wrap .site-footer__line { white-space: normal; line-height: 1.6; }
@media screen and (min-width: 768px) { .site-footer--wrap .site-footer__line { white-space: nowrap; line-height: 1; } }
