@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Jost:wght@400;500;600&family=Pinyon+Script&display=swap');

/**
 * Pretty Luxe Competitions — child theme token bridge. Loaded after parent Vite bundle.
 * Palette is locked to four colours (cream #F9E8B2, champagne #E8C78C, warm gold #BC935D,
 * black #000000); every tint and text shade below is a mix of those, written as hex so
 * computed styles stay plain rgb(). Mix formulas: docs/colors-concept.md.
 */
:root {
  /* Locked palette */
  --pl-cream: #F9E8B2;
  --pl-champagne: #E8C78C;
  --pl-gold: #BC935D;
  --pl-black: #000000;

  /* Mixes */
  --pl-ground: #FEF9EC;      /* cream 25% + white */
  --pl-surface: #FEFDF7;     /* cream 10% + white */
  --pl-tint: #FCF2D5;        /* cream 55% + white */
  --pl-muted: #F9F1E2;       /* champagne 25% + white */
  --pl-tint-deep: #F6E9D1;   /* champagne 40% + white */
  --pl-line: #F2E0C0;        /* champagne 55% + white */
  --pl-line-strong: #EDD2A3; /* champagne 80% + white */
  --pl-gold-dark: #A07D4F;   /* gold 85% + black */
  --pl-gold-ink: #675133;    /* gold 55% + black */
  --pl-ink: #423321;         /* gold 35% + black */
  --pl-ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  /* Brand */
  --color-primary: #BC935D;
  --color-primary-dark: var(--pl-gold-dark);
  --color-primary-gradient-end: var(--pl-champagne);
  --color-primary-gradient-end-light: var(--pl-gold-ink);
  --color-accent: #E8C78C;
  --color-accent-dark: var(--pl-gold);
  --color-on-primary: #000000;
  --color-secondary: var(--pl-tint);

  /* Canvas + surface */
  --color-background-light: var(--pl-ground);
  --color-background-dark: var(--pl-ink);
  --color-surface: var(--pl-surface);

  /* Text */
  --color-text-primary: var(--pl-black);
  --color-text-secondary: var(--pl-ink);
  --heading-accent: var(--pl-gold-ink);

  /* Warm neutral scale (champagne tints → gold shades) */
  --color-gray-50: var(--pl-muted);
  --color-gray-100: var(--pl-tint-deep);
  --color-gray-200: var(--pl-line);
  --color-gray-300: var(--pl-line-strong);
  --color-gray-400: var(--pl-gold);
  --color-gray-500: #846741;  /* gold 70% + black */
  --color-gray-600: var(--pl-gold-ink);
  --color-gray-700: #55422A;  /* gold 45% + black */
  --color-gray-800: var(--pl-ink);
  --color-gray-900: #261D13;  /* gold 20% + black */

  /* Radius: 12px buttons and inputs, 18px cards */
  --radius-lg: 12px;
  --radius-xl: 12px;
  --radius-2xl: 18px;

  /* Typography */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Jost', system-ui, sans-serif;
  --font-sans: var(--font-body);
  --font-script: 'Pinyon Script', cursive;

  /* Plugin bridge (Nera Core / Fluent / Woo) */
  --nera-primary: var(--color-primary);
  --nera-text: var(--color-text-primary);
  --nera-text-secondary: var(--color-text-secondary);
  --nera-bg: var(--color-background-light);
  --nera-surface: var(--color-surface);
  --nera-border: var(--color-gray-200);
}

/* Type */
body h1,
body h2,
body h3,
body h4,
body h5,
body h6 {
  font-weight: 600;
}

.pl-script {
  font-family: var(--font-script);
  font-weight: 400;
}

/* ---------------------------------------------------------------------------
   Interaction: colour only. Hover = warm gold, focus and press = champagne,
   no lift, zoom or nudge anywhere.
   --------------------------------------------------------------------------- */

/* Parent hover lifts on the shared hooks; two of them ship as !important utilities,
   so the reset has to be !important too. */
[class*='hover:-translate-']:hover,
[class*='hover:translate-']:hover,
[class*='hover:scale-']:hover,
[class*='active:scale-']:active,
.group:hover [class*='group-hover:scale-'],
.group:hover [class*='group-hover:translate-'],
[class*='group/']:hover [class*='group-hover/'] {
  translate: none !important;
  scale: none !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--pl-gold-ink);
  outline-offset: 3px;
}

