/* ============================================
   CMG LOAN SERVICING LLC — style.css
   Aesthetic: Dark Financial Editorial / Red Accent
   ============================================ */

:root {
  --red:        #c8202c;
  --red-deep:   #8b0000;
  --red-glow:   rgba(200, 32, 44, 0.18);
  --red-border: rgba(200, 32, 44, 0.35);
  --bg:         #0a0a0a;
  --bg-2:       #0e0e0e;
  --bg-3:       #141414;
  --bg-card:    #111111;
  --text:       #e8e0d6;
  --text-muted: #7a7168;
  --text-dim:   #4a4540;
  --gold:       #c9aa71;
  --white:      #f5f0ea;
  --border:     rgba(255,255,255,0.07);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Barlow', sans-serif;
  --font-condensed: 'Barlow Condensed', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 2px; }

/* ===== CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  font-family: var(--font-condensed);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  position: relative;
}
.btn--primary {
  background: var(--red);
  color: #fff;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.btn--primary:hover {
  background: #e02030;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(200,32,44,0.4);
}
.btn--ghost {
  border: 1px solid var(--red-border);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--red);
  color: #fff;
  background: var(--red-glow);
}
.btn--full { width: 100%; justify-content: center; }

/* ===== SECTION COMMON ===== */
.section { padding: 120px 0; }
.section-tag {
  font-family: var(--font-condensed);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.section-tag::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--red);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 24px;
}
.section-title em {
  font-style: italic;
  color: var(--red);
}
.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 60px;
}
.section-header {
  text-align: center;
  margin-bottom: 72px;
}
.section-header .section-title { margin-bottom: 16px; }
.section-header .section-tag {
  justify-content: center;
}
.section-header .section-tag::before { display: none; }

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal--delay-1 { transition-delay: 0.15s; }
.reveal--delay-2 { transition-delay: 0.3s; }
.reveal--delay-3 { transition-delay: 0.45s; }

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 48px;
  height: 72px;
  display: flex;
  align-items: center;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s ease;
}
.header.scrolled {
  border-bottom-color: var(--red-border);
}
.header__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo__cmg {
  font-family: var(--font-condensed);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--red);
}
.logo__divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}
.logo__sub {
  font-family: var(--font-condensed);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  line-height: 1.3;
  text-transform: uppercase;
}
.logo__sub em { font-style: normal; color: var(--red); }

/* Nav */
.nav { display: flex; align-items: center; gap: 36px; }
.nav__link {
  font-family: var(--font-condensed);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.25s;
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--red);
  transition: width 0.3s ease;
}
.nav__link:hover { color: var(--white); }
.nav__link:hover::after { width: 100%; }
.nav__link--cta {
  color: #fff;
  background: var(--red);
  padding: 8px 20px;
  letter-spacing: 0.1em;
}
.nav__link--cta::after { display: none; }
.nav__link--cta:hover { background: #e02030; color: #fff; }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s ease;
}
.burger.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 48px 80px;
  overflow: hidden;
  background: var(--bg);
}

/* Noise texture overlay */
.hero__noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Grid lines */
.hero__grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

/* Red glow bottom left */
.hero::before {
  content: '';
  position: absolute;
  bottom: -100px; left: -100px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(200,32,44,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero__content {
  max-width: 700px;
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-condensed);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,32,44,0.6); }
  50% { box-shadow: 0 0 0 6px rgba(200,32,44,0); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 300;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 32px;
  letter-spacing: -0.01em;
}
.hero__title em {
  font-style: italic;
  color: var(--red);
  position: relative;
}

