/* ==========================================================================
   MyTraceability — Landing styles
   Light-theme-committed, food-industry credible palette. WCAG AA gated.
   No external assets. System font stack (fast, local, zero-dependency).
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* palette */
  --ink:        #10201a;   /* near-black forest */
  --ink-2:      #1c2f28;
  --muted:      #4b5c54;   /* body-muted, AA on --surface */
  --line:       #e2e5df;
  --surface:    #f7f6f1;   /* warm off-white page bg */
  --surface-2:  #ffffff;   /* card bg */
  --surface-3:  #eef1ea;
  --green:      #196a48;   /* primary; white text = 5.2:1 AA */
  --green-700:  #12583b;
  --green-900:  #0f3d2e;   /* dark sections */
  --lime:       #b9e34f;   /* accent, decorative + on-dark chips only */
  --lime-soft:  #e7f4c9;
  --amber:      #c9832b;

  /* type */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  /* scale (fluid) */
  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1rem, 0.96rem + 0.22vw, 1.13rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3:  clamp(1.9rem, 1.5rem + 2vw, 2.9rem);
  --step-4:  clamp(2.3rem, 1.6rem + 3.4vw, 4rem);

  /* spacing / radii / shadow */
  --sp: clamp(1rem, 0.6rem + 2vw, 2rem);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(16,32,26,.06), 0 2px 8px rgba(16,32,26,.05);
  --shadow-md: 0 10px 30px rgba(16,32,26,.10), 0 2px 8px rgba(16,32,26,.05);
  --shadow-lg: 0 24px 60px rgba(15,61,46,.18);
  --container: 1160px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
h1,h2,h3 { line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); margin: 0; }
p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.container { width: min(100% - 2 * clamp(1rem, 4vw, 2.5rem), var(--container)); margin-inline: auto; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--green-900); color: #fff; padding: .6rem 1rem;
  border-radius: 10px; transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Focus visibility ---------- */
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 6px;
}
.on-dark:focus-visible, .final-cta :focus-visible { outline-color: var(--lime); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  --btn-pad-y: .72rem; --btn-pad-x: 1.15rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: var(--btn-pad-y) var(--btn-pad-x);
  font: inherit; font-weight: 650; font-size: var(--step-0);
  border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              box-shadow .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
  white-space: nowrap;
}
.btn-lg { min-height: 52px; padding: .95rem 1.6rem; font-size: var(--step-1); }
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-700); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-700); background: #fff; }
.btn-ghost.on-dark { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost.on-dark:hover { background: rgba(255,255,255,.10); border-color: #fff; }
.btn:active { transform: translateY(0); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.brand-mark { color: var(--green); display: inline-flex; }
.brand-name { font-size: 1.12rem; }

.main-nav { display: none; gap: 1.5rem; margin-inline: auto; }
.main-nav a { text-decoration: none; color: var(--ink-2); font-weight: 550; font-size: var(--step-0); position: relative; padding: .25rem 0; }
.main-nav a::after { content:""; position:absolute; left:0; right:100%; bottom:-2px; height:2px; background: var(--green); transition: right .25s var(--ease); }
.main-nav a:hover::after, .main-nav a:focus-visible::after { right: 0; }

.header-actions { display: none; align-items: center; gap: .6rem; }

/* language select */
.lang-select-wrap { position: relative; display: inline-flex; align-items: center; }
.lang-select-wrap .globe { position: absolute; left: 10px; pointer-events: none; color: var(--muted); display: inline-flex; }
.lang-select {
  appearance: none; -webkit-appearance: none;
  min-height: 44px; padding: .5rem 2rem .5rem 2.1rem;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 600; font-size: var(--step--1);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234b5c54' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center;
}
.lang-select:hover { border-color: var(--green); }

/* mobile nav toggle */
.nav-toggle {
  margin-left: auto; width: 44px; height: 44px; display: inline-flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 5px; background: transparent; border: 0; cursor: pointer; border-radius: 10px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { border-top: 1px solid var(--line); background: var(--surface); }
.mobile-nav nav { display: flex; flex-direction: column; gap: .25rem; padding: 1rem clamp(1rem,4vw,2.5rem) 1.5rem; }
.mobile-nav a { text-decoration: none; color: var(--ink); font-weight: 600; padding: .8rem .25rem; border-radius: 10px; min-height: 44px; display: flex; align-items: center; }
.mobile-nav a:not(.btn):hover { color: var(--green-700); }
.mobile-nav .btn { margin-top: .35rem; }

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .header-actions { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding: clamp(2.5rem, 3vw + 1.5rem, 5.5rem) 0 clamp(2rem,4vw,3.5rem); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .55; will-change: transform; }
.blob-a { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; right: -8vw; top: -8vw; background: radial-gradient(circle at 30% 30%, var(--lime-soft), transparent 70%); }
.blob-b { width: 40vw; height: 40vw; max-width: 520px; max-height: 520px; left: -12vw; bottom: -14vw; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--green) 22%, transparent), transparent 70%); }
.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .25;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}

