/* NCNW Christmas Candles. Everything is scoped to .ncc so nothing leaks into the theme. */

html:has(body.ncnw-candles-page), .ncnw-candles-page { overflow-x: clip; }

.ncc {
  --ncc-ember: #622905;
  --ncc-charcoal: #2E2E2E;
  --ncc-tile: #3A3838;
  --ncc-tile-empty: #333131;
  --ncc-pill: #1A1A1A;
  --ncc-gold: #E6B325;
  --ncc-gold-dark: #B98A14;
  --ncc-cream: #FDF6DF;
  --ncc-soft: #F3E3D2;
  --ncc-grey: #E2DCD6;
  --ncc-ink: #1A1A1A;
  --ncc-red: #B33A3A;
  --ncc-card: #6B2F0A;
  --ncc-tile-w: 132px;
  --ncc-tile-h: 152px;

  position: relative;
  box-sizing: border-box;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: var(--ncc-ember);
  color: var(--ncc-cream);
  font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  text-align: center;
}

.ncc *, .ncc *::before, .ncc *::after { box-sizing: border-box; }
.ncc [hidden] { display: none !important; }
.ncc svg { display: block; max-width: none; }
.ncc h1, .ncc h2 { font-family: Merriweather, Georgia, "Times New Roman", serif; letter-spacing: 0; text-transform: none; }
.ncc em { font-style: italic; color: var(--ncc-gold); }

/* ---------------------------------------------------------------- buttons */

.ncc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  margin: 0;
  padding: 0 48px;
  border: 0;
  border-radius: 32px;
  background: var(--ncc-gold);
  box-shadow: 0 6px 0 var(--ncc-gold-dark);
  color: var(--ncc-ink);
  font: inherit;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ncc-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ncc-gold-dark); }
.ncc-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ncc-gold-dark); }
.ncc-btn:focus-visible { outline: 3px solid var(--ncc-cream); outline-offset: 4px; }
.ncc-btn[disabled] { opacity: .6; cursor: default; transform: none; }

.ncc-btn--ghost {
  min-height: 48px;
  margin-top: 44px;
  padding: 0 28px;
  border: 1.5px solid var(--ncc-cream);
  border-radius: 25px;
  background: transparent;
  box-shadow: none;
  color: var(--ncc-cream);
  font-size: 15px;
  font-weight: 500;
}
.ncc-btn--ghost:hover { transform: none; box-shadow: none; background: rgba(253, 246, 223, .1); }

/* ------------------------------------------------------------------- hero */

