/* ==========================================================================
   Koh Tomyums v3 — the bridge.

   Loaded ONLY on the 2.x commerce pages (cart, checkout, the account area,
   the order pages — see kty_v3_is_legacy_page()), after their own sheets.

   Those pages keep their 2.x markup and stylesheets: they carry the block
   checkout, WooPayments and the order-status tracker, and a restyle must not
   put any of that at risk. So this file does not restyle components one by
   one. It re-points the 2.x design TOKENS at v3's palette and faces — the
   2.x sheets reference them several hundred times — and then corrects the
   handful of places where 2.x's Cinzel-era typography (tracked capitals, a
   script face) would read wrong in Instrument Serif.

   --kt-ground stays a plain colour on :root: the WooPayments appearance
   bridge (functions.php) reads it from <html> to paint Stripe's card fields.
   ========================================================================== */

:root {
	/* Grounds and surfaces */
	--kt-ground: #0b0907;
	--kt-ground-2: #12100c;
	--kt-ground-3: #1a1612;
	--kt-panel: rgb(243 234 219 / 0.035);
	--kt-panel-top: rgb(243 234 219 / 0.04);
	--kt-panel-bottom: rgb(243 234 219 / 0.03);
	--kt-panel-blur: none;
	--kt-field: rgb(243 234 219 / 0.04);

	/* Gold: the accent only — frames and rules turn neutral, as in v3 */
	--kt-gold: #ddae62;
	--kt-gold-hi: #f1c983;
	--kt-gold-dim: #c89c57;
	--kt-gold-line: rgb(243 234 219 / 0.42);
	--kt-gold-line-2: rgb(243 234 219 / 0.3);
	--kt-gold-line-mid: rgb(243 234 219 / 0.22);
	--kt-gold-line-soft: rgb(243 234 219 / 0.42);
	--kt-gold-line-faint: rgb(243 234 219 / 0.12);
	--kt-gold-rule: rgb(243 234 219 / 0.16);
	--kt-frame: rgb(243 234 219 / 0.16);
	--kt-frame-soft: rgb(243 234 219 / 0.1);
	--kt-hairline: rgb(243 234 219 / 0.1);
	--kt-hairline-faint: rgb(243 234 219 / 0.08);
	--kt-divider: rgb(243 234 219 / 0.12);
	--kt-border-control: rgb(243 234 219 / 0.42);

	/* Text */
	--kt-text: #e6dccb;
	--kt-text-bright: #f3eadb;
	--kt-text-hero: #f3eadb;
	--kt-text-body: #cdc2b0;
	--kt-text-dim: #bcb19f;
	--kt-text-muted: #afa594;
	--kt-text-faint: #9d9383;
	--kt-text-meta: #9d9383;
	--kt-text-off: #5f584f;

	/* Signals */
	--kt-chili: #f26a3d;
	--kt-chili-off: rgb(243 234 219 / 0.2);
	--kt-herb: #9cc27a;
	--kt-ok: #9cc27a;
	--kt-warn: #f0a64a;
	--kt-err: #ff7a6b;
	--kt-on-gold: #1b1307;

	/* Type */
	--kt-font-display: var(--k-font-display);
	--kt-font-body: var(--k-font-sans);
	--kt-font-script: var(--k-font-display);

	/* Shape and layout */
	--kt-radius: 16px;
	--kt-radius-sm: 10px;
	--kt-radius-lg: 28px;
	--kt-radius-pill: 999px;
	--kt-header-h: var(--k-header-h);
}

/* The 2.x script face (Great Vibes) had one job: a cursive whisper. v3's
   whisper is the serif's italic. */
.k-legacy [class*="__script"] {
	font-style: italic;
	font-weight: 400;
	letter-spacing: 0;
}

/* Cinzel's display capitals were tracked wide and forced upper case. In
   Instrument Serif that reads as shouting, so v3 sets display headings in
   their natural case. Labels in the body face keep their small caps. */
.k-legacy h1,
.k-legacy h2,
.k-legacy h3,
.k-legacy .kt-heading,
.k-legacy [class*="__title"] {
	text-transform: none;
	letter-spacing: -0.01em;
	font-weight: 400;
}

.k-legacy h1 {
	font-family: var(--k-font-display);
	font-size: var(--k-fs-xl);
	line-height: 0.98;
	color: var(--k-cream);
}

/* Buttons: pills, the body face, sentence case. */
.k-legacy .kt-btn,
.k-legacy .button,
.k-legacy .wc-block-components-button:not(.is-link) {
	border-radius: var(--k-r-pill) !important;
	font-family: var(--k-font-sans) !important;
	letter-spacing: 0.01em !important;
	text-transform: none !important;
}

/* The 2.x photograph wash lived on .kt-site, which v3 does not print; the
   ground is v3's own. The grain stays on top as everywhere else. */
.k-legacy .k-main {
	background: transparent;
}

/* The 2.x commerce pages sit under v3's floating header. */
.k-legacy .k-main > :first-child {
	margin-top: 0;
}

/* --- The block checkout ---------------------------------------------------------

   checkout-blocks.css tracked and capitalised three kinds of text for Cinzel:
   the summary heading, the Total label, and the checkbox labels. In the v3
   faces those read as shouting, so they return to their natural case. */

.k-legacy .wc-block-components-checkout-order-summary__title-text,
.k-legacy .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.k-legacy .wc-block-components-checkbox__label {
	text-transform: none !important;
	letter-spacing: normal !important;
}

.k-legacy .wc-block-components-checkout-order-summary__title-text {
	font-size: 1.625rem !important;
}

.k-legacy .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	font-size: 1.25rem !important;
}

.k-legacy .wc-block-components-checkbox__label {
	font-size: 0.9375rem !important;
}

/* Step titles are editor content; one was saved as "address", which Cinzel
   (capitals only) displayed as ADDRESS. Instrument Serif shows the lower case,
   so the first letter is lifted. */
.k-legacy .wc-block-components-checkout-step__title::first-letter {
	text-transform: uppercase;
}

.k-legacy .wc-block-components-checkout-step__title {
	font-size: 1.625rem !important;
}
