/* HOJA DE VIDA design system: tokens
   Version 1.0, 2026-12-04. Plain CSS custom properties.

   COLOR
   Measured: the capture paints six flat colors. The site's palette variables
   name them: accent #f5f5f3 (header and hero ground), lightest #fafafa (the
   ingredients ground), darkest #28282a (headings, header rule), dark #1c1c1d
   (footer ground), plus pure #000000 for body text, nav and the button
   outline, and #ffffff (light accent, unused on the home page).
   Decided: keep all six as they are; name them by role. The brand is
   monochrome on purpose; the color lives in the photography. */
:root {
  /* raw palette, as measured */
  --hoja-paper:    #f5f5f3; /* accent: header and hero ground */
  --hoja-white:    #fafafa; /* lightest: main ground below the hero */
  --hoja-pure:     #ffffff; /* light accent */
  --hoja-ink:      #000000; /* body text, nav, button outline */
  --hoja-charcoal: #28282a; /* darkest: headings, header rule */
  --hoja-night:    #1c1c1d; /* dark: footer ground */

  /* roles */
  --color-ground:        var(--hoja-white);
  --color-ground-raised: var(--hoja-paper);
  --color-ground-dark:   var(--hoja-night);
  --color-text:          var(--hoja-ink);      /* 19.3:1 on paper, 20.1:1 on white */
  --color-heading:       var(--hoja-charcoal); /* 13.4:1 on paper, 14.1:1 on white */
  --color-text-on-dark:  var(--hoja-white);    /* 16.3:1 on night */
  --color-link-on-dark:  var(--hoja-paper);    /* 15.9:1 on night */
  --color-rule:          var(--hoja-charcoal); /* 13.4:1 on paper, well over 3:1 */
  --color-focus:         var(--hoja-ink);      /* focus ring on light grounds */
  --color-focus-on-dark: var(--hoja-white);    /* focus ring on the footer */
}

/* TYPE
   Measured: three Adobe Fonts families, the files copied into fonts/.
   pragmatica-extended 700 for every heading (uppercase, -0.08em tracking);
   courier-std 400 and 700 for body copy (line height 1.325);
   aktiv-grotesk 400 for navigation (uppercase, 0.02em) and 500 for buttons.
   Sizes on the live site are a step value v run through one formula:
   wide screens  (v - 1) x 1.2vw + 1rem, held at the 1800 px page width;
   phones        (v - 1) x 1.2% of the window height (at most 900) + 1rem.
   Decided: keep that formula, so every size lands where the capture has it.
   Steps: nav 0.9 (14.3 / 15 px), button 1 (16 px), body 1.5 (24.6 / 21.1),
   lead heading 2 (33.3 / 26.1), display 4 (67.8 px wide only).
   The two headline words that fill the width (INGREDIENTS, #BEALEAF) are
   sized to the column, as the live site scales them to fit. */
:root {
  --font-display: "pragmatica-extended", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "courier-std", "Courier New", Courier, monospace;
  --font-ui:      "aktiv-grotesk", "Helvetica Neue", Arial, sans-serif;

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-bold:    700;

  /* one size step on this screen */
  --type-unit: min(1.2vw, 21.6px);

  --size-nav:      calc(-0.1 * var(--type-unit) + 1rem); /* step 0.9 */
  --size-button:   1rem;                                /* step 1   */
  --size-body:     calc(0.5 * var(--type-unit) + 1rem);  /* step 1.5 */
  --size-lead:     calc(1 * var(--type-unit) + 1rem);    /* step 2   */
  --size-marquee:  calc(3 * var(--type-unit) + 1rem);    /* step 4: ENERGY DRINK */
  --size-marquee-small: var(--size-body);               /* step 1.5: RIDE THE WIND */
  --size-menu:     6vmin;                               /* phone menu links */
  /* fitted words: size = the column width x the ratio the live site lands on */
  --fit-ingredients: 0.1416;  /* 188 px over a 1328 px column */
  --fit-bealeaf:     0.1855;  /* 267 px over 1440 px */
  --size-footer-line: 14.7px; /* fitted to one line, 1359 px wide at 1440 */

  --leading-body:    1.325;
  --leading-heading: 1.248;  /* 1.3 x (1 - 1/25), the site's h3 rule */
  --leading-marquee: 1.4;
  --leading-tight:   1;
  --leading-nav:     1.8;

  --tracking-heading: -0.08em;
  --tracking-ui:      0.02em;
  --tracking-body:    0;
}
@media screen and (max-width: 767px) and (orientation: portrait) {
  :root {
    --type-unit: calc(0.012 * min(100vh, 900px));
    --size-marquee: var(--size-body); /* the phone strip drops to step 1.5 */
    --size-menu: 8.5vmin;
    --size-footer-line: 4.1px; /* the live site fits the line to the phone width */
  }
}

