/* ===========================================================================
   HIES AI Platform carousel — scoped port of the original standalone page.
   Every selector is scoped under .hies-croot so the LIGHT (ivory/emerald/gold)
   theme survives on the dark host page and wins over /styles.css and
   /styles/products/product-page.css (.btn, .tag, .content, .stat, etc.).
   =========================================================================== */

.hies-croot {
  --ivory:        #f4ede0;
  --ivory-2:      #ebe2cf;
  --emerald-deep: #0a3a2c;
  --emerald:      #1a5e4a;
  --emerald-2:    #0d4a37;
  --gold:         #f58a22;
  --gold-2:       #d97718;
  --rose-soft:    #c25551;
  --slate:        #2c3e50;
  --ink:          #1a1f2e;
  --ink-soft:     #4a5260;
  --ink-mute:     #707684;
  --serif:   'Cormorant Garamond', 'Georgia', serif;
  --sans:    'Inter', -apple-system, system-ui, sans-serif;
  --mono:    'DM Mono', 'SF Mono', Menlo, monospace;
  --slide-duration: 7000ms;

  /* re-applied body styling + explicit light background so the light theme
     survives on the dark host page */
  display: block;
  font-family: var(--sans);
  background: #ffffff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* scoped reset (replaces the global * / html / body resets) */
.hies-croot,
.hies-croot * { box-sizing: border-box; margin: 0; padding: 0; }

/* Taller than the sibling carousels (74vh): the HIES slide carries a 4-stat
   footer row that clipped at the bottom under overflow:hidden. The 700px
   floor keeps the full foot visible even on short desktop viewports. */
.hies-croot .carousel { position: relative; width: 100%; height: clamp(820px, 98vh, 1020px); min-height: 0; max-height: none; overflow: hidden; background: #ffffff; }
.hies-croot .carousel__track { position: relative; width: 100%; height: 100%; }
.hies-croot .slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1100ms cubic-bezier(.65,.05,.35,1), visibility 0s linear 1100ms; will-change: opacity; }
.hies-croot .slide.is-active { opacity: 1; visibility: visible; transition: opacity 1100ms cubic-bezier(.65,.05,.35,1), visibility 0s linear; z-index: 2; }
.hies-croot .slide__inner { position: relative; width: 100%; height: 100%; max-width: 1440px; margin: 0 auto; padding: clamp(40px, 6vh, 80px) clamp(24px, 5vw, 88px); display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: auto 1fr auto; gap: 0 clamp(16px, 2vw, 36px); }

.hies-croot .eyebrow { grid-column: 1 / -1; align-self: start; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; z-index: 2; }
.hies-croot .eyebrow__seal { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; border: 1px solid currentColor; border-radius: 999px; opacity: 0.85; }
.hies-croot .eyebrow__seal::before { content: ''; width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 50%; box-sizing: border-box; }
.hies-croot .eyebrow__title { letter-spacing: 0.2em; opacity: 0.78; }
.hies-croot .eyebrow__line { flex: 1; height: 1px; background: currentColor; opacity: 0.18; max-width: 220px; }
.hies-croot .eyebrow__partners { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; opacity: 0.55; }

.hies-croot .slide__copy { grid-column: 1 / span 7; align-self: center; max-width: 760px; z-index: 2; position: relative; }
.hies-croot .slide__copy h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4.5vw, 64px); line-height: 1.02; letter-spacing: -0.02em; margin-bottom: clamp(22px, 3vh, 32px); }
.hies-croot .slide__copy h1 em { font-style: italic; font-weight: 400; color: var(--gold); }
.hies-croot .slide__copy h1 .firstline { display: block; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; opacity: 0.95; }
.hies-croot .slide__copy p { font-family: var(--sans); font-size: clamp(15px, 1.05vw, 17px); line-height: 1.6; font-weight: 400; max-width: 580px; margin-bottom: clamp(28px, 3.5vh, 40px); opacity: 0.85; }
.hies-croot .slide__copy p strong { color: var(--gold-2); font-weight: 600; }

