/* Hero: two-column grid, absolutely-composed stage. */

.hero {
  position: relative;
  padding-top: 52px;
  padding-bottom: 64px;
  overflow: hidden;
}

/* Faint square-grid texture, wider squares than a typical grid so it reads
   as structure rather than a busy pattern. */
.hero::after {
  content: "";
  position: absolute;
  inset: -40px -40px 0;
  background-image:
    linear-gradient(rgba(88, 96, 121, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 96, 121, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 85% 80% at 50% 20%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 80% at 50% 20%, #000 0%, transparent 78%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 569px) minmax(0, 515px);
  gap: var(--sp-6);
  align-items: center;
  min-height: 624px;
}

/* ---- Left column ------------------------------------------------------- */

.hero-copy {
  max-width: 569px;
}

.hero-copy h1 {
  margin-top: var(--sp-5);
  font-size: clamp(2.3rem, 4.3vw, 3.3rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

/* Each line is its own span so it can rise on a stagger. */
.frag {
  display: block;
}

.hl {
  position: relative;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy .sub {
  margin-top: var(--sp-5);
  max-width: 520px;
  font-size: var(--fs-lead);
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: var(--sp-6);
}

.badges {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: var(--sp-6);
}

/* ---- Right column: composed stage -------------------------------------- */

.hero-stage {
  position: relative;
  /* All children are absolutely positioned, so the box has no intrinsic size. */
  width: 100%;
  height: 624px;
}

/* Illustration variant: one panel, one overlapping panel, no backdrop block. */
.hero-stage--illus {
  display: grid;
  place-items: center;
  height: auto;
  min-height: 560px;
}

.hero-stage--illus .illus-main {
  width: 100%;
  max-width: 520px;
  height: auto;
  filter: drop-shadow(0 34px 60px rgba(20, 28, 52, 0.16));
}

.hero-stage--illus .illus-float {
  position: absolute;
  right: -6%;
  bottom: -8%;
  width: 62%;
  height: auto;
  filter: drop-shadow(0 26px 48px rgba(20, 28, 52, 0.2));
}

/* Rounded backdrop the cutouts sit against. */
.hero-block {
  position: absolute;
  right: 0;
  top: 28px;
  width: 463px;
  height: 568px;
  border-radius: var(--r-lg);
  background: linear-gradient(168deg, var(--bone-2) 0%, #e7dcc8 100%);
  border: 1px solid var(--line);
}

.cutout {
  position: absolute;
  bottom: 56px;
  filter: drop-shadow(0 24px 34px rgba(20, 28, 52, 0.22));
}

.cutout img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.cut-1 {
  left: 8px;
  width: 215px;
  z-index: 2;
}

.cut-2 {
  left: 128px;
  width: 294px;
  z-index: 3;
}

.cut-3 {
  right: 4px;
  width: 207px;
  z-index: 1;
}

/* ---- Floating data cards ----------------------------------------------- */

.metric-card {
  position: absolute;
  top: 6px;
  right: 0;
  z-index: 4;
  width: 234px;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bone-card);
  box-shadow: var(--shadow-lg);
}

.mc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-lab);
  text-transform: uppercase;
  color: var(--muted-2);
}

.mc-value {
  margin-top: var(--sp-2);
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.mc-delta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-1);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--pos);
}

.mc-spark {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: var(--sp-3);
  overflow: visible;
}

.mc-spark path {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-card {
  position: absolute;
  left: 0;
  bottom: 8px;
  z-index: 4;
  width: 160px;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.mc-label {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-lab);
  text-transform: uppercase;
  color: var(--muted-2);
}

.mini-card .v {
  margin-top: var(--sp-1);
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 1120px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }

  .hero-block {
    width: 100%;
  }

  .cut-2 {
    left: 22%;
  }
}

@media (max-width: 900px) {
  .hero {
    padding-bottom: var(--sp-7);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: var(--sp-7);
  }

  .hero-copy {
    max-width: 640px;
  }

  .hero-stage {
    height: 520px;
    /* Children are all absolute, so the box needs an explicit width to fill. */
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
  }

  .hero-block {
    top: 16px;
    height: 470px;
  }

  .cutout {
    bottom: 40px;
  }
}

@media (max-width: 560px) {
  .hero-stage {
    height: 400px;
  }

  .hero-block {
    height: 360px;
  }

  .cut-1 { width: 150px; left: 0; }
  .cut-2 { width: 205px; left: 24%; }
  .cut-3 { width: 145px; }

  .metric-card {
    width: 190px;
    padding: var(--sp-3);
  }

  .mc-value {
    font-size: 26px;
  }

  .mini-card {
    width: 136px;
    padding: var(--sp-3);
  }

  .mini-card .v {
    font-size: 24px;
  }

  .hero-actions .btn {
    width: 100%;
  }
}


/* ---- Photo hero variant --------------------------------------------------
   Replaces the illustration stage with a real portrait photo in a rounded
   frame, keeping the floating metric card from the original composed stage. */

.hero-stage--photo {
  height: 624px;
}

.hero-photo-frame {
  position: absolute;
  right: 0;
  top: 28px;
  width: 463px;
  height: 568px;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
}

.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.hero-stage--photo .metric-card {
  top: 6px;
  right: 0;
}

@media (max-width: 1120px) {
  .hero-photo-frame {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .hero-stage--photo {
    height: 520px;
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
  }

  .hero-photo-frame {
    top: 16px;
    height: 470px;
  }
}

@media (max-width: 560px) {
  .hero-stage--photo {
    height: 400px;
  }

  .hero-photo-frame {
    height: 360px;
  }
}
