/* IC Finance — design system
   Navy / cream / gold, serif display + sans body, per the client brand brief. */

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

:root {
  --navy: #14213d;
  --navy-deep: #0d1730;
  --cream: #f5f1e6;
  --cream-soft: #faf8f2;
  --gold: #b98a46;
  --gold-soft: #d9b678;
  --ink: #1c1d22;
  --ink-soft: #4a4d57;
  --line: #e1dac8;
  --line-navy: rgba(245, 241, 230, 0.16);
  --max: 1180px;
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, Segoe UI, sans-serif;
  color: var(--ink);
  background: var(--cream-soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .serif {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--navy);
}

p { margin: 0 0 1.1em; color: var(--ink-soft); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold);
}
.on-navy .eyebrow { color: var(--gold-soft); }

.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.on-navy { background: var(--navy); color: var(--cream); }
.on-navy h1, .on-navy h2, .on-navy h3, .on-navy h4 { color: var(--cream); }
.on-navy p { color: rgba(245, 241, 230, 0.78); }
.on-cream-soft { background: var(--cream); }

.rule {
  width: 56px;
  height: 2px;
  background: var(--gold);
  margin: 18px 0 24px;
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 34px; width: auto; }
.nav-logo span {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.02em;
  color: var(--navy);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a { color: var(--navy); opacity: 0.82; transition: opacity 0.15s; }
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--gold); }
.nav-cta {
  background: var(--navy);
  color: var(--cream) !important;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  opacity: 1 !important;
}
.nav-cta:hover { background: var(--gold); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 5px 0; }

@media (max-width: 880px) {
  .nav-links {
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--cream-soft);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 28px 28px;
    gap: 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-cta { width: 100%; text-align: center; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-primary { background: var(--gold); color: var(--navy-deep); }
.btn-primary:hover { background: var(--gold-soft); transform: translateY(-1px); }
.btn-outline { border-color: currentColor; color: inherit; }
.btn-outline:hover { background: rgba(255,255,255,0.06); }
.on-cream-soft .btn-outline, body .btn-outline { border-color: var(--navy); color: var(--navy); }
.on-navy .btn-outline { border-color: var(--cream); color: var(--cream); }
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

/* ---- Hero ---- */
.hero {
  padding: 96px 0 88px;
  background: var(--navy);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: -180px; top: -180px;
  width: 520px; height: 520px;
  border: 1px solid var(--line-navy);
  border-radius: 50%;
}
.hero-inner { max-width: 760px; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); }
.hero .lede { font-size: 19px; color: rgba(245,241,230,0.82); max-width: 620px; }
.hero-strip {
  margin-top: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--line-navy);
  padding-top: 28px;
  position: relative;
  z-index: 1;
}
.hero-strip .step {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-soft);
  padding-right: 22px;
  margin-right: 22px;
  border-right: 1px solid var(--line-navy);
}
.hero-strip .step:last-child { border-right: none; }

/* ---- Cards ---- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  padding: 30px;
  border-radius: var(--radius);
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card ul { margin: 14px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: 14.5px; }
.card ul li { margin-bottom: 6px; }
.card .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.card-navy {
  background: rgba(245, 241, 230, 0.04);
  border: 1px solid var(--line-navy);
  padding: 26px;
}
.card-navy h4 { font-size: 16px; color: var(--cream); margin-bottom: 4px; }

/* ---- Process chips ---- */
.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.flow .chip {
  background: var(--navy);
  color: var(--cream);
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius);
}
.on-navy .flow .chip { background: rgba(245,241,230,0.08); border: 1px solid var(--line-navy); }
.flow .arrow { color: var(--gold); font-size: 16px; }

/* ---- Numbered steps ---- */
.steps { display: grid; gap: 28px; }
.step-row { display: flex; gap: 22px; align-items: flex-start; }
.step-num {
  flex: none;
  width: 46px; height: 46px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--gold);
}
.step-body h4 { font-size: 17px; margin-bottom: 4px; color: var(--navy); }
.on-navy .step-body h4 { color: var(--cream); }
.step-body p { margin: 0; }

/* ---- Quote ---- */
.quote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 27px);
  color: var(--navy);
  line-height: 1.45;
  max-width: 780px;
}
.on-navy .quote { color: var(--cream); }
.quote::before { content: '\201C'; color: var(--gold); margin-right: 4px; }