.hies-croot .ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hies-croot .btn { display: inline-flex; align-items: center; gap: 12px; padding: 16px 28px; font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0.02em; text-decoration: none; border-radius: 0; border: 1px solid transparent; transition: transform 280ms cubic-bezier(.4,0,.2,1), background 240ms ease, color 240ms ease, border-color 240ms ease, box-shadow 240ms ease; cursor: pointer; white-space: nowrap; position: relative; }
.hies-croot .btn .arrow { display: inline-block; transition: transform 320ms cubic-bezier(.4,0,.2,1); font-family: var(--mono); }
.hies-croot .btn:hover .arrow { transform: translateX(4px); }
.hies-croot .btn--primary { background: #f58a22; color: var(--ivory); }
.hies-croot .btn--primary:hover { background: #d97718; transform: translateY(-2px); box-shadow: 0 12px 32px -8px rgba(245, 138, 34, 0.4); }
.hies-croot .btn--gold { background: var(--gold); color: var(--ink); }
.hies-croot .btn--gold:hover { background: var(--gold-2); color: var(--ivory); transform: translateY(-2px); }
.hies-croot .btn--ghost-dark { background: transparent; color: var(--ink); border-color: rgba(26, 31, 46, 0.3); }
.hies-croot .btn--ghost-dark:hover { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.hies-croot .btn--ghost-light { background: transparent; color: var(--ivory); border-color: rgba(244, 237, 224, 0.35); }
.hies-croot .btn--ghost-light:hover { background: var(--ivory); color: var(--emerald-deep); border-color: var(--ivory); }

.hies-croot .slide__visual { grid-column: 8 / span 5; grid-row: 2 / 3; align-self: center; justify-self: end; width: 100%; max-width: 470px; aspect-ratio: 1 / 1.05; position: relative; z-index: 1; }
.hies-croot .slide__foot { grid-column: 1 / span 12; align-self: end; display: flex; align-items: stretch; gap: 0; padding-top: 28px; border-top: 1px solid currentColor; opacity: 0.9; z-index: 2; position: relative; flex-wrap: wrap; }
.hies-croot .slide__foot .stat { flex: 1; min-width: 150px; padding-right: 32px; }
.hies-croot .slide__foot .stat + .stat { border-left: 1px solid currentColor; padding-left: 32px; }
.hies-croot .slide__foot .stat strong { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 2.6vw, 38px); line-height: 1; letter-spacing: -0.01em; }
.hies-croot .slide__foot .stat strong em { font-style: italic; font-weight: 400; color: var(--gold); }
.hies-croot .slide__foot .stat span { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; margin-top: 8px; font-weight: 500; opacity: 0.7; }
.hies-croot .slide[data-theme="dark"] .slide__foot, .hies-croot .slide[data-theme="dark"] .slide__foot .stat + .stat { border-color: rgba(244, 237, 224, 0.16); }
.hies-croot .slide[data-theme="ivory"] .slide__foot, .hies-croot .slide[data-theme="ivory"] .slide__foot .stat + .stat { border-color: rgba(26, 31, 46, 0.16); }
.hies-croot .slide[data-theme="gold"] .slide__foot, .hies-croot .slide[data-theme="gold"] .slide__foot .stat + .stat { border-color: rgba(26, 31, 46, 0.22); }

.hies-croot .hies-slide-1 { background: #ffffff; color: var(--ink); }
.hies-croot .seal-frame { position: absolute; inset: 0; border: 1px solid rgba(26, 31, 46, 0.14); background: var(--ivory-2); padding: 28px; display: flex; flex-direction: column; box-shadow: 0 30px 80px -30px rgba(26, 31, 46, 0.25), inset 0 0 0 6px var(--ivory-2), inset 0 0 0 7px rgba(184, 146, 74, 0.5); }
.hies-croot .seal-frame__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid rgba(26, 31, 46, 0.14); font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.hies-croot .seal-frame__body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 12px; gap: 18px; }
.hies-croot .seal-emblem { width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle at 30% 28%, #f0e0bf 0%, #c9a875 40%, #8c6e3f 100%); display: flex; align-items: center; justify-content: center; flex-direction: column; box-shadow: 0 18px 36px -16px rgba(140, 110, 63, 0.55), inset 0 4px 10px rgba(255, 255, 255, 0.45), inset 0 -10px 20px rgba(60, 40, 10, 0.3); position: relative; }
.hies-croot .seal-emblem::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; border: 1px dashed rgba(60, 40, 10, 0.5); }
.hies-croot .seal-emblem__num { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 38px; line-height: 1; color: var(--ink); }
.hies-croot .seal-emblem__lbl { font-family: var(--mono); font-size: 8px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(26, 31, 46, 0.7); margin-top: 4px; }
.hies-croot .seal-quote { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 22px; line-height: 1.25; color: var(--ink); max-width: 280px; }
.hies-croot .seal-divider { width: 32px; height: 1px; background: var(--gold); }
.hies-croot .seal-meta { font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-mute); }
.hies-croot .seal-frame__foot { padding-top: 16px; border-top: 1px solid rgba(26, 31, 46, 0.14); display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.hies-croot .seal-frame__foot strong { color: var(--emerald-deep); font-weight: 600; }

.hies-croot .hies-slide-2 { background: #ffffff; color: var(--ink); }
/* Timeline panel keeps original dark emerald so its light text remains readable on white slide */
.hies-croot .timeline { position: absolute; inset: 0; padding: 28px; background: linear-gradient(135deg, var(--emerald-deep), var(--emerald-2)); border: 1px solid rgba(26, 31, 46, 0.14); box-shadow: 0 30px 80px -30px rgba(10, 58, 44, 0.4); display: flex; flex-direction: column; gap: 14px; }
.hies-croot .timeline__head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid rgba(244, 237, 224, 0.14); font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.hies-croot .timeline__head .span { font-family: var(--serif); font-style: italic; font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--ivory); opacity: 0.85; }
.hies-croot .timeline__phases { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.hies-croot .phase { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-left: 2px solid var(--gold); background: rgba(244, 237, 224, 0.04); font-family: var(--sans); font-size: 12px; }
.hies-croot .phase .id { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--gold); letter-spacing: 0.08em; }
.hies-croot .phase .name { font-family: var(--serif); font-weight: 500; font-size: 16px; color: var(--ivory); letter-spacing: -0.01em; }
.hies-croot .phase .date { font-family: var(--mono); font-size: 10px; color: var(--ivory); opacity: 0.7; letter-spacing: 0.06em; text-align: right; }
.hies-croot .phase.is-mvp { border-left-color: var(--ivory); background: rgba(244, 237, 224, 0.10); }
.hies-croot .phase.is-mvp .id { color: var(--ivory); }
.hies-croot .phase.is-mvp .name::after { content: 'MVP'; display: inline-block; margin-left: 8px; padding: 2px 6px; font-family: var(--mono); font-size: 8px; letter-spacing: 0.15em; background: var(--gold); color: var(--ink); vertical-align: middle; transform: translateY(-1px); }

.hies-croot .hies-slide-3 { background: #ffffff; color: var(--ink); }
.hies-croot .pillars { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; }
.hies-croot .pillar { background: var(--ivory); border: 1px solid rgba(26, 31, 46, 0.12); padding: 18px; display: flex; flex-direction: column; justify-content: space-between; position: relative; transition: transform 280ms ease; }
.hies-croot .pillar::before { content: ''; position: absolute; top: 0; left: 0; width: 28px; height: 28px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.hies-croot .pillar__id { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; color: var(--gold-2); font-weight: 500; }
.hies-croot .pillar__title { font-family: var(--serif); font-weight: 500; font-size: 18px; line-height: 1.15; color: var(--emerald-deep); letter-spacing: -0.01em; margin: 8px 0 6px; }
.hies-croot .pillar__desc { font-family: var(--sans); font-size: 11px; color: var(--ink-soft); line-height: 1.4; }
.hies-croot .pillar__metric { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 14px; color: var(--gold-2); margin-top: 8px; }

.hies-croot .carousel__nav { position: absolute; bottom: clamp(20px, 4vh, 32px); right: clamp(24px, 5vw, 80px); z-index: 10; display: flex; gap: 6px; }
.hies-croot .carousel__nav button { width: 44px; height: 44px; border: 1px solid currentColor; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background 240ms ease, color 240ms ease; color: inherit; }
.hies-croot .carousel__nav button:hover { background: currentColor; }
.hies-croot .carousel__nav button:hover svg { stroke: var(--ivory); }
.hies-croot .carousel[data-theme="dark"] .carousel__nav button:hover svg { stroke: var(--emerald-deep); }
.hies-croot .carousel__nav svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.5; fill: none; transition: stroke 240ms ease; }
.hies-croot .carousel[data-theme="dark"]   { color: var(--ivory); }
.hies-croot .carousel[data-theme="ivory"]  { color: var(--ink); }
.hies-croot .carousel[data-theme="gold"]   { color: var(--ink); }

@keyframes hies-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
.hies-croot .slide.is-active .eyebrow      { animation: hies-rise 800ms cubic-bezier(.2,.7,.2,1) 100ms both; }
.hies-croot .slide.is-active h1            { animation: hies-rise 1000ms cubic-bezier(.2,.7,.2,1) 240ms both; }
.hies-croot .slide.is-active p             { animation: hies-rise 800ms cubic-bezier(.2,.7,.2,1) 540ms both; }
.hies-croot .slide.is-active .ctas         { animation: hies-rise 800ms cubic-bezier(.2,.7,.2,1) 700ms both; }
.hies-croot .slide.is-active .slide__foot  { animation: hies-rise 800ms cubic-bezier(.2,.7,.2,1) 860ms both; }
.hies-croot .slide.is-active .slide__visual{ animation: hies-rise 1100ms cubic-bezier(.2,.7,.2,1) 360ms both; }

@media (max-width: 960px) {
  .hies-croot .carousel { height: auto; min-height: clamp(545px, 74vh, 760px); max-height: none; background: var(--ivory); }
  .hies-croot .carousel__track { height: auto; min-height: clamp(545px, 74vh, 760px); }
  .hies-croot .slide { position: relative; inset: auto; display: none; }
  .hies-croot .slide.is-active { display: block; }
  .hies-croot .slide__inner { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto auto; padding: 80px 24px 110px; gap: 32px; min-height: clamp(545px, 74vh, 760px); }
  .hies-croot .slide__copy, .hies-croot .slide__foot, .hies-croot .slide__visual { grid-column: 1 / -1; }
  .hies-croot .slide__visual { order: 1; max-width: 340px; aspect-ratio: 1 / 1; justify-self: center; margin-bottom: 12px; }
  .hies-croot .slide__copy { order: 2; }
  .hies-croot .slide__foot { order: 3; padding-top: 20px; }
  .hies-croot .slide__copy h1 { font-size: clamp(28px, 7vw, 44px); }
  .hies-croot .slide__foot { gap: 0; flex-wrap: wrap; }
  .hies-croot .slide__foot .stat { flex: 1 1 48%; min-width: 0; padding-right: 12px; padding-bottom: 18px; }
  .hies-croot .slide__foot .stat + .stat { padding-left: 12px; border-left: none; }
  .hies-croot .seal-frame { padding: 18px; } .hies-croot .seal-frame__body { gap: 12px; padding: 14px 6px; } .hies-croot .seal-emblem { width: 100px; height: 100px; } .hies-croot .seal-emblem__num { font-size: 30px; } .hies-croot .seal-quote { font-size: 17px; max-width: 220px; }
  .hies-croot .timeline { padding: 18px; } .hies-croot .timeline__phases { gap: 5px; } .hies-croot .phase { padding: 7px 10px; grid-template-columns: 24px 1fr auto; } .hies-croot .phase .name { font-size: 13px; } .hies-croot .phase .id { font-size: 10px; } .hies-croot .phase .date { font-size: 9px; }
  .hies-croot .pillar { padding: 12px; } .hies-croot .pillar__title { font-size: 14px; line-height: 1.1; } .hies-croot .pillar__desc { display: none; } .hies-croot .pillar__id { font-size: 8px; } .hies-croot .pillar__metric { font-size: 12px; margin-top: 4px; }
  .hies-croot .carousel__nav { right: 24px; bottom: 22px; }
}

@media (max-width: 720px) {
  .hies-croot .carousel { height: auto; min-height: clamp(475px, 70vh, 700px); }
  .hies-croot .carousel__track { min-height: clamp(475px, 70vh, 700px); }
  .hies-croot .slide__inner { min-height: clamp(475px, 70vh, 700px); }
}

@media (prefers-reduced-motion: reduce) { .hies-croot .slide, .hies-croot .slide.is-active * { animation: none !important; transition: opacity 200ms ease !important; } }

/* ---- Host-page isolation shim ----------------------------------------
   These carousels used to live in an <iframe>, so global element rules
   from /styles.css and product-page.css never reached them. Inline, two
   bare-element rules leak in: `footer { background: var(--ink-950); … }`
   (styles.css) and `a { color: var(--electric-bright) }` (product-page.css).
   Neutralize them; class-based carousel rules still override these. */
.hies-croot footer { background: transparent; border-top: 0; padding: 0; }
.hies-croot a { color: inherit; }
