/* =========================================================
   HOME 02: EMARK HERO
   File: /assets/css/hero.css

   Built for:
   - Fast LCP
   - No hero image
   - No framework
   - No JavaScript
   - No external icons
   - Reduced-motion support
   ========================================================= */

:root {
  --hero-blue: #083E7F;
  --hero-blue-dark: #052C59;
  --hero-green: #00A86B;
  --hero-green-dark: #008959;
  --hero-ink: #172238;
  --hero-text: #5D6878;
  --hero-line: #E7EDF4;
  --hero-soft: #F6F9FC;
  --hero-white: #FFFFFF;
  --hero-max: 1220px;
}

/* Main hero */
.emark-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 690px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(180deg, #fbfdff 0%, #f8fbfe 52%, #ffffff 100%);
  border-bottom: 1px solid var(--hero-line);
}

.emark-hero__container {
  width: min(calc(100% - 40px), var(--hero-max));
  margin-inline: auto;
  padding: 86px 0 92px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(460px, 0.98fr);
  gap: 74px;
  align-items: center;
}

/* Background */
.emark-hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.emark-hero__grid {
  position: absolute;
  inset: 0 0 0 52%;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(8, 62, 127, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 62, 127, 0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to right, transparent 0%, #000 24%, #000 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 24%, #000 100%);
}

.emark-hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
}

.emark-hero__glow--blue {
  width: 430px;
  height: 430px;
  right: 6%;
  top: 9%;
  background: rgba(8, 62, 127, 0.055);
}

.emark-hero__glow--green {
  width: 250px;
  height: 250px;
  right: 26%;
  bottom: 4%;
  background: rgba(0, 168, 107, 0.07);
}

/* Left content */
.emark-hero__content {
  max-width: 700px;
}

.emark-hero__eyebrow {
  margin: 0 0 18px;
  color: var(--hero-blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.115em;
  line-height: 1.5;
  text-transform: uppercase;
}

.emark-hero__eyebrow span {
  margin-inline: 8px;
  color: var(--hero-green);
}

.emark-hero h1 {
  max-width: 13.5ch;
  margin: 0;
  color: var(--hero-ink);
  font-size: clamp(3rem, 5.35vw, 5.15rem);
  font-weight: 780;
  letter-spacing: -0.048em;
  line-height: 0.99;
  text-wrap: balance;
}

.emark-hero__lead {
  max-width: 650px;
  margin: 27px 0 0;
  color: var(--hero-text);
  font-size: clamp(1.02rem, 1.25vw, 1.18rem);
  line-height: 1.75;
}

.emark-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 31px;
}

.emark-hero__btn {
  min-height: 51px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 0.93rem;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.emark-hero__btn--primary {
  color: var(--hero-white);
  background: var(--hero-blue);
  border-color: var(--hero-blue);
  box-shadow: 0 11px 28px rgba(8, 62, 127, 0.16);
}

.emark-hero__btn--primary:hover,
.emark-hero__btn--primary:focus-visible {
  color: var(--hero-white);
  background: var(--hero-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 15px 32px rgba(8, 62, 127, 0.22);
}

.emark-hero__btn--primary span:last-child {
  color: #9BE8C9;
  transition: transform 160ms ease;
}

.emark-hero__btn--primary:hover span:last-child {
  transform: translateX(3px);
}

.emark-hero__btn--secondary {
  color: var(--hero-blue);
  background: rgba(255, 255, 255, 0.62);
  border-color: #D9E3EE;
}

.emark-hero__btn--secondary:hover,
.emark-hero__btn--secondary:focus-visible {
  color: var(--hero-blue-dark);
  background: var(--hero-white);
  border-color: rgba(8, 62, 127, 0.30);
  transform: translateY(-2px);
}

.emark-hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 13px 24px;
  margin: 29px 0 0;
  padding: 0;
  list-style: none;
  color: #687383;
  font-size: 0.84rem;
  font-weight: 620;
}

.emark-hero__points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.emark-hero__point-mark {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--hero-green);
  border: 2px solid rgba(0, 168, 107, 0.20);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(0, 168, 107, 0.07);
}

/* Right visual */
.emark-hero__visual {
  min-height: 500px;
  position: relative;
  display: grid;
  place-items: center;
}

.emark-finance-orbit {
  width: min(100%, 510px);
  aspect-ratio: 1 / 1;
  position: relative;
  display: grid;
  place-items: center;
}

.emark-finance-orbit::before {
  content: "";
  position: absolute;
  inset: 10%;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.94) 0%, rgba(255,255,255,0.67) 58%, rgba(255,255,255,0) 73%);
  border-radius: 50%;
}

