/* Custom styles for RDTMT App — Golden-Green Marketing Theme v8 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700;800&display=swap');

:root {
  /* ── Golden-Green Core Palette ── */
  --gold:        #C9A84C;   /* warm antique gold */
  --gold-light:  #E8CA7E;   /* soft gold highlight */
  --gold-pale:   #F5E6C0;   /* parchment pale gold */
  --ggreen:      #7CB342;   /* bright leaf golden-green */
  --ggreen-mid:  #558B2F;   /* mid forest green */
  --ggreen-dark: #2E5C17;   /* deep forest green */

  /* ── Background ── */
  --bg-page:     #070f08;   /* deep forest almost-black */
  --bg-card:     #0d1c0e;   /* card surface */
  --bg-card2:    #122013;   /* elevated card */

  /* ── Text ── */
  --text-body:   #e8f4e4;   /* warm light green-white */
  --text-muted:  #9aba8e;   /* sage muted */

  /* ── Border ── */
  --border:      #2c5020;   /* forest border */

  /* ── Legacy aliases (kept for any JS refs) ── */
  --indigo:      var(--gold);
  --violet:      var(--gold-light);
  --cyan:        var(--ggreen);
  --emerald:     #4CAF50;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-body);
}
.font-playfair { font-family: 'Playfair Display', serif; }
.font-inter    { font-family: 'Inter', sans-serif; }

/* ── Vivid gradient headline ── */
.text-gradient {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 40%, var(--ggreen) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html { scroll-behavior: smooth; }

/* ══════════════════════════════════════════════════════
   PAGE-FRAME WRAPPER — decorative marketing corners
   ══════════════════════════════════════════════════════ */

/* Top gradient ribbon */
.page-frame::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--ggreen-dark) 0%,
    var(--ggreen)      25%,
    var(--gold)        50%,
    var(--ggreen)      75%,
    var(--ggreen-dark) 100%);
  z-index: 9999;
  pointer-events: none;
}

.page-frame {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  overflow: hidden;
}

/* Corner ornaments — L-shaped gold brackets */
.pf-c {
  position: absolute;
  width: 36px;
  height: 36px;
  pointer-events: none;
  opacity: 0.65;
}
/* Top-left */
.pf-c.tl {
  top: 10px; left: 10px;
  border-top: 2.5px solid var(--gold);
  border-left: 2.5px solid var(--gold);
  border-radius: 4px 0 0 0;
}
/* Top-right */
.pf-c.tr {
  top: 10px; right: 10px;
  border-top: 2.5px solid var(--gold);
  border-right: 2.5px solid var(--gold);
  border-radius: 0 4px 0 0;
}
/* Bottom-left */
.pf-c.bl {
  bottom: 14px; left: 10px;
  border-bottom: 2.5px solid var(--ggreen);
  border-left: 2.5px solid var(--ggreen);
  border-radius: 0 0 0 4px;
}
/* Bottom-right */
.pf-c.br {
  bottom: 14px; right: 10px;
  border-bottom: 2.5px solid var(--ggreen);
  border-right: 2.5px solid var(--ggreen);
  border-radius: 0 0 4px 0;
}

/* ── Rating buttons ── */
.rating-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 56px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}
.rating-btn:hover {
  border-color: var(--gold);
  background: #1a2a0c;
  color: var(--gold-pale);
  transform: translateY(-1px);
}
/* DR — gold */
.rating-btn.selected-indigo {
  border-color: var(--gold);
  background: #2a1f00;
  color: var(--gold-pale);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.28);
}
/* EFE — ggreen */
.rating-btn.selected-cyan {
  border-color: var(--ggreen);
  background: #122010;
  color: #d4f7c0;
  box-shadow: 0 0 0 3px rgba(124,179,66,0.22);
}
/* VCI — forest green */
.rating-btn.selected-emerald {
  border-color: #4CAF50;
  background: #0d2210;
  color: #c8f5cb;
  box-shadow: 0 0 0 3px rgba(76,175,80,0.22);
}

