/* ─────────────────────────────────────────────────────────────
   Revenue Diagnostic — page-specific styles
   Loaded only on page-revenue-diagnostic.php
   ───────────────────────────────────────────────────────────── */

/* ── Reset & base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:    #F5F3EE; --bg2: #EDEBE5; --bg3: #E4E1D9;
  --text:  #1A1A18; --text2: #5C5B56; --text3: #9B9A94;
  --acc:   var(--blue, #1E6FFF); --acc2: var(--blue2, #1558D6);
  --card:  #FFFFFF; --bd: #DDDBD3;
  --green: #22c55e; --red: #ef4444;
  --fh: var(--fh, 'Barlow Condensed', sans-serif); --fb: var(--fb, 'Outfit', sans-serif);
  --r: 14px;
}

[data-theme="dark"] {
  --bg: #0F0F0D; --bg2: #161614; --bg3: #1E1E1B;
  --text: #F0EEE8; --text2: #9B9A94; --text3: #5C5B56;
  --card: #1A1A18; --bd: #2A2A26;
}

/* Override Kadence body on this page */
body.page-template-page-revenue-diagnostic, body.diagnostic-page {
  font-family: var(--fb);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .3s, color .3s;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--fb); border: none; outline: none; background: none; }

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: var(--acc); border-radius: 2px; }
::selection { background: var(--acc); color: #fff; }

/* ── Hide Kadence header/nav on this page ── */
body.page-template-page-revenue-diagnostic .site-header,
body.page-template-page-revenue-diagnostic #masthead,
body.page-template-page-revenue-diagnostic .kadence-sticky-header { display: none !important; }

/* ── Diagnostic nav ── */
.diag-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg); border-bottom: 1px solid var(--bd);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.diag-nav-logo {
  font-family: var(--fh); font-weight: 800; font-size: 1.1rem;
  display: flex; align-items: center; gap: 8px;
}
.logo-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--acc); display: inline-block;
  animation: ldot 2s ease-in-out infinite;
}
@keyframes ldot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.7); }
}
.diag-nav-right { display: flex; align-items: center; gap: 12px; }
.theme-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--bd);
  color: var(--text2); font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.theme-btn:hover { background: var(--acc); color: #fff; border-color: var(--acc); }
.back-btn {
  padding: 8px 18px; border-radius: 100px;
  border: 1.5px solid var(--bd);
  font-size: .82rem; font-weight: 600; color: var(--text2);
  display: flex; align-items: center; gap: 7px;
  transition: all .2s;
}
.back-btn:hover { border-color: var(--acc); color: var(--acc); }

/* ── Page layout ── */
.diag-page { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }

/* ── Hero ── */
.page-eyebrow {
  font-size: .72rem; font-weight: 700; color: var(--acc);
  letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.page-eyebrow::before { content: ''; width: 20px; height: 2px; background: var(--acc); border-radius: 1px; }
.page-title {
  font-family: var(--fh); font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800; line-height: 1; letter-spacing: -.03em; margin-bottom: 14px;
}
.page-title span { color: var(--acc); }
.page-sub { font-size: .95rem; color: var(--text2); max-width: 500px; line-height: 1.7; margin-bottom: 28px; }

/* ── Quote block ── */
.quote-block {
  border-left: 3px solid var(--acc); padding: 14px 18px;
  background: rgba(30,111,255,.04); border-radius: 0 10px 10px 0;
  margin-bottom: 28px;
}
.quote-text  { font-size: .9rem; color: var(--text2); line-height: 1.65; font-style: italic; margin-bottom: 6px; }
.quote-source { font-size: .72rem; font-weight: 700; color: var(--acc); text-transform: uppercase; letter-spacing: .07em; }

/* ── Form card ── */
.form-card {
  background: var(--card); border: 1px solid var(--bd);
  border-radius: 20px; padding: 36px; margin-bottom: 24px;
}
.section-label {
  font-family: var(--fh); font-size: .75rem; font-weight: 700;
  color: var(--acc); text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 18px; display: flex; align-items: center; gap: 8px;
}
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 4px; }
.field label { font-size: .75rem; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .05em; }
.field input,
.field select {
  padding: 11px 14px; border-radius: 10px;
  background: var(--bg); border: 1.5px solid var(--bd);
  color: var(--text); font-family: var(--fb); font-size: .9rem;
  transition: border-color .2s, box-shadow .2s; outline: none;
  -webkit-appearance: none; -moz-appearance: textfield;
  min-height: 44px;
}
.field input[type=number]::-webkit-inner-spin-button,
.field input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.field input:focus,
.field select:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(30,111,255,.1); }
.field .hint { font-size: .71rem; color: var(--text3); line-height: 1.45; }
.divider { height: 1px; background: var(--bd); margin: 24px 0; }

