/* Home page */

/* Overture: the static split is the default; JS pins it and drives --p. */
.overture {
  --p: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

.overture__pin {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  align-items: center;
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 6rem) clamp(3rem, 7vw, 7rem);
}

.overture__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.overture__stage {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 30% 20%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(circle at 75% 80%, rgba(79, 216, 255, 0.18), transparent 55%),
    var(--color-white);
  overflow: hidden;
}

.overture__stage::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--color-hairline);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
}

.overture__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  transition: opacity var(--dur-slow) var(--ease-out);
}

.overture__stage.is-live .overture__poster {
  opacity: 0;
}

.overture__canvas {
  position: absolute;
  inset: 0;
}

.overture__canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.overture__veil {
  display: none;
}

@media (min-width: 56.25rem) {
  .overture__pin {
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-8);
  }

  .overture__copy {
    grid-column: 1 / span 7;
  }

  .overture__stage {
    grid-column: 8 / span 5;
  }
}

/* JS on, no pin: phones and portrait tablets get a band above the copy.
   Landscape windows too short to pin keep the static split instead. */
@media (max-width: 56.1875rem), (max-aspect-ratio: 1 / 1) {
  html.is-overture .overture {
    height: auto;
    min-height: 100svh;
  }

  html.is-overture .overture__pin {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 0;
  }

  html.is-overture .overture__stage {
    order: -1;
    position: relative;
    inset: auto;
    width: 100%;
    height: 34svh;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    background: var(--color-paper);
  }

  html.is-overture .overture__stage::after {
    display: none;
  }

  html.is-overture .overture__copy {
    width: 100%;
    padding: var(--space-5) max(var(--gutter), calc((100% - var(--wrap)) / 2)) var(--space-8);
    background: var(--color-paper);
  }

  html.is-overture .hero__title {
    font-size: clamp(2rem, 8vw, 2.75rem);
  }
}

/* Phones: the eyebrow steps aside so the CTA clears the fold. */
@media (max-width: 26.875rem) {
  html.is-overture .hero__eyebrow {
    display: none;
  }
}

/* The smallest phones: the band, the headline, the price and the one CTA. */
@media (max-width: 22.5rem) {
  html.is-overture .overture__stage {
    height: 30svh;
  }

  html.is-overture .hero__sub,
  html.is-overture .hero__actions .btn--ghost {
    display: none;
  }
}

/* Short landscape: the copy is the product, so the band steps aside. */
@media (max-width: 56.1875rem) and (max-height: 32.5rem) {
  html.is-overture .overture__stage {
    display: none;
  }

  html.is-overture .hero__eyebrow {
    display: none;
  }

  html.is-overture .hero__title {
    font-size: clamp(2rem, 6.4vw, 3rem);
  }

  html.is-overture .overture__copy {
    padding-block: var(--space-4) var(--space-5);
  }
}

/* Phones on their side: the sub and the meta step aside so the CTA clears the fold. */
@media (max-width: 56.1875rem) and (max-height: 26rem) {
  html.is-overture .hero__sub,
  html.is-overture .hero__meta {
    display: none;
  }
}

/* JS on, wide landscape viewport: pin the shot for the length of the overture. */
@media (min-width: 64rem) and (min-aspect-ratio: 6/5) and (min-height: 40rem) {
  html.is-overture .overture {
    height: 190svh;
    min-height: 0;
    margin-top: calc(-1 * (var(--header-h) + 1px));
  }

  html.is-overture .overture__pin {
    position: sticky;
    top: 0;
    display: block;
    width: 100%;
    height: 100svh;
    margin: 0;
    padding: 0;
    overflow: clip;
  }

  html.is-overture .overture__stage {
    position: absolute;
    inset:
      calc(var(--p) * (var(--header-h) + var(--space-5)))
      calc(var(--p) * var(--space-6))
      calc(var(--p) * var(--space-6))
      calc(42% + (var(--p) * 8%));
    width: auto;
    height: auto;
    aspect-ratio: auto;
    border-radius: calc(var(--p) * var(--radius-lg));
    background: var(--color-paper);
  }

  html.is-overture .overture__stage::after {
    display: block;
    inset: 0;
    z-index: 3;
    /* Keeps its original 12% ink line in light; dark takes the hairline. */
    border: 1px solid light-dark(rgba(6, 10, 22, 0.12), rgba(255, 255, 255, 0.14));
    border-radius: inherit;
    opacity: var(--p);
  }

  html.is-overture .overture__copy {
    position: relative;
    z-index: 4;
    justify-content: safe center;
    width: min(44%, 44rem);
    height: 100%;
    padding-block: calc(var(--header-h) + var(--space-5)) 0;
    padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2)) var(--space-6);
    background: none;
    /* Last resort for very large text: the copy scrolls instead of clipping. */
    overflow-y: auto;
  }

  html.is-overture .overture__veil {
    display: block;
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    height: 28%;
    background: linear-gradient(
      to top,
      var(--color-paper) 8%,
      color-mix(in srgb, var(--color-paper) 45%, transparent) 42%,
      transparent 78%
    );
    opacity: calc(var(--p) * 0.7);
    pointer-events: none;
  }
}