.hero__desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 44px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Badge */
.hero__badge {
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.hero__badge-inner {
  width: 180px; height: 180px;
  border: 1px solid var(--red-border);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 24px;
  position: relative;
  animation: rotateBadge 20s linear infinite;
}
.hero__badge-inner::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px dashed rgba(200,32,44,0.2);
  border-radius: 50%;
  animation: rotateBadge 12s linear infinite reverse;
}
@keyframes rotateBadge {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.hero__badge-line {
  display: block;
  font-family: var(--font-condensed);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.3;
  animation: rotateBadge 20s linear infinite reverse;
}
.hero__badge-line--large {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0;
  animation: rotateBadge 20s linear infinite reverse;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 40px; left: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-condensed);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hero__scroll-line {
  width: 48px; height: 1px;
  background: var(--text-dim);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--red);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  to { left: 100%; }
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.about__layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 100px;
  align-items: start;
}
.about__left {
  position: sticky;
  top: 100px;
}
.about__text {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.85;
  margin-bottom: 20px;
}
.about__pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.pillar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pillar__icon {
  color: var(--red);
  font-size: 10px;
  flex-shrink: 0;
}
.pillar__text {
  font-family: var(--font-condensed);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.about__stripe {
  position: absolute;
  top: 0; right: 0;
  width: 4px; height: 100%;
  background: linear-gradient(to bottom, transparent, var(--red), transparent);
  opacity: 0.5;
}

/* ============================================
   SERVICES
   ============================================ */
.services { background: var(--bg); }
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.service-card {
  background: var(--bg-card);
  padding: 44px 36px;
  position: relative;
  overflow: hidden;
  transition: background 0.35s ease;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.service-card:hover { background: #161616; }
.service-card:hover::before { transform: scaleX(1); }

.service-card__number {
  font-family: var(--font-condensed);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--red);
  margin-bottom: 20px;
}
.service-card__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 14px;
  line-height: 1.2;
}
.service-card__text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
}
.service-card__arrow {
  position: absolute;
  bottom: 28px; right: 28px;
  font-size: 18px;
  color: var(--text-dim);
  transition: all 0.3s ease;
}
.service-card:hover .service-card__arrow {
  color: var(--red);
  transform: translate(4px, -4px);
}

/* ============================================
   INDUSTRIES
   ============================================ */
.industries {
  background: var(--bg-3);
  position: relative;
}
.industries::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--red-border), transparent);
}
.industries__layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 100px;
  align-items: start;
}
.industries__left {
  position: sticky;
  top: 100px;
}
.industries__desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-top: 8px;
}
.industry-item {
  display: flex;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.3s ease;
}
.industry-item:first-child { border-top: 1px solid var(--border); }
.industry-item:hover { padding-left: 10px; }
.industry-item__icon {
  color: var(--red);
  font-size: 12px;
  margin-top: 4px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.industry-item:hover .industry-item__icon { transform: translateX(4px); }
.industry-item__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 6px;
}
.industry-item__text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================
   FAQ
   ============================================ */
.faq { background: var(--bg-2); }
.faq__list {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  text-align: left;
  gap: 20px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  transition: color 0.25s;
}
.faq-item__q:hover { color: var(--white); }
.faq-item__q[aria-expanded="true"] { color: var(--red); }
.faq-item__icon {
  font-size: 22px;
  color: var(--text-dim);
  flex-shrink: 0;
  font-family: var(--font-condensed);
  transition: all 0.3s ease;
  line-height: 1;
}
.faq-item__q[aria-expanded="true"] .faq-item__icon {
  transform: rotate(45deg);
  color: var(--red);
}
.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease;
}
.faq-item__a-inner {
  padding: 0 0 28px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: '';
  position: absolute;
  top: 0; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(200,32,44,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.contact__layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 100px;
  align-items: start;
}
.contact__desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 48px;
}
.contact__info { display: flex; flex-direction: column; gap: 28px; }
.contact__info-label {
  font-family: var(--font-condensed);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}
.contact__info-value {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  transition: color 0.25s;
}
a.contact__info-value:hover { color: var(--red); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 24px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label {
  font-family: var(--font-condensed);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  padding: 14px 18px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
}
.form-input::placeholder { color: var(--text-dim); }
.form-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,32,44,0.1);
}
.form-textarea { resize: vertical; min-height: 130px; }
.form-success {
  display: none;
  font-family: var(--font-condensed);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  text-align: center;
  padding: 12px;
}
.form-success.visible { display: block; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #060606;
  border-top: 1px solid var(--border);
  padding: 32px 48px;
}
.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__copy {
  font-family: var(--font-condensed);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .hero__badge { display: none; }
}
@media (max-width: 900px) {
  .container { padding: 0 28px; }
  .header { padding: 0 28px; }
  .about__layout,
  .industries__layout,
  .contact__layout { grid-template-columns: 1fr; gap: 48px; }
  .about__left,
  .industries__left { position: static; }
  .section { padding: 80px 0; }
  .services__grid { grid-template-columns: 1fr; }
  .nav {
    display: none;
    position: fixed;
    inset: 72px 0 0;
    background: rgba(10,10,10,0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    backdrop-filter: blur(20px);
  }
  .nav.open { display: flex; }
  .nav__link { font-size: 18px; letter-spacing: 0.1em; }
  .nav__link--cta { padding: 14px 40px; }
  .burger { display: flex; }
  .hero { padding: 100px 28px 70px; }
  .hero__scroll { left: 28px; }
  .footer { padding: 28px; }
}
@media (max-width: 540px) {
  .hero__title { font-size: 48px; }
  .hero__actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .about__pillars { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; text-align: center; }
}
