/* ============================================================
   RCM Group — main stylesheet
   ============================================================ */

:root {
  --indigo-dark: #272264;
  --indigo: #3d3787;
  --indigo-pill: #514aa8;
  --amber: #f5c06a;
  --amber-dark: #5a3c0a;
  --cream: #f5f1e8;
  --lavender: #e9e8f8;
  --ink: #2b2b3a;
  --muted: #5b5b70;

  --blue: #1d5fa8;
  --blue-bg: #e7f1fb;
  --orange: #d95f2b;
  --orange-bg: #fcece2;
  --green: #1e9e63;
  --green-bg: #e3f5ec;
  --gold: #b07d1e;
  --whatsapp: #1fa05a;

  --radius: 14px;
  --shadow: 0 6px 24px rgba(39, 34, 100, 0.10);
  --shadow-hover: 0 14px 34px rgba(39, 34, 100, 0.18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

img, svg { display: block; }

a { text-decoration: none; color: inherit; }

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.85rem 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn:active { transform: translateY(0); }

.btn-amber { background: var(--amber); color: var(--amber-dark); }

.btn-card {
  color: #fff;
  font-size: 0.85rem;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
}
.btn-blue   { background: var(--blue); }
.btn-orange { background: var(--orange); }
.btn-green  { background: var(--green); }

.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.08); }
.btn-contact { padding: 0.8rem 1.8rem; }

/* ============ Navbar ============ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--indigo-dark);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.brand-logo {
  background: #fff;
  color: var(--indigo-dark);
  font-family: "Poppins", var(--font);
  font-weight: 800;
  font-size: 1.15rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  letter-spacing: 0.05em;
}
.brand-name {
  color: #fff;
  font-family: "Poppins", var(--font);
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  color: #cfcde8;
  font-weight: 500;
  font-size: 0.97rem;
  position: relative;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: var(--amber); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--amber);
  transition: width 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* ---- Navbar cyclist animation ---- */
.cyclist-track {
  position: relative;
  flex: 1;
  align-self: stretch;
  margin: 0 2rem;
  overflow: hidden;
}

.cyclist {
  position: absolute;
  bottom: 1px;
  left: -80px;
  animation: ride 10s linear infinite;
}

@keyframes ride {
  from { left: -80px; }
  to   { left: 100%; }
}

/* spinning wheels */
.wheel {
  transform-box: fill-box;
  transform-origin: center;
  animation: wheel-spin 0.7s linear infinite;
}
@keyframes wheel-spin {
  to { transform: rotate(360deg); }
}

/* the fat rider bobs as he pedals */
.rider {
  animation: rider-bob 0.55s ease-in-out infinite alternate;
}
@keyframes rider-bob {
  from { transform: translateY(0); }
  to   { transform: translateY(-1.6px); }
}

/* legs pedaling in opposite phases */
.leg-front, .leg-back {
  transform-box: fill-box;
  transform-origin: top left;
  animation: leg-pump 0.7s ease-in-out infinite alternate;
}
.leg-back { animation-direction: alternate-reverse; }
@keyframes leg-pump {
  from { transform: scaleY(1); }
  to   { transform: scaleY(0.84); }
}

