/* ==========================================================================
   CHHAAP STUDIO - TYPOGRAPHY (step 2)
   --------------------------------------------------------------------------
   Self-hosted webfonts + the type scale wired to the --chp-* tokens declared
   in ../style.css. Loaded after style.css via functions.php.

   Provenance: the woff2 files in ../fonts/ were mirrored from the Google Fonts
   CSS API by fetch_fonts.py (project root). To refresh them:
       python fetch_fonts.py --force
   and re-paste the @font-face block it prints.

   Licence: Marcellus and Palanquin are both SIL Open Font License 1.1, which
   permits self-hosting and redistribution.

   Subsets: latin, latin-ext and (Palanquin only) devanagari. The five
   devanagari files are 114-136 KB each, but `unicode-range` means a browser
   only downloads them when Devanagari characters actually appear, so they cost
   nothing on a Latin-only page.

   Cascade note: Blocksy generates its own typography CSS from the Customizer.
   If those options are still on defaults they can win over some rules below.
   Either clear them in Customizer -> Typography, or set them to match:
       Body  : Palanquin 400
       H1-H6 : Marcellus 400
   Verify in a browser after the first deploy and raise specificity only where
   a rule actually loses.
   ========================================================================== */

/* ==========================================================================
   1. FONT FACES
   ========================================================================== */

/* -- Marcellus (display serif, single weight) ----------------------------- */

/* Marcellus - latin-ext */
@font-face {
  font-family: "Marcellus"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/marcellus-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Marcellus - latin */
@font-face {
  font-family: "Marcellus"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/marcellus-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* -- Palanquin (body sans, 300-700) - latin ------------------------------- */

/* Palanquin - latin - 300 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("../fonts/palanquin-latin-300.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Palanquin - latin - 400 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/palanquin-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Palanquin - latin - 500 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/palanquin-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Palanquin - latin - 600 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/palanquin-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Palanquin - latin - 700 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/palanquin-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* -- Palanquin - latin-ext ------------------------------------------------ */

/* Palanquin - latin-ext - 300 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("../fonts/palanquin-latin-ext-300.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Palanquin - latin-ext - 400 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/palanquin-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Palanquin - latin-ext - 500 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/palanquin-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Palanquin - latin-ext - 600 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/palanquin-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Palanquin - latin-ext - 700 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/palanquin-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* -- Palanquin - devanagari (loaded only when Devanagari text appears) ---- */

/* Palanquin - devanagari - 300 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("../fonts/palanquin-devanagari-300.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

/* Palanquin - devanagari - 400 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/palanquin-devanagari-400.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

/* Palanquin - devanagari - 500 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/palanquin-devanagari-500.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

/* Palanquin - devanagari - 600 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/palanquin-devanagari-600.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

/* Palanquin - devanagari - 700 */
@font-face {
  font-family: "Palanquin"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/palanquin-devanagari-700.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

/* ==========================================================================
   2. TYPE SCALE - every value comes from the --chp-* tokens in ../style.css
   ========================================================================== */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--chp-font-body);
  font-size: var(--chp-fs-body);
  font-weight: var(--chp-weight-regular);
  line-height: var(--chp-lh-body);
  letter-spacing: 0;
  color: var(--chp-text);
  background-color: var(--chp-canvas);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headlines: Marcellus, indigo ink */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--chp-space-4);
  font-family: var(--chp-font-display);
  font-weight: var(--chp-weight-regular);
  line-height: var(--chp-lh-heading);
  letter-spacing: var(--chp-tracking-heading);
  color: var(--chp-ink);
  text-wrap: balance;
}

h1 { font-size: var(--chp-fs-h1); line-height: var(--chp-lh-display); }
h2 { font-size: var(--chp-fs-h2); }
h3 { font-size: var(--chp-fs-h3); }
h4 { font-size: var(--chp-fs-h4); }

/* H5/H6 are labels, not headlines: switch them to the sans voice */
h5,
h6 {
  font-family: var(--chp-font-eyebrow);
  font-size: var(--chp-fs-eyebrow);
  font-weight: var(--chp-weight-semibold);
  letter-spacing: var(--chp-tracking-eyebrow);
  text-transform: uppercase;
}

p,
ul,
ol,
dl,
figure,
table {
  margin: 0 0 var(--chp-space-4);
}

ul,
ol {
  padding-left: var(--chp-space-5);
}

li + li {
  margin-top: var(--chp-space-2);
}

a {
  color: var(--chp-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: color var(--chp-transition-fast);
}

a:hover,
a:focus {
  color: var(--chp-accent-bright);
}

strong,
b {
  font-weight: var(--chp-weight-semibold);
}

small {
  font-size: var(--chp-fs-caption);
}

blockquote {
  margin: var(--chp-space-6) 0;
  padding-left: var(--chp-space-5);
  border-left: var(--chp-border-hairline);
  font-family: var(--chp-font-display);
  font-size: var(--chp-fs-h3);
  line-height: var(--chp-lh-tight);
  color: var(--chp-ink);
}

blockquote cite {
  display: block;
  margin-top: var(--chp-space-3);
  font-family: var(--chp-font-body);
  font-size: var(--chp-fs-caption);
  font-style: normal;
  letter-spacing: var(--chp-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--chp-text-muted);
}

hr {
  margin: var(--chp-space-8) 0;
  border: 0;
  border-top: var(--chp-border-hairline);
}

code,
kbd,
pre,
samp {
  font-size: var(--chp-fs-caption);
}

::selection {
  background: var(--chp-sand);
  color: var(--chp-ink);
}

:focus-visible {
  outline: var(--chp-focus-ring);
  outline-offset: var(--chp-focus-offset);
}

/* Eyebrow / kicker utility - also the look of H5/H6 */
.chp-eyebrow {
  font-family: var(--chp-font-eyebrow);
  font-size: var(--chp-fs-eyebrow);
  font-weight: var(--chp-weight-semibold);
  letter-spacing: var(--chp-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--chp-accent);
}

/* Buttons, inputs and WooCommerce controls share one voice */
button,
input,
optgroup,
select,
textarea,
.ct-button,
.wp-block-button__link,
.button,
.added_to_cart,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  font-family: var(--chp-font-body);
  font-size: var(--chp-fs-button);
  font-weight: var(--chp-weight-semibold);
  letter-spacing: var(--chp-tracking-button);
  text-transform: uppercase;
}

/* Headings Blocksy/WooCommerce render as classes rather than tags */
.entry-title,
.page-title,
.product_title,
.woocommerce-loop-product__title,
.ct-section-heading,
.widget-title {
  font-family: var(--chp-font-display);
  font-weight: var(--chp-weight-regular);
  letter-spacing: var(--chp-tracking-heading);
  color: var(--chp-ink);
}

/* Prices read as data, not headlines */
.price,
.woocommerce-Price-amount,
.amount {
  font-family: var(--chp-font-body);
  font-size: var(--chp-fs-price);
  font-weight: var(--chp-weight-medium);
  letter-spacing: 0;
}

/* Honour reduced-motion preferences globally */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
