/* =========================================================
   LEDGERS — HOMEPAGE
   File: css/public/home.css
========================================================= */

/* =========================================================
   1. ROUTE TRACE
========================================================= */

.route-trace {
  position: fixed;
  top: 140px;
  left: 34px;
  z-index: 50;
  width: 20px;
  height: 320px;
  opacity: 0;
  pointer-events: none;
}

.route-line {
  position: absolute;
  top: 0;
  left: 8px;
  width: 3px;
  height: 0;
  background: var(--gold);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(247, 221, 131, 0.45);
}

.route-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow:
    0 0 0 6px rgba(247, 221, 131, 0.18),
    0 0 18px rgba(247, 221, 131, 0.55);
}

.route-trace.active {
  opacity: 1;
}

.route-trace.active .route-line {
  animation: draw-route 0.65s ease forwards;
}

.route-trace.active .route-dot {
  animation: travel-route 0.65s ease forwards;
}

@keyframes draw-route {
  to {
    height: 280px;
  }
}

@keyframes travel-route {
  to {
    transform: translateY(280px);
  }
}


/* =========================================================
   2. HERO
========================================================= */

.hero {
  min-height: auto;
  padding: 35px 90px 100px;
  overflow: hidden;
  background: var(--deep-navy);
  color: #fff;
}

.hero-container {
  position: relative;
  max-width: 1400px;
  min-height: 450px;
  margin: 0 auto;
}

.hero-left {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding-top: 50px;
}

.hero-title {
  margin: -50px 0 35px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 70px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
}

.hero-title .title-line {
  display: block;
  overflow: hidden;
}

.hero-title .title-line > span {
  display: block;
  transform: translate3d(0, 110%, 0);
  animation: slide-up-title 1s
    cubic-bezier(0.22, 1, 0.36, 1)
    forwards;
  animation-delay: 0.2s;
  will-change: transform;
}

.hero-title .title-line:nth-child(2) > span {
  animation-delay: 0.38s;
}

@keyframes slide-up-title {
  to {
    transform: translate3d(0, 0, 0);
  }
}

.hero-description {
  margin-bottom: 25px;
  color: #f0f0f0;
  font-size: 22px;
  line-height: 1.8;
}

.hero-highlight {
  margin-bottom: 45px;
  font-size: 22px;
  font-weight: 700;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.hero .primary-btn,
.hero .secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 34px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 0.3s ease,
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.hero .primary-btn {
  background: var(--gold);
  color: var(--navy);
}

.hero .primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(247, 221, 131, 0.18);
}

.hero .secondary-btn {
  border: 1px solid var(--gold);
  background: transparent;
  color: #fff;
  font-weight: 600;
}

.hero .secondary-btn:hover {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-2px);
}

.hero-right {
  position: absolute;
  top: -70px;
  left: 570px;
  z-index: 1;
  pointer-events: none;
}

.map-pixel-wrap {
  position: relative;
  width: 670px;
  height: 670px;
  overflow: hidden;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 38%, #000 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, #000 38%, #000 100%);
}

.map-pixel-wrap .hero-map,
.map-pixel-wrap .pixel-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.map-pixel-wrap .hero-map {
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

.map-pixel-wrap .pixel-map {
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.map-pixel-wrap.revealed .hero-map {
  opacity: 1;
  visibility: visible;
}

.map-pixel-wrap.revealed .pixel-map {
  opacity: 0;
}


/* =========================================================
   3. WHY LEDGERS
========================================================= */

.why-ledgers {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 120px 80px;
  overflow: hidden;
}

.why-ledgers::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(
      to right,
      rgba(246, 246, 246, 0.75),
      rgba(246, 246, 246, 0.15) 25%,
      rgba(246, 246, 246, 0.15) 75%,
      rgba(246, 246, 246, 0.75)
    ),
    linear-gradient(
      to bottom,
      rgba(246, 246, 246, 0.75),
      rgba(246, 246, 246, 0.05) 25%,
      rgba(246, 246, 246, 0.05) 75%,
      rgba(246, 246, 246, 0.75)
    ),
    url("../../assets/map-bg.jpg");
  background-position: center;
  background-size: cover;
  opacity: 0.75;
}

.why-ledgers > * {
  position: relative;
  z-index: 1;
}

.why-left {
  min-width: 0;
}

.section-tag {
  color: var(--gold);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 6px;
  text-transform: uppercase;
}

.info-box {
  width: 700px;
  max-width: 100%;
  margin-top: 25px;
  padding: 50px;
  background: #fff;
  box-shadow: 0 15px 40px rgba(20, 0, 0, 0.08);
}

.info-box p {
  color: var(--navy);
  font-size: 22px;
  line-height: 1.9;
}

.info-box span {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 2px;
}

.why-right {
  display: flex;
  flex-direction: column;
  gap: 35px;
  margin-top: 40px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px 35px;
  background: #fff;
  color: var(--navy);
  font-size: 24px;
  box-shadow: 0 10px 25px rgba(22, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.feature:hover {
  transform: translateX(10px);
  box-shadow: 0 14px 32px rgba(22, 0, 0, 0.12);
}

.pin-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
}


/* =========================================================
   4. HOW WE WORK
========================================================= */

.work-section {
  position: relative;
  padding: 120px 80px;
  overflow: hidden;
  text-align: center;
}

.work-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(246, 246, 246, 1) 0%,
      rgba(246, 246, 246, 0.15) 18%,
      rgba(246, 246, 246, 0.15) 82%,
      rgba(246, 246, 246, 1) 100%
    ),
    url("../../assets/bg.png");
  background-position: center;
  background-size: cover;
  opacity: 0.6;
}

