/* ==========================================================================
   base.css — Cociniña foundations
   --------------------------------------------------------------------------
   WHAT THIS FILE CONTROLS
     1. @font-face — self-hosted Cormorant Garamond + Manrope
     2. Shared button styles (.cn-btn-primary / .cn-btn-secondary)
     3. Shared link styles
     4. Shared focus styles
     5. Small shared utilities (eyebrow labels, hairlines, screen-reader text)

   Everything below section 1 is scoped to .cn-redesign, a class this theme
   adds to <body> only on pages that have been redesigned. Nothing here can
   affect a page that has not been through a redesign phase.

   Page-specific styling lives in woocommerce.css / sections.css.
   All values come from tokens.css — do not hardcode colours or sizes here.
   ========================================================================== */


/* ==========================================================================
   1. FONTS — self-hosted, no external requests
   --------------------------------------------------------------------------
   Two subsets per family:
     latin      — normal characters
     latin-ext  — contains the peso sign ₱ (U+20B1). Without this subset
                  every price would fall back to a system font mid-string.
   @font-face must sit outside the .cn-redesign scope to be valid.
   ========================================================================== */

/* --- Manrope (variable, 400–700) — body, UI, form fields, buttons -------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/manrope-latin.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;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/manrope-latin-ext.woff2") format("woff2");
  /* U+20AD-20C0 includes ₱ */
  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-20C0, U+2113,
                 U+2C60-2C7F, U+A720-A7FF;
}

/* --- Cormorant Garamond 600 — headings and the order total only --------- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cormorant-600-latin.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;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cormorant-600-latin-ext.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-20C0, U+2113,
                 U+2C60-2C7F, U+A720-A7FF;
}


/* ==========================================================================
   2. BUTTONS
   --------------------------------------------------------------------------
   Two styles only:
     .cn-btn-primary   — solid bright green fill, deep green label (5.28:1)
     .cn-btn-secondary — outlined, transparent fill
   Both get a shimmer sweep on hover. White text on bright green is banned
   (2.70:1), so the primary label is always --cn-header-footer-bg.
   ========================================================================== */

.cn-redesign .cn-btn-primary,
.cn-redesign .cn-btn-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--cn-space-2xs);
  box-sizing: border-box;
  margin: 0;
  padding: var(--cn-space-sm) var(--cn-space-lg);
  border-radius: var(--cn-radius-pill);
  font-family: var(--cn-font-body);
  font-size: var(--cn-text-base);
  font-weight: var(--cn-weight-bold);
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;   /* clips the shimmer sweep */
  isolation: isolate; /* keeps the shimmer behind the label */
  transition:
    background-color var(--cn-dur) var(--cn-ease),
    border-color     var(--cn-dur) var(--cn-ease),
    color            var(--cn-dur) var(--cn-ease),
    transform        var(--cn-dur-fast) var(--cn-ease),
    box-shadow       var(--cn-dur) var(--cn-ease);
}

/* --- Shimmer sweep ------------------------------------------------------ */
.cn-redesign .cn-btn-primary::after,
.cn-redesign .cn-btn-secondary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    115deg,
    transparent 0%,
    var(--cn-shimmer) 46%,
    var(--cn-shimmer) 54%,
    transparent 100%
  );
  transform: translateX(-130%);
  transition: transform var(--cn-dur-slow) var(--cn-ease);
  pointer-events: none;
}
.cn-redesign .cn-btn-primary:hover::after,
.cn-redesign .cn-btn-secondary:hover::after,
.cn-redesign .cn-btn-primary:focus-visible::after,
.cn-redesign .cn-btn-secondary:focus-visible::after {
  transform: translateX(130%);
}

/* --- Primary ------------------------------------------------------------ */
.cn-redesign .cn-btn-primary {
  background: var(--cn-gradient-accent);
  border: 1px solid var(--cn-accent-dark);
  color: var(--cn-header-footer-bg);
  box-shadow: var(--cn-shadow-button);
}
.cn-redesign .cn-btn-primary:hover,
.cn-redesign .cn-btn-primary:focus-visible {
  background: var(--cn-accent);
  color: var(--cn-header-footer-bg);
  transform: translateY(-1px);
}
.cn-redesign .cn-btn-primary:active {
  transform: translateY(0);
}

/* --- Secondary ---------------------------------------------------------- */
.cn-redesign .cn-btn-secondary {
  background: transparent;
  border: 1px solid var(--cn-hairline-strong);
  color: var(--cn-text);
  font-weight: var(--cn-weight-semibold);
}
.cn-redesign .cn-btn-secondary:hover,
.cn-redesign .cn-btn-secondary:focus-visible {
  border-color: var(--cn-accent);
  color: var(--cn-text);
}

/* --- Disabled ----------------------------------------------------------- */
.cn-redesign .cn-btn-primary[disabled],
.cn-redesign .cn-btn-primary[aria-disabled="true"],
.cn-redesign .cn-btn-secondary[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.cn-redesign .cn-btn-primary[disabled]::after,
.cn-redesign .cn-btn-secondary[disabled]::after {
  display: none;
}


/* ==========================================================================
   3. LINKS
   ========================================================================== */

.cn-redesign .cn-link {
  color: var(--cn-text);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--cn-hairline-strong);
  transition: text-decoration-color var(--cn-dur) var(--cn-ease),
              color var(--cn-dur) var(--cn-ease);
}
.cn-redesign .cn-link:hover,
.cn-redesign .cn-link:focus-visible {
  text-decoration-color: var(--cn-accent);
}


/* ==========================================================================
   4. FOCUS — one visible treatment everywhere, keyboard users only
   ========================================================================== */

.cn-redesign :focus-visible {
  outline: var(--cn-focus-ring);
  outline-offset: var(--cn-focus-ring-offset);
  border-radius: var(--cn-radius-sm);
}
/* Mouse clicks should not draw the ring, but never remove it for keyboards. */
.cn-redesign :focus:not(:focus-visible) {
  outline: none;
}


/* ==========================================================================
   5. SHARED UTILITIES
   ========================================================================== */

/* Small spaced-out uppercase label above a heading */
.cn-redesign .cn-eyebrow {
  display: block;
  margin: 0 0 var(--cn-space-2xs);
  font-family: var(--cn-font-body);
  font-size: var(--cn-text-2xs);
  font-weight: var(--cn-weight-semibold);
  letter-spacing: var(--cn-tracking-wider);
  text-transform: uppercase;
  color: var(--cn-text-muted);
}

/* Editorial hairline rule */
.cn-redesign .cn-rule {
  height: 1px;
  margin: var(--cn-space-md) 0;
  border: 0;
  background: var(--cn-hairline);
}

/* Prices and any figure that must not jitter as it updates */
.cn-redesign .cn-numeric {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Visible to screen readers only */
.cn-redesign .cn-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ==========================================================================
   6. REDUCED MOTION — honoured globally
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .cn-redesign *,
  .cn-redesign *::before,
  .cn-redesign *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  /* The shimmer is decorative — switch it off entirely rather than
     making it snap across instantly. */
  .cn-redesign .cn-btn-primary::after,
  .cn-redesign .cn-btn-secondary::after {
    display: none;
  }
}
