/* NatureTech — design tokens (v2)
   Brand pivot 2026-04-25: purple + forest + gold + cream + lavender, sans-only typography.
   Tokens locked by designer in design/v2/article/README.md ("don't change without approval").

   This file keeps v1 token NAMES alive (with v2 values) so per-screen CSS that still
   references --green, --yellow, --canvas, etc. won't go undefined during the
   sprint-by-sprint v1→v2 migration. New code should prefer the v2-native names
   (--purple, --gold, --cream, --lavender, --canvas, --ink). */

:root {
  /* ── v2 brand palette (locked) ── */
  --purple:        #2D1B4E;
  --purple-deep:   #1E1236;
  --purple-bright: #6B3FA0;

  --green:         #2D6A4F;   /* product CTA, in-stock, forest */
  --green-deep:    #1E4D38;

  --gold:          #E6B149;   /* primary CTA */
  --gold-deep:     #C4922A;

  --cream:         #F7F3E9;   /* warm raised surface */
  --lavender:      #F0EBF7;   /* cool soft surface, hairlines */
  --canvas:        #FAF9FC;   /* page background */
  --ink:           #1A1628;   /* near-black, body text */

  /* ── v1-name compat shims (mapped to v2 values) ── */
  /* Surfaces */
  --canvas-ink:    #F7F3E9;   /* alias of --cream */
  --raised:        #ffffff;
  --ink-soft:      #2D2540;
  --ink-muted:     #6B6580;
  --ink-faint:     #9892A8;

  /* Lines */
  --line-soft:     #F0EBF7;   /* alias of --lavender */
  --line:          #E5DEEA;
  --line-strong:   #C5C0CC;

  /* Green ramp (v1 names; v2 forest) */
  --green-mid:     #2D6A4F;
  --green-soft:    #C9D9CF;
  --green-pale:    #DEE7E2;

  /* Yellow ramp (v1 names; v2 gold) */
  --yellow:        #E6B149;
  --yellow-deep:   #C4922A;
  --yellow-soft:   #F0D9A0;
  --yellow-pale:   #F8E8B8;

  /* Blue ramp (v1 names; remapped to purple-bright family) */
  --blue:          #6B3FA0;
  --blue-soft:     #D5C9E8;
  --blue-pale:     #F0EBF7;

  /* Magazine accent (v1 was terracotta; v2 magazine pages use purple-bright) */
  --magazine:      #6B3FA0;
  --magazine-soft: #F0EBF7;

  /* Semantic */
  --in-stock:      #2D6A4F;
  --low-stock:     #C4922A;
  --out-stock:     #9892A8;
  --new:           #6B3FA0;
  --restock:       #6B3FA0;

  /* ── Typography (v2: sans-only, Heebo body + IBM Plex Sans Hebrew headings) ── */
  --font-display:  "IBM Plex Sans Hebrew", "Heebo", "Arial Hebrew", "Helvetica Neue", system-ui, sans-serif;
  --font-heading:  "IBM Plex Sans Hebrew", "Heebo", "Arial Hebrew", "Helvetica Neue", system-ui, sans-serif;
  --font-body:     "Heebo", "IBM Plex Sans Hebrew", "Arial Hebrew", "Helvetica Neue", system-ui, sans-serif;
  --font-mono:     "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout utility tokens (consumed by editorial templates) */
  --container: 1920px;                              /* max-width for full-bleed editorial sections */
  --gutter:    clamp(20px, 2.4vw, 56px);            /* responsive page gutter */
  --ease:      cubic-bezier(.2, .7, .2, 1);         /* default easing curve */

  /* Type scale */
  --t-display:  clamp(56px, 7vw, 104px);
  --t-h1:       clamp(40px, 4.8vw, 72px);
  --t-h2:       clamp(30px, 3.2vw, 48px);
  --t-h3:       24px;
  --t-h4:       20px;
  --t-lede:     21px;
  --t-body-lg:  18px;
  --t-body:     16px;
  --t-small:    14px;
  --t-label:    12px;

  /* Radii */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(.2,.7,.2,1);
  --ease-in-out: cubic-bezier(.6,.1,.2,1);
}

.nt-mobile {
  --t-display: 52px;
  --t-h1:      40px;
  --t-h2:      30px;
  --t-h3:      22px;
  --t-lede:    19px;
  --t-body-lg: 17px;
  --t-body:    16px;
}

/* Base */
.nt, .nt * { box-sizing: border-box; }
.nt {
  direction: rtl;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--canvas);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
.nt h1,.nt h2,.nt h3,.nt h4 {
  font-family: var(--font-heading);
  font-weight: 600;             /* sans needs more weight than the v1 serif at 500 */
  letter-spacing: -0.01em;
  line-height: 1.1;
  /* color: inherit — let parent sections (e.g. .mag-masthead, .hero, .product-banner)
     drive heading color, since dark-bg sections need cream/white headings while
     light-bg sections need --ink. Body inherits --ink via the .nt rule above. */
  color: inherit;
  margin: 0;
}
/* Reset paragraph margin BUT lower the specificity to 0,0,1 via :where(),
   so per-section rules like .product-banner__lead { margin-bottom: 36px }
   (0,1,0) actually win the cascade. Without :where(), the .nt p rule
   (0,1,1) was eating every design spec'd <p> margin. */
