/* ==========================================================================
   Hero Frame block (almax/hero-frame)
   Scoped DS tokens — do not change site-wide almax-tokens.css.
   ========================================================================== */

.almax-hero-frame {
  --hf-radius-frame: 16px;
  --hf-radius-tile: 8px;
  --hf-radius-chip: 4px;
  --hf-frame-keyline: 1px solid var(--orange-500);
  --hf-frame-offset-rule: 1px solid var(--n-600, #363c45);
  --hf-frame-offset: 4px;
  --hf-section-gap: 16px;
  --hf-control-h-lg: 48px;
  --hf-measure-lede: 60ch;
  --hf-ease: cubic-bezier(0.2, 0, 0, 1);
  --hf-dur-fast: 120ms;
  --hf-tick-quiet: var(--n-400, #a6acb5);
  --hf-tick-quiet-dim: var(--n-200, #d7d9dc);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 40px 0;
  overflow: visible;
  background: var(--bg-canvas);
}

html[data-prc-theme="dark"] .almax-hero-frame {
  --hf-tick-quiet: var(--n-500, #6b6f76);
  --hf-tick-quiet-dim: var(--n-600, #363c45);
}

.almax-hero-frame *,
.almax-hero-frame *::before,
.almax-hero-frame *::after {
  box-sizing: border-box;
}

.almax-hero-frame__shell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.almax-hero-frame__rail {
  position: absolute;
  display: block;
  overflow: visible;
  pointer-events: none;
}

.almax-hero-frame__ticks rect {
  opacity: 0;
}

.almax-hero-frame.is-inview .almax-hero-frame__ticks rect:nth-child(1) {
  opacity: 1;
  transition: opacity 260ms var(--hf-ease) 200ms;
}

.almax-hero-frame.is-inview .almax-hero-frame__ticks rect:nth-child(2) {
  opacity: 1;
  transition: opacity 260ms var(--hf-ease) 350ms;
}

.almax-hero-frame.is-inview .almax-hero-frame__ticks rect:nth-child(3) {
  opacity: 1;
  transition: opacity 260ms var(--hf-ease) 500ms;
}

.almax-hero-frame.is-drawn .almax-hero-frame__ticks rect {
  opacity: 1;
  transition: none;
}

.almax-hero-frame__band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 8px;
}

.almax-hero-frame__band--has-crumb {
  justify-content: flex-start;
  gap: 29px;
  padding: 0 40px 0 34px;
}

.almax-hero-frame__crumbs {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.almax-hero-frame__crumb {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 30px 0 8px;
  font: 500 12px/1 var(--font-copy, "Barlow", system-ui, sans-serif);
  color: var(--text-primary);
  white-space: nowrap;
}

.almax-hero-frame__crumb-svg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
}

.almax-hero-frame__crumb-text {
  position: relative;
}

.almax-hero-frame__band-label {
  flex: 0 0 auto;
  font: var(--type-label);
  letter-spacing: var(--track-label-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}

.almax-hero-frame__frame-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
}

.almax-hero-frame__frame {
  display: flex;
  flex-direction: column;
  gap: var(--hf-section-gap);
  min-height: 460px;
  padding: 40px;
  background: var(--bg-canvas);
  border: var(--hf-frame-keyline);
  border-radius: var(--hf-radius-frame);
  outline: var(--hf-frame-offset-rule);
  outline-offset: var(--hf-frame-offset);
}

.almax-hero-frame__stage {
  position: relative;
  display: flex;
  flex: 1 1 0%;
}

.almax-hero-frame__mark {
  position: absolute;
  z-index: 1;
  display: flex;
  pointer-events: none;
}

.almax-hero-frame__mark--tl {
  top: 0;
  left: -20px;
}

.almax-hero-frame__mark--br {
  top: calc(100% - 49px);
  left: calc(100% - 47px);
}

.almax-hero-frame__grid {
  display: grid;
  flex: 1 1 0%;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
}

/* First-view hold: tiny centre window + stacked corner marks (JS opens it). */
.almax-hero-frame.is-pending .almax-hero-frame__grid {
  clip-path: inset(calc(50% - 4px) round 4px);
}

.almax-hero-frame.is-pending .almax-hero-frame__mark--tl,
.almax-hero-frame.is-pending .almax-hero-frame__mark--br {
  top: calc(50% - 18.5px);
  left: calc(50% - 17.5px);
}

.almax-hero-frame.is-drawn .almax-hero-frame__grid,
.almax-hero-frame.is-revealed .almax-hero-frame__grid {
  clip-path: none;
}

.almax-hero-frame__copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.almax-hero-frame__eyebrow {
  padding-left: 24px;
  font: var(--type-label);
  letter-spacing: var(--track-label-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.almax-hero-frame__title {
  margin: 0;
  font-family: var(--font-display, "Barlow Condensed", "Barlow", system-ui, sans-serif);
  font-size: 64px;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: var(--track-display, 0.02em);
  text-transform: uppercase;
  color: var(--text-primary);
}

.almax-hero-frame__lede {
  max-width: var(--hf-measure-lede);
  margin: 0;
  font: var(--type-lede);
  color: var(--text-body);
}

.almax-hero-frame__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.almax-hero-frame__chip,
a.almax-hero-frame__chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--border-accent);
  border-radius: var(--hf-radius-chip);
  font: var(--type-chip);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-accent);
  white-space: nowrap;
  transition: background var(--hf-dur-fast) var(--hf-ease), color var(--hf-dur-fast) var(--hf-ease);
}

a.almax-hero-frame__chip:hover,
a.almax-hero-frame__chip:focus-visible {
  background: var(--bg-raised);
  color: var(--text-accent);
}

.almax-hero-frame__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.almax-hero-frame__btn,
a.almax-hero-frame__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--hf-control-h-lg);
  padding: 0 20px;
  border-radius: var(--hf-radius-chip);
  font: 500 14px/1 var(--font-copy, "Barlow", system-ui, sans-serif);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--hf-dur-fast) var(--hf-ease), color var(--hf-dur-fast) var(--hf-ease);
}