.work-section > * {
  position: relative;
  z-index: 2;
}

.work-section h2 {
  margin: -120px 0 20px;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 72px;
  font-weight: 700;
  text-shadow: 0 3px 12px rgba(255, 255, 255, 0.9);
}

.sub-heading {
  margin-bottom: 50px;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.9);
}

.steps {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 50px;
}

.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 400px;
  min-height: 350px;
  padding: 40px;
  background: #fff;
  border-radius: 25px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.step-card:hover {
  transform: translateY(-10px);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.2),
    0 10px 24px rgba(0, 0, 0, 0.1);
}

.step-icon {
  width: 140px;
  height: 140px;
  margin: -30px 0;
  object-fit: contain;
}

.step-card h3 {
  margin-bottom: 20px;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1.15;
}

.step-card ul {
  flex-grow: 1;
  margin-bottom: 25px;
  padding-left: 25px;
  text-align: left;
}

.step-card li {
  color: var(--navy);
  font-size: 18px;
  line-height: 1.8;
}

.step-card a,
.step-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 14px 34px;
  border: 0;
  border-radius: 999px;
  background: #23236f;
  color: var(--gold);
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.step-card a:hover,
.step-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(35, 35, 111, 0.2);
}


/* =========================================================
   5. HOMEPAGE CONTACT FORM
========================================================= */

#contact {
  scroll-margin-top: 20px;
}

.contact-section {
  padding: 80px 40px;
  background: var(--deep-navy);
}

.contact-container {
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  padding: 40px 50px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

.contact-container h2 {
  margin-bottom: 25px;
  color: var(--navy);
  font-size: 38px;
}

.contact-section form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-section .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.contact-section .field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-section .phone-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
}

.contact-section .phone-row .error {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.contact-section fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.contact-section legend {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.contact-section .services-label {
  margin: 20px 0 -5px;
  color: var(--navy);
  font-size: 18px;
  font-weight: 600;
  text-align: left;
}

.contact-section .services-label span {
  color: var(--text-muted);
  font-weight: 400;
}

.contact-section .checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 40px;
  margin-top: 12px;
}

.contact-section .checkbox-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  color: var(--navy);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.25s ease;
}

.contact-section .checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  accent-color: var(--gold);
  cursor: pointer;
}

.contact-section .checkbox-group label:hover,
.contact-section .checkbox-group label:has(input:checked) {
  color: var(--gold-dark);
}

.contact-section input:not([type="checkbox"]),
.contact-section textarea,
.contact-section select {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  outline: none;
  background: #fafafa;
  color: var(--navy);
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.contact-section input:not([type="checkbox"]):focus,
.contact-section textarea:focus,
.contact-section select:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(247, 221, 131, 0.15);
}

.contact-section textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-section .yellow-btn,
.contact-section .contact-submit {
  width: fit-content;
  align-self: flex-start;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease;
}

.contact-section .yellow-btn:hover,
.contact-section .contact-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.contact-section .yellow-btn:disabled,
.contact-section .contact-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.contact-section .error {
  height: 0;
  overflow: hidden;
  color: #b00020;
  font-size: 13px;
  transition:
    height 0.2s ease,
    margin-top 0.2s ease;
}

.contact-section .error:not(:empty) {
  height: 16px;
  margin-top: 5px;
}

.contact-section #messageCounter {
  margin-top: 0;
  color: var(--text-muted);
  font-size: 13px;
}


/* =========================================================
   6. SCROLL REVEALS
========================================================= */

.home-reveal {
  opacity: 0;
  transition:
    opacity 0.55s ease,
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity;
}

.home-reveal.reveal-up {
  transform: translateY(30px);
}

.home-reveal.reveal-left {
  transform: translateX(-30px);
}

.home-reveal.reveal-right {
  transform: translateX(30px);
}

.home-reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}


/* =========================================================
   7. FORM STATES
========================================================= */

#reachOutForm .input-error {
  border-color: #c84545;
}

/*#reachOutForm .checkbox-group.has-error {
  outline: 1px solid #c84545;
  outline-offset: 8px;
  border-radius: 4px;
}*/

#reachOutForm .form-status {
  margin: 5px 0 0;
  padding: 12px 16px;
  border-radius: 6px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

#reachOutForm .form-status-success {
  background: var(--gold);
  color: var(--navy);
}

