/* =============================================================
   Smart Sale — Main Stylesheet
   Companion to Tailwind CDN (custom/utility classes only)
   ============================================================= */

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html  { scroll-behavior: smooth; }
body  { font-family: 'Inter', system-ui, sans-serif; }
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; }

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --bronze:        #A06F47;
  --bronze-hover:  #8a5e3c;
  --bronze-glow:   rgba(160, 111, 71, 0.35);
  --bronze-subtle: rgba(160, 111, 71, 0.12);
  --midnight:      #171C22;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary {
  background: var(--bronze);
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: .85rem 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: background .25s, transform .25s, box-shadow .25s;
}
.btn-primary:hover {
  background: var(--bronze-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--bronze-glow);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 500;
  transition: color .2s, gap .2s;
}
.btn-ghost:hover { gap: .7rem; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  border-radius: 8px;
  border: 1px solid rgba(160,111,71,.14);
  transition: border-color .25s, transform .25s;
}
.card:hover {
  border-color: rgba(160,111,71,.45);
  transform: translateY(-3px);
}

/* ── Hero background ───────────────────────────────────────── */
.hero-bg {
  background-image:
    radial-gradient(ellipse 60% 50% at 15% 55%, rgba(160,111,71,.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 85% 20%, rgba(160,111,71,.04) 0%, transparent 60%);
}

/* ── Nav blur ──────────────────────────────────────────────── */
.nav-blur {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Form inputs ───────────────────────────────────────────── */
.form-field {
  width: 100%;
  padding: .75rem 1rem;
  border-radius: 4px;
  border: 1px solid rgba(160,111,71,.25);
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-field:focus {
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(160,111,71,.1);
}
.dark  .form-field { color: #fff; }
.dark  .form-field::placeholder { color: rgba(255,255,255,.3); }
.light .form-field { color: var(--midnight); }
.light .form-field::placeholder { color: rgba(23,28,34,.35); }

select.form-field { cursor: pointer; }
.dark  select.form-field { background: #171C22; }
.light select.form-field { background: #F4F4F4; }

/* ── PDCA cycle animation ──────────────────────────────────── */
.pdca-ring {
  stroke-dasharray: 8 5;
  animation: rotateRing 18s linear infinite;
  transform-origin: 250px 250px;
}
@keyframes rotateRing {
  to { transform: rotate(360deg); }
}
.pdca-node { transition: filter .25s; cursor: default; }
.pdca-node:hover { filter: drop-shadow(0 0 12px var(--bronze-glow)); }

.pdca-arc {
  fill: none;
  stroke: var(--bronze);
  stroke-width: 1.5;
  stroke-dasharray: 8 4;
  opacity: .45;
}
.pdca-arrow { fill: var(--bronze); opacity: .45; }

/* Light mode overrides for PDCA node fill */
html.light .pdca-node-fill { fill: rgba(255,255,255,.97); }
html.dark  .pdca-node-fill { fill: rgba(26,31,39,.97); }

/* Light-mode text colour fix for PDCA node labels */
html.light .pdca-node text[fill="rgba(255,255,255,.6)"] {
  fill: rgba(23,28,34,.55) !important;
}

/* ── Scroll-reveal ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Pulse badge ───────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(1.35); }
}
.pulse-dot { animation: pulse 2s infinite; }

/* ── Stat numbers ──────────────────────────────────────────── */
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--bronze);
  line-height: 1;
}

/* ── Quote mark ────────────────────────────────────────────── */
.big-quote {
  font-family: 'Playfair Display', serif;
  font-size: 7rem;
  line-height: .7;
  color: var(--bronze);
  opacity: .18;
  user-select: none;
}

/* ── Methodology card top bar ──────────────────────────────── */
.card-top-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 8px 8px 0 0;
  background: var(--bronze);
}

/* ── Mobile menu ───────────────────────────────────────────── */
#mobileMenu { display: none; }
#mobileMenu.open { display: block; }

/* ── Pegasus logo glow ─────────────────────────────────────── */
.logo-glow { filter: drop-shadow(0 0 8px rgba(160,111,71,.4)); }

/* ── Label / section tag ───────────────────────────────────── */
.label-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  color: #A06F47;
  text-transform: uppercase;
  letter-spacing: .14em;
}

/* ── Icon box ──────────────────────────────────────────────── */
.icon-box {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 6px;
  background: rgba(160,111,71,.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Check icon (checklist) ────────────────────────────────── */
.check-icon {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: rgba(160,111,71,.15);
  flex-shrink: 0;
  position: relative;
}
.check-icon::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -55%) rotate(45deg);
  width: 5px; height: 8px;
  border-right: 1.8px solid #A06F47;
  border-bottom: 1.8px solid #A06F47;
}

/* ── Form field label ──────────────────────────────────────── */
.field-label {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .4rem;
  opacity: .55;
}
