/* =============================================================
   RCM Nexus — Design System
   Paleta: navy #0A1628 + laranja RCM #E94B1D + ivory #F5F1EA
   Tipografia: Fraunces (display) + Inter (body)
   ============================================================= */

:root {
  /* Cores */
  --navy-deep: #0A1628;
  --navy-mid: #142033;
  --navy-soft: #1E2D44;
  --navy-line: #2A3B54;

  --rcm-orange: #E94B1D;
  --rcm-orange-soft: #F26D44;
  --rcm-orange-deep: #C13D14;

  --ivory: #F5F1EA;
  --ivory-pure: #FAF8F4;
  --ivory-warm: #EDE6D8;

  --text-primary: #0A1628;
  --text-secondary: #2C3E54;
  --text-muted: #6A7889;
  --text-inverse: #F5F1EA;
  --text-inverse-muted: #B5BFCC;

  --border-soft: #E2DCD0;
  --border-medium: #C9C0AF;

  /* Tipografia */
  --font-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Escala de espaçamento (8pt grid) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 32px;
  --s-6: 48px;
  --s-7: 64px;
  --s-8: 96px;
  --s-9: 128px;
  --s-10: 160px;

  /* Layout */
  --container-max: 1240px;
  --container-narrow: 880px;

  /* Outros */
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-soft: 0 8px 32px rgba(10, 22, 40, 0.08);
  --shadow-medium: 0 16px 48px rgba(10, 22, 40, 0.12);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================== Reset ================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--ivory);
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition-base); }
button { font-family: inherit; cursor: pointer; }

/* ================== Tipografia ================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 var(--s-4);
  line-height: 1.1;
}
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 350; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); }
h4 { font-size: 1.2rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }

p { margin: 0 0 var(--s-4); color: var(--text-secondary); }
.lead { font-size: 1.25rem; line-height: 1.6; color: var(--text-secondary); max-width: 60ch; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rcm-orange);
  margin-bottom: var(--s-3);
}
.eyebrow.on-dark { color: var(--rcm-orange-soft); }

/* ================== Layout ================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--s-4);
}
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--s-4); }

section { padding: var(--s-9) 0; }
@media (max-width: 768px) {
  section { padding: var(--s-7) 0; }
}

.section-dark { background: var(--navy-deep); color: var(--text-inverse); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--text-inverse); }
.section-dark p, .section-dark .lead { color: var(--text-inverse-muted); }

.section-warm { background: var(--ivory-warm); }

/* ================== Header / Nav ================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  max-width: var(--container-max);
  margin: 0 auto;
  gap: var(--s-5);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--text-inverse);
}
.nav-brand img { height: 40px; width: auto; }
.nav-brand-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  font-weight: 400;
}
.nav-brand-text strong { color: var(--rcm-orange); font-weight: 500; }

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--s-5);
  align-items: center;
}
.nav-menu a {
  color: var(--text-inverse-muted);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: var(--s-2) 0;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--text-inverse); }
.nav-menu a.active::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--rcm-orange);
}
.nav-cta {
  background: var(--rcm-orange);
  color: var(--text-inverse) !important;
  padding: var(--s-2) var(--s-4) !important;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: background var(--transition-base);
}
.nav-cta:hover { background: var(--rcm-orange-soft) !important; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--text-inverse);
  padding: var(--s-2);
  font-size: 1.5rem;
}

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--navy-deep);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s-4);
    border-top: 1px solid var(--navy-line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-menu li { border-bottom: 1px solid var(--navy-line); }
  .nav-menu li:last-child { border-bottom: 0; }
  .nav-menu a { display: block; padding: var(--s-3) 0; }
  .nav-menu a.active::after { display: none; }
  .nav-cta { display: inline-block; margin-top: var(--s-3); }
}

/* ================== Buttons ================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: var(--rcm-orange);
  color: var(--text-inverse);
}
.btn-primary:hover {
  background: var(--rcm-orange-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(233, 75, 29, 0.28);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--text-primary);
}
.btn-secondary:hover { background: var(--text-primary); color: var(--ivory); }
.btn-secondary.on-dark { color: var(--text-inverse); border-color: var(--text-inverse); }
.btn-secondary.on-dark:hover { background: var(--text-inverse); color: var(--text-primary); }

.btn-ghost {
  background: transparent;
  color: var(--rcm-orange);
  padding: var(--s-2) 0;
  border: 0;
  border-bottom: 1px solid var(--rcm-orange);
  border-radius: 0;
}
.btn-ghost:hover { color: var(--rcm-orange-deep); border-color: var(--rcm-orange-deep); }

.btn-arrow::after {
  content: '→';
  display: inline-block;
  transition: transform var(--transition-base);
}
.btn-arrow:hover::after { transform: translateX(4px); }

/* ================== Hero ================== */
.hero {
  background: var(--navy-deep);
  color: var(--text-inverse);
  padding: var(--s-10) 0 var(--s-9);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  border: 1px solid rgba(233, 75, 29, 0.08);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: -150px; right: -150px;
  width: 500px; height: 500px;
  border: 1px solid rgba(233, 75, 29, 0.12);
  border-radius: 50%;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  color: var(--text-inverse);
  max-width: 18ch;
  margin-bottom: var(--s-4);
}
.hero h1 .accent { color: var(--rcm-orange); font-style: italic; }
.hero .lead { color: var(--text-inverse-muted); margin-bottom: var(--s-6); }
.hero-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }

.hero-compact {
  padding: var(--s-8) 0 var(--s-7);
}
.hero-compact h1 { font-size: clamp(2rem, 4vw, 3.25rem); }

