/* ============================================================================
   CenterWay landing network — single semantic token source (one DS for all 5).

   Per the ReOS canon (`Дизайн-токени.md`), the design system IS the token
   contract, not any one component stylesheet. This file is that contract for
   the platform-author network (way21 / reset-day / dosha / consult / herbs):

     platform --cw-sem-* (data/design-tokens/cw.tokens.json)   ← base of record
        │  values mirrored here as the network's --cw-net-* semantic layer
        ▼
     --cw-net-*  (defaults below = the brand "core" = way21 palette)
        │  per-landing skin blocks override only the values that differ
        ▼
     local dialects map onto --cw-net-*:
        · way21 / reset-day page.css : --ink/--indigo/--cta/… → var(--cw-net-*)
        · funnel-network.css (dosha/consult/herbs) : --cw-accent/--cw-gold/… → var(--cw-net-*)

   Change a value here → all five landings move together, and the whole network
   stays traceable to platform canon. Loaded before funnel-network.css / page.css
   on every landing. Custom properties resolve at use-time, so file order only
   needs to keep this before the consumers for clarity.

   Trace map (network → platform semantic → primitive):
     --cw-net-route        ≈ --cw-sem-guide-primary  (#456b58, AA-deepened #3f6350)
     --cw-net-route-strong ≈ --cw-sem-guide-strong   (#203126)
     --cw-net-gold         =  --cw-sem-warmth         (#e5ae65)
     --cw-net-canvas       ≈ --cw-sem-calm-bg         (#faefe0)
     --cw-net-ink          ≈ --cw-sem-method-ink      (#203126, network core #203126)
   ============================================================================ */

