/* ============================================================
   RC South — Homepage Styles
   Loaded only on the home page (page.home()).
   Builds on top of blades.min.css / theme.css / custom.css.
   ============================================================ */

/* ---------- Full-bleed layout (home overrides body-wrapper) ---------- */
#body-wrapper {
  padding: 0;
}

#body-wrapper > .container {
  max-width: none;
  padding: 0;
}

/* ============================================================
   Hero
   ============================================================ */

.home-hero {
  position: relative;
  /* Decorative layers (very low opacity, corners only):
     1. PCB circuit traces + pads (electronics theme, white)
     2. Radio-wave arcs echoing the logo symbol (brand orange)
     then the navy gradient underneath.
     SVG art lives in CSS vars so light and dark themes share it. */
  --hero-circuit: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='460'%20height='460'%20viewBox='0%200%20460%20460'%20fill='none'%3E%3Cg%20stroke='rgba(255,255,255,0.16)'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M8%20452V380L96%20292V160'/%3E%3Cpath%20d='M140%208v92l96%2096v120'/%3E%3Cpath%20d='M268%20452v-72l84-84h100'/%3E%3Cpath%20d='M360%208v48l92%2092'/%3E%3Cpath%20d='M8%20230h64l44-44'/%3E%3Cpath%20d='M452%20210h-80l-56%2056v96'/%3E%3C/g%3E%3Cg%20fill='rgba(255,255,255,0.26)'%3E%3Ccircle%20cx='96'%20cy='160'%20r='5'/%3E%3Ccircle%20cx='236'%20cy='316'%20r='5'/%3E%3Ccircle%20cx='452'%20cy='296'%20r='5'/%3E%3Ccircle%20cx='452'%20cy='148'%20r='5'/%3E%3Ccircle%20cx='116'%20cy='186'%20r='5'/%3E%3Ccircle%20cx='316'%20cy='262'%20r='5'/%3E%3C/g%3E%3Cg%20fill='rgba(255,255,255,0.14)'%20stroke='rgba(255,255,255,0.18)'%20stroke-width='1.5'%3E%3Crect%20x='168'%20y='196'%20width='44'%20height='32'%20rx='4'/%3E%3Crect%20x='262'%20y='96'%20width='36'%20height='24'%20rx='3'/%3E%3C/g%3E%3C/svg%3E");
  --hero-arcs: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='380'%20height='380'%20viewBox='0%200%20380%20380'%20fill='none'%3E%3Cg%20stroke='rgba(253,62,4,0.24)'%20stroke-linecap='round'%3E%3Cpath%20d='M0%20316A64%2064%200%200%201%2064%20380'%20stroke-width='22'/%3E%3Cpath%20d='M0%20256A124%20124%200%200%201%20124%20380'%20stroke-width='30'/%3E%3Cpath%20d='M0%20180A200%20200%200%200%201%20200%20380'%20stroke-width='38'/%3E%3C/g%3E%3Ccircle%20cx='0'%20cy='380'%20r='10'%20fill='rgba(253,62,4,0.34)'/%3E%3C/svg%3E");
  background:
    var(--hero-circuit) no-repeat top 3.5rem right 2.5rem / 440px 440px,
    var(--hero-arcs) no-repeat bottom 1.5rem left 1.5rem / 340px 340px,
    linear-gradient(160deg, var(--rc-navy) 0%, var(--rc-navy-light) 55%, var(--rc-navy) 100%);
  color: var(--rc-white);
  padding: 6rem 0;
  overflow: hidden;
  text-align: center;
}

/* subtle blueprint grid */
.home-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, black 25%, transparent 72%);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, black 25%, transparent 72%);
  pointer-events: none;
}

/* orange glow */
.home-hero__glow {
  position: absolute;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 62, 4, 0.32) 0%, transparent 62%);
  top: -240px;
  right: -140px;
  filter: blur(48px);
  pointer-events: none;
}

.home-hero__inner {
  position: relative;
  z-index: 1;
}

.home-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rc-orange);
}

.home-hero__kicker::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--rc-orange);
}

.home-hero__title {
  margin: 0 auto 1rem;
  max-width: 860px;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--rc-white);
}

.home-hero__subtitle {
  margin: 0 auto;
  max-width: 680px;
  font-size: 1.08rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.74);
}

.home-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.25rem;
}

.home-hero__cta {
  white-space: nowrap;
  font-weight: 700;
}

/* Primary CTA — orange gradient + navy text.
   Navy on #FD3E04 is ~6.2:1 (WCAG AA passes; white is only ~2.6:1).
   Navy text also softens the orange-vs-navy clash the white text had.
   !important needed: custom.css's global `.btn` rule uses it. */
.home-hero__cta--primary {
  background: linear-gradient(
    135deg,
    color-mix(in oklab, var(--rc-orange) 82%, white 18%) 0%,
    var(--rc-orange) 55%,
    color-mix(in oklab, var(--rc-orange) 72%, black 28%) 100%
  ) !important;
  color: var(--rc-navy) !important;
  border: none !important;
  box-shadow: 0 10px 26px color-mix(in oklab, var(--rc-orange) 40%, transparent) !important;
}

.home-hero__cta--primary:hover {
  background: linear-gradient(
    135deg,
    color-mix(in oklab, var(--rc-orange) 90%, white 10%) 0%,
    var(--rc-orange) 55%,
    color-mix(in oklab, var(--rc-orange) 78%, black 22%) 100%
  ) !important;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px color-mix(in oklab, var(--rc-orange) 48%, transparent) !important;
  opacity: 1;
}

/* Ghost CTA — transparent over the navy hero. Fixed #fff on purpose
   (--rc-white goes dark in dark mode; the hero surface is always navy). */