/* ================== Service cards ================== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-4);
  margin-top: var(--s-6);
}
.service-card {
  background: var(--ivory-pure);
  border: 1px solid var(--border-soft);
  padding: var(--s-6);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--rcm-orange);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition-slow);
}
.service-card:hover { box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.service-card:hover::before { transform: scaleY(1); }
.service-card-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--rcm-orange);
  margin-bottom: var(--s-3);
  display: block;
}
.service-card h3 { margin-bottom: var(--s-3); }
.service-card p { font-size: 0.96rem; }
.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--rcm-orange);
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: var(--s-3);
}
.service-card-link::after {
  content: '→';
  transition: transform var(--transition-base);
}
.service-card-link:hover::after { transform: translateX(4px); }

/* Service card on dark variant */
.service-grid.on-dark .service-card {
  background: var(--navy-mid);
  border-color: var(--navy-line);
}
.service-grid.on-dark .service-card h3 { color: var(--text-inverse); }
.service-grid.on-dark .service-card p { color: var(--text-inverse-muted); }

/* ================== Two-column ================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-7);
  align-items: center;
}
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: var(--s-5); }
}
.two-col.text-on-left .col-text { padding-right: var(--s-4); }

/* ================== Stats / Numbers ================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-5);
  margin-top: var(--s-6);
}
.stat-item {
  text-align: left;
  padding-left: var(--s-4);
  border-left: 2px solid var(--rcm-orange);
}
.stat-item .num {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 350;
  line-height: 1;
  display: block;
  margin-bottom: var(--s-2);
  color: var(--text-primary);
}
.section-dark .stat-item .num { color: var(--text-inverse); }
.stat-item .label {
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.section-dark .stat-item .label { color: var(--text-inverse-muted); }

/* ================== Process timeline ================== */
.process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-5);
  margin-top: var(--s-6);
}
.process-step {
  position: relative;
  padding-top: var(--s-5);
  border-top: 1px solid var(--border-medium);
}
.section-dark .process-step { border-top-color: var(--navy-line); }
.process-step .step-num {
  position: absolute;
  top: -2px;
  left: 0;
  background: var(--rcm-orange);
  color: var(--text-inverse);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  transform: translateY(-50%);
}
.process-step h4 { margin-bottom: var(--s-2); }
.process-step p { font-size: 0.94rem; margin: 0; }

/* ================== Quote / pull ================== */
.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.3;
  font-weight: 350;
  font-style: italic;
  border-left: 3px solid var(--rcm-orange);
  padding-left: var(--s-5);
  margin: var(--s-6) 0;
  max-width: 32ch;
}

/* ================== List with check ================== */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature-list li {
  padding-left: var(--s-5);
  position: relative;
  margin-bottom: var(--s-3);
  color: var(--text-secondary);
  line-height: 1.6;
}
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 16px; height: 1px;
  background: var(--rcm-orange);
}
.section-dark .feature-list li { color: var(--text-inverse-muted); }

/* ================== Insight cards ================== */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--s-4);
}
.insight-card {
  background: var(--ivory-pure);
  border: 1px solid var(--border-soft);
  padding: var(--s-5);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}
.insight-card:hover { box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.insight-meta {
  display: flex;
  gap: var(--s-3);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}
.insight-meta .tag {
  color: var(--rcm-orange);
  font-weight: 600;
}
.insight-card h3 {
  font-size: 1.35rem;
  margin-bottom: var(--s-3);
}
.insight-card p { font-size: 0.95rem; flex: 1; }
.insight-card .read-more {
  color: var(--rcm-orange);
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: var(--s-3);
}

/* ================== Form ================== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
}
.form-row { display: flex; flex-direction: column; gap: var(--s-2); }
.form-row.full { grid-column: 1 / -1; }
.form-row label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: var(--s-3);
  border: 1px solid var(--border-medium);
  background: var(--ivory-pure);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color var(--transition-base);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 0;
  border-color: var(--rcm-orange);
}
.form-row textarea { min-height: 140px; resize: vertical; }
.form-actions { margin-top: var(--s-5); }

/* ================== CTA strip ================== */
.cta-strip {
  background: var(--navy-deep);
  color: var(--text-inverse);
  padding: var(--s-7) 0;
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--rcm-orange);
}
.cta-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.cta-strip h2 {
  color: var(--text-inverse);
  margin: 0;
  max-width: 22ch;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

/* ================== Footer ================== */
.site-footer {
  background: #050D17;
  color: var(--text-inverse-muted);
  padding: var(--s-7) 0 var(--s-4);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--s-5);
  margin-bottom: var(--s-6);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand img { height: 48px; margin-bottom: var(--s-3); }
.footer-brand p { color: var(--text-inverse-muted); font-size: 0.9rem; max-width: 32ch; }
.footer-col h4 {
  color: var(--text-inverse);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--s-3);
  font-family: var(--font-body);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: var(--s-2); }
.footer-col a { color: var(--text-inverse-muted); }
.footer-col a:hover { color: var(--rcm-orange); }
.footer-bottom {
  border-top: 1px solid var(--navy-line);
  padding-top: var(--s-4);
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-inverse-muted);
  flex-wrap: wrap;
  gap: var(--s-3);
}

/* ================== Utilities ================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: var(--s-3); }
.mb-5 { margin-bottom: var(--s-5); }
.divider {
  height: 1px;
  background: var(--border-soft);
  border: 0;
  margin: var(--s-7) 0;
}
.section-dark .divider { background: var(--navy-line); }

/* ================== Scroll animation hook ================== */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
