/* Maxi Capitalist home page. Loaded on the home page only.
   Every class is prefixed hm- so nothing here can affect the site header,
   footer or any other page. Reveal animations reuse .reveal from main.css. */

html { scroll-padding-top: 5.5rem; }
.hm { --hm-hdr: 61px; --hm-band: 84px; }

/* ---------- Hero: bridge as background, copy left, wordmark cropped at the foot ---------- */
.hm-hero { position: relative; height: calc(100svh - var(--hm-hdr) - var(--hm-band)); min-height: 34rem; max-height: 62rem; overflow: hidden; background: var(--paper); }
.hm-hero__bridge { position: absolute; right: -2vw; top: 4%; width: min(64vw, 61rem); z-index: 0; margin: 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 34%, #000 100%);
          mask-image: linear-gradient(to right, transparent 0%, #000 34%, #000 100%); }
.hm-hero__bridge img { width: 100%; height: auto; display: block; }
.hm-hero__inner { position: relative; z-index: 2; padding-top: clamp(2rem, 8vh, 6.5rem); }
.hm-hero__copy { max-width: min(46vw, 35rem); }
.hm-label { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem; font-weight: 600; color: var(--ink-soft); margin: 0; }
.hm-hero h1 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; line-height: 1.04; font-size: clamp(2.1rem, 4.6vw, 4.25rem); margin: 0.45em 0 0.4em; }
.hm-hero h1 em, .hm h2 em { font-style: italic; font-weight: 400; color: var(--accent); }
.hm-lede { font-size: clamp(0.95rem, 1.25vw, 1.06rem); line-height: 1.7; color: var(--ink-soft); max-width: 40ch; margin: 0; }
.hm-cta { display: flex; gap: 0.75rem; margin-top: 1.6rem; flex-wrap: wrap; }
.hm .btn { min-height: 44px; font-weight: 600; font-size: 0.85rem; letter-spacing: 0.01em; }
.hm .btn--solid { background: var(--ink); color: var(--paper); }
.hm .btn--solid:hover, .hm .btn--solid:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* Big wordmark: centred, fitted to width, cropped by the band below */
.hm-mark { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; margin: 0; text-align: center; white-space: nowrap;
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.025em; line-height: 0.8; color: var(--ink);
  font-size: 11.3vw; transform: translateY(0.1em); user-select: none; pointer-events: none; }
.hm-mark span { display: inline-block; will-change: transform; }

.hm-band { background: var(--ink); color: var(--paper); position: relative; z-index: 4; }
.hm-band__inner { display: flex; flex-wrap: wrap; gap: 1rem 3rem; padding-block: 1.3rem; margin-block: 0; }
.hm-band__inner div { margin: 0; }
.hm-band dt { color: var(--paper); font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.64rem; margin-bottom: 0.3rem; }
.hm-band dd { margin: 0; font-size: 0.72rem; letter-spacing: 0.04em; color: #cfc8ba; }
.hm-band a { color: #cfc8ba; border-bottom: 1px solid rgba(207, 200, 186, 0.35); display: inline-block; padding-block: 0.55rem; margin-block: -0.55rem; }
.hm-band a:hover { color: var(--paper); border-color: var(--paper); }

/* ---------- Travelling coin ---------- */
.hm-coin { position: fixed; top: 0; left: 0; width: clamp(120px, 15vw, 230px); aspect-ratio: 1; z-index: 6; pointer-events: none;
  perspective: 900px; opacity: 0; visibility: hidden; will-change: transform, opacity; }
.hm-coin__faces { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.hm-coin svg { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  filter: drop-shadow(0 10px 14px rgba(32, 32, 32, 0.16)); }
.hm-coin .hm-coin__back { transform: rotateY(180deg); }

/* ---------- Sections ---------- */
.hm-section { position: relative; z-index: 2; padding-block: clamp(4rem, 12vh, 8.75rem); }
.hm-section--alt { background: var(--paper-alt); }
.hm-two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5.6rem); align-items: start; }
.hm h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; line-height: 1.1; font-size: clamp(1.65rem, 3.2vw, 2.75rem); margin: 0 0 0.5em; }
.hm-col-lede { font-size: 0.95rem; line-height: 1.75; color: var(--ink-soft); max-width: 44ch; margin: 0; }

.hm-rows { border-top: 1px solid var(--line); margin: 0; padding: 0; list-style: none; }
.hm-row { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: 1.1rem; align-items: baseline; padding: 1.1rem 0.4rem; border-bottom: 1px solid var(--line-faint); color: var(--ink); transition: background 0.2s ease; }
a.hm-row:hover, a.hm-row:focus-visible { background: rgba(117, 106, 92, 0.07); }
.hm-row__lab { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.64rem; font-weight: 600; color: var(--accent); }
.hm-row__desc { font-size: 0.88rem; line-height: 1.6; }
.hm-row__val { font-family: var(--serif); font-size: 1.25rem; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
a.hm-row:hover .hm-row__lab { color: var(--ink); }

/* ---------- Five layers video ---------- */
.hm-layers__head { max-width: 58ch; margin-bottom: 1.6rem; }
.hm-layers__head h2 { margin-top: 0.5em; }
.hm-layers__more { margin: 1.4rem 0 0; font-size: 0.9rem; }

/* ---------- Compound interest ---------- */
.hm-demo__head { max-width: 58ch; margin-bottom: 1.5rem; }
.hm-demo__head h2 { margin-top: 0.5em; }
.hm-formula { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.9rem; }
.hm-formula code { white-space: nowrap; font-family: var(--sans); font-size: 0.8rem; background: var(--paper); border: 1px solid var(--line-faint); padding: 0.1rem 0.4rem; border-radius: var(--radius); color: var(--ink); }
.hm-variants { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.hm-variants button { font-family: var(--sans); font-size: 0.8rem; font-weight: 600; padding: 0.55rem 1rem; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); cursor: pointer; min-height: 44px; min-width: 44px; border-radius: var(--radius); }
.hm-variants button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.hm-variants button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hm-panel { border: 1px solid var(--line); background: var(--paper); padding: clamp(1rem, 3vw, 2rem); border-radius: var(--radius); }
.hm-panel svg { width: 100%; height: auto; display: block; overflow: visible; }
.hm-legend { display: flex; gap: 0.5rem 1.4rem; flex-wrap: wrap; font-size: 0.75rem; color: var(--ink-soft); margin: 0 0 0.6rem; }
.hm-legend i { display: inline-block; width: 22px; height: 0; border-top: 2.5px solid var(--ink); vertical-align: middle; margin-right: 7px; }
.hm-legend i.is-simple { border-top: 2px dashed var(--accent); }
.hm-legend i.is-gap { border-top: 10px solid rgba(117, 106, 92, 0.3); width: 18px; }
.hm-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin: 1.1rem 0 0; border-top: 1px solid var(--line-faint); padding-top: 1.1rem; }
.hm-facts div { margin: 0; }
.hm-facts dd { margin: 0; font-family: var(--serif); font-size: 1.9rem; line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); }
.hm-facts dt { font-size: 0.68rem; letter-spacing: 0.06em; color: var(--ink-soft); text-transform: uppercase; margin-top: 0.45rem; order: 2; }
.hm-facts div { display: flex; flex-direction: column; }
.hm-note { font-size: 0.72rem; font-style: italic; color: var(--ink-soft); margin: 0.9rem 0 0; }

