/* SMA Method — homepage hero + SYSTEM INTRO + BANDS + CTA OUTRO */

.page-home {
  background-color: var(--cream);
}

.page-home .site-main {
  padding: 0;
  margin: 0;
  max-width: none;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  box-sizing: border-box;
  height: 700px;
  max-height: 700px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  color: var(--white);
  background-color: #000;
  background-image: url("../images/hero-bg-black-texture.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Header treatment lives in global.css under .site-header--on-hero. */

.hero__stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-4) var(--space-6);
  position: relative;
  z-index: 1;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
}

.hero__title {
  margin: 0;
  display: flex;
  justify-content: center;
  width: 100%;
}

.hero__title.hero-jumbo {
  font-family: var(--font-jumbo);
  font-weight: 500;
  font-size: clamp(2.75rem, 8vw + 0.5rem, 6.25rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hero__h1-block {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.28em 0.2em;
}

.hero__word {
  white-space: nowrap;
}

.hero__arrow-svg {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.88);
  vertical-align: middle;
}

.hero__arrow-svg--between {
  width: clamp(40px, 8vw, 56px);
  height: auto;
}

.hero__arrow-initial-wrap {
  display: none;
}

.hero__tagline {
  margin: 0;
  max-width: 36rem;
  font-family: var(--font-jumbo);
  font-size: clamp(1.35rem, 1.5vw + 0.75rem, 1.75rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.88);
}

/* ============================================================
   HERO TERMINAL
   ============================================================ */
.hero__terminal {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 820px;
  height: 115px;
  margin: 0;
  padding: 0;
  text-align: left;
  color: #f3f3f3;
  background-color: rgba(34, 34, 34, 0.5);
  border: 1px solid #555555;
  border-radius: 8px;
  overflow: hidden;
}

.hero__terminal-lights {
  position: absolute;
  left: 9px;
  top: 11px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.hero__terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hero__terminal-dot--red    { background-color: #a04b4b; }
.hero__terminal-dot--yellow { background-color: #d9b561; }
.hero__terminal-dot--green  { background-color: #45a561; }

.hero__terminal-main {
  position: absolute;
  left: 61px;
  top: 36px;
  width: min(723px, calc(100% - 61px - 36px));
  height: 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: calc(29.547168731689453 / 22);
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}

.hero__terminal-main,
.hero__terminal-main * {
  font-family: var(--font-mono);
}

.hero__terminal-row {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  white-space: nowrap;
}

.hero__terminal-row--pending {
  display: none;
}

.hero__terminal-line {
  margin: 0;
}

.hero__terminal-cursor {
  flex-shrink: 0;
  margin-inline-start: 0;
  color: #f3f3f3;
  animation: hero-terminal-cursor-blink 1s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero__terminal-cursor { animation: none; opacity: 1; }
}

@keyframes hero-terminal-cursor-blink {
  0%, 49.99% { opacity: 1; }
  50%, 100%  { opacity: 0; }
}

@media (max-width: 767px) {
  .hero__h1-block {
    flex-direction: column;
    gap: 0.08em;
  }
  .hero__arrow-svg--between {
    width: 20px;
    height: clamp(36px, 10vw, 48px);
    transform: rotate(90deg);
  }
  .hero__terminal { max-width: none; }

  /* Proportional hero on phones (replaces the fixed 700px height) */
  .page-home .hero {
    height: auto;
    max-height: none;
    min-height: 80svh;
  }
  .page-home .hero__stage {
    padding: var(--space-3) var(--space-3) var(--space-6);
  }
  .page-home .hero__inner {
    gap: var(--space-3);
  }
  .page-home .hero__tagline {
    font-size: clamp(1.05rem, 4.5vw, 1.35rem);
    line-height: 1.4;
  }
  .page-home .hero__terminal {
    height: auto;
    min-height: 92px;
  }
  .page-home .hero__terminal-main {
    left: 16px;
    top: 42px;
    width: calc(100% - 28px);
    font-size: 13px;
  }

  /* Hide the system diagrams on the homepage; keep the band copy */
  .page-home .band__figure {
    display: none;
  }
  .page-home .band__inner {
    margin-bottom: 0;
  }
}

/* ============================================================
   SYSTEM INTRO — white section under the hero, charcoals at edges
   ============================================================ */
.system-intro {
  position: relative;
  background-color: #ffffff;
  padding: clamp(4rem, 7vw, 7rem) var(--space-4) clamp(3rem, 5vw, 5rem);
  overflow: visible;
}

.system-intro__inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
}

.system-intro__heading {
  margin: 0 0 clamp(1.25rem, 1.8vw, 1.75rem);
  font-family: var(--font-jumbo);
  font-weight: 700;
  font-size: clamp(2rem, 3vw + 0.6rem, 3rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: #111;
}

.system-intro__body {
  margin: 0 auto;
  max-width: 820px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
  line-height: 1.65;
  color: #111;
}

.system-intro__charcoal {
  position: absolute;
  top: 0;
  z-index: 0;
  pointer-events: none;
  height: auto;
  max-width: none;
  display: block;
  opacity: 1;
}

.system-intro__charcoal--tl { left: 0;  width: clamp(260px, 28vw, 404px); }
.system-intro__charcoal--tr { right: 0; width: clamp(286px, 43vw, 624px); }

@media (max-width: 767px) {
  .system-intro { padding: clamp(2.5rem, 9vw, 4rem) var(--space-2); }
  .system-intro__body { font-size: 1rem; line-height: 1.6; }
  .system-intro__charcoal--tl,
  .system-intro__charcoal--tr {
    width: clamp(156px, 36vw, 260px);
    opacity: 0.6;
  }
}

/* ============================================================
   BANDS — each subsystem (UI/UX, Protocol, Overview) is a
   full-bleed colored band. The heading + intro is centered
   inside .band__inner; the diagram .band__figure sits below
   constrained to 80vw, centered.
   ============================================================ */
.band {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(4rem, 7vw, 7rem) var(--space-4);
  text-align: center;
  overflow: hidden;
}

/* Backgrounds by position */
.band--ui       { background-color: #f8f6f1; }
.band--protocol { background-color: #efece5; }
.band--overview { background-color: #e6e2d9; }

/* Centered, contained heading + intro block */
.band__inner {
  width: 100%;
  max-width: 900px;
  margin: 0 auto clamp(2.5rem, 4vw, 4rem);
  text-align: center;
}

.band__heading {
  margin: 0 0 clamp(1rem, 1.5vw, 1.5rem);
  font-family: var(--font-jumbo);
  font-weight: 700;
  font-size: clamp(1.75rem, 2.5vw + 0.5rem, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: #111;
  text-align: center;
}

.band__intro {
  margin: 0 auto;
  max-width: 720px;
}

.band__intro p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1rem, 0.25vw + 0.95rem, 1.125rem);
  line-height: 1.65;
  color: #111;
  text-align: center;
}

/* Diagram: 80vw, centered, contains the SVG */
.band__figure {
  width: 80vw;
  max-width: 80vw;
  margin: 0 auto;
  overflow: visible;
}

.band__figure .system__svg,
.band__figure > svg,
.band__figure .system-diagram {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* ============================================================
   CTA OUTRO BAND — 150px black band at the bottom of the page,
   hero texture, single pill button.
   ============================================================ */
.band--cta-outro {
  width: 100%;
  min-height: 150px;
  padding: clamp(2.5rem, 4vw, 4rem) var(--space-4);
  background-color: #000;
  background-image: url("../images/hero-bg-black-texture.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}

/* CTA button uses the shared demo button system. */
.band--cta-outro .demo-cta {
  text-transform: none;
}

/* ============================================================
   MOBILE — diagrams go full width, bands tighten
   ============================================================ */
@media (max-width: 900px) {
  .band {
    padding: clamp(2.5rem, 8vw, 4rem) var(--space-3);
  }
  .band__figure {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 1023px) {
  .band__figure {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(26, 26, 26, 0.25) transparent;
  }
  .band__figure .system__svg,
  .band__figure > svg,
  .band__figure .system-diagram {
    width: auto;
    max-width: none;
  }
}


/* ---------- Mobile hero terminal containment ---------- */
@media (max-width: 767px) {

  .page-home .hero__terminal {
    width: 100%;
    max-width: 100%;
    min-height: 108px;
    height: auto;
    padding: 0;
    overflow: hidden;
  }

  .page-home .hero__terminal-lights {
    left: 12px;
    top: 12px;
    gap: 6px;
  }

  .page-home .hero__terminal-dot {
    width: 10px;
    height: 10px;
  }

  .page-home .hero__terminal-main {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    min-height: 68px;
    padding: 40px 16px 14px;
    overflow: hidden;
    display: block;
    font-size: 12px;
    line-height: 1.55;
  }

  .page-home .hero__terminal-row--pending {
    display: none !important;
  }

  .page-home .hero__terminal-row:not(.hero__terminal-row--pending) {
    display: block !important;
    white-space: normal !important;
    overflow: visible;
    max-width: 100%;
  }

  .page-home .hero__terminal-line {
    display: inline;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .page-home .hero__terminal-cursor {
    display: inline;
    margin-left: 2px;
  }
}

/* ---------- Mobile diagram download links ---------- */
.diagram-download-link {
  display: none;
}

@media (max-width: 767px) {
  .page-home .band__figure {
    display: block !important;
    width: 100%;
    max-width: 100%;
    margin: 1.5rem auto 0;
    overflow: visible;
    text-align: center;
  }

  .page-home .band__figure .system-diagram {
    display: none !important;
  }

  .page-home .diagram-download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(17,17,17,.18);
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.92rem;
    line-height: 1.2;
    color: #111;
    background: rgba(255,255,255,.68);
    text-decoration: none;
  }

  .page-home .diagram-download-link::after {
    content: " ↓";
    margin-left: .35rem;
  }
}