.ncc-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 280px 24px 40px;
  background: transparent;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ncc-hero__stars { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

.ncc-hero__title {
  margin: 0;
  max-width: 900px;
  color: var(--ncc-cream);
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 900;
  line-height: 1.15;
}

.ncc-hero__intro {
  margin: 26px 0 0;
  max-width: 540px;
  color: var(--ncc-soft);
  font-size: 18px;
  line-height: 1.7;
}

.ncc-hero .ncc-btn { margin-top: 44px; }

.ncc-closed { margin: 40px 0 0; max-width: 520px; color: var(--ncc-soft); font-size: 18px; }

.ncc-stats { margin-top: 64px; display: flex; flex-wrap: wrap; justify-content: center; }
.ncc-stat { padding: 4px 56px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ncc-stat + .ncc-stat { border-left: 1px solid rgba(230, 179, 37, .45); }
.ncc-stat__num { color: var(--ncc-cream); font-size: 48px; font-weight: 400; line-height: 1; }
.ncc-stat__label { color: var(--ncc-soft); font-size: 15px; }
.ncc-stat__label::after { content: ""; display: block; width: 40px; height: 2px; margin: 14px auto 0; background: var(--ncc-gold); }

/* ----------------------------------------------------------- landscape */

/* The landscape tucks up behind the bottom of the hero, so there is no hard edge
   between the night sky and the scene. Its own sky layer is hidden (the page's
   ember background shows through) and nothing is clipped at the top, so the
   bridge towers show in full. */
.ncc-scene {
  position: relative;
  line-height: 0;
  /* On wide screens the towers rise above the image box, so push it down far
     enough that the tallest tower rises beside the stats, never behind the text. */
  margin-top: max(16px, calc(41.667vw - 686px));
  background: transparent;
  overflow: visible;
  /* Open at the top so the towers show in full, but clipped at the sides and
     bottom so the ground never spills over the candle wall heading. */
  clip-path: inset(-1000px 0 0 0);
}
.ncc-scene__svg { overflow: visible; }
.ncc-scene [data-layer="0"] { display: none; }
.ncc-scene__svg { width: 100%; height: 600px; }

@keyframes nccRise { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
@keyframes nccFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nccTwinkle { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes nccGlow { 0%, 100% { opacity: 1; } 50% { opacity: .8; } }
@keyframes nccSnow { from { transform: translateY(-14px); } to { transform: translateY(14px); } }
@keyframes nccIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes nccNew { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.08); } 100% { transform: scale(1); } }

.ncc .sc-rise { animation: nccRise 1.2s cubic-bezier(.2, .7, .2, 1) both; }
.ncc .sc-fade { animation: nccFade 1.4s ease-out both; }
.ncc .sc-d1 { animation-delay: .15s; } .ncc .sc-d2 { animation-delay: .35s; } .ncc .sc-d3 { animation-delay: .55s; }
.ncc .sc-d4 { animation-delay: .8s; } .ncc .sc-d5 { animation-delay: 1s; } .ncc .sc-d6 { animation-delay: 1.3s; }
.ncc .sc-twinkle { animation: nccTwinkle 3.2s ease-in-out infinite; }
.ncc .sc-glow { animation: nccGlow 4s ease-in-out infinite; }
.ncc .sc-snow { animation: nccSnow 6s ease-in-out infinite alternate; }

.ncc-in { animation: nccIn .9s cubic-bezier(.2, .7, .2, 1) both; }
.ncc-d2 { animation-delay: .1s; } .ncc-d3 { animation-delay: .3s; } .ncc-d4 { animation-delay: .5s; } .ncc-d5 { animation-delay: .7s; }

/* ---------------------------------------------------------- candle wall */

.ncc-wall {
  padding: 40px 24px 80px;
  background: var(--ncc-charcoal);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ncc-h2 { margin: 0; color: var(--ncc-cream); font-size: 40px; font-weight: 900; line-height: 1.2; }
.ncc-h2--big { font-size: clamp(34px, 4.6vw, 44px); }
.ncc-wall__sub { margin: 12px 0 0; color: var(--ncc-grey); font-size: 16px; }

.ncc-find { margin-top: 28px; width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ncc-find__label { color: var(--ncc-grey); font-size: 14px; font-weight: 500; }
.ncc .ncc-find__input {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 20px;
  border: 1px solid rgba(230, 179, 37, .55);
  border-radius: 24px;
  background: var(--ncc-pill);
  box-shadow: none;
  color: var(--ncc-cream);
  font: inherit;
  font-size: 16px;
  text-align: center;
}
.ncc .ncc-find__input::placeholder { color: rgba(253, 246, 223, .55); }
.ncc .ncc-find__input:focus { outline: 3px solid rgba(230, 179, 37, .45); outline-offset: 0; border-color: var(--ncc-gold); }
.ncc-find__status { min-height: 18px; color: var(--ncc-gold); font-size: 13px; }

.ncc-grid { width: 100%; max-width: 1240px; margin-top: 64px; padding-top: calc(var(--ncc-tile-h) * .22); }
.ncc-row { display: flex; justify-content: center; margin-top: calc(var(--ncc-tile-h) * -.22); }
.ncc-row.is-waiting { opacity: 0; }
.ncc-row.is-in { animation: nccIn .8s cubic-bezier(.2, .7, .2, 1) both; }

.ncc-tile {
  flex: none;
  width: var(--ncc-tile-w);
  height: var(--ncc-tile-h);
  margin: 0 4px;
  padding: 3px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--ncc-tile-empty);
}
.ncc-tile--lit { background: var(--ncc-gold); }
.ncc-tile__inner {
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--ncc-tile-empty);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ncc-tile--lit .ncc-tile__inner { background: var(--ncc-tile); }
.ncc-tile.is-dim { opacity: .18; }
.ncc-tile.is-new { animation: nccNew .9s cubic-bezier(.2, .7, .2, 1) both; }
.ncc-tile { transition: opacity .3s; }

.ncc-tile__art svg { height: auto; }
.ncc-tile__art--tea svg { width: 58px; }
.ncc-tile__art--pillar svg { width: 50px; }
.ncc-tile__art--cluster svg { width: 88px; }
.ncc-tile__art--empty svg { width: 44px; }

.ncc-tile__name {
  max-width: calc(var(--ncc-tile-w) - 24px);
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ncc-pill);
  color: var(--ncc-cream);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ncc-wall__empty { margin: 24px 0 0; color: var(--ncc-grey); font-size: 16px; }

.ncc-drift { line-height: 0; background: var(--ncc-charcoal); }
.ncc-drift svg { width: 100%; height: 96px; }

/* --------------------------------------------------------- how it works */

.ncc-how { padding: 64px 24px 128px; background: var(--ncc-ember); display: flex; flex-direction: column; align-items: center; }
.ncc-how__intro { margin: 18px 0 0; max-width: 520px; color: var(--ncc-soft); font-size: 17px; line-height: 1.7; }
.ncc-how__note { margin: 56px 0 0; max-width: 520px; color: var(--ncc-soft); font-size: 15px; line-height: 1.7; }
.ncc-how .ncc-btn { margin-top: 32px; }

.ncc-cards { margin-top: 56px; width: 100%; max-width: 1000px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.ncc-card {
  padding: 36px 24px 32px;
  border: 1px solid rgba(230, 179, 37, .5);
  border-radius: 24px;
  background: var(--ncc-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.ncc-card__art { height: 96px; display: flex; align-items: flex-end; justify-content: center; }
.ncc-card__art--tea svg { width: 76px; } .ncc-card__art--pillar svg { width: 62px; } .ncc-card__art--cluster svg { width: 108px; }
.ncc-card__price { margin-top: 14px; color: var(--ncc-gold); font-family: Merriweather, Georgia, serif; font-size: 34px; font-weight: 900; line-height: 1.2; }
.ncc-card__name { color: var(--ncc-cream); font-size: 17px; font-weight: 600; }
.ncc-card__text { max-width: 220px; color: var(--ncc-soft); font-size: 14px; line-height: 1.6; }

/* ------------------------------------------------------------------ pop-up */

.ncc-modal { position: fixed; inset: 0; z-index: 100000; overflow-y: auto; padding: 48px 16px; display: flex; justify-content: center; align-items: flex-start; }
.ncc-modal__backdrop { position: fixed; inset: 0; background: rgba(20, 10, 4, .72); }
.ncc-modal__card {
  position: relative;
  width: 100%;
  max-width: 472px;
  margin: auto 0;
  padding: 56px 34px 44px;
  border-radius: 24px;
  background: var(--ncc-cream);
  color: var(--ncc-ink);
  text-align: center;
  animation: nccIn .4s cubic-bezier(.2, .7, .2, 1) both;
}
.ncc-modal__x {
  position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; margin: 0; padding: 0;
  border: 0; border-radius: 999px; background: transparent; color: var(--ncc-ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.ncc-modal__x:hover { background: rgba(26, 26, 26, .06); }
.ncc-modal__x:focus-visible { outline: 3px solid var(--ncc-gold); }
.ncc .ncc-modal__title { margin: 0; color: #2C2C2C; font-size: 28px; font-weight: 900; line-height: 1.2; }
.ncc-modal__sub { margin: 6px 0 0; color: #4F4740; font-size: 14px; }

.ncc-form { margin: 26px 0 0; display: flex; flex-direction: column; gap: 26px; }
.ncc-field { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ncc-label { padding: 0; color: var(--ncc-ink); font-size: 15px; font-weight: 600; }
.ncc .ncc-input {
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 0 16px;
  border: 1.5px solid #E3D6B6;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: none;
  color: var(--ncc-ink);
  font: inherit;
  font-size: 16px;
  text-align: center;
}
.ncc .ncc-input:focus { border-color: var(--ncc-gold); outline: 3px solid rgba(230, 179, 37, .35); outline-offset: 0; }
.ncc-hint { color: #4F4740; font-size: 13px; }
.ncc-hint--center { margin: 0; }

.ncc-options { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ncc-option { position: relative; display: block; margin: 0; cursor: pointer; }
.ncc-option input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.ncc-option__card {
  min-height: 118px;
  padding: 12px 10px;
  border: 1.5px solid #E3D6B6;
  border-radius: 16px;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: border-color .15s, background-color .15s;
}
.ncc-option__card strong { color: var(--ncc-ink); font-size: 20px; font-weight: 600; line-height: 1.2; }
.ncc-option__card > span:last-child { color: #4F4740; font-size: 13px; }
.ncc-option__art { height: 44px; display: flex; align-items: flex-end; justify-content: center; }
.ncc-option__art svg { height: 44px; width: auto; }
/* On the white option cards: drop the glow and darken the wax so the candles read clearly. */
.ncc-option__art svg circle[opacity] { display: none; }
.ncc-option__art svg [fill="#F7EBD0"] { fill: #E6D6B3; }
.ncc-option__art svg [fill="#E6D6B3"] { fill: #D4C29A; }
.ncc-option__art svg [fill="#FFF8E8"] { fill: #EFE3C8; }
.ncc-option input:checked + .ncc-option__card { border: 2px solid #A93226; background: #FFF4E8; }
.ncc-option input:focus-visible + .ncc-option__card { outline: 3px solid rgba(26, 26, 26, .55); outline-offset: 2px; }

.ncc-custom { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ncc-label--inline { font-size: 14px; }
.ncc .ncc-input--amount { width: 120px; min-height: 46px; }

.ncc-preview { padding: 22px 16px; border-radius: 16px; background: var(--ncc-charcoal); display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ncc-cream); }
.ncc-tile--preview { --ncc-tile-w: 108px; --ncc-tile-h: 124px; margin: 0 0 6px; }
.ncc-tile--preview .ncc-tile__art svg { width: auto; height: 58px; }
.ncc-tile--preview .ncc-tile__name { font-size: 10px; }
.ncc-preview__title { font-family: Merriweather, Georgia, serif; font-size: 15px; font-weight: 700; }
.ncc-preview__text { color: var(--ncc-grey); font-size: 14px; line-height: 1.5; }

.ncc-msg:empty { display: none; }
.ncc-msg { padding: 11px 14px; border-radius: 12px; font-size: 15px; }
.ncc-msg--error { background: #FDECEA; color: #8F2219; }
.ncc-msg--success { background: #E8F5E9; color: #1D5F2A; }
.ncc-msg--info { background: #FFF7E0; color: #6A4A00; }
.ncc-pay { min-height: 52px; }
.ncc-pay .ncc-btn { width: 100%; min-height: 56px; font-size: 18px; }
.ncc-notice { margin: 0 0 12px; padding: 11px 14px; border-radius: 12px; background: #FFF7E0; color: #6A4A00; font-size: 14px; }
.ncc-noscript { margin: 0; padding: 24px; background: var(--ncc-charcoal); }

body.ncc-locked { overflow: hidden; }

/* Break out of the theme's content column (themes often force a max width with !important). */
/* Themes style inputs globally (BeTheme turns search boxes white): keep ours. */
.ncc input.ncc-find__input[type="search"] {
  height: 54px !important;
  min-height: 54px !important;
  padding: 0 22px 0 52px !important;
  border: 1px solid rgba(253, 246, 223, .14) !important;
  border-radius: 999px !important;
  background: #242424 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23E6B325' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 22px 50% !important;
  box-shadow: none !important;
  color: #FDF6DF !important;
  font-size: 16px !important;
  text-align: left !important;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.ncc input.ncc-find__input[type="search"]:hover { border-color: rgba(253, 246, 223, .28) !important; }
.ncc input.ncc-find__input[type="search"]:focus { outline: none; border-color: #E6B325 !important; box-shadow: 0 0 0 4px rgba(230, 179, 37, .18) !important; }
.ncc input.ncc-input {
  height: 54px !important;
  padding: 0 18px !important;
  border: 1px solid #E6D9BC !important;
  border-radius: 14px !important;
  background: #FFFDF7 !important;
  box-shadow: inset 0 1px 2px rgba(42, 38, 34, .05) !important;
  color: #2A2622 !important;
  font-size: 17px !important;
  text-align: center !important;
  transition: border-color .15s, box-shadow .15s;
}
.ncc input.ncc-input:hover { border-color: #D8C69C !important; }
.ncc input.ncc-input:focus { outline: none; border-color: #E2B84A !important; box-shadow: 0 0 0 3px rgba(230, 179, 37, .12) !important; }
.ncc input.ncc-input::placeholder { color: rgba(42, 38, 34, .38); opacity: 1; }
.ncc input.ncc-input[type="number"] { -moz-appearance: textfield; }
.ncc input.ncc-input::-webkit-outer-spin-button,
.ncc input.ncc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ncc input.ncc-input--amount { width: 100% !important; height: 54px !important; padding-left: 40px !important; font-size: 18px !important; font-weight: 600 !important; }

div.ncc.ncc {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

/* ------------------------------------------------------------------ smaller screens */

@media (max-width: 760px) {
  .ncc { --ncc-tile-w: 110px; --ncc-tile-h: 127px; }
  .ncc-hero { padding: 280px 20px 32px; }
  .ncc-hero__intro { font-size: 16px; }
  .ncc-btn { min-height: 58px; padding: 0 36px; font-size: 18px; }
  .ncc-stats { margin-top: 44px; }
  .ncc-stat { padding: 4px 28px; }
  .ncc-stat__num { font-size: 36px; }
  .ncc-scene__svg { height: 380px; }
  .ncc-h2 { font-size: 32px; }
  .ncc-tile { margin: 0 3px; }
  .ncc-tile__art--tea svg { width: 42px; } .ncc-tile__art--pillar svg { width: 36px; }
  .ncc-tile__art--cluster svg { width: 66px; } .ncc-tile__art--empty svg { width: 32px; }
  .ncc-tile__name { max-width: calc(var(--ncc-tile-w) - 14px); font-size: 10px; padding: 2px 7px; }
  .ncc-modal { padding: 16px 10px; }
  .ncc-modal__card { padding: 52px 20px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .ncc .sc-rise, .ncc .sc-fade, .ncc .sc-twinkle, .ncc .sc-glow, .ncc .sc-snow,
  .ncc-in, .ncc-row.is-in, .ncc-tile.is-new, .ncc-modal__card { animation: none; }
  .ncc-row.is-waiting { opacity: 1; }
  .ncc-btn, .ncc-tile { transition: none; }
}

/* ------------------------------------------------- pop-up: fit and layering */

/* BeTheme's #Content makes its own layer, which put the sticky header on top of
   the pop-up. Lift it while the pop-up is open. */
body.ncc-locked #Content { z-index: 100000; }

.ncc-modal { align-items: center; padding: 24px 16px; }
.ncc-modal__card { max-width: 620px; padding: 40px 36px 32px; }
.ncc-modal .ncc-input::placeholder { color: rgba(42, 38, 34, .45); opacity: 1; }

/* Wider screens: candles in one row and a side-by-side preview, so the whole
   pop-up fits on screen without scrolling. */
@media (min-width: 640px) {
  .ncc-modal .ncc-options { grid-template-columns: repeat(4, 1fr) !important; }
  .ncc-modal .ncc-preview {
    display: grid !important;
    grid-template-columns: auto 1fr;
    column-gap: 24px;
    align-items: center;
    text-align: left;
    padding: 18px 24px !important;
  }
  .ncc-modal .ncc-preview .ncc-tile--preview { grid-row: span 2; margin: 0 !important; }
  .ncc-modal .ncc-preview__title { align-self: end; }
  .ncc-modal .ncc-preview__text { align-self: start; }
}

/* Candle choices: every card the same height, with icon, price and name lined
   up across the row. */
.ncc-option { height: 100%; }
.ncc-option__card { height: 100%; box-sizing: border-box; justify-content: flex-start; }

/* ------------------------------------------------------- theme fixes */

/* The page uses BeTheme's full-width layout so the night sky runs edge to edge,
   but that also stretched the site footer. Put the footer back to the width it
   has on every other page. */
body.ncnw-candles-page .mfn-footer-tmpl .section_wrapper {
  max-width: 1060px !important; /* beats the theme's full-width !important */
  margin-left: auto;
  margin-right: auto;
}

/* Remove the thin pale strip BeTheme leaves between the page and the footer. */
body.ncnw-candles-page .the_content_wrapper { margin-bottom: 0; }

/* ---------------------------------------------- pop-up: split panel layout */

/* Wider screens: the live candle preview fills a dark panel on the left and
   the form sits on the right, so the whole pop-up fits without scrolling.
   Phones keep the stacked layout above. */
@media (min-width: 760px) {
  .ncc-modal__card{max-width:880px;padding:0;display:grid;grid-template-columns:320px minmax(0,1fr);align-content:start;row-gap:0;overflow:hidden;text-align:center}
  .ncc-modal__card>*:not(.ncc-modal__x):not(.ncc-form),.ncc-modal .ncc-form>*{grid-column:2;margin-left:40px;margin-right:40px}
  .ncc-modal .ncc-form{display:contents}
  .ncc-modal__title{padding-top:44px}.ncc-modal__sub{margin-top:-14px!important}.ncc-modal .ncc-preview__text{display:block;text-align:center!important}.ncc-modal .ncc-form>*:not(.ncc-preview){margin-top:22px!important}.ncc-modal .ncc-form>.ncc-msg:empty{margin-top:0!important}.ncc-modal .ncc-form>.ncc-hint--center{margin-top:14px!important}.ncc-modal__sub{margin-top:4px!important}
  .ncc-modal .ncc-form>*:last-child{padding-bottom:36px}
  .ncc-modal .ncc-preview{grid-column:1!important;grid-row:1 / span 20;margin:0!important;border-radius:0!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;text-align:center!important;padding:40px 28px!important;background:radial-gradient(circle at 50% 42%,rgba(230,179,37,.28),rgba(230,179,37,0) 55%),linear-gradient(180deg,#3a1a06 0%,#2e2e2e 100%)!important}
  .ncc-modal .ncc-preview .ncc-tile--preview{transform:scale(1.7);margin:40px 0 56px!important}
  .ncc-modal .ncc-preview__title{color:#fde9c0;font-size:20px}
  .ncc-modal .ncc-preview__text{max-width:230px;margin:6px auto 0!important}
}

/* ------------------------------------------------ pop-up: form polish */

/* Everything in the pop-up is centred. */
.ncc-modal__card { text-align: center !important; }
.ncc-modal__title, .ncc-modal__sub, .ncc-modal .ncc-notice, .ncc-modal .ncc-hint--center { text-align: center !important; }
.ncc-modal .ncc-preview, .ncc-modal .ncc-option__card { text-align: center !important; }
.ncc-modal .ncc-field .ncc-label { display: block !important; width: 100%; margin: 0 0 8px; font-size: 14px; font-weight: 600; text-align: center !important; }
.ncc-modal .ncc-field .ncc-hint { display: block; width: 100%; margin-top: 8px; font-size: 13px; color: rgba(42, 38, 34, .6); text-align: center !important; }
.ncc-modal .ncc-choose legend { width: 100%; text-align: center; }

/* "Other": a full-width amount box with a pound sign inside it. */
.ncc-modal .ncc-custom:not([hidden]) { display: grid !important; grid-template-columns: 1fr; width: 100% !important; justify-items: stretch !important; margin-top: 14px; text-align: left; }
.ncc-modal .ncc-custom .ncc-label--inline { grid-row: 1; margin: 0 0 8px; text-align: left !important; }
.ncc-modal .ncc-custom .ncc-input--amount { grid-row: 2; grid-column: 1; max-width: none !important; }
.ncc-modal .ncc-custom::after { content: "\00a3"; grid-row: 2; grid-column: 1; align-self: center; justify-self: start; margin-left: 18px; color: #2A2622; font-size: 18px; font-weight: 600; pointer-events: none; }
.ncc-modal .ncc-custom .ncc-hint { grid-row: 3; }

/* ------------------------------------------ candle wall: arched cards */

/* Each candle sits in a tall card with an arched top, like a chapel window.
   The name goes underneath on up to three lines; names are capped at 30
   letters, enough for three names in full. Rows are even, not a honeycomb. */
.ncc { --ncc-tile-w: 128px; --ncc-tile-h: 178px; }
.ncc-grid { padding-top: 0; }
.ncc-row { margin-top: 0; }
.ncc-row + .ncc-row { margin-top: 16px; }
.ncc-tile {
  width: var(--ncc-tile-w);
  height: var(--ncc-tile-h);
  margin: 0 4px;
  padding: 0;
  clip-path: none;
  background: none;
}
.ncc-tile__inner {
  box-sizing: border-box;
  height: 100%;
  clip-path: none;
  border: 1px solid rgba(253, 246, 223, .07);
  border-radius: 64px 64px 16px 16px;
  background: var(--ncc-tile-empty);
  justify-content: flex-start;
  gap: 12px;
  padding: 24px 10px 14px;
}
.ncc-tile--lit .ncc-tile__inner {
  border-color: rgba(230, 179, 37, .6);
  background:
    radial-gradient(circle at 50% 34%, rgba(230, 179, 37, .22), rgba(230, 179, 37, 0) 58%),
    var(--ncc-tile);
  box-shadow: 0 0 28px rgba(230, 179, 37, .10);
}
.ncc-tile__art { display: flex; align-items: flex-end; justify-content: center; height: 76px; flex: none; }
.ncc-tile__name,
.ncc-tile--preview .ncc-tile__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--ncc-cream);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.ncc-tile--preview { --ncc-tile-w: 150px; --ncc-tile-h: 200px; }
.ncc-tile--preview .ncc-tile__name { font-size: 14px; }
.ncc-tile--preview .ncc-tile__art { height: 100px; }
.ncc-tile--preview .ncc-tile__art svg { height: 88px; width: auto; }

@media (max-width: 760px) {
  .ncc { --ncc-tile-w: 100px; --ncc-tile-h: 164px; }
  .ncc-tile { margin: 0 3px; }
  .ncc-tile__inner { padding: 22px 8px 12px; gap: 10px; border-radius: 50px 50px 14px 14px; }
  .ncc-tile__art { height: 62px; }
  .ncc-tile__name { font-size: 12px; }
}

/* Split pop-up: the preview card is already big enough, so no scaling. */
@media (min-width: 760px) {
  .ncc-modal .ncc-preview .ncc-tile--preview { transform: none !important; margin: 0 0 22px !important; }
}

/* Phones: the two stats sit side by side instead of stacking. */
@media (max-width: 760px) {
  .ncc-stats { flex-wrap: nowrap; margin-top: 48px; }
  .ncc-stat { flex: 1 1 0; min-width: 0; padding: 4px 16px; }
  .ncc-stat__num { font-size: 38px; }
  .ncc-stat__label { font-size: 14px; text-align: center; }
}

/* Phones: a more compact pop-up. Four candle choices in one row and a
   small side-by-side preview, so there is far less scrolling. */
@media (max-width: 759px) {
  .ncc-modal{padding:12px}
  .ncc-modal__card{padding:30px 20px 22px}
  .ncc-modal .ncc-options{gap:6px;grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .ncc-modal .ncc-option__card{min-height:0;padding:10px 6px;gap:2px}
  .ncc-modal .ncc-option__card svg{height:30px;width:auto}
  .ncc-modal .ncc-option__card strong{font-size:16px}.ncc-modal .ncc-option__card>span:not(:first-child),.ncc-modal .ncc-option__card small{font-size:10.5px;line-height:1.25}
  .ncc-modal .ncc-preview{display:grid!important;grid-template-columns:auto 1fr;column-gap:16px;align-items:center;text-align:left!important;padding:14px 16px!important}
  .ncc-modal .ncc-preview .ncc-tile--preview{--ncc-tile-w:92px;--ncc-tile-h:132px;grid-row:span 2;margin:0!important}
  .ncc-modal .ncc-preview .ncc-tile--preview .ncc-tile__inner{padding:14px 6px 10px;gap:6px;border-radius:46px 46px 12px 12px}
  .ncc-modal .ncc-preview .ncc-tile--preview .ncc-tile__art{height:54px}
  .ncc-modal .ncc-preview .ncc-tile--preview .ncc-tile__art svg{height:50px}
  .ncc-modal .ncc-preview .ncc-tile--preview .ncc-tile__name{font-size:11px}
  .ncc-modal .ncc-preview__title{align-self:end;font-size:16px}
  .ncc-modal .ncc-preview__text{align-self:start;font-size:13px}
}

/* Tighter gap between each label and its box. */
.ncc-modal .ncc-field { gap: 0; }
.ncc-modal .ncc-field .ncc-label { margin-bottom: 6px; }
.ncc-modal .ncc-custom .ncc-label--inline { margin-bottom: 6px; }

/* Let the soft glow behind each candle spill past its drawing instead of
   being clipped flat at the top (most visible on the candle cluster). */
.ncc-tile__art svg,
.ncc-option__card svg,
.ncc-preview svg { overflow: visible; }

/* ------------------------------------------------ pop-up: share screen */

/* After a candle is lit the form is swapped for a thank-you and share
   buttons. On wider screens the lit candle stays in the left panel. */
.ncc-modal__card.is-shared .ncc-modal__title,
.ncc-modal__card.is-shared .ncc-modal__sub,
.ncc-modal__card.is-shared .ncc-form > *:not(.ncc-preview) { display: none !important; }
.ncc-share { text-align: center; padding: 8px 0 4px; }
.ncc-share__title { margin: 0; color: var(--ncc-ink); font-size: 28px; font-weight: 900; line-height: 1.2; }
.ncc-share__title em { color: var(--ncc-gold-dark, #B7861A); }
.ncc-share__text { margin: 12px auto 0; max-width: 420px; color: rgba(42, 38, 34, .75); font-size: 16px; line-height: 1.6; }
.ncc-share__native { width: 100%; margin-top: 24px; }
.ncc-share__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.ncc .ncc-share__btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; margin: 0; padding: 0 15px;
  border: 1px solid #E6D9BC; border-radius: 999px; background: #FFFDF7;
  color: #2A2622; font: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.ncc .ncc-share__btn:hover { border-color: #E6B325; background: #FFF6DC; color: #2A2622; }
.ncc .ncc-share__see {
  margin: 22px 0 0; padding: 6px 4px; border: 0; background: none;
  color: #2A2622; font: inherit; font-size: 15px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
@media (min-width: 760px) {
  .ncc-modal__card.is-shared .ncc-share { grid-column: 2; grid-row: 1; align-self: center; margin: 0 40px; padding: 56px 0 44px; }
}
@media (max-width: 759px) {
  .ncc-share { padding-top: 18px; }
  .ncc-share__title { font-size: 24px; }
}

/* Shared link: a clear call to action under the candle someone was sent. */
.ncc .ncc-shared-cta { display: flex; margin: 36px auto 0; }

/* Search box: the magnifying glass stays a soft cream until the box is
   clicked, then turns gold. Gentler focus glow, and the clear (x) button
   is gold to match instead of the browser's default blue. */
.ncc input.ncc-find__input[type="search"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23FDF6DF' stroke-opacity='.45' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") !important; background-size: 18px 18px !important; }
.ncc input.ncc-find__input[type="search"] { background-color: #242424 !important; }
.ncc input.ncc-find__input[type="search"]:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23E6B325' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") !important;
  border-color: #C9A040 !important;
  box-shadow: 0 0 0 3px rgba(230, 179, 37, .10) !important;
}
.ncc input.ncc-find__input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E6B325' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") no-repeat center / 16px 16px;
  opacity: .85;
}
.ncc input.ncc-find__input[type="search"]::-webkit-search-cancel-button:hover { opacity: 1; }

/* Pop-up preview panel: keep the title and text centred. */
@media (min-width: 760px) {
  .ncc-modal .ncc-preview .ncc-preview__title,
  .ncc-modal .ncc-preview .ncc-preview__text { align-self: center !important; text-align: center !important; }
}

/* A bigger, longer search bar. */
.ncc-find { width: 100%; max-width: 520px; }
.ncc input.ncc-find__input[type="search"] {
  height: 60px !important;
  min-height: 60px !important;
  padding-left: 58px !important;
  font-size: 17px !important;
  background-position: 24px 50% !important;
}

/* Subtle reveal on scroll. The landscape waits until it is in view, then
   its layers rise a short way into place; sections fade up gently. */
@keyframes nccRiseSoft { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.ncc .sc-rise { animation-name: nccRiseSoft; animation-duration: 1.1s; }
.ncc-scene.is-waiting .sc-rise,
.ncc-scene.is-waiting .sc-fade { animation-play-state: paused; }
.ncc-reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.ncc-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ncc-reveal { opacity: 1; transform: none; transition: none; }
}

/* Names always start each word with a capital, even on older candles. */
.ncc-tile__name { text-transform: capitalize; }

/* Thank-you screen: buttons turn NCNW red when hovered or pressed. */
.ncc .ncc-share__btn:hover,
.ncc .ncc-share__btn:focus-visible { border-color: #A93226; background: #A93226; color: #FFFFFF; }
.ncc .ncc-share__btn:active { border-color: #8E2A20; background: #8E2A20; color: #FFFFFF; }
.ncc .ncc-share__see:hover { color: #A93226; }

/* ------------------------------------------------ pop-up: let someone know */
.ncc-modal .ncc-notify { margin-top: 16px; }
.ncc-modal .ncc-check { display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; color: var(--ncc-ink); font-size: 15px; font-weight: 600; }
.ncc-modal .ncc-check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: #B7861A; cursor: pointer; }
.ncc-modal .ncc-notify__box { width: 100%; margin-top: 12px; }
.ncc-modal .ncc-notify__box[hidden] { display: none !important; }
.ncc-share__emailed { margin: 14px 0 0; color: rgba(42, 38, 34, .7); font-size: 14px; line-height: 1.5; }
.ncc-modal .ncc-test-btn { display: block; width: 100%; margin-top: 12px; font-size: 14px; }
.ncc-modal .ncc-test-btn { background: transparent !important; color: #6B5A45 !important; border: 1.5px dashed #C9B48A !important; box-shadow: none !important; min-height: 46px; }

/* ---------------------------------------------------------- hover effect on lit candles */

@media (hover: hover) {
  .ncc-tile__inner {
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease, background-color .35s ease;
  }
  .ncc-tile--lit:hover .ncc-tile__inner {
    transform: translateY(-6px);
    border-color: rgba(230, 179, 37, 1);
    background-color: #434040;
    box-shadow: 0 0 38px 6px rgba(230, 179, 37, .35), 0 12px 24px rgba(0, 0, 0, .35);
  }
  .ncc-tile--lit .ncc-tile__art svg {
    transition: transform .35s ease;
    transform-origin: 50% 100%;
  }
  .ncc-tile--lit:hover .ncc-tile__art svg {
    transform: scale(1.08);
  }
  .ncc-tile--lit:hover svg circle[fill="#F2A93B" i] {
    animation: ncc-halo 1.6s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
  }
  .ncc-tile--lit:hover svg path[fill="#F6A623" i],
  .ncc-tile--lit:hover svg path[fill="#FFE39A" i] {
    animation: ncc-flicker 1.1s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: 50% 100%;
  }
  .ncc-tile--lit .ncc-tile__name {
    transition: color .35s ease;
  }
  .ncc-tile--lit:hover .ncc-tile__name {
    color: #E6B325;
  }
  .ncc-tile:not(.ncc-tile--lit):hover .ncc-tile__inner {
    border-color: rgba(230, 179, 37, .25);
  }
}
@keyframes ncc-flicker {
  0%, 100% { transform: scale(1, 1) rotate(0deg); }
  25% { transform: scale(.93, 1.07) rotate(-2deg); }
  50% { transform: scale(1.04, .96) rotate(1.5deg); }
  75% { transform: scale(.97, 1.05) rotate(-1deg); }
}
@keyframes ncc-halo {
  0%, 100% { opacity: .3; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .ncc-tile--lit:hover .ncc-tile__inner,
  .ncc-tile--lit:hover .ncc-tile__art svg { transform: none; }
  .ncc-tile--lit:hover svg * { animation: none !important; }
}
