/* Additional content for Studio Edition; shared styles remain unchanged. */

#main-nav > a:not(.button),
#main-nav .button {
  font-size: 14px;
}

#main-nav .header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#main-nav .header-actions > .button {
  width: 176px;
  height: 40px;
  justify-content: center;
  padding: 8px 14px;
  white-space: nowrap;
}

#main-nav .button-demo {
  background: #fff;
  color: #245da9;
  border-color: #8eadd7;
  box-shadow: none;
  transition: background-color .2s, border-color .2s, color .2s;
}

#main-nav .button-demo:hover {
  background: #f0f5fc;
  border-color: #245da9;
  color: #174780;
}

#main-nav .button-demo:focus-visible {
  outline: 2px solid #245da9;
  outline-offset: 3px;
}

/* Keep decorative arrows clear of the text underline. */
:is(.text-link, .demo-link, .guide-link) > .link-label {
  font: inherit;
  color: inherit;
  flex-shrink: 1;
}

:is(.text-link, .demo-link, .guide-link):is(:hover, :focus-visible) {
  text-decoration: none;
}

:is(.text-link, .demo-link, .guide-link):is(:hover, :focus-visible) > .link-label {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.footer-links a {
  font-size: 13px;
}

.footer-bottom a {
  font-size: 12px;
}

.step-number {
  font-weight: 600;
  font-size: 18px;
  gap: 12px;
}

.step-number > span:first-child {
  font-size: 12px;
  letter-spacing: 1.2px;
}

.avery-notice {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 12px;
  border: 1px solid #d5dfd8;
  border-radius: 10px;
  background: #ffffffb3;
  color: #385b4a;
  font-size: 13px;
  line-height: 1.5;
}

.avery-notice:hover {
  background: #fff;
  border-color: #718f82;
}

.avery-notice:focus-visible {
  outline: 2px solid #385b4a;
  outline-offset: 3px;
}

@media (min-width: 701px) and (max-width: 950px) {
  #main-nav {
    gap: 12px;
  }
}