.hero-inner { position: relative; z-index: 1; display: grid; gap: clamp(2rem,4vw,3.5rem); align-items: center; }
@media (min-width: 940px) { .hero-inner { grid-template-columns: 1.05fr .95fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--lime-soft); color: var(--green-900);
  font-weight: 650; font-size: var(--step--1); padding: .4rem .85rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--green) 20%, transparent);
}
.hero-copy h1 { font-size: var(--step-4); font-weight: 800; margin: 1.1rem 0 .9rem; max-width: 16ch; }
.hero-sub { font-size: var(--step-1); color: var(--muted); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-cta.center { justify-content: center; }
.hero-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.7rem; }
.hero-chips li { font-size: var(--step--1); font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: .4rem .8rem; border-radius: 999px; }
.hero-trustline { position: relative; z-index:1; text-align: center; color: var(--muted); font-size: var(--step--1); margin-top: clamp(1.5rem,3vw,2.5rem); }

/* hero visual chain card */
.hero-visual { display: flex; justify-content: center; }
.chain-card {
  width: 100%; max-width: 440px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem;
  box-shadow: var(--shadow-lg); will-change: transform;
}
.chain { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: .35rem; }
.chain-node { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; }
.node-ico { width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.4rem; background: var(--surface-3); border-radius: 12px; }
.node-label { font-size: .72rem; font-weight: 650; color: var(--ink-2); }
.chain-link { height: 2px; background: linear-gradient(90deg, var(--green), var(--lime)); border-radius: 2px; }
.chain-badge {
  margin-top: 1.2rem; display: inline-flex; align-items: center; gap: .5rem;
  color: var(--green-900); background: var(--lime-soft); border-radius: 12px; padding: .6rem .85rem;
  font-weight: 650; font-size: var(--step--1); width: 100%;
}
.chain-badge svg { color: var(--green); flex: 0 0 auto; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(3rem, 6vw, 6rem) 0; }
.section-head { max-width: 60ch; margin-bottom: clamp(2rem,4vw,3rem); }
.section-head.reveal { margin-inline: 0; }
.section-kicker { display: inline-block; font-weight: 700; font-size: var(--step--1); text-transform: uppercase; letter-spacing: .12em; color: var(--green); margin-bottom: .7rem; }
.section h2 { font-size: var(--step-3); font-weight: 800; }
.section-lead { margin-top: .9rem; font-size: var(--step-1); color: var(--muted); }

/* problem */
.problem { background: linear-gradient(180deg, var(--surface), var(--surface-3)); }
.prob-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .prob-grid { grid-template-columns: repeat(3,1fr); } }
.prob-card { background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: var(--radius-sm); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.prob-card h3 { font-size: var(--step-1); margin-bottom: .5rem; }
.prob-card p { color: var(--muted); }

/* features — bento */
.bento { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; }
  .bento-lg { grid-row: span 2; }
}
@media (min-width: 1040px) { .bento { grid-template-columns: 1.3fr 1fr 1fr; grid-auto-rows: auto; align-items: stretch; } .bento-lg { grid-column: 1; grid-row: auto; } }
.bento-cell {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 2vw, 2rem); box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  display: flex; flex-direction: column;
}
.bento-cell:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--green) 30%, var(--line)); }
.bento-lg { background: linear-gradient(160deg, #fff, var(--surface-3)); }
.bento-accent { background: linear-gradient(160deg, var(--green-900), var(--green-700)); color: #fff; border-color: var(--green-900); }
.bento-accent h3, .bento-accent .feat-ico { color: #fff; }
.bento-accent p { color: rgba(255,255,255,.86); }
.feat-ico { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--lime-soft); color: var(--green); margin-bottom: 1rem; }
.feat-ico svg { width: 26px; height: 26px; }
.bento-accent .feat-ico { background: rgba(255,255,255,.14); }
.bento-cell h3 { font-size: var(--step-2); margin-bottom: .6rem; }
.bento-cell p { color: var(--muted); }
.feat-points { margin-top: 1.1rem; display: grid; gap: .55rem; }
.feat-points li { position: relative; padding-left: 1.6rem; font-weight: 550; color: var(--ink-2); }
.feat-points li::before { content:""; position:absolute; left:0; top:.5em; width:14px; height:8px; border-left:2.5px solid var(--green); border-bottom:2.5px solid var(--green); transform: rotate(-45deg); }
.feat-note { margin-top: auto; padding-top: 1rem; font-size: var(--step--1); color: rgba(255,255,255,.8) !important; font-style: italic; }
/* Dark accent card: force body + list to high-contrast light text on the green background (WCAG AA).
   These must come AFTER `.bento-cell p` above so source order wins the equal-specificity cascade
   (otherwise the accent card's body inherits --muted = dark green on dark green = unreadable). */
.bento-accent p { color: rgba(255,255,255,.92); }
.bento-accent .feat-points li { color: rgba(255,255,255,.9); }

/* how it works */
.how { background: var(--surface-3); }
.steps { display: grid; gap: 1.2rem; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3,1fr); } }
.step { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.step-num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--green); color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: 1rem; }
.step h3 { font-size: var(--step-1); margin-bottom: .5rem; }
.step p { color: var(--muted); }