.almax-hero-frame__btn--primary,
a.almax-hero-frame__btn--primary {
  background: var(--accent);
  border: 1px solid transparent;
  color: var(--text-on-accent);
}

.almax-hero-frame__btn--primary:hover,
.almax-hero-frame__btn--primary:focus-visible,
a.almax-hero-frame__btn--primary:hover,
a.almax-hero-frame__btn--primary:focus-visible {
  background: var(--accent-hover);
  color: var(--text-on-accent);
}

.almax-hero-frame__btn--primary:active,
a.almax-hero-frame__btn--primary:active {
  background: var(--accent-pressed);
}

.almax-hero-frame__btn--secondary,
a.almax-hero-frame__btn--secondary {
  background: transparent;
  border: 1px solid var(--border-accent);
  color: var(--text-accent);
}

.almax-hero-frame__btn--secondary:hover,
.almax-hero-frame__btn--secondary:focus-visible,
a.almax-hero-frame__btn--secondary:hover,
a.almax-hero-frame__btn--secondary:focus-visible {
  background: var(--bg-raised);
  color: var(--text-accent);
}

.almax-hero-frame__media {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  background: var(--bg-imagery);
  border-radius: var(--hf-radius-tile);
}

.almax-hero-frame__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.almax-hero-frame__specimen {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: inline-block;
  padding: 6px 10px;
  background: #e8e9e3c2;
  border-radius: var(--hf-radius-chip) 4px;
  font: var(--type-meta-medium);
  letter-spacing: -0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: pre-wrap;
  max-width: 500px;
}

@media (max-width: 960px) {
  .almax-hero-frame {
    padding: 20px 20px 0;
  }

  .almax-hero-frame__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .almax-hero-frame__title {
    font-size: 42px;
  }

  .almax-hero-frame__frame {
    min-height: 0;
    padding: 24px;
  }

  .almax-hero-frame__media {
    min-height: 240px;
  }

  .almax-hero-frame__band--has-crumb {
    padding: 0 28px 0 28px;
  }
}

@media (max-width: 640px) {
  .almax-hero-frame__title {
    font-size: 32px;
  }

  .almax-hero-frame__band-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .almax-hero-frame__specimen {
    max-width: calc(100% - 32px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (prefers-reduced-motion: reduce) {
  .almax-hero-frame.is-pending .almax-hero-frame__grid {
    clip-path: none;
  }

  .almax-hero-frame.is-pending .almax-hero-frame__mark--tl {
    top: 0;
    left: -20px;
  }

  .almax-hero-frame.is-pending .almax-hero-frame__mark--br {
    top: calc(100% - 49px);
    left: calc(100% - 47px);
  }

  .almax-hero-frame__ticks rect,
  .almax-hero-frame.is-inview .almax-hero-frame__ticks rect,
  .almax-hero-frame__btn,
  .almax-hero-frame__chip {
    transition: none;
  }
}