/* ---- Stat ---- */
.stat-line {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(28px, 4vw, 44px);
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.on-navy .stat-line { color: var(--cream); }
.stat-line .arrow { color: var(--gold); }
.stat-caption {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ---- Case study card ---- */
.case-card {
  border: 1px solid var(--line);
  background: var(--cream-soft);
  padding: 32px;
  border-radius: var(--radius);
}
.case-card .industry {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold); display: inline-block;
  padding: 4px 10px; border-radius: 20px; margin-bottom: 14px;
}
.case-mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 22px; }
.case-mini-grid div { border-top: 2px solid var(--gold); padding-top: 10px; }
.case-mini-grid strong { display: block; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--navy); margin-bottom: 4px; }
.case-mini-grid span { font-size: 13.5px; color: var(--ink-soft); }
@media (max-width: 780px) { .case-mini-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- Footer ---- */
.footer { background: var(--navy-deep); color: rgba(245,241,230,0.7); padding: 64px 0 32px; }
.footer h4 { color: var(--cream); font-family: 'Inter', sans-serif; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; margin-bottom: 16px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-grid a { display: block; margin-bottom: 10px; font-size: 14px; color: rgba(245,241,230,0.7); }
.footer-grid a:hover { color: var(--gold-soft); }
.footer-bottom { border-top: 1px solid var(--line-navy); margin-top: 48px; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12.5px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo img { height: 30px; }
.footer-logo span { font-family: 'Playfair Display', serif; color: var(--cream); font-size: 18px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---- Page hero (non-home) ---- */
.page-hero { background: var(--navy); color: var(--cream); padding: 64px 0 56px; }
.page-hero h1 { font-size: clamp(28px, 4vw, 42px); max-width: 720px; }
.page-hero p { max-width: 620px; font-size: 17px; }
.breadcrumb { font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 16px; }

/* ---- Table ---- */
.review-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.review-table th, .review-table td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.review-table th { font-family: 'Playfair Display', serif; font-weight: 600; color: var(--navy); width: 220px; font-size: 15.5px; }
.review-table td { color: var(--ink-soft); font-size: 14.5px; }

/* ---- Form ---- */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; letter-spacing: 0.02em; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: 'Inter', sans-serif; font-size: 14.5px; background: var(--cream-soft); color: var(--ink);
}
.form-field textarea { min-height: 110px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.form-note { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }

/* ---- Score tool ---- */
.score-shell {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 44px;
}
@media (max-width: 620px) { .score-shell { padding: 26px; } }
.score-progress { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 34px; }
.score-progress-bar { height: 100%; width: 0%; background: var(--gold); transition: width 0.3s ease; }
.score-q { display: none; }
.score-q.active { display: block; }
.score-q .q-num { font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.score-q h3 { font-size: 22px; margin-bottom: 22px; }
.score-options { display: grid; gap: 12px; }
.score-option {
  display: block; width: 100%; text-align: left;
  padding: 16px 20px; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--cream); cursor: pointer; font-size: 15px; font-family: 'Inter', sans-serif; color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.score-option:hover { border-color: var(--gold); }
.score-option.selected { border-color: var(--gold); background: rgba(185,138,70,0.1); font-weight: 600; }
.score-nav { display: flex; justify-content: space-between; margin-top: 30px; }
.score-nav button:disabled { opacity: 0.35; cursor: not-allowed; }
.score-result { display: none; text-align: center; }
.score-result.active { display: block; }
.score-dial {
  width: 180px; height: 180px; margin: 0 auto 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--gold) calc(var(--pct, 0) * 1%), var(--line) 0);
  position: relative;
}
.score-dial::before {
  content: ''; position: absolute; inset: 12px; background: var(--cream-soft); border-radius: 50%;
}
.score-dial .num { position: relative; font-family: 'Playfair Display', serif; font-size: 40px; font-weight: 700; color: var(--navy); }
.score-dial .denom { position: relative; font-size: 13px; color: var(--ink-soft); margin-top: -6px; }
.score-breakdown { display: grid; gap: 14px; text-align: left; margin: 30px 0; }
.score-breakdown .row { display: flex; align-items: center; gap: 14px; }
.score-breakdown .label { width: 200px; font-size: 13.5px; font-weight: 600; color: var(--navy); flex: none; }
.score-breakdown .bar-track { flex: 1; height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; }
.score-breakdown .bar-fill { height: 100%; background: var(--gold); }
.score-breakdown .val { font-size: 13px; color: var(--ink-soft); width: 46px; text-align: right; flex: none; }
.score-message { text-align: left; background: var(--cream); border-left: 3px solid var(--gold); padding: 20px 24px; margin: 26px 0; font-size: 15px; color: var(--ink); }

/* ---- Utility ---- */
.center { text-align: center; margin-left: auto; margin-right: auto; }
.max-720 { max-width: 720px; }
.mt-40 { margin-top: 40px; }
.small-note { font-size: 13px; color: var(--ink-soft); }