.rating-btn .score-num {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

/* ── Progress bar ── */
.progress-fill { transition: width 0.5s cubic-bezier(.4,0,.2,1); }

/* ── Survey section card ── */
.section-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

/* ── Animated pulse dot ── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}
.pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }

/* ── Tooltip ── */
.tooltip-content {
  visibility: hidden;
  opacity: 0;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 100;
}
.tooltip-trigger:hover .tooltip-content,
.tooltip-trigger:focus .tooltip-content {
  visibility: visible;
  opacity: 1;
}

/* ── Dashboard chart container ── */
.chart-wrap { position: relative; height: 300px; max-height: 300px; }

/* ── Custom scrollbar ── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--ggreen-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ggreen-mid); }

/* ── Form input ── */
.form-input {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text-body);
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.18);
}
.form-input::placeholder { color: #4a6a42; }

textarea.form-input { resize: vertical; min-height: 90px; }

/* ── Step indicator ── */
.step-indicator {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  transition: all 0.3s;
}
.step-active  { background: var(--gold); color: #1a0e00; box-shadow: 0 0 12px rgba(201,168,76,0.55); }
.step-done    { background: var(--ggreen-mid); color: #fff; }
.step-pending { background: #0d1c0e; color: #4a6a42; border: 1px solid var(--border); }

/* ── Construct card hover ── */
.construct-card { transition: transform 0.2s, box-shadow 0.2s; }
.construct-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -12px rgba(201,168,76,0.25);
}

/* ── Shimmer for empty charts ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.shimmer {
  background: linear-gradient(90deg, #0d1c0e 25%, #1a3012 50%, #0d1c0e 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
}

/* ── Mobile nav toggle ── */
.mobile-menu { display: none; }
@media (max-width: 768px) {
  .mobile-menu.open { display: block; }

  .rating-btn {
    padding: 12px 14px;
    min-width: 52px;
  }
  .rating-btn .score-num { font-size: 20px; }
  .section-card { padding: 20px; }
  body { font-size: 15px; }
}

/* ── Nav overrides ── */
nav {
  background: rgba(7, 15, 8, 0.94) !important;
  border-bottom-color: var(--border) !important;
}

/* ── Tailwind colour overrides → golden-green ── */
.text-slate-400  { color: var(--text-muted) !important; }
.text-slate-500  { color: var(--text-muted) !important; }

/* bg slate overrides */
.bg-slate-800 { background-color: #182c14 !important; }
.bg-slate-900 { background-color: #0f1c10 !important; }
.bg-slate-950 { background-color: #070f08 !important; }

/* Construct accent card backgrounds */
.bg-indigo-950  { background-color: #1a1200 !important; }   /* DR gold */
.bg-cyan-950    { background-color: #0e1c08 !important; }   /* EFE ggreen */
.bg-emerald-950 { background-color: #0d1f0d !important; }   /* VCI forest */

.bg-indigo-900  { background-color: #2d1e00 !important; }
.bg-cyan-900    { background-color: #1a2e0a !important; }
.bg-emerald-900 { background-color: #163016 !important; }

/* Border upgrades */
.border-slate-700  { border-color: #2c5020 !important; }
.border-slate-600  { border-color: #3d6a2e !important; }
.border-indigo-700 { border-color: #9a7520 !important; }
.border-cyan-700   { border-color: #5a8a28 !important; }
.border-emerald-700{ border-color: #2e7a2e !important; }

/* Badge / pill */
.bg-indigo-500 { background-color: var(--gold) !important; }
.bg-indigo-500:hover,
.hover\:bg-indigo-400:hover { background-color: var(--gold-light) !important; }
.bg-indigo-500 *, .bg-indigo-600 * { color: #1a0e00; }

/* Text accent colours → gold / ggreen */
.text-indigo-400, .text-indigo-300,
.text-indigo-200  { color: var(--gold-light) !important; }
.text-indigo-500  { color: var(--gold) !important; }

.text-cyan-400, .text-cyan-300,
.text-cyan-200    { color: #9fd15c !important; }
.text-cyan-500    { color: var(--ggreen) !important; }

.text-emerald-400, .text-emerald-300,
.text-emerald-200 { color: #6fcf70 !important; }
.text-emerald-500 { color: #4CAF50 !important; }

.text-violet-400, .text-violet-300 { color: var(--gold-pale) !important; }

/* Logo / title gradient */
.from-indigo-500  { --tw-gradient-from: var(--gold) !important; }
.to-violet-600    { --tw-gradient-to:   var(--ggreen) !important; }
.via-cyan-400     { --tw-gradient-via:  var(--ggreen) !important; }

/* Indigo ring / focus */
.ring-indigo-500, .focus\:ring-indigo-500:focus { --tw-ring-color: rgba(201,168,76,0.5) !important; }

/* ═══════════════════════════════════════════════════════
   BOTTOM NAVIGATION BAR  (mobile < 768 px only)
   ═══════════════════════════════════════════════════════ */
.bottom-nav { display: none; }

@media (max-width: 767px) {

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(7, 15, 8, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 6px 4px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    align-items: flex-end;
    justify-content: space-around;
    gap: 2px;
  }

  body { padding-bottom: 80px !important; }

  nav:not(.bottom-nav) {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 12px 6px;
    border-radius: 14px;
    color: #4a6a42;
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.18s, background 0.18s, transform 0.15s;
    flex: 1;
    max-width: 80px;
    position: relative;
  }

  .bottom-nav-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: transform 0.2s;
  }

  .bottom-nav-item:active { transform: scale(0.9); }

  .bottom-nav-item:not(.bottom-nav-survey):hover {
    color: var(--gold-light);
    background: rgba(201,168,76,0.09);
  }

  .bottom-nav-item.active:not(.bottom-nav-survey) {
    color: var(--gold-light);
    background: rgba(201,168,76,0.13);
  }

  .bottom-nav-item.active:not(.bottom-nav-survey)::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 6px rgba(201,168,76,0.7);
  }

  .bottom-nav-item.active:not(.bottom-nav-survey) svg {
    filter: drop-shadow(0 0 5px rgba(232,202,126,0.55));
  }

  /* ── Survey pill — golden-green CTA ── */
  .bottom-nav-survey {
    background: linear-gradient(145deg, var(--ggreen) 0%, var(--gold) 100%);
    color: #0a1a04 !important;
    border-radius: 18px;
    padding: 10px 14px 8px;
    box-shadow:
      0 4px 16px rgba(124,179,66,0.5),
      0 1px 0 rgba(255,255,255,0.12) inset;
    margin-bottom: 6px;
    flex: 0 0 auto;
    min-width: 64px;
  }

  .bottom-nav-survey:hover,
  .bottom-nav-survey:active {
    background: linear-gradient(145deg, #8fc94a 0%, #d9b840 100%);
    box-shadow: 0 6px 20px rgba(124,179,66,0.65);
    transform: translateY(-2px) scale(0.97);
  }

  .bottom-nav-survey.active {
    background: linear-gradient(145deg, var(--ggreen) 0%, var(--gold) 100%);
    box-shadow:
      0 6px 20px rgba(201,168,76,0.55),
      0 0 0 2px rgba(232,202,126,0.4);
  }

  .bottom-nav-survey svg { filter: none !important; }
}
/* ── End bottom nav ── */

/* ── Save Progress button ── */
.save-progress-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.save-progress-btn:hover {
  color: var(--gold-light);
  background: rgba(201,168,76,0.1);
}

/* ── Opacity-variant bg overrides (Tailwind /60 etc.) ── */
.bg-indigo-950\/60  { background-color: rgba(26, 18,  0, 0.72) !important; }
.bg-cyan-950\/60    { background-color: rgba(14, 28,  8, 0.72) !important; }
.bg-emerald-950\/60 { background-color: rgba(13, 31, 13, 0.72) !important; }
.bg-violet-950\/60  { background-color: rgba(20, 10,  0, 0.72) !important; }

/* ── bg-slate opacity variants ── */
.bg-slate-900\/50   { background-color: rgba(15, 28, 16, 0.5) !important; }
.bg-slate-800\/60   { background-color: rgba(24, 44, 20, 0.6) !important; }

/* border opacity variants */
.border-indigo-800\/40  { border-color: rgba(154, 117,  32, 0.4) !important; }
.border-cyan-800\/40    { border-color: rgba( 90, 138,  40, 0.4) !important; }
.border-emerald-800\/40 { border-color: rgba( 46, 122,  46, 0.4) !important; }
.border-violet-800\/40  { border-color: rgba(201, 168,  76, 0.3) !important; }

/* text-violet-300 / text-violet-500 → warm gold-pale */
.text-violet-300 { color: var(--gold-pale) !important; }
.text-violet-500 { color: var(--gold-light) !important; }

/* bg-violet-950 */
.bg-violet-950 { background-color: #1a0e00 !important; }

/* ════════════════════════════════════════════════════════
   FLOATING SHARE BUTTON
   ════════════════════════════════════════════════════════ */

.share-fab {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* On mobile sit above bottom-nav bar */
@media (max-width: 767px) {
  .share-fab { right: 16px; bottom: 90px; }
}

/* ── Pill body ── */
.share-fab-body {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(145deg, var(--ggreen) 0%, var(--gold) 100%);
  color: #0a1a04;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 11px 18px 11px 13px;
  border-radius: 50px;
  box-shadow: 0 6px 22px rgba(124,179,66,0.42), 0 2px 6px rgba(0,0,0,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  user-select: none;
}

.share-fab:hover .share-fab-body {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(124,179,66,0.58), 0 4px 10px rgba(0,0,0,0.3);
}
.share-fab:active .share-fab-body {
  transform: scale(0.94);
  box-shadow: 0 3px 12px rgba(124,179,66,0.35);
}

/* ── Two expanding pulse rings ── */
.share-fab-ring {
  position: absolute;
  inset: 0;
  border-radius: 50px;
  border: 2px solid var(--ggreen);
  opacity: 0;
  pointer-events: none;
  animation: sfab-pulse 2.6s ease-out infinite;
}
.share-fab-ring.r2 {
  border-color: var(--gold);
  animation-delay: 1.3s;
}

@keyframes sfab-pulse {
  0%   { inset: 0;      opacity: 0.72; }
  60%  { inset: -10px;  opacity: 0.25; }
  100% { inset: -18px;  opacity: 0;    }
}

/* ── Copied toast ── */
.share-toast {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card2);
  border: 1.5px solid var(--ggreen-mid);
  color: var(--gold-pale);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45), 0 0 0 1px rgba(124,179,66,0.18);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
  white-space: nowrap;
}
.share-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 767px) {
  .share-toast { right: 16px; bottom: 165px; }
}

/* ── Share panel (pops above FAB) ── */
.share-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 501;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #0d1c0e;
  border: 1px solid #2c5020;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.55), 0 0 0 1px rgba(124,179,66,0.12);
  min-width: 200px;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.share-panel.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
@media (max-width: 767px) {
  .share-panel { right: 16px; bottom: 170px; }
}

/* ── Share option buttons inside the panel ── */
.share-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
  white-space: nowrap;
  text-decoration: none;
}
.share-opt--copy {
  background: rgba(201,168,76,0.10);
  color: #C9A84C;
  border: 1px solid rgba(201,168,76,0.28);
}
.share-opt--copy:hover {
  background: rgba(201,168,76,0.20);
  transform: translateX(-2px);
}
.share-opt--wa {
  background: rgba(37,211,102,0.10);
  color: #25D366;
  border: 1px solid rgba(37,211,102,0.28);
}
.share-opt--wa:hover {
  background: rgba(37,211,102,0.20);
  transform: translateX(-2px);
}

/* ── Animated GIF hero background ───────────────────────── */
.hero-gif-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0.20;                   /* reduced — prevents ghost text */
  pointer-events: none;
  z-index: 0;
}

/* Left side near-opaque (hides GIF text panel); right side lighter (brain circuit shows) */
.hero-gif-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(7,15,8,0.98) 0%,
    rgba(7,15,8,0.96) 38%,
    rgba(7,15,8,0.72) 62%,
    rgba(7,15,8,0.82) 100%
  );
  pointer-events: none;
  z-index: 1;
}
