/* ==========================================================================
   Medifoot — Base (reset + typography + primitives)
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--slate);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

h1, h2, h3, h4 { line-height: var(--lh-snug); font-weight: var(--fw-semibold); letter-spacing: -0.015em; color: var(--slate); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p  { max-width: 68ch; }

a { color: var(--cypress); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--honey-deep); }

:focus-visible { outline: 2px solid var(--cypress); outline-offset: 3px; border-radius: 4px; }

/* ---- Layout primitives ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--paper { background: var(--paper); }
.section--bone  { background: var(--bone); }
.section--cypress { background: var(--cypress-deep); color: rgba(255,255,255,0.86); }
.section--cypress h2, .section--cypress h3 { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--honey-deep);
  margin-bottom: var(--sp-2);
}
.section--cypress .eyebrow { color: var(--honey-glow); }

.section-head { max-width: var(--maxw-text); margin-bottom: var(--sp-5); }
.section-head--center { margin-inline: auto; text-align: center; }
.lead { font-size: var(--fs-lead); color: var(--muted); font-weight: var(--fw-light); }
.section--cypress .lead { color: rgba(255,255,255,0.72); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-weight: var(--fw-semibold); font-size: var(--fs-small);
  letter-spacing: 0.01em;
  padding: 0.95em 1.7em; border-radius: var(--r-pill);
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  will-change: transform;
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 0.62em 1.25em; }
.btn-ghost svg, .btn-secondary svg { transition: transform var(--dur-fast) var(--ease); }
.btn-ghost:hover svg, .btn-secondary:hover svg { transform: translateX(3px); }

/* Primary: white on honey (LOCKED Apostolos preference) */
.btn-primary { background: var(--honey); color: var(--white); box-shadow: var(--shadow-honey); }
.btn-primary:hover { background: var(--honey-deep); color: var(--white); transform: translateY(-2px); }

/* Secondary: cypress */
.btn-secondary { background: var(--cypress); color: var(--white); }
.btn-secondary:hover { background: var(--cypress-deep); color: var(--white); transform: translateY(-2px); }

/* Ghost: outline on light */
.btn-ghost { background: transparent; color: var(--slate); border: 1.5px solid var(--rule); }
.btn-ghost:hover { border-color: var(--cypress); color: var(--cypress); }

.btn-link { color: var(--cypress); font-weight: var(--fw-semibold); font-size: var(--fs-small); display: inline-flex; align-items: center; gap: 0.4em; }
.btn-link svg { transition: transform var(--dur-fast) var(--ease); }
.btn-link:hover svg { transform: translateX(3px); }

/* ---- Reveal-on-scroll (progressive enhancement: only hides when JS is active) ----
   Note: the entrance transform lives on :not(.is-in) so that once an element is
   revealed it carries NO transform from the reveal system — leaving :hover/active
   transforms (card lifts, image zoom) free to apply. */
.js .reveal { opacity: 0; transition: opacity 0.7s var(--ease), transform 0.8s var(--ease), clip-path 0.8s var(--ease); }
.js .reveal:not(.is-in) { transform: translateY(18px); }
.js .reveal.is-in { opacity: 1; }

/* Reveal variant — image "wipe" uncover (hero / founder / about photos) */
.js .reveal--wipe:not(.is-in) { clip-path: inset(0 0 32% 0); transform: translateY(16px); }
.js .reveal--wipe.is-in { clip-path: inset(0 0 0 0); }

/* Reveal variant — trigger only: the element itself does not fade/move
   (its children reveal on their own); used to time a child animation. */
.js .reveal--line { opacity: 1; }
.js .reveal--line:not(.is-in) { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal--wipe, .js .reveal--line { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
}

.u-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
