/* =========================================================
   MIDAS Expert Network — shared styles
   Colours and sizes are set once here; change them in :root.
   ========================================================= */

:root {
  --accent: #0071e3;          /* buttons, links, bars */
  --accent-hover: #0077ed;
  --accent-on-dark: #2997ff;  /* accent used on black sections */
  --link: #0066cc;

  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --text-on-dark: #f5f5f7;
  --text-muted-on-dark: #a1a1a6;

  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-dark: #000000;
  --card-dark: #1d1d1f;
  --card-dark-inner: #2c2c2e;

  --line: #d2d2d7;
  --line-soft: #e8e8ed;

  --radius-card: 28px;
  --radius-input: 12px;
  --max: 1024px;
  --gutter: 22px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--link); }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }
.muted { color: var(--text-muted); }

section { scroll-margin-top: 52px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 251, 253, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand { color: var(--text); text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; padding: 12px 0; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 13px; flex-wrap: wrap; }
.nav-links a { color: var(--text); text-decoration: none; opacity: 0.85; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
.nav-links a.pill-sm { opacity: 1; }
@media (max-width: 720px) { .nav-links a:not(.pill-sm):not(.back) { display: none; } }

/* ---------- Buttons ---------- */
.pill {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  font-size: 17px; padding: 12px 24px; border-radius: 980px; border: 0; cursor: pointer; font-family: inherit;
}
.pill:hover { background: var(--accent-hover); text-decoration: none; }
.pill-sm { background: var(--accent); color: #fff !important; padding: 6px 14px; border-radius: 980px; text-decoration: none; }
.pill-sm:hover { background: var(--accent-hover); text-decoration: none; }
.more { font-size: 17px; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* ---------- Type ---------- */
.eyebrow { font-size: 21px; font-weight: 600; margin: 0; }
.display { margin: 0; font-size: clamp(44px, 7vw, 80px); line-height: 1.05; font-weight: 700; letter-spacing: -0.035em; }
.h2 { margin: 0; font-size: clamp(36px, 5vw, 56px); line-height: 1.07; font-weight: 700; letter-spacing: -0.03em; }
.lead { margin: 0; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.4; color: var(--text-muted); letter-spacing: -0.01em; }
.sub { margin: 0; font-size: 21px; line-height: 1.4; color: var(--text-muted); }

/* ---------- Hero ---------- */
.hero { padding: 88px var(--gutter) 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.hero .display { max-width: 920px; }
.hero .lead { max-width: 720px; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px; padding-top: 12px; }
.hero-media { width: 100%; max-width: 1200px; margin-top: 56px; border-radius: var(--radius-card); overflow: hidden; }
.hero-media img { width: 100%; aspect-ratio: 2.2 / 1; object-fit: cover; }

/* Placeholder box shown until a real image is added */
.placeholder {
  background: var(--bg-alt); color: var(--text-muted); display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px; font-size: 15px; min-height: 220px; border-radius: inherit;
}
.hero-media .placeholder { aspect-ratio: 2.2 / 1; min-height: 240px; }
.dark .placeholder { background: var(--card-dark-inner); color: var(--text-muted-on-dark); }

/* ---------- Stats ---------- */
.stats { padding: 88px var(--gutter); max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; text-align: center; }
.stat-num { display: block; font-size: 64px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.stat-label { color: var(--text-muted); }

/* ---------- Sections ---------- */
.band { padding: 112px 0; }
.band-alt { background: var(--bg-alt); }
.dark { background: var(--bg-dark); color: var(--text-on-dark); }
.dark .sub { color: var(--text-muted-on-dark); }
.stack-xl { display: flex; flex-direction: column; gap: 56px; }
.head { display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }
.head .sub { max-width: 640px; }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.card { background: #fff; border-radius: var(--radius-card); padding: 40px 36px; display: flex; flex-direction: column; gap: 20px; }
.card-why { min-height: 300px; justify-content: space-between; }
.card-label { font-weight: 600; color: var(--text-muted); }
.card-title { font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.card-body { color: var(--text-muted); margin: 0; }

/* Dark bento */
.bento { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.bento-card { background: var(--card-dark); border-radius: var(--radius-card); padding: 40px 36px; display: flex; flex-direction: column; gap: 12px; }
.bento-wide { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 32px; padding: 48px 44px; }
.bento-wide > div { flex: 1 1 320px; display: flex; flex-direction: column; gap: 14px; }
.bento-label { font-weight: 600; color: var(--accent-on-dark); }
.bento-title { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.bento-wide .bento-title { font-size: 40px; letter-spacing: -0.025em; }
.bento-body { margin: 0; color: var(--text-muted-on-dark); }
.bento-media { border-radius: 20px; overflow: hidden; }
.bento-media img { width: 100%; height: 100%; object-fit: cover; }
.bento-media .placeholder { min-height: 140px; }
.fine { font-size: 14px; color: var(--text-muted-on-dark); margin: 0; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.step { display: flex; flex-direction: column; gap: 12px; }
.step-num { font-size: 48px; font-weight: 700; color: var(--line); letter-spacing: -0.03em; line-height: 1; }
.step:last-child .step-num { color: var(--accent); }
.step-title { font-size: 21px; font-weight: 600; margin: 0; }
.step p { margin: 0; color: var(--text-muted); }

/* Score card */
.score-card { background: #fff; border-radius: var(--radius-card); padding: 44px; display: flex; flex-direction: column; gap: 26px; }
.score-top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; font-size: 15px; color: var(--text-muted); }
.score-avg { font-size: 40px; font-weight: 700; color: var(--text); letter-spacing: -0.03em; margin-left: 6px; }
.score { display: flex; flex-direction: column; gap: 8px; }
.score-row { display: flex; justify-content: space-between; gap: 12px; }
.score-row strong { font-weight: 600; }
.bar { height: 6px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* Members */
.member { background: var(--bg-alt); border-radius: var(--radius-card); padding: 36px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.avatar { width: 112px; height: 112px; border-radius: 50%; background: var(--line-soft); object-fit: cover; }
.member-name { font-size: 21px; font-weight: 600; margin: 0; }
.member-role { font-size: 15px; color: var(--text-muted); margin: 0; }
.member p { margin: 0; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 24px 0; }
.faq summary { cursor: pointer; list-style: none; font-size: 21px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 14px 0 0; color: var(--text-muted); }

/* CTA */
.cta { padding: 120px var(--gutter); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }

/* Footer */
.footer { background: var(--bg-alt); border-top: 1px solid var(--line); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter) 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--text-muted); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: #424245; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- Form ---------- */
.form-page { max-width: 680px; margin: 0 auto; padding: 80px var(--gutter) 120px; display: flex; flex-direction: column; gap: 56px; }
form { display: flex; flex-direction: column; gap: 48px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
legend { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; padding: 0 0 18px; }
.row-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 17px; color: var(--text); background: #fff;
  padding: 0 16px; height: 56px; border: 1px solid #86868b; border-radius: var(--radius-input); width: 100%;
}
.field textarea { height: auto; padding: 14px 16px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.req { color: #bf4800; }
.group-label { font-size: 14px; color: var(--text-muted); }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.checks-1 { grid-template-columns: 1fr; }
.check { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 56px; border: 1px solid var(--line); border-radius: var(--radius-input); font-size: 17px; cursor: pointer; }
.check:has(input:checked) { border-color: var(--accent); background: #f2f8ff; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }
.note { background: var(--bg-alt); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.note p { margin: 0; font-size: 15px; color: var(--text-muted); }
.submit-area { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.consent { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--text-muted); text-align: left; }
.consent input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--accent); }
.pill[disabled] { opacity: 0.5; cursor: default; }
.form-status { font-size: 15px; min-height: 1.4em; }
.form-status.error { color: #b3261e; }
.thanks { display: none; text-align: center; flex-direction: column; align-items: center; gap: 16px; padding: 40px 0; }
.thanks.show { display: flex; }