.emark-finance-orbit__ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.emark-finance-orbit__ring--outer {
  inset: 8%;
  border: 1px dashed rgba(8, 62, 127, 0.17);
  animation: emarkRingRotate 34s linear infinite;
}

.emark-finance-orbit__ring--inner {
  inset: 23%;
  border: 1px solid rgba(0, 168, 107, 0.12);
  box-shadow:
    0 0 0 16px rgba(8, 62, 127, 0.018),
    0 0 0 34px rgba(0, 168, 107, 0.012);
}

/* Central card */
.emark-finance-core {
  width: 214px;
  min-height: 218px;
  position: relative;
  z-index: 4;
  padding: 26px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(248,251,254,0.95));
  border: 1px solid rgba(8, 62, 127, 0.10);
  border-radius: 26px;
  box-shadow:
    0 25px 55px rgba(18, 43, 73, 0.13),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.emark-finance-core::before {
  content: "";
  position: absolute;
  top: 22px;
  right: 22px;
  width: 10px;
  height: 10px;
  background: var(--hero-green);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(0, 168, 107, 0.08);
}

.emark-finance-core__small {
  display: block;
  color: var(--hero-green-dark);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.emark-finance-core > strong {
  display: block;
  margin-top: 14px;
  color: var(--hero-blue-dark);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.035em;
}

.emark-finance-core > span:not(.emark-finance-core__small) {
  display: block;
  margin-top: 5px;
  color: var(--hero-text);
  font-size: 0.84rem;
}

.emark-finance-core__chart {
  height: 71px;
  display: flex;
  align-items: end;
  gap: 7px;
  margin-top: 25px;
  padding-top: 13px;
  border-top: 1px solid var(--hero-line);
}

.emark-finance-core__chart span {
  flex: 1;
  height: var(--bar);
  min-height: 14px;
  background: linear-gradient(180deg, var(--hero-green), var(--hero-blue));
  border-radius: 5px 5px 2px 2px;
  opacity: 0.92;
  animation: emarkBarPulse 4.8s ease-in-out infinite alternate;
}

.emark-finance-core__chart span:nth-child(2) { animation-delay: 0.35s; }
.emark-finance-core__chart span:nth-child(3) { animation-delay: 0.7s; }
.emark-finance-core__chart span:nth-child(4) { animation-delay: 1.05s; }
.emark-finance-core__chart span:nth-child(5) { animation-delay: 1.4s; }

/* Service nodes */
.emark-finance-node {
  position: absolute;
  z-index: 5;
  min-width: 154px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(8, 62, 127, 0.10);
  border-radius: 16px;
  box-shadow: 0 13px 32px rgba(18, 43, 73, 0.09);
  animation: emarkNodeFloat 6s ease-in-out infinite;
}

.emark-finance-node__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--hero-white);
  background: var(--hero-blue);
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 850;
}

.emark-finance-node small,
.emark-finance-node strong {
  display: block;
}

.emark-finance-node small {
  margin-bottom: 2px;
  color: #8A94A3;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.emark-finance-node strong {
  color: var(--hero-ink);
  font-size: 0.82rem;
  font-weight: 760;
  white-space: nowrap;
}

.emark-finance-node--accounting {
  top: 3%;
  left: 50%;
  transform: translateX(-50%);
}

.emark-finance-node--tax {
  top: 24%;
  right: -1%;
  animation-delay: 0.7s;
}

.emark-finance-node--erp {
  right: 2%;
  bottom: 13%;
  animation-delay: 1.3s;
}

.emark-finance-node--invoice {
  left: -1%;
  bottom: 15%;
  animation-delay: 1.9s;
}

.emark-finance-node--reporting {
  top: 25%;
  left: -2%;
  animation-delay: 2.5s;
}

.emark-finance-node--invoice .emark-finance-node__icon,
.emark-finance-node--reporting .emark-finance-node__icon {
  background: var(--hero-green);
}

/* Connecting lines */
.emark-finance-orbit__connector {
  position: absolute;
  z-index: 2;
  height: 1px;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(8, 62, 127, 0.26),
      rgba(0, 168, 107, 0.34),
      transparent
    );
  transform-origin: left center;
  opacity: 0.78;
}

.emark-finance-orbit__connector--one {
  width: 118px;
  top: 26%;
  left: 50%;
  transform: rotate(-90deg);
}

.emark-finance-orbit__connector--two {
  width: 112px;
  top: 45%;
  left: 61%;
  transform: rotate(-23deg);
}

.emark-finance-orbit__connector--three {
  width: 116px;
  top: 58%;
  left: 58%;
  transform: rotate(32deg);
}

.emark-finance-orbit__connector--four {
  width: 112px;
  top: 60%;
  left: 42%;
  transform: rotate(148deg);
}