@media (prefers-reduced-motion: reduce) {
  .cyclist-track { display: none; }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px; height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ============ Hero ============ */
.hero {
  background: linear-gradient(180deg, var(--indigo) 0%, #3a3380 100%);
  color: #fff;
  text-align: center;
  padding: 5.5rem 0 6.5rem;
}

.hero-pill {
  display: inline-block;
  background: var(--indigo-pill);
  color: #e4e2ff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  padding: 0.55rem 1.6rem;
  border-radius: 999px;
  margin-bottom: 1.8rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 1.4rem;
}

.hero-sub {
  color: #c9c6ea;
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto 2.4rem;
}

/* ============ Section headings ============ */
.eyebrow {
  color: var(--indigo);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: #221f4e;
  margin-bottom: 2.2rem;
}

/* ============ Businesses ============ */
.businesses {
  background: var(--cream);
  padding: 4.5rem 0 5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.biz-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  border-left: 6px solid;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.biz-card > :not(.pipes) { position: relative; z-index: 1; }
.biz-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.biz-blue   { background: var(--blue-bg);   border-color: var(--blue); }
.biz-orange { background: var(--orange-bg); border-color: var(--orange); }
.biz-green  { background: var(--green-bg);  border-color: var(--green); }

.biz-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 1.4rem;
  color: #fff;
}
.biz-icon svg { width: 28px; height: 28px; }
.biz-blue   .biz-icon { background: var(--blue); }
.biz-orange .biz-icon { background: var(--orange); }
.biz-green  .biz-icon { background: var(--green); }

.biz-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}
.biz-blue   h3 { color: var(--blue); }
.biz-orange h3 { color: #a8430f; }
.biz-green  h3 { color: #14704a; }

.biz-card p {
  color: var(--muted);
  font-size: 0.97rem;
  margin-bottom: 1.4rem;
}
.biz-blue   p { color: #3d5a78; }
.biz-orange p { color: #8a5640; }
.biz-green  p { color: #3c6b56; }

/* ---- Card hover/touch effects: pipes, sparks, leaves ---- */
.pipes, .sparks, .leaves {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.pipes span {
  position: absolute;
  top: -80px;
  width: 8px;
  height: 62px;
  border-radius: 5px;
  background: linear-gradient(90deg, #7d97b5 0%, #dcEAf7 45%, #6d88a8 100%);
  box-shadow: 0 2px 5px rgba(29, 95, 168, 0.35);
  opacity: 0;
}

/* spread the pipes across the card with different speeds, delays and tilts */
.pipes span:nth-child(1) { left: 8%;  --tilt: -14deg; animation-duration: 1.5s; animation-delay: 0s; }
.pipes span:nth-child(2) { left: 22%; --tilt: 10deg;  animation-duration: 1.9s; animation-delay: 0.45s; height: 48px; }
.pipes span:nth-child(3) { left: 35%; --tilt: -6deg;  animation-duration: 1.4s; animation-delay: 0.9s; }
.pipes span:nth-child(4) { left: 49%; --tilt: 16deg;  animation-duration: 2.0s; animation-delay: 0.2s; height: 70px; }
.pipes span:nth-child(5) { left: 62%; --tilt: -12deg; animation-duration: 1.6s; animation-delay: 0.7s; height: 52px; }
.pipes span:nth-child(6) { left: 74%; --tilt: 7deg;   animation-duration: 1.8s; animation-delay: 1.1s; }
.pipes span:nth-child(7) { left: 86%; --tilt: -18deg; animation-duration: 1.5s; animation-delay: 0.35s; height: 56px; }
.pipes span:nth-child(8) { left: 94%; --tilt: 12deg;  animation-duration: 2.1s; animation-delay: 0.85s; height: 44px; }

.biz-blue:hover .pipes span,
.biz-blue.fx-active .pipes span {
  animation-name: pipe-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes pipe-fall {
  0%   { transform: translateY(0) rotate(var(--tilt)); opacity: 0; }
  8%   { opacity: 0.8; }
  82%  { opacity: 0.8; }
  100% { transform: translateY(480px) rotate(var(--tilt)); opacity: 0; }
}

/* ---- Grinder sparks (Fabrication card) ---- */
.sparks span {
  position: absolute;
  top: -10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffd166;
  box-shadow: 0 0 8px 2px rgba(255, 140, 40, 0.65);
  opacity: 0;
}

.sparks span:nth-child(1)  { left: 10%; --dx: -22px; animation-duration: 1.3s; animation-delay: 0s; }
.sparks span:nth-child(2)  { left: 20%; --dx: 18px;  animation-duration: 1.7s; animation-delay: 0.5s; width: 4px; height: 4px; }
.sparks span:nth-child(3)  { left: 32%; --dx: -14px; animation-duration: 1.2s; animation-delay: 0.9s; }
.sparks span:nth-child(4)  { left: 44%; --dx: 26px;  animation-duration: 1.8s; animation-delay: 0.25s; width: 5px; height: 5px; }
.sparks span:nth-child(5)  { left: 55%; --dx: -30px; animation-duration: 1.4s; animation-delay: 0.7s; }
.sparks span:nth-child(6)  { left: 66%; --dx: 14px;  animation-duration: 1.6s; animation-delay: 1.1s; width: 4px; height: 4px; }
.sparks span:nth-child(7)  { left: 76%; --dx: -18px; animation-duration: 1.3s; animation-delay: 0.4s; }
.sparks span:nth-child(8)  { left: 86%; --dx: 24px;  animation-duration: 1.9s; animation-delay: 0.8s; width: 5px; height: 5px; }
.sparks span:nth-child(9)  { left: 50%; --dx: 8px;   animation-duration: 1.1s; animation-delay: 1.3s; width: 4px; height: 4px; }
.sparks span:nth-child(10) { left: 28%; --dx: 30px;  animation-duration: 1.5s; animation-delay: 1.5s; }

.biz-orange:hover .sparks span,
.biz-orange.fx-active .sparks span {
  animation-name: spark-fall;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
}

@keyframes spark-fall {
  0%   { transform: translate(0, 0) scale(1); opacity: 0; }
  8%   { opacity: 1; }
  40%  { opacity: 0.7; }
  60%  { opacity: 1; }
  100% { transform: translate(var(--dx), 480px) scale(0.25); opacity: 0; }
}

/* ---- Falling leaves (Farm card) ---- */
.leaves span {
  position: absolute;
  top: -30px;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #3ec98a 0%, #137a4c 100%);
  border-radius: 0 65% 0 65%;
  opacity: 0;
}

.leaves span:nth-child(1) { left: 8%;  animation-duration: 3.2s; animation-delay: 0s; }
.leaves span:nth-child(2) { left: 24%; animation-duration: 4.0s; animation-delay: 0.8s; width: 11px; height: 11px; }
.leaves span:nth-child(3) { left: 40%; animation-duration: 3.5s; animation-delay: 1.6s; }
.leaves span:nth-child(4) { left: 55%; animation-duration: 4.3s; animation-delay: 0.4s; width: 16px; height: 16px; }
.leaves span:nth-child(5) { left: 68%; animation-duration: 3.0s; animation-delay: 1.2s; width: 12px; height: 12px; }
.leaves span:nth-child(6) { left: 82%; animation-duration: 3.8s; animation-delay: 2.0s; }
.leaves span:nth-child(7) { left: 92%; animation-duration: 3.4s; animation-delay: 0.6s; width: 11px; height: 11px; }

.biz-green:hover .leaves span,
.biz-green.fx-active .leaves span {
  animation-name: leaf-fall;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes leaf-fall {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.9; }
  25%  { transform: translate(20px, 120px) rotate(70deg); }
  50%  { transform: translate(-16px, 240px) rotate(150deg); opacity: 0.9; }
  75%  { transform: translate(18px, 360px) rotate(230deg); opacity: 0.85; }
  100% { transform: translate(-12px, 480px) rotate(310deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pipes span, .sparks span, .leaves span { animation: none !important; }
}

.coming-soon {
  margin-top: 2rem;
  border: 2px dashed #b3aede;
  border-radius: var(--radius);
  background: #efeefa;
  padding: 1.4rem;
  text-align: center;
  color: var(--indigo);
  font-weight: 600;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.coming-soon:hover { background: #e7e5f8; border-color: var(--indigo-pill); }

/* ============ Why choose ============ */
.why {
  background: var(--lavender);
  padding: 4.5rem 0 5rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}

.why-card {
  background: #fff;
  border-radius: 10px;
  border-top: 5px solid;
  padding: 1.7rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.why-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.why-card svg {
  width: 30px; height: 30px;
  margin-bottom: 1rem;
}

.why-blue   { border-color: var(--blue); }
.why-orange { border-color: var(--orange); }
.why-green  { border-color: var(--green); }
.why-amber  { border-color: var(--gold); }

.why-blue   svg, .why-blue   h3 { color: var(--blue); }
.why-orange svg, .why-orange h3 { color: var(--orange); }
.why-green  svg, .why-green  h3 { color: var(--green); }
.why-amber  svg, .why-amber  h3 { color: var(--gold); }

.why-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.why-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ============ Footer ============ */
.footer {
  background: var(--indigo-dark);
  color: #fff;
  padding: 4rem 0 2.5rem;
}

.footer-title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

.footer-sub {
  color: #c9c6ea;
  margin-bottom: 1.8rem;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-rule {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 2.5rem 0 1.5rem;
}

.footer-copy {
  color: #a39fd0;
  font-size: 0.9rem;
}

/* ============ Contact modal ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 17, 55, 0.65);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 2.2rem 2rem 2rem;
  width: min(460px, 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #221f4e;
}
.modal-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.2rem 0 1.4rem;
}

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #9a97b8;
  cursor: pointer;
  transition: color 0.2s ease;
}
.modal-close:hover { color: #221f4e; }

.modal-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.modal-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: left;
  font-family: inherit;
  background: #fff;
  border: 1.5px solid #e4e2f0;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.modal-option:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.opt-blue:hover   { border-color: var(--blue);   background: var(--blue-bg); }
.opt-orange:hover { border-color: var(--orange); background: var(--orange-bg); }
.opt-green:hover  { border-color: var(--green);  background: var(--green-bg); }

.opt-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
}
.opt-icon svg { width: 22px; height: 22px; }
.opt-blue   .opt-icon { background: var(--blue); }
.opt-orange .opt-icon { background: var(--orange); }
.opt-green  .opt-icon { background: var(--green); }

.opt-text { flex: 1; display: flex; flex-direction: column; }
.opt-text strong { font-size: 0.98rem; color: var(--ink); }
.opt-text small  { color: var(--muted); font-size: 0.8rem; }

.opt-arrow {
  color: #b3b0cc;
  font-size: 1.1rem;
  transition: transform 0.2s ease, color 0.2s ease;
}
.modal-option:hover .opt-arrow { transform: translateX(4px); }
.opt-blue:hover   .opt-arrow { color: var(--blue); }
.opt-orange:hover .opt-arrow { color: var(--orange); }
.opt-green:hover  .opt-arrow { color: var(--green); }

.modal-numbers {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.modal-number {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #e4e2f0;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.modal-number:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--indigo);
  background: var(--lavender);
}
.num-icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--indigo);
  color: #fff;
  border-radius: 9px;
  font-size: 1rem;
}

.modal-back {
  align-self: flex-start;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--indigo);
  background: none;
  border: none;
  padding: 0.3rem 0;
  cursor: pointer;
}
.modal-back:hover { text-decoration: underline; }

/* ============ Reveal-on-scroll ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .card-grid { grid-template-columns: 1fr; }
  .why-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .cyclist-track { display: none; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--indigo-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 360px; box-shadow: 0 14px 24px rgba(0,0,0,0.3); }
  .nav-links a {
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav-links a::after { display: none; }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .hero { padding: 4rem 0 5rem; }
  .hero-pill { font-size: 0.68rem; padding: 0.5rem 1.1rem; }
}

@media (max-width: 540px) {
  .why-grid { grid-template-columns: 1fr; }
  .footer-actions .btn { width: 100%; text-align: center; }
}