/* SPACE AND LAYOUT
   Measured: the page gutter is 4vw on wide screens (58 px at 1440) and 6vw
   on phones (23 px at 390); content runs full width inside it, no max width
   below 1800 px. The header is 202 px tall wide, 134 px on a phone, with a
   1 px rule under it. Gaps measured between blocks: 20, 24, 32, 48, 64, 96 px.
   Decided: one gutter token, a header height token the page offsets by,
   and a spacing scale on those measured gaps. */
:root {
  --gutter: 4vw;
  --page-max: 1800px;
  --header-height: 202px;
  --header-rule: 1px;

  --space-2xs: 4px;
  --space-xs: 8px;
  --space-s: 12px;
  --space-m: 20px;
  --space-l: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
}
@media screen and (max-width: 767px) {
  :root {
    --gutter: 6vw;
    --header-height: 134px; /* the rule sits at 134 px in the phone capture */
  }
}

/* SHAPE
   Measured: corners are square everywhere except the button, a full pill
   (300 px radius) with a 2 px outline. Icons are 20 px (social) and 25 px
   (cart), drawn in ink.
   Decided: two radii, one stroke weight. */
:root {
  --radius-none: 0;
  --radius-pill: 300px;
  --stroke: 2px;
  --icon-s: 20px;
  --icon-m: 25px;
  --target-min: 44px; /* the smallest tap area this system draws */
}

/* MOTION
   Measured: the two type strips move steadily to the right, the live site
   at speed 2; the menu fades in.
   Decided: strips travel one item length every 14 s; everything stops for
   visitors who ask their device for less motion. */
:root {
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --marquee-cycle: 14s;
}
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
  }
}

/* ---------------------------------------------------------------
   2026-12-05: the product-led home page.
   Decided: the can brings the first colour into a monochrome system.
   Leaf is sampled from the can's sleeve; ring and spark are the two
   lights the can gives off in the client's film. They are used for
   light only (lines, glows, one button), never for running text.
   The header drops from 202 px to 96 px so the can owns the first
   screen; the logo stays large inside it.
   --------------------------------------------------------------- */
:root {
  --hoja-leaf:  #bcd24a; /* the sleeve; 11.9:1 under ink text */
  --hoja-ring:  #45e3c1; /* the ring round the leaf mark when lit */
  --hoja-spark: #c8a4ff; /* the light that runs along the veins */

  --color-muted:            #58585b; /* 7.0:1 on white, 6.6:1 on paper */
  --color-muted-on-dark:    #b4b4ae; /* 8.4:1 on night */
  --color-hairline:         rgba(40, 40, 42, 0.2);
  --color-hairline-on-dark: rgba(250, 250, 250, 0.18);

  --size-hero:  clamp(2.375rem, 4.9vw, 5.25rem);  /* 70.6 px at 1440 */
  --size-title: clamp(1.625rem, 2.9vw, 3rem);     /* 41.8 px at 1440 */
  --size-item:  clamp(1.0625rem, 1.25vw, 1.25rem);/* ingredient names */
  --size-note:  clamp(1rem, 1.18vw, 1.125rem);    /* courier, small copy */
  --size-label: 0.8125rem;                        /* aktiv caps, 13 px */
  --tracking-label: 0.14em;
  --leading-hero: 0.98;
  --leading-note: 1.5;

  --measure: 1320px;        /* the widest the words and tables run */
  --header-height: 96px;
}
@media screen and (max-width: 767px) {
  :root { --header-height: 68px; --size-footer-line: 12px; }
}