/* ── Staff note ── */
.staff-note {
  background: var(--bg2); border-radius: 10px; padding: 11px 14px;
  font-size: .78rem; color: var(--text2); margin-top: 14px;
  display: flex; align-items: flex-start; gap: 8px; line-height: 1.5;
}
.staff-note-icon { color: var(--acc); flex-shrink: 0; margin-top: 1px; }

/* ── Calculate button ── */
.calc-btn {
  width: 100%; padding: 15px; border-radius: 100px;
  background: var(--acc); color: #fff;
  font-family: var(--fh); font-weight: 800; font-size: .95rem;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all .25s; margin-top: 10px;
  min-height: 52px; -webkit-tap-highlight-color: transparent;
}
.calc-btn:hover { background: var(--acc2); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(30,111,255,.35); }

/* ── Results ── */
#diag-results { display: none; animation: fadeUp .5s cubic-bezier(.16,1,.3,1) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Total card ── */
.total-card {
  background: var(--text); border-radius: 20px;
  padding: 36px; margin-bottom: 20px;
  position: relative; overflow: hidden;
}
[data-theme="dark"] .total-card { background: var(--bg3); border: 1px solid var(--bd); }
.total-card::before {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(30,111,255,.22), transparent 65%);
  pointer-events: none;
}
.total-eyebrow  { font-size: .68rem; font-weight: 700; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
[data-theme="dark"] .total-eyebrow { color: var(--text3); }
.total-num      { font-family: var(--fh); font-size: clamp(2.8rem,8vw,4.2rem); font-weight: 800; color: #fff; line-height: 1; letter-spacing: -.04em; margin-bottom: 6px; }
[data-theme="dark"] .total-num { color: var(--text); }
.total-sub      { font-size: .84rem; color: rgba(255,255,255,.48); margin-bottom: 24px; }
[data-theme="dark"] .total-sub { color: var(--text3); }
.total-pills    { display: flex; gap: 10px; flex-wrap: wrap; }
.total-pill     {
  padding: 7px 15px; border-radius: 100px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  font-size: .76rem; font-weight: 600; color: rgba(255,255,255,.7);
  display: flex; align-items: center; gap: 6px;
}
[data-theme="dark"] .total-pill { background: var(--card); border-color: var(--bd); color: var(--text2); }
.total-pill b { color: var(--acc); font-family: var(--fh); }

/* ── Breakdown grid ── */
.breakdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.leak-card {
  background: var(--card); border: 1px solid var(--bd);
  border-radius: var(--r); padding: 20px;
  border-left: 3px solid var(--acc); transition: all .3s;
}
.leak-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.leak-label   { font-size: .67rem; font-weight: 700; color: var(--acc); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
.leak-amount  { font-family: var(--fh); font-size: 1.55rem; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 2px; }
.leak-period  { font-size: .7rem; color: var(--text3); margin-bottom: 9px; }
.leak-bar-wrap { height: 3px; background: var(--bg3); border-radius: 2px; overflow: hidden; margin-bottom: 10px; }
.leak-bar     { height: 100%; background: var(--acc); border-radius: 2px; transition: width 1.2s cubic-bezier(.16,1,.3,1); }
.leak-desc    { font-size: .75rem; color: var(--text2); line-height: 1.55; }
.zero-badge   {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 100px;
  background: rgba(34,197,94,.09); border: 1px solid rgba(34,197,94,.2);
  font-size: .72rem; font-weight: 700; color: var(--green); margin-bottom: 9px;
}

/* ── ROI card ── */
.roi-card {
  background: rgba(30,111,255,.05); border: 1px solid rgba(30,111,255,.18);
  border-radius: var(--r); padding: 22px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.roi-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--acc); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.roi-label { font-size: .68rem; font-weight: 700; color: var(--acc); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.roi-val   { font-family: var(--fh); font-size: 1.25rem; font-weight: 800; color: var(--text); line-height: 1; }
.roi-sub   { font-size: .76rem; color: var(--text2); margin-top: 3px; line-height: 1.5; }

/* ── Recalc button ── */
.recalc-btn {
  width: 100%; padding: 11px; border-radius: 100px;
  background: var(--bg3); border: 1.5px solid var(--bd);
  color: var(--text2); font-size: .82rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all .2s; margin-bottom: 20px;
}
.recalc-btn:hover { border-color: var(--acc); color: var(--acc); background: rgba(30,111,255,.05); }

/* ── CTA card ── */
.cta-card {
  background: var(--card); border: 1px solid var(--bd);
  border-radius: 20px; padding: 32px; text-align: center;
}
.cta-card h3 { font-family: var(--fh); font-size: 1.25rem; font-weight: 800; margin-bottom: 8px; }
.cta-card p  { font-size: .87rem; color: var(--text2); margin-bottom: 24px; max-width: 400px; margin-left: auto; margin-right: auto; line-height: 1.65; }
.cta-btns    { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-primary {
  padding: 13px 28px; border-radius: 100px;
  background: var(--acc); color: #fff;
  font-weight: 700; font-size: .88rem;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .25s;
}
.cta-primary:hover { background: var(--acc2); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(30,111,255,.3); }
.cta-ghost {
  padding: 12px 24px; border-radius: 100px;
  border: 1.5px solid var(--bd); color: var(--text2);
  font-size: .85rem; display: inline-flex; align-items: center; gap: 8px;
  transition: all .2s;
}
.cta-ghost:hover { border-color: var(--acc); color: var(--acc); }

/* ── Footnote ── */
.diag-footnote {
  font-size: .71rem; color: var(--text3); text-align: center;
  margin-top: 32px; line-height: 1.7;
  max-width: 520px; margin-left: auto; margin-right: auto;
}

/* ─── Mobile ─── */
@media (max-width: 640px) {
  .field-grid, .breakdown-grid { grid-template-columns: 1fr; }
  .diag-page     { padding: 28px 16px 60px; }
  .form-card     { padding: 22px 18px; }
  .total-card    { padding: 24px 18px; }
  .cta-card      { padding: 24px 18px; }
  .roi-card      { flex-direction: column; gap: 12px; }
  .cta-btns      { flex-direction: column; align-items: stretch; }
  .cta-primary,
  .cta-ghost     { justify-content: center; width: 100%; }
  .total-pills   { gap: 8px; }
  .total-pill    { font-size: .72rem; padding: 6px 12px; }
}

@media (max-width: 400px) {
  .back-btn span { display: none; }
  .back-btn      { padding: 8px 12px; }
  .diag-nav      { padding: 12px 16px; }
  .page-title    { font-size: 1.85rem; }
  .total-num     { font-size: 2.4rem; }
}

/* iOS zoom fix — inputs must be ≥ 16px on mobile */
@media (max-width: 768px) {
  .field input,
  .field select { font-size: 16px; }
}