[data-cw-landing] {
  /* --- palette primitives: default = way21 brand core --- */
  --cw-net-canvas: var(--cw-sem-calm-bg, #faefe0);
  --cw-net-surface: var(--cw-mat-surface, #ffffff);
  --cw-net-surface-cool: #f5f1e7;
  --cw-net-ink: var(--cw-sem-guide-strong, #203126);
  --cw-net-ink-soft: #283e31;
  --cw-net-text: var(--cw-sem-method-ink, #1f2e24);
  --cw-net-text-muted: #48544c;
  --cw-net-text-soft: #646d64;

  --cw-net-route: #3f6350;         /* primary green a landing leads with */
  --cw-net-route-bright: var(--cw-sem-guide-primary, #456b58);  /* = --cw-sem-guide-primary */
  --cw-net-route-strong: #203126;
  --cw-net-route-soft: #f0ece2;    /* soft accent tint (backgrounds) */
  /* Label colour on a filled route-green control (the Telegram action). Was a
     bare #fff inline in landing.css; the platform's own on-accent contrast is
     cream, not pure white. */
  --cw-net-on-route: var(--cw-platform-accent-contrast, #faefe0);
  --cw-net-chip: #e8e6dc;
  --cw-net-chip-soft: #f3efe5;

  --cw-net-gold: var(--cw-sem-warmth, #e5ae65);          /* = --cw-sem-warmth */
  --cw-net-gold-strong: var(--cw-sem-warmth-strong, #c8913f);
  --cw-net-on-gold: #203126;       /* ink on gold (AA) */

  --cw-net-line: #d8d6c6;
  --cw-net-line-strong: #c2c5b5;

  /* --- material: references, not copies. The values live in
     data/design-tokens/cw.tokens.json and arrive via cw-tokens.generated.css,
     which every landing loads first. Editing the platform palette moves the
     network with it; the literal fallbacks only cover a missing file. --- */
  --cw-net-mat-surface: var(--cw-mat-surface, #fbf9f2);
  --cw-net-mat-tint: var(--cw-mat-tint, rgba(251, 249, 242, .76));
  --cw-net-mat-tint-hover: var(--cw-mat-tint-hover, rgba(251, 249, 242, .84));
  --cw-net-mat-tint-chrome: var(--cw-mat-tint-chrome, rgba(251, 249, 242, .30));
  /* Canvas floor — the density ink text needs over the page itself. The nav bar
     and its drawer both sit here so they read as one glass, not two. */
  --cw-net-mat-tint-floor: var(--cw-mat-tint, rgba(251, 249, 242, .76));
  /* Denser floor for glass sitting over photo media rather than the page canvas
     — same warm tint family, just less see-through, so dark ink text stays
     legible over any photo content (verified against black and white). */
  --cw-net-mat-tint-media: var(--cw-mat-tint-media, rgba(251, 249, 242, .82));
  --cw-net-mat-blur: var(--cw-mat-blur, 20px);
  --cw-net-mat-filter: var(--cw-mat-filter, blur(20px) saturate(1.08));
  --cw-net-mat-stroke: var(--cw-mat-stroke, rgba(255, 255, 255, .55));
  --cw-net-mat-shadow: var(--cw-mat-shadow-soft, 0 1px 2px rgba(35, 29, 20, .05), 0 10px 28px rgba(35, 29, 20, .07));
  --cw-net-mat-shadow-raised: var(--cw-mat-shadow-raised, 0 2px 6px rgba(35, 29, 20, .07), 0 24px 56px rgba(35, 29, 20, .12));
  /* Chrome shadow: the floating bar hangs over the page rather than resting on
     it, so it needs more lift than a card and less weight than a modal. Same
     token the platform topbar uses. */
  --cw-net-mat-shadow-chrome: var(--cw-mat-shadow-chrome, 0 1px 2px rgba(35, 29, 20, .06), 0 14px 34px rgba(35, 29, 20, .10));
  --cw-net-mat-grain: var(--cw-mat-grain-image, none);

  /* --- shared scale (shape / type / rhythm) — consumed by the shared
     component DS (shared/css/landing.css). One scale for the whole network;
     landings no longer carry per-page radius/spacing/shadow. --- */
  /* One brand mark for every lockup — nav bar, drawer header, footer. The
     wordmark's own size differs by context, the mark does not. */
  --cw-net-brand-mark: 2.25rem;

  --maxw: 1160px;
  --r-sm: .7rem; --r-md: 1rem; --r-lg: 1.4rem; --r-pill: 999px;
  /* Single button shape across platform and network: soft rect, never pill.
     No longer a mirrored literal — cw-tokens.generated.css now carries the
     button contract's geometry, so this resolves to the platform's own corner
     and moves with it. The 1rem fallback is for a stale cached generated file
     only; it is the same 16px. */
  --r-btn: var(--ds-button-radius, 1rem);

  /* The rest of the button contract, referenced the same way. docs/design-system.md
     → "Buttons". The network paints its own colours but does not get its own
     height, padding, weight or lift: those are the axes that drifted last time.
     Landing .btn had no min-height at all and was padding-driven. */
  --btn-h: var(--ds-button-min-height, 3rem);
  --btn-px: var(--ds-button-padding-inline, 1.15rem);
  --btn-gap: var(--ds-button-gap, .5rem);
  --btn-fs: var(--ds-button-font-size, 1rem);
  --btn-weight: var(--ds-button-font-weight, 700);
  --btn-lift: var(--ds-button-lift, -1px);
  --sp-sec: clamp(64px, 9vw, 132px);
  /* Depth is the platform's, not the network's own: these two feed every
     card, panel and hover state in landing.css. */
  --shadow-soft: var(--cw-net-mat-shadow);
  --shadow-med: var(--cw-net-mat-shadow-raised);
  /* Was a hardcoded rgba of a gold that is a token two lines below, at a
     different spread from the platform's. Same recipe as the contract's
     primary now, mixed off whichever gold the active skin resolves. */
  --shadow-cta: 0 16px 30px color-mix(in srgb, var(--cw-net-gold) 20%, transparent);
  --shadow-cta-hover: 0 20px 32px color-mix(in srgb, var(--cw-net-gold) 24%, transparent);
  --chip-py: .55em; --chip-px: .95em; --chip-fs: .78rem; --chip-nudge: .09em;

  /* --- local dialect map: the premium component DS (landing.css) reads
     --ink/--indigo/--cta/… ; bind them to the --cw-net-* contract once here so
     every landing resolves them from its skin. way21/reset-day page.css also
     declare these (redundantly) alongside their --irem-*/--landing-* extras. --- */
  --ink: var(--cw-net-ink);
  --ink-soft: var(--cw-net-ink-soft);
  --indigo: var(--cw-net-route);
  --indigo-bright: var(--cw-net-route-bright);
  --indigo-tint: var(--cw-net-route-soft);
  --chip: var(--cw-net-chip);
  --chip-soft: var(--cw-net-chip-soft);
  --cta: var(--cw-net-gold);
  --cta-strong: var(--cw-net-gold-strong);
  --on-cta: var(--cw-net-on-gold);
  --cream: var(--cw-net-canvas);
  --surface: var(--cw-net-surface);
  --surface-cool: var(--cw-net-surface-cool);
  --line: var(--cw-net-line);
  --line-strong: var(--cw-net-line-strong);
  --text: var(--cw-net-text);
  --text-muted: var(--cw-net-text-muted);
  --text-soft: var(--cw-net-text-soft);
  --gold: var(--cw-net-gold);

  /* dark-section palette (used by .offer and other dark blocks in landing.css).
     Default = mineral-dark; way21/reset-day page.css override per skin. */
  --irem-dark-1: #182a20; --irem-dark-2: #2c4635;
  /* The dark offer block is the material's night side, same gradient the
     platform's inverse panels use. */
  --irem-grad-dark: var(--cw-mat-inverse-bg, linear-gradient(165deg, var(--irem-dark-1), var(--irem-dark-2)));
  --irem-gold-bright: #e5ae65; --irem-gold-soft: #edc693; --irem-gold-tint: #f3e4d0;
  --irem-on-dark-soft: #d7e0d2; --irem-on-dark-muted: #bcc7b4; --irem-on-dark-faint: #8b9884; --irem-on-dark-label: #aec0a9;
  --irem-indigo-soft: #7d9a7a;

  /* --- photo hero (mobile, data-cw-hero="photo") ---
     The copy band over a photograph runs the night side of the palette: the
     same dark ground the offer block uses, and the same on-dark ink. A skin
     that wants a warmer or cooler hero overrides these four, not the recipe. */
  /* The scrim is deliberately NOT --irem-dark-1: a skin whose dark side is
     lighter (reset-day's #23463a) would drop the hero labels under AA. It is
     one fixed depth for the whole network, and it is the value the contrast
     gate asserts — a skin that overrides it owes the gate a new pair. */
  --cw-net-hero-scrim: #182a20;
  /* What darkens the photograph itself, as opposed to the band the copy sits
     on. Those are two jobs and they were sharing one green-black value: at the
     strengths this scrim runs, a green-black repaints a warm photo instead of
     darkening it. The band above keeps the brand dark (it is a surface, and the
     gate asserts it); the image gets the platform's neutral scrim ink. */
  --cw-net-photo-scrim: var(--cw-mat-scrim-ink, #171817);
  --cw-net-hero-ink: #ffffff;
  --cw-net-hero-ink-soft: var(--irem-on-dark-soft);
  --cw-net-hero-ink-label: var(--irem-on-dark-label);
  --cw-net-hero-accent: var(--irem-gold-bright);
  /* The night side of the glass, for chips and badges sitting on the hero's
     copy band. The same material as the bar, on the other tone: the bar's dark
     tone tints DOWN because its backdrop (a dark section, #356152) is lighter
     than the depth it wants, while here the backdrop is the 92% scrim, already
     darker than any tint would take it — so the night side lifts instead.
     Sourced from the platform's own inverse-glass pair so the two surfaces
     stay one material rather than two look-alikes. */
  --cw-net-hero-glass: var(--cw-mat-inverse-glass, color-mix(in srgb, #ffffff 8%, transparent));
  --cw-net-hero-glass-stroke: var(--cw-mat-inverse-stroke, color-mix(in srgb, #ffffff 18%, transparent));
}

/* ============ Platform type (whole network) ============
   All five landings run the platform's own faces instead of Formular:
   editorial Cormorant Garamond for display, Manrope for UI, IBM Plex Mono for
   data. Formular now belongs to Short/IREM only — a different author.

   The metrics move with the family. Formular is a sans that wants tight
   negative tracking; a serif at display size does not, so --f-display-track
   and --f-display-leading come along with the switch rather than leaving the
   old sans values on a face that reads cramped under them. */
[data-cw-landing] {
  --cw-net-font: "Manrope", "Segoe UI", Arial, sans-serif;
  --f-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --f-ui: "Manrope", "Segoe UI", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  --f-display-track: -0.005em;
  --f-display-leading: 1.06;
  --f-display-weight: 600;
  --f-display-nums: lining-nums;
}

/* ============ Per-landing skins (override palette only) ============ */

/* way21 — deep brand core (= defaults; declared explicitly for clarity) */
[data-cw-landing="way21"] {
  --cw-net-route: #3f6350;
  --cw-net-route-bright: #456b58;
  --cw-net-route-strong: #203126;
  --cw-net-route-soft: #f0ece2;
  --cw-net-chip: #e8e6dc;
  --cw-net-chip-soft: #f3efe5;
  --cw-net-ink: #203126;
  --cw-net-ink-soft: #283e31;
  --cw-net-text: #1f2e24;
  --cw-net-text-muted: #48544c;
  --cw-net-text-soft: #646d64;
  --cw-net-canvas: #faefe0;
  --cw-net-surface-cool: #f5f1e7;
  --cw-net-line: #d8d6c6;
  --cw-net-line-strong: #c2c5b5;
  --cw-net-on-gold: #203126;
}

/* reset-day — lighter, warmer variant of the core */
[data-cw-landing="reset-day"] {
  --cw-net-route: #55806a;
  --cw-net-route-bright: #6b957c;
  --cw-net-route-strong: #2c4636;
  --cw-net-route-soft: #f1f0e8;
  --cw-net-chip: #ebebe3;
  --cw-net-chip-soft: #f5f3eb;
  --cw-net-ink: #2c4636;
  --cw-net-ink-soft: #375544;
  --cw-net-text: #26372c;
  --cw-net-text-muted: #48544c;
  --cw-net-text-soft: #656e66;
  --cw-net-canvas: #fdf6ec;
  --cw-net-surface-cool: #f7f2e8;
  --cw-net-line: #dfe1d5;
  --cw-net-line-strong: #cbd3c5;
  --cw-net-on-gold: #2c4636;
}

/* dosha — deep diagnostic core (mirrors way21 route) */
[data-cw-landing="dosha"] {
  --cw-net-route: #3f6350;
  --cw-net-route-bright: #456b58;
  --cw-net-route-strong: #203126;
  --cw-net-route-soft: #f0ece2;
  --cw-net-chip: #e8e6dc;
  --cw-net-chip-soft: #f3efe5;
  --cw-net-ink: #203126;
  --cw-net-ink-soft: #283e31;
  --cw-net-text: #243429;
  --cw-net-text-muted: #48544c;
  --cw-net-text-soft: #646d64;
  --cw-net-canvas: #faefe0;
  --cw-net-surface-cool: #f5f1e7;
  --cw-net-line: #d8d6c6;
  --cw-net-line-strong: #c2c5b5;
  --cw-net-on-gold: #203126;
}

/* consult — brighter trust */
[data-cw-landing="consult"] {
  --cw-net-route: #456b58;
  --cw-net-route-bright: #4f7a63;
  --cw-net-route-strong: #24382b;
  --cw-net-route-soft: #f0ede3;
  --cw-net-chip: #e9e7dd;
  --cw-net-chip-soft: #f4f0e6;
  --cw-net-ink: #24382b;
  --cw-net-ink-soft: #2d4537;
  --cw-net-text: #243429;
  --cw-net-text-muted: #48544c;
  --cw-net-text-soft: #646d64;
  --cw-net-canvas: #faefe0;
  --cw-net-surface-cool: #f6f1e7;
  --cw-net-line: #d9d7c8;
  --cw-net-line-strong: #c4c7b7;
  --cw-net-on-gold: #24382b;
}

/* herbs — leafier nature (still inside the family) */
[data-cw-landing="herbs"] {
  --cw-net-route: #56804f;
  --cw-net-route-bright: #628c5a;
  --cw-net-route-strong: #2b4526;
  --cw-net-route-soft: #f1eee2;
  --cw-net-chip: #ebeadc;
  --cw-net-chip-soft: #f5f1e5;
  --cw-net-ink: #2b4526;
  --cw-net-ink-soft: #365431;
  --cw-net-text: #283b2b;
  --cw-net-text-muted: #48544c;
  --cw-net-text-soft: #646d64;
  --cw-net-canvas: #faefe0;
  --cw-net-surface-cool: #f7f2e7;
  --cw-net-line: #dcdbc6;
  --cw-net-line-strong: #c9ceb4;
  --cw-net-on-gold: #2b4526;
}