/* audience */
.aud-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .aud-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1000px) { .aud-grid { grid-template-columns: repeat(4,1fr); } }
.aud-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.aud-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.aud-ico { font-size: 1.9rem; display: block; margin-bottom: .7rem; }
.aud-card h3 { font-size: var(--step-1); margin-bottom: .4rem; }
.aud-card p { color: var(--muted); font-size: var(--step-0); }

/* trust */
.trust-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .trust-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1000px) { .trust-grid { grid-template-columns: repeat(4,1fr); } }
.trust-item { background: var(--surface-2); border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: var(--radius-sm); padding: 1.4rem; display: flex; flex-direction: column; gap: .4rem; box-shadow: var(--shadow-sm); }
.trust-item strong { font-size: var(--step-1); color: var(--ink); }
.trust-item span { color: var(--muted); font-size: var(--step-0); }

/* final CTA */
.final-cta { position: relative; overflow: hidden; background: radial-gradient(120% 120% at 20% 0%, var(--green-700), var(--green-900)); color: #fff; text-align: center; }
.final-bg { position: absolute; inset: 0; pointer-events: none; }
.blob-c { position:absolute; width: 50vw; height: 50vw; max-width: 640px; max-height: 640px; right: -10vw; bottom: -22vw; background: radial-gradient(circle, color-mix(in srgb, var(--lime) 30%, transparent), transparent 70%); filter: blur(50px); opacity: .5; will-change: transform; }
.final-inner { position: relative; z-index: 1; max-width: 62ch; margin-inline: auto; }
.final-cta h2 { color: #fff; font-size: var(--step-3); }
.final-cta p { color: rgba(255,255,255,.85); font-size: var(--step-1); margin-top: 1rem; }
.final-cta .hero-cta { margin-top: 2rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: #cdd6d0; padding: clamp(2.5rem,5vw,4rem) 0 1.5rem; }
.footer-inner { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 800px) { .footer-inner { grid-template-columns: 1.5fr 1fr auto; } }
.site-footer .brand { color: #fff; }
.site-footer .brand-mark { color: var(--lime); }
.footer-tag { color: #9fb0a6; margin-top: .7rem; max-width: 34ch; }
.footer-links { display: flex; flex-direction: column; gap: .3rem; }
.footer-links a { color: #cdd6d0; text-decoration: none; padding: .55rem 0; min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-lang { display: flex; flex-direction: column; gap: .5rem; }
.footer-lang label { color: #9fb0a6; font-size: var(--step--1); font-weight: 600; }
.site-footer .lang-select { background: var(--ink-2); color: #fff; border-color: rgba(255,255,255,.16); }
.site-footer .lang-select-wrap .globe { color: #9fb0a6; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; margin-top: 2.5rem; padding-top: 1.3rem; border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom small { color: #8fa096; font-size: var(--step--1); }

/* ==========================================================================
   Scroll reveal + parallax motion
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
/* stagger inside grids */
.bento .reveal.in, .prob-grid .reveal.in, .aud-grid .reveal.in, .trust-grid .reveal.in, .steps .reveal.in { transition-delay: var(--rd, 0ms); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .blob, .chain-card, .blob-c { transform: none !important; }
  .btn:hover, .bento-cell:hover, .aud-card:hover { transform: none; }
}

/* print / no-js safety: reveal visible if JS disabled */
.no-js .reveal { opacity: 1; transform: none; }

/* ============ PRICING ============ */
.pricing .container { display: flex; flex-direction: column; align-items: center; }
.pricing .section-head { text-align: center; margin-inline: auto; }
.pricing-card {
  width: 100%;
  max-width: 30rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  text-align: center;
}
.pricing-country {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green-700);
  background: var(--surface-3);
  border-radius: 999px;
  padding: .25rem .8rem;
  margin-bottom: 1rem;
}
.pricing-amount { display: flex; align-items: baseline; justify-content: center; gap: .4rem; flex-wrap: wrap; }
.pricing-value { font-size: clamp(2.4rem, 8vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; color: var(--ink); line-height: 1; }
.pricing-period { font-size: var(--step-1); color: var(--muted); font-weight: 600; }
.pricing-features {
  list-style: none;
  margin: 1.6rem 0;
  padding: 0;
  display: grid;
  gap: .7rem;
  text-align: left;
}
.pricing-features li {
  position: relative;
  padding-left: 1.8rem;
  color: var(--ink-2);
  font-size: var(--step-0);
}
.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0; top: .15em;
  width: 1.15rem; height: 1.15rem;
  background: var(--green);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-9' stroke='white' stroke-width='2.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 100% 100%;
}
.pricing-card .btn { width: 100%; justify-content: center; }
.pricing-note { margin-top: 1rem; font-size: var(--step--1); color: var(--muted); }
@media (max-width: 40rem) {
  .pricing-features { gap: .55rem; }
}