/* Short desktop windows: tighten the copy so it still clears the fold. */
@media (min-width: 64rem) and (min-aspect-ratio: 6/5) and (min-height: 40rem) and (max-height: 46rem) {
  html.is-overture .overture__copy {
    padding-block: calc(var(--header-h) + var(--space-3)) 0;
  }

  html.is-overture .hero__title {
    margin-bottom: var(--space-4);
  }
}

.hero__eyebrow {
  margin-bottom: var(--space-5);
}

.hero__title {
  font-size: clamp(2.375rem, 4.2vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  margin-bottom: var(--space-5);
}

.hero__accent {
  display: block;
  color: var(--color-violet-deep);
  font-style: italic;
  font-weight: 500;
}

.hero__sub {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  max-width: 34ch;
  color: var(--color-ink);
}

.price-anchor {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--color-lime);
  color: var(--color-on-bright);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.price-anchor strong {
  font-size: 1.125rem;
}

.hero__price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-4);
}

.price-anchor__note {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.04em;
  color: var(--color-muted);
  text-transform: uppercase;
}

.hero__meta {
  font-size: var(--text-small);
  color: var(--color-muted);
  margin: 0;
}

.cta-band .hero__meta {
  color: light-dark(#C9C4DC, color-mix(in srgb, var(--color-on-deep) 72%, transparent));
}

.hero__stage {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 30% 20%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(circle at 75% 80%, rgba(79, 216, 255, 0.18), transparent 55%),
    var(--color-white);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.hero__stage::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--color-hairline);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
}

.hero__poster {
  width: auto;
  height: 86%;
  max-width: 86%;
  opacity: 1;
  transition: opacity var(--dur-slow) var(--ease-out);
}

.hero__stage.is-live .hero__poster {
  opacity: 0;
}

.hero__canvas {
  position: absolute;
  inset: 0;
}

.hero__canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.proof {
  border-block: 1px solid var(--color-line);
  background: var(--color-paper-2);
  padding-block: var(--space-5);
}

.proof__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
}

.proof__label {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.proof__item {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
}

.proof__client {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.proof__name {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
}

.proof__kind {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 400;
  color: var(--color-muted);
}

.service-card h3 {
  margin-bottom: var(--space-2);
}

.service-card p {
  color: var(--color-muted);
  font-size: var(--text-small);
  margin: 0;
}

.work-card {
  display: grid;
  gap: var(--space-3);
  padding: 0;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
}

.work-card__media {
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-lg);
  background: var(--color-paper-2);
}

.work-card__media picture > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.work-card:hover .work-card__media picture > img,
.work-card:focus-visible .work-card__media picture > img {
  transform: scale(1.02);
}

.work-card__logo {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 4px;
  border-radius: 10px;
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.work-card__logo img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 6px;
}

.work-card__index {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-scrim);
  color: var(--color-on-deep);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 400;
  letter-spacing: 0.14em;
}

.work-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 500;
  color: var(--color-violet-deep);
}

.work-card__link span {
  transition: transform var(--dur-fast) var(--ease-out);
}

.work-card:hover .work-card__link,
.work-card:focus-visible .work-card__link {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.work-card:hover .work-card__link span,
.work-card:focus-visible .work-card__link span {
  transform: translateX(3px);
}

.work-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  font-size: var(--text-small);
  color: var(--color-muted);
}

.work-card h3 {
  margin: 0;
}

.package-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  border-top: 1px solid var(--color-line);
}

.package-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 1.25rem;
  gap: var(--space-3);
  align-items: baseline;
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-line);
  text-decoration: none;
  color: inherit;
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

.package-row::after {
  content: "→";
  font-family: var(--font-mono);
  color: var(--color-violet-deep);
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}

.package-row:hover,
.package-row:focus-visible {
  transform: translateX(4px);
  box-shadow: inset 3px 0 0 var(--color-lime);
}

.package-row:hover::after,
.package-row:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.package-row:hover .package-row__name {
  color: var(--color-violet-deep);
}

.package-row__name {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
}

.package-row__desc {
  font-size: var(--text-small);
  color: var(--color-muted);
  display: block;
  margin-top: var(--space-1);
}

.package-row__price {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  white-space: nowrap;
}

@media (max-width: 56.1875rem) {
  .overture__stage {
    aspect-ratio: 16 / 11;
  }
}