/* Primary button: hero call to action. The parent forces text-white with !important
   through var(--color-white), so the text colour is set through that variable. */
.ncs-hero__cta > a:first-child {
  --color-white: var(--pl-ground);
  background: var(--pl-black);
  color: var(--pl-ground);
  transform: none;
  transition-property: background-color, color, box-shadow;
  transition-duration: 200ms;
  transition-timing-function: ease;
}

@media (hover: hover) and (pointer: fine) {
  .ncs-hero__cta > a:first-child:hover {
    --color-white: var(--pl-black);
    background: var(--pl-gold);
    color: var(--pl-black);
  }

  .ncs-hero__cta > a + a:hover {
    background-color: var(--pl-gold);
    border-color: var(--pl-gold);
    color: var(--pl-black);
  }

  .ncs-product-card:hover .ncs-product-card__cta {
    --color-white: var(--pl-black);
    background-color: var(--pl-gold);
    border-color: var(--pl-gold);
    color: var(--pl-black);
  }
}

.ncs-hero__cta > a:first-child:focus-visible,
.ncs-hero__cta > a:first-child:active,
.ncs-hero__cta > a + a:focus-visible,
.ncs-hero__cta > a + a:active,
.ncs-product-card__cta:focus-visible,
.ncs-product-card__cta:active {
  --color-white: var(--pl-black);
  background: var(--pl-champagne);
  border-color: var(--pl-gold);
  color: var(--pl-black);
}

/* Enter now button (single competition buy box): champagne-to-gold at rest, flat gold on
   hover, champagne on focus and press, a quiet surface until tickets are chosen. */
body.single-product .lty-participate-now-button {
  --color-white: var(--pl-black);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 16px 20px;
  border: 0;
  border-radius: 4px;
  background-color: var(--pl-gold);
  background-image: linear-gradient(90deg, var(--pl-champagne), var(--pl-gold));
  color: var(--pl-black);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 18px -12px var(--pl-gold);
  transform: none;
  transition-property: background-color, color, box-shadow;
  transition-duration: 200ms;
  transition-timing-function: ease;
}

@media (hover: hover) and (pointer: fine) {
  body.single-product .lty-participate-now-button:not(:disabled):hover {
    background-color: var(--pl-gold);
    background-image: none;
    color: var(--pl-black);
    box-shadow: 0 10px 26px -10px var(--pl-gold);
  }
}

body.single-product .lty-participate-now-button:not(:disabled):focus-visible,
body.single-product .lty-participate-now-button:not(:disabled):active {
  background-color: var(--pl-champagne);
  background-image: none;
  color: var(--pl-black);
}

body.single-product .lty-participate-now-button:disabled {
  --color-white: var(--pl-ink);
  background-color: var(--pl-surface);
  background-image: none;
  color: var(--pl-ink);
  box-shadow: inset 0 0 0 1px var(--pl-line-strong);
  opacity: 1;
  cursor: not-allowed;
}

/* Busy (adding to basket): keeps the gold fill and a readable label */
body.single-product .lty-participate-now-button.is-busy:disabled {
  --color-white: var(--pl-black);
  background-color: var(--pl-gold);
  background-image: none;
  color: var(--pl-black);
  box-shadow: none;
  cursor: wait;
}

/* WooCommerce buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  border-radius: 12px;
}

/* ---------------------------------------------------------------------------
   Motion: slow and soft
   --------------------------------------------------------------------------- */

/* Progress fill: the parent bundle sets the width; retime its transition. */
.ncs-progress__fill {
  --tw-duration: 800ms;
  --tw-ease: var(--pl-ease-out);
  transition-duration: 800ms;
  transition-timing-function: var(--pl-ease-out);
}

.pl-fade-in {
  animation: pl-fade-in 1.4s ease both;
}

@keyframes pl-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ncs-progress__fill {
    --tw-duration: 0s;
    transition-duration: 0s;
    animation: pl-fade-in 300ms ease both;
  }

  .pl-fade-in {
    animation: none;
  }
}

/* Admin bar: visible at the top of the document, slides away once scrolled. */
#wpadminbar { transition: transform .25s ease; }
#wpadminbar.nera-adminbar--hidden { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) { #wpadminbar { transition: none; } }