/* ---------- Close ---------- */
.hm-close { position: relative; z-index: 2; background: var(--paper-alt); overflow: hidden; padding-top: clamp(4.4rem, 14vh, 9.4rem); }
.hm-close__inner { position: relative; }
.hm-close h2 { font-size: clamp(1.8rem, 4vw, 3.6rem); margin-bottom: 0; }
.hm-fine { font-size: 0.78rem; letter-spacing: 0.02em; color: var(--ink-soft); margin: 3rem 0 0; max-width: 62ch; }
.hm-close .hm-cta { justify-content: flex-end; margin-top: 1.9rem; }
.hm-close .hm-mark { position: relative; bottom: auto; margin-top: clamp(2.5rem, 8vh, 5.6rem); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hm-two { grid-template-columns: 1fr; gap: 2.2rem; }
}
@media (max-width: 760px) {
  .hm { --hm-hdr: 74px; --hm-band: 56px; }
  .hm-hero { height: auto; min-height: calc(100svh - var(--hm-hdr) - var(--hm-band)); max-height: none; padding-bottom: 24vw; }
  .hm-hero__copy { max-width: none; }
  .hm-hero__bridge { width: 118vw; right: -30vw; top: auto; bottom: 14vw; opacity: 0.35; }
  .hm-band__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.2rem; }
  .hm-facts { grid-template-columns: 1fr; gap: 0.8rem; }
  .hm-close .hm-cta { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .hm-row { grid-template-columns: 1fr auto; grid-template-areas: "lab val" "desc desc"; row-gap: 0.35rem; padding-inline: 0.2rem; }
  .hm-row__lab { grid-area: lab; }
  .hm-row__val { grid-area: val; }
  .hm-row__desc { grid-area: desc; }
  .hm-cta .btn { flex: 1 1 auto; justify-content: center; }
}
/* Tablets in portrait: the bridge fills the lower half of the hero, under the copy */
@media (min-width: 761px) and (max-width: 1100px) and (orientation: portrait) {
  .hm-hero__copy { max-width: 36rem; }
  .hm-hero__bridge { width: 96vw; right: -8vw; top: auto; bottom: 7vw;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 100%);
            mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 100%); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .hm-hero { height: auto; min-height: 0; max-height: none; padding-bottom: 13vw; }
  .hm-hero__inner { padding-top: 1.5rem; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .hm-coin { display: none !important; }
  .hm-mark span { transform: none !important; }
}