.emark-finance-orbit__connector--five {
  width: 108px;
  top: 45%;
  left: 39%;
  transform: rotate(202deg);
}

/* Status chip */
.emark-finance-status {
  position: absolute;
  left: 50%;
  bottom: 1%;
  z-index: 6;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  color: #526072;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(0, 168, 107, 0.16);
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(18, 43, 73, 0.07);
  font-size: 0.71rem;
  font-weight: 680;
  transform: translateX(-50%);
}

.emark-finance-status__dot {
  width: 7px;
  height: 7px;
  background: var(--hero-green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(0,168,107,0.08);
}

/* Motion */
@keyframes emarkRingRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes emarkNodeFloat {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -5px; }
}

@keyframes emarkBarPulse {
  from { opacity: 0.72; }
  to { opacity: 1; }
}

/* Large tablets */
@media (max-width: 1080px) {
  .emark-hero__container {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.85fr);
    gap: 42px;
  }

  .emark-finance-orbit {
    width: min(100%, 450px);
  }

  .emark-finance-node {
    min-width: 138px;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .emark-hero {
    min-height: auto;
  }

  .emark-hero__container {
    padding: 72px 0 78px;
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .emark-hero__content {
    max-width: 760px;
  }

  .emark-hero h1 {
    max-width: 14ch;
  }

  .emark-hero__visual {
    min-height: 480px;
  }

  .emark-hero__grid {
    inset: 45% 0 0 0;
    mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 100%);
  }
}

/* Mobile */
@media (max-width: 600px) {
  .emark-hero__container {
    width: min(calc(100% - 28px), var(--hero-max));
    padding: 58px 0 62px;
    gap: 38px;
  }

  .emark-hero__eyebrow {
    margin-bottom: 15px;
    font-size: 0.68rem;
    letter-spacing: 0.09em;
  }

  .emark-hero__eyebrow span {
    margin-inline: 4px;
  }

  .emark-hero h1 {
    max-width: 100%;
    font-size: clamp(2.55rem, 12.5vw, 3.65rem);
    line-height: 1.01;
  }

  .emark-hero__lead {
    margin-top: 21px;
    font-size: 0.99rem;
    line-height: 1.68;
  }

  .emark-hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 25px;
  }

  .emark-hero__btn {
    width: 100%;
  }

  .emark-hero__points {
    display: grid;
    gap: 10px;
    margin-top: 24px;
  }

  .emark-hero__visual {
    min-height: 395px;
  }

  .emark-finance-orbit {
    width: 100%;
    max-width: 385px;
  }

  .emark-finance-core {
    width: 174px;
    min-height: 184px;
    padding: 22px;
    border-radius: 22px;
  }

  .emark-finance-core > strong {
    font-size: 1.65rem;
  }

  .emark-finance-core__chart {
    height: 58px;
    margin-top: 19px;
  }

  .emark-finance-node {
    min-width: 115px;
    min-height: 54px;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 13px;
  }

  .emark-finance-node__icon {
    width: 29px;
    height: 29px;
    border-radius: 8px;
    font-size: 0.67rem;
  }

  .emark-finance-node strong {
    font-size: 0.71rem;
  }

  .emark-finance-node small {
    font-size: 0.55rem;
  }

  .emark-finance-node--accounting {
    top: 0;
  }

  .emark-finance-node--tax {
    right: -2%;
    top: 25%;
  }

  .emark-finance-node--erp {
    right: 0;
    bottom: 13%;
  }

  .emark-finance-node--invoice {
    left: -1%;
    bottom: 15%;
  }

  .emark-finance-node--reporting {
    left: -3%;
    top: 26%;
  }

  .emark-finance-status {
    bottom: 0;
    font-size: 0.62rem;
  }
}

/* Very small screens */
@media (max-width: 390px) {
  .emark-finance-node--tax,
  .emark-finance-node--reporting {
    top: 22%;
  }

  .emark-finance-node {
    min-width: 105px;
  }

  .emark-finance-status {
    white-space: nowrap;
  }
}

/* Accessibility: reduce animation when the user requests it */
@media (prefers-reduced-motion: reduce) {
  .emark-finance-orbit__ring--outer,
  .emark-finance-node,
  .emark-finance-core__chart span {
    animation: none !important;
  }

  .emark-hero__btn {
    transition-duration: 0.01ms !important;
  }
}

.emark-hero__btn--einvoice {
  gap: 10px;
}

.emark-hero__btn-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: #00A86B;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(0, 168, 107, 0.10);
}

.emark-hero__btn--einvoice:hover .emark-hero__btn-dot,
.emark-hero__btn--einvoice:focus-visible .emark-hero__btn-dot {
  box-shadow: 0 0 0 6px rgba(0, 168, 107, 0.12);
}