/* ============================================================
   Menava — Procurement Readiness Diagnostic
   Design tokens + dawn atmosphere
   ============================================================ */

:root {
  /* Brand palette */
  --teal-deep: #076773;
  --teal-mid: #78BABE;
  --teal-light: #C9E1E3;
  --coral: #EEBB8E;

  /* Derived ink / surface */
  --ink: #0c4a52;          /* darker teal for body text */
  --ink-soft: #3d6b71;     /* muted teal text */
  --ink-faint: #6f9298;    /* captions */
  --cream: #FBF5EE;
  --paper: #ffffff;

  /* Calm RAG — muted, not traffic-light */
  --green: #5f9b86;
  --green-soft: #e4efe9;
  --amber: #d99a5b;        /* warm, derived from coral */
  --amber-soft: #f7ead9;
  --red: #c47d6e;          /* muted clay, not alarming */
  --red-soft: #f4e2dc;

  /* Accent (tweakable) */
  --accent: var(--coral);

  /* Type */
  --font-body: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Instrument Serif', 'Hanken Grotesk', serif;
  --type-scale: 1;

  /* Geometry */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;

  /* Soft shadows only — no hard shadows */
  --shadow-glass: 0 24px 70px -34px rgba(7, 76, 82, 0.45),
                  0 2px 8px -4px rgba(7, 76, 82, 0.12);
  --shadow-soft: 0 14px 40px -26px rgba(7, 76, 82, 0.38);
  --shadow-lift: 0 30px 80px -36px rgba(7, 76, 82, 0.42);

  --glass-bg: rgba(255, 255, 255, 0.58);
  --glass-border: rgba(255, 255, 255, 0.72);

  --maxw: 600px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  position: relative;
  overflow-x: hidden;
}

/* ---------- Dawn atmosphere ---------- */
.dawn {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(130% 78% at 50% -16%, #FCE6CF 0%, rgba(252,230,207,0) 52%),
    radial-gradient(120% 70% at 82% 8%, #F7D8BE 0%, rgba(247,216,190,0) 46%),
    radial-gradient(140% 90% at 50% 118%, #BFDDDF 0%, rgba(191,221,223,0) 58%),
    linear-gradient(180deg, #FBF2E8 0%, #F0F2ED 42%, #DCE9E8 78%, #CFE3E3 100%);
}
/* slow shimmer ripple on the 'water' */
.dawn::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 40% at 30% 92%, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 60%),
    radial-gradient(50% 36% at 72% 96%, rgba(120,186,190,0.30) 0%, rgba(120,186,190,0) 60%);
  mix-blend-mode: screen;
  animation: ripple 16s ease-in-out infinite alternate;
}
@keyframes ripple {
  0%   { transform: translate3d(-2%, 0, 0) scale(1.02); opacity: .85; }
  100% { transform: translate3d(3%, -1.5%, 0) scale(1.06); opacity: 1; }
}
/* faint sun glow that breathes */
.sun {
  position: fixed;
  top: -16vmin; right: 6vw;
  width: 46vmin; height: 46vmin;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,236,214,0.9) 0%, rgba(238,187,142,0.34) 40%, rgba(238,187,142,0) 70%);
  filter: blur(6px);
  z-index: -2;
  animation: breathe 11s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes breathe {
  0%   { transform: scale(1); opacity: .85; }
  100% { transform: scale(1.08); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .dawn::after, .sun { animation: none; }
}

/* atmosphere variants */
body[data-atmosphere="mist"] .dawn {
  background:
    radial-gradient(130% 80% at 50% -18%, #EAF1EE 0%, rgba(234,241,238,0) 55%),
    radial-gradient(140% 90% at 50% 120%, #C9E1E3 0%, rgba(201,225,227,0) 60%),
    linear-gradient(180deg, #F4F7F4 0%, #E7EFEC 46%, #D5E6E5 100%);
}
body[data-atmosphere="mist"] .sun { opacity: .4; }
body[data-atmosphere="tide"] .dawn {
  background:
    radial-gradient(130% 78% at 50% -16%, #FBE6CC 0%, rgba(251,230,204,0) 50%),
    radial-gradient(150% 95% at 50% 116%, #9FCBCE 0%, rgba(159,203,206,0) 60%),
    linear-gradient(180deg, #F1F4F0 0%, #DCEAE8 40%, #BBDCDC 78%, #A6D2D2 100%);
}
body[data-atmosphere="tide"] .sun { top: -10vmin; right: 12vw; }

/* ---------- App shell ---------- */
.app {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(20px, 4vw, 48px) clamp(16px, 4vw, 40px) 64px;
}

/* ---------- Top bar ---------- */
.topbar {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(16px, 4vw, 40px) 0;
  gap: 16px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 20px;
  color: var(--teal-deep);
  text-decoration: none;
}
.wordmark-logo {
  height: 22px;
  width: auto;
  display: block;
}
.wordmark small {
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  padding-left: 11px;
  border-left: 1px solid rgba(7,103,115,0.22);
}
.topbar .save-note {
  font-size: 12.5px;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.topbar .save-note .pip {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(95,155,134,0.18);
}

/* ---------- Glass card ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-glass);
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  border: none;
  border-radius: 999px;
  padding: 15px 28px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, background .22s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.995); }

.btn-primary {
  color: #4a2c14;
  background: linear-gradient(135deg, #F4CBA3 0%, var(--coral) 52%, #E7A878 100%);
  box-shadow: 0 16px 34px -16px rgba(214,143,90,0.7), inset 0 1px 0 rgba(255,255,255,0.5);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px -16px rgba(214,143,90,0.78), inset 0 1px 0 rgba(255,255,255,0.6);
}
.btn-primary:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: rgba(255,255,255,0.4);
  color: var(--teal-deep);
  border: 1px solid rgba(7,103,115,0.16);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.7);
  border-color: rgba(7,103,115,0.28);
}

.btn-quiet {
  background: transparent;
  color: var(--ink-soft);
  padding: 12px 16px;
}
.btn-quiet:hover { color: var(--teal-deep); }

/* ---------- Pills / chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(7,103,115,0.12);
  color: var(--ink-soft);
}
.chip .ico { width: 15px; height: 15px; }

.rag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
}
.rag .seed { width: 9px; height: 9px; border-radius: 50%; }
.rag.green { background: var(--green-soft); color: #3a6f5c; }
.rag.green .seed { background: var(--green); }
.rag.amber { background: var(--amber-soft); color: #9a6a2f; }
.rag.amber .seed { background: var(--amber); }
.rag.red   { background: var(--red-soft);   color: #9c5547; }
.rag.red .seed { background: var(--red); }

/* utility */
.serif { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
.center { text-align: center; }
.fade-up { animation: fadeUp .55s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes fadeUp {
  from { transform: translateY(16px); }
  to   { transform: translateY(0); }
}
.fade-in { animation: fadeIn .5s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

::selection { background: rgba(238,187,142,0.4); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(120,186,190,0.4); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }
