/* Hianma commercial homepage — premium brand layer
   Single premium source of truth for the commercial Hero.
   Main Hero mascot is a REAL <img> from PublicHome.tsx — never a pseudo-element. */

body .hm-marketing {
  --hm-blue: #2563eb;
  --hm-blue-dark: #1d4ed8;
  --hm-navy: #0b1a33;
  --hm-ink: #14213b;
  --hm-muted: #68758a;
  --hm-line: #e5ebf4;
  --hm-soft: #f8fafc;
  --hm-ice: #f1f6ff;
  --hm-success: #10b981;
  --hm-accent: #f59e0b;
  background:
    radial-gradient(circle at 82% 7%, rgba(37, 99, 235, .055), transparent 25%),
    #fff;
}

/* Header */
body .hm-header {
  min-height: 78px;
  border-bottom: 1px solid rgba(213, 224, 239, .8);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 34px rgba(11, 26, 51, .035);
  backdrop-filter: blur(24px) saturate(150%);
}

body .hm-brand strong {
  font-size: 1.08rem;
  font-weight: 850;
  letter-spacing: -.035em;
}

body .hm-brand small {
  color: #2563eb;
  font-weight: 800;
}

body .hm-header .hm-brand img,
body .hm-brand-footer img {
  filter: drop-shadow(0 7px 12px rgba(37, 99, 235, .17));
}

body .hm-nav a {
  position: relative;
  color: #5f6e83;
}

body .hm-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, #2563eb, #6ea4ff);
  transition: right .2s ease;
}

body .hm-nav a:hover::after { right: 0; }

body .hm-login {
  border-color: #d7e2f0;
  box-shadow: 0 7px 18px rgba(11, 26, 51, .045);
}

/* =========================================================
   HERO — one clean implementation, no competing mascot CSS
   ========================================================= */
body .hm-hero {
  min-height: calc(100svh - 78px);
  padding: 58px 0 66px;
  background:
    radial-gradient(circle at 77% 33%, rgba(37, 99, 235, .12), transparent 23%),
    radial-gradient(circle at 20% 4%, rgba(96, 165, 250, .07), transparent 27%),
    linear-gradient(180deg, #fbfdff 0%, #ffffff 85%);
}

body .hm-hero::before {
  opacity: .72;
  background-size: 64px 64px;
}

body .hm-hero::after {
  right: -90px;
  top: 54px;
  width: 480px;
  height: 480px;
  opacity: .014;
}

body .hm-eyebrow {
  padding: 8px 12px;
  border: 1px solid #dbe8fb;
  border-radius: 999px;
  background: rgba(242, 247, 255, .88);
  box-shadow: inset 0 1px 0 #fff;
  letter-spacing: .075em;
}

body .hm-dot {
  background: #10b981;
  box-shadow: 0 0 0 5px rgba(16, 185, 129, .11);
}

body .hm-hero h1 {
  max-width: 760px;
  margin: 22px 0 20px;
  color: #0b1a33;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
}

body .hm-hero h1 span {
  color: #2563eb;
  background: none;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: #2563eb;
  text-shadow: none;
}

body .hm-hero-copy > p {
  max-width: 625px;
  color: #65748a;
}

body .hm-button {
  min-height: 54px;
  border-radius: 15px;
  letter-spacing: -.01em;
}

body .hm-button-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 72%, #1947bd 100%);
  box-shadow:
    0 18px 36px rgba(37, 99, 235, .23),
    inset 0 1px 0 rgba(255, 255, 255, .28);
}

body .hm-button-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 18%, rgba(255,255,255,.18) 43%, transparent 64%);
  transform: translateX(-120%);
  transition: transform .55s ease;
}

body .hm-button-primary:hover::before { transform: translateX(120%); }

body .hm-button-secondary {
  border-color: #dce6f2;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 28px rgba(11, 26, 51, .065);
  backdrop-filter: blur(12px);
}

body .hm-proof-row { padding-top: 2px; }
body .hm-proof-row span { color: #66758a; font-weight: 760; }
body .hm-proof-row span:nth-child(1) svg { color: #10b981; }
body .hm-proof-row span:nth-child(2) svg { color: #2563eb; }
body .hm-proof-row span:nth-child(3) svg { color: #f59e0b; }

/* Product preview + Hian. Both are real grid items in the same visual cell. */
body .hm-product-stage {
  position: relative;
  isolation: isolate;
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: end;
  padding: 18px 6px 34px 4px;
}

body .hm-product-stage::before {
  content: "";
  position: absolute;
  z-index: -2;
  width: 420px;
  height: 420px;
  right: 4%;
  top: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, .15), rgba(37, 99, 235, 0) 67%);
  filter: blur(8px);
}

/* There is intentionally NO .hm-product-stage::after mascot. */
body .hm-product-window {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  margin-right: 42px;
  margin-bottom: 26px;
  border: 1px solid rgba(196, 211, 231, .88);
  border-radius: 30px;
  background: rgba(255, 255, 255, .96);
  box-shadow:
    0 44px 95px rgba(17, 45, 87, .17),
    0 8px 24px rgba(17, 45, 87, .07),
    inset 0 1px 0 #fff;
  transform: perspective(1300px) rotateY(-3deg) rotateX(1.2deg);
}

body .hm-product-window::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.48);
}

body .hm-product-topbar { background: linear-gradient(180deg, #fff, #fbfdff); }
body .hm-product-body { background: linear-gradient(135deg, #f8fbff 0%, #f4f7fb 100%); }
body .hm-product-sidebar { background: rgba(255,255,255,.94); }
body .hm-product-sidebar span.is-active { box-shadow: inset 0 0 0 1px rgba(37,99,235,.08); }

body .hm-stat-row article,
body .hm-activity-card {
  border-color: #e4ebf4;
  box-shadow: 0 8px 20px rgba(11, 26, 51, .04);
}

body .hm-stat-row article:nth-child(1) > span { color: #2563eb; background: #edf4ff; }
body .hm-stat-row article:nth-child(2) > span { color: #10b981; background: #ecfdf5; }
body .hm-stat-row article:nth-child(3) > span { color: #f59e0b; background: #fff7e6; }

/* REAL DOM Hero mascot in normal CSS Grid flow: no absolute positioning. */
body .hm-hian-card {
  grid-area: 1 / 1;
  position: relative;
  z-index: 8;
  align-self: end;
  justify-self: end;
  width: 224px;
  height: auto;
  min-height: 0;
  display: grid;
  justify-items: end;
  padding: 0;
  margin: 0 -4px -8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  pointer-events: none;
}

body .hm-hian-card > img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
  filter: drop-shadow(0 20px 22px rgba(11, 26, 51, .22));
}

body .hm-hian-card > span {
  position: relative;
  z-index: 2;
  width: 150px;
  max-width: 150px;
  margin: -18px 5px 0 0;
  padding: 7px 10px;
  border: 1px solid #d8e4f4;
  border-radius: 999px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 26px rgba(11, 26, 51, .11);
  color: #43546d;
  font-size: .58rem;
  line-height: 1.25;
  font-weight: 800;
  text-align: center;
  backdrop-filter: blur(12px);
}

/* Core promise — preserve the additional Hian brand moments below the Hero. */
body .hm-mission {
  position: relative;
  background:
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, .055), transparent 27%),
    #fff;
}

body .hm-mission::after {
  content: "";
  position: absolute;
  right: 2.5%;
  top: 92px;
  width: 132px;
  height: 132px;
  background: url('/assistant/hian/hian-rest.webp') center/contain no-repeat;
  opacity: .92;
  filter: drop-shadow(0 12px 16px rgba(11,26,51,.11));
  pointer-events: none;
}

body .hm-section-heading h2,
body .hm-connected-copy h2,
body .hm-website-copy h2,
body .hm-dual-grid h2,
body .hm-contact-copy h2 {
  color: #0b1a33;
  text-wrap: balance;
}

body .hm-value-card,
body .hm-role-card,
body .hm-dual-grid article {
  border-color: #e1e9f3;
  box-shadow:
    0 18px 48px rgba(11, 26, 51, .055),
    inset 0 1px 0 #fff;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

body .hm-value-card:hover,
body .hm-role-card:hover,
body .hm-dual-grid article:hover {
  transform: translateY(-5px);
  border-color: #cad9ed;
  box-shadow: 0 26px 58px rgba(11, 26, 51, .09);
}

body .hm-value-card:nth-child(1) .hm-card-icon { color: #2563eb; background: #edf4ff; }
body .hm-value-card:nth-child(2) .hm-card-icon { color: #10b981; background: #ecfdf5; }
body .hm-value-card:nth-child(3) .hm-card-icon { color: #f59e0b; background: #fff6df; }

body .hm-value-card { position: relative; overflow: hidden; }
body .hm-value-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, transparent 65%);
  opacity: .8;
}
body .hm-value-card:nth-child(2)::before { background: linear-gradient(90deg, #10b981, transparent 65%); }
body .hm-value-card:nth-child(3)::before { background: linear-gradient(90deg, #f59e0b, transparent 65%); }

/* Roles */
body .hm-roles {
  background:
    linear-gradient(180deg, rgba(248,250,252,.88), rgba(246,249,253,.96)),
    #f8fafc;
  border-top: 1px solid #edf1f6;
  border-bottom: 1px solid #edf1f6;
}
body .hm-role-card { background: linear-gradient(150deg, #fff, #fbfdff); }
body .hm-role-icon { box-shadow: inset 0 0 0 1px rgba(37,99,235,.08); }
body .hm-role-card:nth-child(2) .hm-role-icon { color: #10b981; background: #ecfdf5; }
body .hm-role-card:nth-child(3) .hm-role-icon { color: #f59e0b; background: #fff6df; }
body .hm-role-card:nth-child(4) .hm-role-icon { color: #1d4ed8; background: #eef4ff; }
body .hm-role-card:nth-child(2) .hm-role-line { background: linear-gradient(90deg,#10b981,#8ce1bf); }
body .hm-role-card:nth-child(3) .hm-role-line { background: linear-gradient(90deg,#f59e0b,#ffd47d); }

/* Connected system visual */
body .hm-orbit {
  border-color: #cbdcf2;
  background:
    radial-gradient(circle at center, rgba(37,99,235,.075) 0 28%, transparent 29%),
    radial-gradient(circle at center, rgba(37,99,235,.03), transparent 64%);
  box-shadow: inset 0 0 80px rgba(37,99,235,.035);
}
body .hm-orbit-center {
  border-color: #d7e3f2;
  box-shadow: 0 25px 55px rgba(25, 68, 127, .15), inset 0 1px 0 #fff;
}
body .hm-orbit-center img { filter: drop-shadow(0 8px 10px rgba(37,99,235,.18)); }
body .hm-orbit-node {
  border-color: #d7e3f2;
  box-shadow: 0 14px 30px rgba(23, 55, 97, .1), inset 0 1px 0 #fff;
}
body .hm-orbit-node:nth-of-type(3) { color: #10b981; }
body .hm-orbit-node:nth-of-type(4) { color: #f59e0b; }

/* Integrated public school website */
body .hm-website {
  background:
    radial-gradient(circle at 7% 20%, rgba(66, 126, 255, .32), transparent 30%),
    radial-gradient(circle at 96% 86%, rgba(37, 99, 235, .2), transparent 27%),
    linear-gradient(145deg, #0b1a33 0%, #102c58 58%, #12346b 100%);
}

body .hm-website::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -40px;
  width: 190px;
  height: 190px;
  background: url('/assistant/hian/hian-notification.webp') center/contain no-repeat;
  opacity: .98;
  filter: drop-shadow(0 20px 18px rgba(0,0,0,.22));
  pointer-events: none;
}

body .hm-site-mock {
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 38px 90px rgba(0,0,0,.29), 0 0 0 1px rgba(255,255,255,.05);
}

body .hm-school-site-hero {
  background:
    radial-gradient(circle at 80% 25%, rgba(37,99,235,.14), transparent 35%),
    linear-gradient(135deg,#eaf3ff,#fbfdff);
}

/* Institution fit */
body .hm-audience-row {
  border-color: #dfe8f3;
  box-shadow: 0 22px 50px rgba(11,26,51,.055);
}
body .hm-audience-row > span { transition: background .2s ease, transform .2s ease; }
body .hm-audience-row > span:hover { background: #f8fbff; }
body .hm-audience-row > span:nth-child(2) .hm-audience-icon { color:#10b981; background:#ecfdf5; }
body .hm-audience-row > span:nth-child(3) .hm-audience-icon { color:#f59e0b; background:#fff6df; }

/* Quote brand moment */
body .hm-quote {
  position: relative;
  overflow: hidden;
  padding: 92px 0;
  background:
    radial-gradient(circle at 14% 20%, rgba(37,99,235,.08), transparent 28%),
    linear-gradient(180deg,#f7faff,#f3f7fc);
  border-top: 1px solid #e7eef7;
  border-bottom: 1px solid #e7eef7;
}
body .hm-quote::before {
  content: "H";
  position: absolute;
  left: 3%;
  top: -85px;
  color: rgba(37,99,235,.028);
  font-size: 25rem;
  line-height: 1;
  font-weight: 950;
  pointer-events: none;
}
body .hm-quote::after {
  content: "";
  position: absolute;
  right: 4.5%;
  bottom: -36px;
  width: 178px;
  height: 178px;
  background: url('/assistant/hian/hian-active.webp') center/contain no-repeat;
  filter: drop-shadow(0 18px 17px rgba(11,26,51,.15));
  pointer-events: none;
}
body .hm-quote blockquote,
body .hm-quote span { position: relative; z-index: 1; }
body .hm-quote blockquote { max-width: 820px; }

/* Contact / conversion */
body .hm-contact {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 95%, rgba(37,99,235,.06), transparent 26%),
    #fff;
}
body .hm-contact::after {
  content: "";
  position: absolute;
  left: -48px;
  bottom: -58px;
  width: 180px;
  height: 180px;
  background: url('/assistant/hian/hian-rest.webp') center/contain no-repeat;
  opacity: .86;
  filter: drop-shadow(0 15px 16px rgba(11,26,51,.11));
  pointer-events: none;
}
body .hm-contact-channels > div {
  background: linear-gradient(145deg,#fff,#fbfdff);
  box-shadow: 0 9px 22px rgba(11,26,51,.04);
}
body .hm-contact-channels > div:nth-child(1) > span { color:#10b981; background:#ecfdf5; }
body .hm-contact-channels > div:nth-child(2) > span { color:#2563eb; background:#edf4ff; }
body .hm-contact-channels > div:nth-child(3) > span { color:#f59e0b; background:#fff6df; }
body .hm-demo-form {
  border-color: #d9e4f1;
  background: linear-gradient(145deg,rgba(255,255,255,.98),rgba(247,250,255,.98));
  box-shadow: 0 30px 70px rgba(11,26,51,.095), inset 0 1px 0 #fff;
}
body .hm-demo-form input,
body .hm-demo-form textarea {
  border-color: #d8e3ef;
  box-shadow: inset 0 1px 2px rgba(11,26,51,.018);
}
body .hm-footer { background: #fbfdff; }

/* =========================================================
   Desktop / laptop — 1366×768 and shorter browser viewport
   ========================================================= */
@media (min-width: 1021px) {
  body .hm-header {
    min-height: 64px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  body .hm-header .hm-brand img { width: 36px; height: 36px; }
  body .hm-brand small { margin-top: 3px; font-size: .54rem; }
  body .hm-nav { gap: 25px; }
  body .hm-nav a { font-size: .84rem; }
  body .hm-language button { height: 27px; }
  body .hm-login { height: 38px; }

  body .hm-hero {
    min-height: calc(100svh - 64px);
    padding: 30px 0 34px;
    align-items: center;
  }
  body .hm-hero-grid {
    grid-template-columns: minmax(0, 1.04fr) minmax(430px, .96fr);
    gap: 42px;
    align-items: center;
  }
  body .hm-hero-copy { max-width: 620px; }
  body .hm-hero .hm-eyebrow { padding: 6px 10px; font-size: .65rem; }
  body .hm-hero h1 {
    max-width: 620px;
    margin: 15px 0 14px;
    font-size: clamp(2.65rem, 3.85vw, 3.55rem);
    line-height: .99;
    letter-spacing: -.052em;
  }
  body .hm-hero-copy > p {
    max-width: 585px;
    font-size: .94rem;
    line-height: 1.52;
  }
  body .hm-hero-actions { gap: 10px; margin-top: 18px; }
  body .hm-hero-actions .hm-button {
    width: auto;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 13px;
    font-size: .83rem;
  }
  body .hm-proof-row { gap: 10px 17px; margin-top: 13px; padding-top: 0; }
  body .hm-proof-row span { gap: 5px; font-size: .67rem; }

  body .hm-product-stage {
    min-width: 0;
    padding: 0 2px 24px 0;
  }
  body .hm-product-stage::before {
    width: 350px;
    height: 350px;
    right: 0;
    top: -10px;
  }
  body .hm-product-window {
    margin-right: 38px;
    margin-bottom: 22px;
    border-radius: 24px;
    transform: perspective(1300px) rotateY(-2deg) rotateX(.6deg);
  }
  body .hm-product-topbar { height: 42px; padding: 0 16px; }
  body .hm-product-body { min-height: 314px; grid-template-columns: 52px 1fr; }
  body .hm-product-sidebar { gap: 7px; padding: 15px 7px; }
  body .hm-product-sidebar span { width: 32px; height: 32px; border-radius: 10px; }
  body .hm-product-content { padding: 17px 17px 18px; }
  body .hm-product-content h3 { margin: 6px 0 3px; font-size: 1.17rem; }
  body .hm-product-content > p { margin-bottom: 12px; font-size: .67rem; }
  body .hm-stat-row { gap: 8px; }
  body .hm-stat-row article { padding: 9px; border-radius: 13px; }
  body .hm-stat-row article > span { width: 25px; height: 25px; margin-bottom: 5px; }
  body .hm-stat-row strong { font-size: .98rem; }
  body .hm-activity-card { margin-top: 8px; padding: 10px 12px; border-radius: 14px; }
  body .hm-activity-title { margin-bottom: 6px; }
  body .hm-activity-line { min-height: 28px; font-size: .58rem; }
}

@media (min-width: 1021px) and (max-height: 780px) {
  body .hm-hero { padding: 18px 0 22px; }
  body .hm-hero-grid { gap: 36px; }
  body .hm-hero h1 {
    margin: 11px 0 10px;
    font-size: clamp(2.4rem, 3.45vw, 3.05rem);
  }
  body .hm-hero-copy > p { font-size: .87rem; line-height: 1.44; }
  body .hm-hero-actions { margin-top: 13px; }
  body .hm-proof-row { margin-top: 9px; }
  body .hm-product-topbar { height: 39px; }
  body .hm-product-body { min-height: 272px; }
  body .hm-product-content { padding: 13px 14px; }
  body .hm-activity-card { padding: 8px 10px; }
  body .hm-activity-line { min-height: 24px; }
  body .hm-product-window { margin-right: 28px; margin-bottom: 16px; }
  body .hm-hian-card { width: 190px; margin-right: 0; margin-bottom: -5px; }
  body .hm-hian-card > span {
    width: 132px;
    max-width: 132px;
    margin-top: -15px;
    margin-right: 2px;
    font-size: .51rem;
  }
}

@media (min-width: 1021px) and (max-height: 660px) {
  body .hm-hero { padding: 12px 0 16px; }
  body .hm-hero h1 { font-size: clamp(2.25rem, 3.2vw, 2.85rem); }
  body .hm-product-body { min-height: 246px; }
  body .hm-activity-line { min-height: 21px; }
  body .hm-hian-card { width: 170px; }
  body .hm-proof-row span { font-size: .63rem; }
}

@media (max-width: 1180px) {
  body .hm-mission::after { opacity: .18; }
  body .hm-quote::after { opacity: .55; right: -28px; }
  body .hm-contact::after { opacity: .2; }
}

@media (min-width: 761px) and (max-width: 1020px) {
  body .hm-product-stage { padding: 24px 4px 58px 10px; }
  body .hm-product-window { margin-right: 34px; margin-bottom: 18px; }
  body .hm-hian-card { width: 190px; margin: 0 -2px -22px 0; }
  body .hm-mission::after { opacity: .3; }
}

@media (max-width: 760px) {
  body .hm-header { min-height: 68px; }
  body .hm-hero {
    padding-top: 54px;
    padding-bottom: 70px;
    background:
      radial-gradient(circle at 80% 48%, rgba(37,99,235,.1), transparent 23%),
      linear-gradient(180deg,#fbfdff,#fff 86%);
  }
  body .hm-eyebrow { padding: 7px 10px; font-size: .65rem; }
  body .hm-product-stage { padding: 18px 0 62px; }
  body .hm-product-window { margin-right: 0; margin-bottom: 20px; transform: none; }
  body .hm-hian-card { width: 158px; margin: 0 -2px -35px 0; }
  body .hm-hian-card > span { display: none; }
  body .hm-website::after {
    width: 135px;
    height: 135px;
    right: -24px;
    opacity: .58;
  }
  body .hm-quote { padding: 76px 0 122px; }
  body .hm-quote::after {
    width: 145px;
    height: 145px;
    right: 50%;
    transform: translateX(50%);
    bottom: -25px;
    opacity: .9;
  }
  body .hm-quote::before { font-size: 16rem; top: -40px; }
  body .hm-contact::after { opacity: .12; }
}

@media (max-width: 430px) {
  body .hm-product-stage { padding-right: 0; padding-bottom: 54px; }
  body .hm-hian-card { width: 142px; margin: 0 -5px -30px 0; }
}

@media (prefers-reduced-motion: reduce) {
  body .hm-value-card,
  body .hm-role-card,
  body .hm-dual-grid article,
  body .hm-nav a::after,
  body .hm-button-primary::before { transition: none; }
}