.home-hero__cta--ghost {
  background: transparent !important;
  border: 1.5px solid rgba(255, 255, 255, 0.5) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.home-hero__cta--ghost:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  opacity: 1;
}

.home-hero__cta--primary:active,
.home-hero__cta--ghost:active {
  transform: translateY(0);
}

.home-hero__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 920px;
  margin: 3.5rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.home-hero__stat {
  flex: 1;
  min-width: 150px;
  padding: 0 1rem;
}

.home-hero__stat-value {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--rc-orange);
}

.home-hero__stat-label {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.62);
}

/* ============================================================
   Sections (shared)
   ============================================================ */

.home-section-title {
  margin: 0 0 2rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.home-section-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--rc-orange);
  margin-top: 0.75rem;
}

.home-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.home-section-head .home-section-title {
  margin: 0;
}

.home-section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ============================================================
   Categories
   ============================================================ */

.home-categories__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.home-cat-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.5rem;
  background: var(--rc-white);
  border: 1px solid var(--rc-light-grey);
  border-radius: 16px;
  text-decoration: none;
  color: var(--rc-dark);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.home-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 6, 85, 0.12);
  border-color: color-mix(in oklab, var(--rc-orange) 45%, transparent);
}

.home-cat-card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 1.2rem;
  color: var(--rc-orange);
  background: color-mix(in oklab, var(--rc-orange) 12%, var(--rc-white));
}

.home-cat-card__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rc-dark);
}

.home-cat-card__text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--rc-grey);
}

/* ============================================================
   Value props
   ============================================================ */

.home-features {
  background: var(--rc-bg);
}

.home-features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.home-feature {
  padding: 2rem 1.5rem 1.75rem;
  background: var(--rc-white);
  border: 1px solid var(--rc-light-grey);
  border-radius: 16px;
  text-align: center;
}

.home-feature__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  font-size: 1.35rem;
  color: var(--rc-orange);
  background: color-mix(in oklab, var(--rc-orange) 12%, var(--rc-white));
}

.home-feature__title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--rc-dark);
}

.home-feature__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--rc-grey);
}

/* ============================================================
   Rent CTA
   ============================================================ */

.home-rent__banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem 3.5rem;
  border-radius: 24px;
  background: linear-gradient(
    120deg,
    var(--rc-orange),
    color-mix(in oklab, var(--rc-orange) 62%, white 38%)
  );
  color: var(--rc-white);
  overflow: hidden;
}

.home-rent__banner::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  top: -130px;
  right: -90px;
  pointer-events: none;
}

.home-rent__text {
  position: relative;
  z-index: 1;
}

.home-rent__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--rc-white);
}

.home-rent__body {
  margin: 0;
  max-width: 540px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.home-rent__cta {
  position: relative;
  z-index: 1;
  flex: none;
  background: var(--rc-navy);
  color: var(--rc-white);
  box-shadow: 0 10px 26px rgba(0, 6, 85, 0.35);
}

.home-rent__cta:hover {
  background: var(--rc-navy-light);
  opacity: 1;
}

/* ============================================================
   Contacts
   ============================================================ */

.home-contacts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.home-contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--rc-white);
  border: 1px solid var(--rc-light-grey);
  border-radius: 16px;
}

.home-contact-card__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.05rem;
  color: var(--rc-navy);
  background: color-mix(in oklab, var(--rc-navy) 9%, var(--rc-white));
}

.home-contact-card__label {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rc-grey);
}

.home-contact-card__value {
  display: block;
  font-weight: 600;
  color: var(--rc-dark);
  text-decoration: none;
}

a.home-contact-card__value:hover {
  color: var(--rc-orange);
}

/* ============================================================
   History
   ============================================================ */

.home-history__inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.home-history__inner p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--rc-grey);
}

.home-history .home-section-title::after {
  margin-inline: auto;
}

/* ============================================================
   Dark mode
   ============================================================ */

:root[data-theme='dark'] .home-hero {
  background:
    var(--hero-circuit) no-repeat top 3.5rem right 2.5rem / 440px 440px,
    var(--hero-arcs) no-repeat bottom 1.5rem left 1.5rem / 340px 340px,
    linear-gradient(160deg, #000440 0%, #0A1A7A 55%, #000440 100%);
}

:root[data-theme='dark'] .home-cat-card,
:root[data-theme='dark'] .home-feature,
:root[data-theme='dark'] .home-contact-card {
  background: var(--rc-white);
  border-color: var(--rc-light-grey);
}

:root[data-theme='dark'] .home-cat-card__icon,
:root[data-theme='dark'] .home-feature__icon {
  background: color-mix(in oklab, var(--rc-orange) 22%, transparent);
}

:root[data-theme='dark'] .home-contact-card__icon {
  background: rgba(255, 255, 255, 0.08);
  color: #E0E0E0;
}

/* --rc-grey stays dark in dark mode — override muted text for contrast */
:root[data-theme='dark'] .home-cat-card__text,
:root[data-theme='dark'] .home-feature__text,
:root[data-theme='dark'] .home-history__inner p {
  color: #9BA1AD;
}

:root[data-theme='dark'] .home-contact-card__label {
  color: #9BA1AD;
}

:root[data-theme='dark'] .home-rent__cta:hover {
  background: #0A1A7A;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .home-hero {
    padding: 3.5rem 0;
  }

  /* shrink decorative background layers on small screens */
  .home-hero {
    background-size:
      240px 240px,
      220px 220px,
      auto;
    background-position:
      top 1.5rem right 0.5rem,
      bottom 0.5rem left 0.5rem,
      0 0;
  }

  .home-hero__stat {
    flex: none;
    min-width: 44%;
  }

  .home-hero__ctas .btn {
    width: 100%;
  }

  .home-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .home-rent__banner {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .home-rent__cta {
    width: 100%;
  }
}