#reachOutForm .form-status-error {
  background: #ffe7e7;
  color: #8b2020;
}

#reachOutForm .yellow-btn.is-loading {
  opacity: 0.75;
  cursor: wait;
}


/* =========================================================
   8. RESPONSIVE
========================================================= */

@media (max-width: 1200px) {
  .hero {
    padding-right: 60px;
    padding-left: 60px;
  }

  .hero-right {
    left: 48%;
  }

  .map-pixel-wrap {
    width: 620px;
    height: 620px;
  }

  .why-ledgers {
    gap: 40px;
    padding-right: 50px;
    padding-left: 50px;
  }

  .info-box {
    width: 620px;
  }

  .steps {
    gap: 28px;
  }

  .step-card {
    width: calc(33.333% - 19px);
    max-width: 400px;
  }
}

@media (max-width: 1024px) {
  .hero {
    padding: 35px 45px 80px;
  }

  .hero-container {
    min-height: 540px;
  }

  .hero-left {
    max-width: 590px;
  }

  .hero-title {
    font-size: 58px;
  }

  .hero-description,
  .hero-highlight {
    font-size: 19px;
  }

  .hero-right {
    top: -15px;
    left: 48%;
  }

  .map-pixel-wrap {
    width: 540px;
    height: 540px;
  }

  .why-ledgers {
    flex-direction: column;
    align-items: stretch;
    padding: 90px 45px;
  }

  .info-box {
    width: 100%;
  }

  .why-right {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
  }

  .feature:hover {
    transform: translateY(-4px);
  }

  .work-section {
    padding: 100px 45px;
  }

  .work-section h2 {
    margin-top: -90px;
    font-size: 60px;
  }

  .sub-heading {
    font-size: 36px;
  }

  .steps {
    flex-wrap: wrap;
  }

  .step-card {
    width: calc(50% - 15px);
    max-width: 440px;
  }
}

@media (max-width: 768px) {
  .route-trace {
    display: none;
  }

  .hero {
    padding: 28px 24px 70px;
  }

  .hero-container {
    min-height: auto;
  }

  .hero-left {
    max-width: 100%;
    padding-top: 30px;
  }

  .hero-title {
    margin-top: 0;
    font-size: clamp(45px, 11vw, 58px);
    letter-spacing: -1px;
  }

  .hero-description {
    font-size: 18px;
    line-height: 1.7;
  }

  .hero-highlight {
    font-size: 18px;
  }

  .hero-buttons {
    position: relative;
    z-index: 3;
  }

  .hero-right {
    position: relative;
    top: auto;
    left: auto;
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
  }

  .map-pixel-wrap {
    width: min(520px, 115vw);
    height: auto;
  }

  .why-ledgers {
    padding: 80px 24px;
  }

  .section-tag {
    font-size: 18px;
    letter-spacing: 4px;
  }

  .info-box {
    padding: 34px 28px;
  }

  .info-box p {
    font-size: 19px;
    line-height: 1.75;
  }

  .feature {
    padding: 22px 24px;
    font-size: 20px;
  }

  .work-section {
    padding: 90px 24px;
  }

  .work-section h2 {
    margin-top: -70px;
    font-size: clamp(44px, 10vw, 58px);
  }

  .sub-heading {
    margin-bottom: 38px;
    font-size: 31px;
  }

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .step-card {
    width: 100%;
    max-width: 500px;
  }

  .contact-section {
    padding: 60px 24px;
  }

  .contact-container {
    padding: 34px 28px;
  }

  .contact-section .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero-title {
    margin-bottom: 25px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero .primary-btn,
  .hero .secondary-btn {
    width: 100%;
  }

  .map-pixel-wrap {
    width: 125vw;
    margin-left: -12vw;
  }

  .why-ledgers {
    padding-right: 18px;
    padding-left: 18px;
  }

  .info-box {
    padding: 28px 22px;
  }

  .why-right {
    gap: 20px;
  }

  .feature {
    gap: 14px;
    padding: 20px;
    font-size: 18px;
  }

  .pin-icon {
    width: 28px;
    height: 28px;
  }

  .work-section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .step-card {
    min-height: auto;
    padding: 32px 24px;
  }

  .step-card h3 {
    font-size: 29px;
  }

  .step-card li {
    font-size: 16px;
  }

  .contact-section {
    padding: 50px 16px;
  }

  .contact-container {
    padding: 30px 20px;
  }

  .contact-container h2 {
    font-size: 32px;
  }

  .contact-section .phone-row {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .contact-section .checkbox-group {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .contact-section .yellow-btn,
  .contact-section .contact-submit {
    width: 100%;
    align-self: stretch;
  }
}


/* =========================================================
   9. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .route-trace,
  .route-line,
  .route-dot,
  .hero-title .title-line > span,
  .feature,
  .step-card,
  .hero .primary-btn,
  .hero .secondary-btn,
  .home-reveal {
    animation: none;
    transition: none;
  }

  .hero-title .title-line > span,
  .home-reveal {
    opacity: 1;
    transform: none;
  }
}