/* Version 8 — the reveal, in the landing's frame.
   The drum, the terrain, and the community list are the live reveal.
   This page only supplies the studio chrome around that stage. */

.frame {
  --reveal-head: 22px;
  --reveal-foot: 0.305;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
}

.frame__bar,
.frame__body,
.frame__foot {
  min-width: 0;
}

.frame__bar {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem var(--pad) 0.7rem;
}

.frame .brand {
  gap: 0.85rem;
  min-width: 0;
}

.frame .logo-stage {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 3.35rem;
  aspect-ratio: 1;
}

.frame .logo-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.frame .brand__name {
  max-width: none;
  margin: 0 0 0.28rem;
  font-size: 0.92rem;
  letter-spacing: -0.04em;
}

.frame .identity-copy__location {
  display: flex;
  align-items: center;
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
}

.frame .identity-copy__practice {
  font-size: 0.64rem;
}

.frame .identity-copy__practice + .identity-copy__practice {
  margin-top: 0.12rem;
}

.frame .identity-copy__pip {
  width: 0.18rem;
  height: 0.18rem;
  margin: 0 0.32rem;
  border-radius: 50%;
  background: var(--signal);
}

.frame__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  align-items: center;
  justify-content: flex-end;
}

.frame__link {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  color: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.frame__link svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 1.4;
}

.frame__link:hover {
  color: var(--signal);
}

.frame__body {
  position: relative;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.reveal-frame {
  position: relative;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--paper);
}

/* The headline sits over the stage's lower-left corner; the reveal keeps
   its drum labels out of that corner. */
.frame__studio {
  position: absolute;
  z-index: 2;
  bottom: 1.4rem;
  left: var(--pad);
  pointer-events: none;
}

.frame__foot {
  background: var(--paper);
}

.frame .statement {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  font-size: clamp(2.6rem, 3.6vw, 3.9rem);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: -0.07em;
}

.frame .statement__line {
  display: block;
}

.frame .statement__line--second {
  font-size: 0.62em;
  font-weight: 400;
  letter-spacing: -0.06em;
}

.frame .period {
  color: var(--signal);
}

/* Version 7's drift and breath, and its signal specks. The keyframes and
   registered properties come from Version-7/styles.css. */
.frame .statement {
  position: relative;
}

.frame .statement__word {
  display: inline-block;
  transform-origin: 0 60%;
  will-change: transform;
}

.frame .statement__word--design {
  transform: translate3d(var(--float-design-x), var(--float-design-y), 0)
    scale(var(--scale-design));
  animation:
    float-design 12s ease-in-out infinite,
    breathe-design 18s ease-in-out infinite;
}

.frame .statement__word--understanding {
  transform: translate3d(
      var(--float-understanding-x),
      var(--float-understanding-y),
      0
    )
    scale(var(--scale-understanding));
  animation:
    float-understanding 15s ease-in-out infinite,
    breathe-understanding 18s ease-in-out infinite;
}

.frame .statement__drift {
  position: absolute;
  z-index: 1;
  inset: -0.08em -0.35em;
  overflow: hidden;
  pointer-events: none;
  container-type: size;
}

.frame .statement__flake {
  position: absolute;
  top: var(--flake-y);
  left: 0;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: var(--signal);
  opacity: 0;
  animation: flake var(--flake-time) linear infinite;
  animation-delay: var(--flake-delay);
}

.frame .statement__flake:nth-child(1) { --flake-y: 22%; --flake-time: 16s; --flake-delay: -2s; --flake-drop: 10px; }
.frame .statement__flake:nth-child(2) { --flake-y: 38%; --flake-time: 21s; --flake-delay: -9s; --flake-drop: -8px; }
.frame .statement__flake:nth-child(3) { --flake-y: 54%; --flake-time: 18s; --flake-delay: -5s; --flake-drop: 14px; }
.frame .statement__flake:nth-child(4) { --flake-y: 70%; --flake-time: 24s; --flake-delay: -14s; --flake-drop: -6px; }
.frame .statement__flake:nth-child(5) { --flake-y: 30%; --flake-time: 19s; --flake-delay: -17s; --flake-drop: 6px; }
.frame .statement__flake:nth-child(6) { --flake-y: 62%; --flake-time: 22s; --flake-delay: -7s; --flake-drop: -12px; }
.frame .statement__flake:nth-child(7) { --flake-y: 46%; --flake-time: 27s; --flake-delay: -20s; --flake-drop: 8px; }
.frame .statement__flake:nth-child(8) { --flake-y: 16%; --flake-time: 17s; --flake-delay: -11s; --flake-drop: -4px; }
.frame .statement__flake:nth-child(9) { --flake-y: 34%; --flake-time: 25s; --flake-delay: -3s; --flake-drop: 12px; }
.frame .statement__flake:nth-child(10) { --flake-y: 50%; --flake-time: 20s; --flake-delay: -13s; --flake-drop: -10px; }
.frame .statement__flake:nth-child(11) { --flake-y: 66%; --flake-time: 23s; --flake-delay: -6s; --flake-drop: 5px; }
.frame .statement__flake:nth-child(12) { --flake-y: 78%; --flake-time: 15s; --flake-delay: -18s; --flake-drop: -14px; }

/* The reveal page is header + stage + bottom panels.
   Shift and clip so only the stage shows: the drum, the terrain,
   and the community list. */
.reveal-frame {
  position: relative;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--paper);
}

.reveal-frame iframe {
  position: absolute;
  top: calc(var(--reveal-head) * -1);
  left: 0;
  width: 100%;
  height: calc((100% + var(--reveal-head)) / (1 - var(--reveal-foot)));
  border: 0;
}

.frame .band {
  position: relative;
  z-index: 3;
  right: auto;
  bottom: auto;
  left: auto;
  display: flex;
  flex: none;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 2.65rem;
  overflow: hidden;
  background: var(--paper);
  border-top: 1px solid var(--line);
  opacity: 1;
  animation: none;
}

.frame .band__track {
  display: flex;
  flex: 0 0 auto;
  width: max-content;
  animation: frame-band var(--band-duration, 30s) linear infinite;
}

.frame .band__set {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.frame .band__item {
  color: rgba(17, 17, 15, 0.5);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.frame .band__dot {
  flex: 0 0 auto;
  width: 0.22rem;
  height: 0.22rem;
  margin: 0 1.35rem;
  border-radius: 50%;
  background: var(--signal);
  opacity: 0.55;
}

@keyframes frame-band {
  to {
    transform: translate3d(calc(-1 * var(--band-set, 0px)), 0, 0);
  }
}

/* Phone: one screen. The links sit on their own row, the drum fills
   whatever is left, and the headline stays whole under it. */
@media (max-width: 759px) {
  .frame {
    height: 100svh;
    min-height: 0;
    overflow: auto;
  }

  .frame__bar {
    flex-wrap: nowrap;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.7rem var(--pad) 0.45rem;
  }

  .frame .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .frame .identity-copy__practice {
    white-space: nowrap;
  }

  /* One link per line, arrows in a column. The longest label sets the width,
     so "Partner Portal" cannot break away from its arrow. */
  .frame__nav {
    flex: 0 0 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0.42rem;
  }

  .frame__link {
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }

  .frame__body {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  .reveal-frame {
    flex: 1 1 auto;
    height: auto;
    min-height: 16rem;
  }

  .frame__studio {
    position: static;
    flex: none;
    padding: 0.3rem var(--pad) 0.25rem;
  }

  .frame .statement {
    font-size: clamp(2.05rem, 11vw, 3rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .frame .band__track,
  .frame .statement__word,
  .frame .statement__flake {
    animation: none;
  }
}