:where(.nt) p { margin: 0; }
.nt .mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.nt .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Block placeholders — v1 botanical color-blocks. v2 uses real photography,
   so these stay only as fallback for screens not yet migrated. */
.nt-block {
  position: relative;
  overflow: hidden;
  background: var(--green-pale);
  color: var(--ink-soft);
  isolation: isolate;
}
.nt-block::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(0,0,0,0) 0 14px,
    rgba(0,0,0,.035) 14px 15px
  );
  pointer-events: none;
}
.nt-block .nt-block-cap {
  position: absolute; inset: auto auto 10px 10px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .08em;
  color: var(--ink-muted);
  direction: ltr;
}
.nt-block--green  { background: var(--green-pale);   color: var(--green); }
.nt-block--leaf   { background: #C9D9CF;             color: var(--green); }
.nt-block--water  { background: var(--lavender);     color: var(--purple-bright); }
.nt-block--harvest{ background: var(--yellow-pale);  color: var(--gold-deep); }
.nt-block--earth  { background: #E8DCC0;             color: #6b4a2f; }
.nt-block--shade  { background: #D5C9E8;             color: var(--purple); }
.nt-block--root   { background: #C5C0CC;             color: var(--purple-deep); }

/* Buttons — pill-radius, v2 gold for primary, green for product CTA. */
.nt-btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.005em;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform .2s var(--ease-out), background .2s, border-color .2s, color .2s;
  text-decoration: none;
  white-space: nowrap;
}
.nt-btn:hover { transform: translateY(-1px); }

/* Primary — gold fill on cream/canvas. (v1 'yellow' kept as alias.) */
.nt-btn--primary   { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.nt-btn--primary:hover { background: var(--gold-deep); border-color: var(--gold-deep); }

/* Product — green fill, used for Add-to-cart and product-flow CTAs. */
.nt-btn--product   { background: var(--green); color: #fff; border-color: var(--green); }
.nt-btn--product:hover { background: var(--green-deep); border-color: var(--green-deep); }

/* Secondary — outline, color-aware. Default outlines green for product context. */
.nt-btn--secondary { background: transparent; color: var(--green); border-color: var(--green); }
.nt-btn--secondary:hover { background: var(--green); color: #fff; }

/* Outline — neutral / surface-aware purple outline for editorial CTAs. */
.nt-btn--outline   { background: transparent; color: var(--purple-bright); border-color: var(--purple-bright); }
.nt-btn--outline:hover { background: var(--purple-bright); color: #fff; }

/* Tertiary — text-only, used inline. */
.nt-btn--tertiary  { background: transparent; color: var(--ink); border-color: transparent; padding: 10px 4px; }
.nt-btn--tertiary:hover { color: var(--purple-bright); }

/* Dark — solid ink-on-cream for chrome/dock CTAs. */
.nt-btn--dark      { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.nt-btn--dark:hover { background: var(--purple); border-color: var(--purple); }

.nt-btn--sm { padding: 10px 16px; font-size: 13px; }

/* Tag / chip */
.nt-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--r-pill);
  background: rgba(26,22,40,0.04); color: var(--ink-muted);
  border: 1px solid var(--line-soft);
}
.nt-tag--instock { color: var(--in-stock); background: var(--green-pale); border-color: transparent; }
.nt-tag--low     { color: var(--gold-deep); background: var(--yellow-pale); border-color: transparent; }
.nt-tag--out     { color: var(--out-stock); background: #ECE8F0; border-color: transparent; }
.nt-tag--new     { color: var(--purple-bright); background: var(--lavender); border-color: transparent; }
.nt-tag--restock { color: var(--purple-bright); background: var(--lavender); border-color: transparent; }
.nt-tag--mag     { color: var(--purple-bright); background: transparent; border-color: var(--purple-bright); }

.nt-tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .7;
}
.nt-tag--mag::before { display: none; }

/* Input */
.nt-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: var(--r-md);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.nt-input:focus { border-color: var(--purple-bright); box-shadow: 0 0 0 3px var(--lavender); }
.nt-input::placeholder { color: var(--ink-faint); }

/* Editorial hairline separator w/ index number — v1 signature.
   v2 doesn't use this pattern; left for back-compat until last consumer migrates. */
.nt-index {
  display: flex; align-items: baseline; gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.nt-index .nt-index-num {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .1em;
  color: var(--ink-muted);
  min-width: 28px;
}
.nt-index .nt-index-label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Logo lockup — v2 uses real PNG (assets/img/logo-black.png + logo-white.png).
   .nt-logo type-only fallback kept for back-compat surfaces that haven't migrated. */
.nt-logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nt-logo .nt-logo-leaf {
  width: 14px; height: 14px; border-radius: 50% 0 50% 50%;
  background: var(--green);
  transform: rotate(45deg);
}

/* Subtle noise — kept as utility */
.nt-noise { position: relative; }
.nt-noise::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(rgba(0,0,0,.04) 1px, transparent 1px) 0 0 / 3px 3px;
  opacity: .5; pointer-events: none; mix-blend-mode: multiply;
}

/* Utility */
.nt-row { display: flex; gap: 16px; }
.nt-col { display: flex; flex-direction: column; gap: 16px; }
.nt-muted { color: var(--ink-muted); }
.nt-pull {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.25;
  color: var(--purple);
}