.hero-backdrop {
  background:
    linear-gradient(180deg, #ffffff00 72%, #fff 100%),
    radial-gradient(ellipse at 76% 42%, #c7dcfa 0%, #dce9fc80 32%, #dce9fc00 64%),
    radial-gradient(ellipse at 20% 12%, #e7e5fb 0%, #e7e5fb00 54%),
    linear-gradient(125deg, #f7f9ff, #edf5fc 68%, #e9f1fa);
}

.hero-backdrop .product-stage {
  background: radial-gradient(ellipse at 50% 44%, #ffffff80, #ffffff00 68%);
}

/* Centre the 22px swatch inside the ring without padding overflow. */
.product-stage .finish-options > button {
  padding: 0;
  border-width: 2px;
  flex-shrink: 0;
}

@media (max-width: 950px) {
  .hero-backdrop {
    background:
      linear-gradient(180deg, #ffffff00 78%, #fff 100%),
      radial-gradient(ellipse at 60% 68%, #c7dcfa 0%, #dce9fc00 62%),
      radial-gradient(ellipse at 15% 8%, #e7e5fb 0%, #e7e5fb00 48%),
      #f3f7fd;
  }
}

.hero h1 {
  margin-top: 0;
}

.fusion-summary {
  padding-block: 36px;
}

.fusion-summary > div {
  align-items: center;
  gap: 20px;
  padding-inline: 16px;
}

.fusion-summary p {
  font-size: 18px;
}

.fusion-summary small {
  font-size: 14px;
  margin-top: 6px;
}

.fusion-summary .workflow-icon {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: #0066cc;
}

/* Reserve a square QR area within the badge's lower panel. */
.product-stage .main-badge .badge-details {
  display: flex;
  flex-direction: column;
  height: calc(100% - 157px);
  min-height: 0;
}

.product-stage .main-badge .badge-bottom {
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-top: auto;
  flex-shrink: 0;
}

.product-stage .main-badge .badge-bottom > span {
  flex-shrink: 0;
}

.product-stage .main-badge .badge-qr {
  display: block;
  width: 52px;
  height: 52px;
  max-width: none;
  aspect-ratio: 1;
  flex: 0 0 52px;
}

/* Animate individual transforms so the scene scale and badge hover stay intact. */
@media (prefers-reduced-motion: no-preference) {
  .product-stage[data-badge-entrance="waiting"] :is(.main-badge, .side-badge, .ground-shadow) {
    opacity: 0;
  }

  .product-stage[data-badge-entrance="playing"] .main-badge {
    animation: badgeflow-main-enter 920ms cubic-bezier(.16, 1, .3, 1) both;
  }

  .product-stage[data-badge-entrance="playing"] .badge-left {
    --badge-enter-x: 155px;
    --badge-enter-rotation: 20deg;
    animation: badgeflow-fan-enter 960ms cubic-bezier(.16, 1, .3, 1) 140ms both;
  }

  .product-stage[data-badge-entrance="playing"] .badge-right {
    --badge-enter-x: -155px;
    --badge-enter-rotation: -17deg;
    animation: badgeflow-fan-enter 960ms cubic-bezier(.16, 1, .3, 1) 240ms both;
  }

  .product-stage[data-badge-entrance="playing"] .ground-shadow {
    animation: badgeflow-shadow-enter 780ms ease-out 180ms both;
  }
}

@keyframes badgeflow-main-enter {
  from {
    opacity: 0;
    translate: 0 64px;
    rotate: 6deg;
    scale: .94;
  }
  65% {
    opacity: 1;
    translate: 0 -3px;
    rotate: -.6deg;
    scale: 1;
  }
  to {
    opacity: 1;
    translate: 0 0;
    rotate: 0deg;
    scale: 1;
  }
}

@keyframes badgeflow-fan-enter {
  from {
    opacity: 0;
    translate: var(--badge-enter-x) 35px;
    rotate: var(--badge-enter-rotation);
    scale: .94;
  }
  to {
    opacity: 1;
    translate: 0 0;
    rotate: 0deg;
    scale: 1;
  }
}

@keyframes badgeflow-shadow-enter {
  from {
    opacity: 0;
    scale: .65;
  }
  to {
    opacity: .12;
    scale: 1;
  }
}

.expanded-events .section-heading > div:last-child > p {
  max-width: 310px;
}

.expanded-events .template-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.template-preview-link {
  display: block;
  border-radius: 24px;
}

.expanded-events .template-label {
  padding-top: 22px;
}

.expanded-events .template-label h3 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -.45px;
}

.expanded-events .template-description {
  font-size: 14px;
  line-height: 1.65;
  margin-top: 13px;
  padding-bottom: 17px;
  color: #626267;
}

.guide-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding-block: 5px;
  font-size: 13px;
  line-height: 1.5;
  color: #0066cc;
  text-decoration: none;
}

.guide-link > span[aria-hidden="true"] {
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
}

:is(.guide-link, .demo-link) > span[aria-hidden="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

:is(.guide-link, .demo-link) > span[aria-hidden="true"] > svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hero .demo-link > span[aria-hidden="true"] {
  font-size: 16px;
  /* Match the visible text centre rather than the font's line-box centre. */
  transform: translateY(1.5px);
}

.template-tile > .guide-link {
  align-self: flex-start;
  margin-top: auto;
}

.more-events {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid #dcdce1;
}

.more-events-heading {
  margin-bottom: 8px;
}

.more-events-heading h3 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -.6px;
  line-height: 1.25;
}

.event-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 32px;
}

.event-guide {
  min-width: 0;
  padding-block: 16px;
  border-bottom: 1px solid #dcdce1;
}

.event-guide h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.25px;
}

.event-guide p {
  margin-top: 6px;
  color: #626267;
  font-size: 13px;
  line-height: 1.55;
}

.event-guide .guide-link {
  display: flex;
  justify-content: space-between;
  min-height: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.event-guide .guide-link > span[aria-hidden="true"] {
  color: #0066cc;
}

@media (max-width: 950px) {
  .expanded-events .template-label h3 {
    font-size: 18px;
  }
  .expanded-events .template-description {
    font-size: 13px;
  }
  .event-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }
}

@media (max-width: 700px) {
  /* Let the fanned badges use the page gutters without cropping their edges. */
  .product-stage {
    width: calc(100% + 40px);
    max-width: none;
    justify-self: center;
  }
  .fusion-summary > div {
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    padding-inline: 3px;
  }
  .fusion-summary {
    padding-block: 28px;
  }
  .fusion-summary p {
    font-size: 15px;
  }
  .fusion-summary small {
    font-size: 12px;
  }
  .fusion-summary .workflow-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
  .expanded-events .template-gallery {
    gap: 38px;
  }
  .expanded-events .template-label h3 {
    font-size: 22px;
  }
  .expanded-events .template-description {
    font-size: 14px;
    padding-bottom: 10px;
  }
  .guide-link {
    min-height: 40px;
    padding-block: 9px;
    font-size: 14px;
  }
  .more-events {
    margin-top: 28px;
    padding-top: 24px;
  }
  .more-events-heading h3 {
    font-size: 22px;
  }
  .event-guide-grid {
    grid-template-columns: 1fr;
  }
  .event-guide {
    padding-block: 8px 14px;
  }
  .event-guide .guide-link {
    min-height: 44px;
    padding-block: 10px;
  }
  .event-guide p {
    margin-top: 0;
  }
  .final-cta > .container {
    padding-block: clamp(48px, 9vw, 64px);
  }
  .final-cta .eyebrow {
    display: block;
    max-width: 30em;
    margin-inline: auto;
    font-size: 9px;
    line-height: 1.6;
    letter-spacing: .12em;
    text-wrap: balance;
  }
  .final-cta h2 {
    margin: 20px auto 24px;
    font-size: clamp(28px, 7.4vw, 48px);
    line-height: 1.1;
    text-wrap: balance;
  }
  .final-cta .button {
    max-width: 100%;
    min-height: 48px;
    padding: 12px 22px;
    gap: 14px;
    font-size: 14px;
  }
  .final-cta p {
    max-width: 34ch;
    margin: 18px auto 0;
    line-height: 1.6;
    text-wrap: balance;
  }
}

@media (max-width: 480px) {
  .fusion-summary {
    grid-template-columns: 1fr;
    gap: 0;
    padding-block: 8px;
  }

  .fusion-summary > div {
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 20px 8px;
  }

  .fusion-summary > div + div {
    border-left: 0;
    border-top: 1px solid #e5e5e9;
    padding-left: 8px;
  }

  .fusion-summary p {
    font-size: 17px;
  }

  .fusion-summary small {
    font-size: 13px;
  }
}

/* Switch to the compact menu before the two header actions become crowded. */
@media (max-width: 950px) {
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 11px;
    border: 1px solid transparent;
    border-color: transparent;
    border-radius: 12px;
    background: #f5f5f7;
  }
  .menu-toggle > span {
    display: block;
    width: 20px;
    background: var(--ink);
    transition: transform .2s;
    height: 2px;
    flex: 0 0 2px;
  }
  .menu-toggle[aria-expanded="true"] > span:first-child {
    transform: translateY(4px) rotate(45deg);
  }
  .menu-toggle[aria-expanded="true"] > span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }
  .menu-toggle:hover,
  .menu-toggle[aria-expanded="true"] {
    background: #e8e8ed;
  }
  #main-nav {
    position: absolute;
    display: none;
    flex-direction: column;
    align-items: stretch;
    top: calc(100% + 8px);
    left: auto;
    right: 20px;
    width: min(360px, calc(100% - 40px));
    max-height: calc(100vh - 94px);
    max-height: calc(100dvh - 94px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px;
    gap: 2px;
    border: 1px solid #e5e5e9;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 45px -10px #1d1d1f26;
  }
  #main-nav > a {
    flex-shrink: 0;
  }
  #main-nav > a:not(.button) {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.4;
  }
  #main-nav > a:not(.button):hover,
  #main-nav > a:not(.button):focus-visible {
    background: #f5f5f7;
  }
  #main-nav .button {
    align-self: flex-start;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    min-height: 44px;
    margin: 10px 0 2px;
    padding: 11px 18px;
    gap: 12px;
    font-size: 15px;
    line-height: 1.4;
  }
  #main-nav.is-open {
    display: flex;
  }
}

@media (max-width: 950px) {
  #main-nav .header-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
  }

  #main-nav .header-actions > .button {
    width: 188px;
    height: 44px;
    margin: 0;
    padding: 10px 14px;
  }
}
