/* Grum UI components — mapped 1:1 to Figma Components in Grum-UI-Design.
   Site chrome uses the dark landing tokens on top of these components. */

@font-face {
  font-family: "New Spirit";
  src: url("/assets/fonts/NewSpirit-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ABC Areal";
  src: url("/assets/fonts/ABCAreal-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ABC Areal";
  src: url("/assets/fonts/ABCAreal-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  overflow-x: clip;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 100;
  padding: var(--number) 16px;
  background: var(--primary-pink);
  color: var(--base-background);
  border-radius: var(--corner-medium);
}

.skip-link:focus {
  top: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 32px;
  text-decoration: none;
}

.logo img {
  display: block;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: var(--body-xsmall-size) 16px;
  border: 0;
  border-radius: var(--corner-medium);
  font-family: "ABC Areal", sans-serif;
  font-size: var(--body-small-size);
  font-weight: var(--body-small-bold-weight);
  line-height: var(--body-small-line);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn img {
  display: block;
  flex-shrink: 0;
}

.btn-primary {
  position: relative;
  gap: var(--corner-medium);
  height: auto;
  padding: var(--body-small-size) 24px;
  background: var(--primary-pink);
  color: var(--base-background);
  font-weight: var(--body-small-weight);
  letter-spacing: normal;
  box-shadow: var(--shadow-button-primary);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: var(--shadow-card-hard);
}

.btn-bright-yellow {
  position: relative;
  gap: var(--corner-medium);
  height: auto;
  padding: var(--body-small-size) 24px;
  background: var(--yellow-base);
  color: var(--base-background);
  font-weight: var(--body-small-weight);
  letter-spacing: normal;
  box-shadow: var(--shadow-button-primary);
}

.btn-bright-yellow:hover,
.btn-bright-yellow:focus-visible {
  box-shadow: var(--shadow-card-hard);
}

.btn-secondary {
  gap: 10px;
  background: transparent;
  color: var(--text-on-base);
  border: 1px solid var(--fade-20);
  box-shadow: none;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--fade-10);
  border-color: var(--primary-pink);
  color: var(--primary-pink);
}

.btn-white {
  position: relative;
  gap: 10px;
  background: var(--text-on-base);
  color: var(--base-background);
  box-shadow: var(--shadow-button-white);
}

.btn-tertiary {
  height: 26px;
  padding: 0;
  gap: var(--corner-small);
  background: transparent;
  color: var(--primary-pink);
  font-size: var(--body-normal-size);
  font-weight: var(--body-normal-bold-weight);
  line-height: var(--body-normal-line);
  box-shadow: none;
}

.btn-tertiary:hover,
.btn-tertiary:focus-visible {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover,
  .btn-primary:focus-visible,
  .btn-bright-yellow:hover,
  .btn-bright-yellow:focus-visible,
  .btn-secondary:hover,
  .btn-secondary:focus-visible {
    transform: none;
  }
}

.btn-block {
  width: 100%;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--fade-10);
  border-radius: var(--corner-small);
  background: var(--fade-primary);
  color: var(--text-on-base);
  box-shadow: var(--shadow-card-lift);
  white-space: nowrap;
}

.chip-rules {
  padding: 4px 8px 4px var(--number);
}

.chip img {
  display: block;
  flex-shrink: 0;
}

.marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: var(--number);
  border: 3px solid var(--base-background);
  border-radius: var(--number);
  box-shadow: var(--shadow-card-lift);
  box-sizing: border-box;
  flex-shrink: 0;
}

.marker img {
  display: block;
}

.marker-error {
  background: var(--fade-10);
}

.marker-primary {
  background: var(--fade-primary);
}

.marker-soon {
  background: var(--fade-20);
}

.media-frame {
  background: var(--fade-10);
  border-radius: var(--corner-medium);
  box-shadow: var(--shadow-card-lift);
}

.media-frame-lg {
  width: 100%;
  height: 320px;
}

.media-frame-sm {
  width: 100%;
  height: 160px;
}

.feature-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-row p {
  margin: 0;
}

.feature-copy {
  display: flex;
  flex-direction: column;
  gap: var(--corner-small);
  min-width: 0;
}

.ds-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px;
  background: var(--fade-10);
  border: 1px dashed var(--fade-20);
  border-radius: var(--corner-small);
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
}

.ds-badge-name,
.ds-badge-version {
  display: flex;
  align-items: center;
}

.ds-badge-name {
  gap: var(--corner-small);
}

.ds-badge-version {
  gap: var(--number);
}

.ds-badge-ver {
  color: var(--text-warm);
}

.ds-dot {
  width: 4px;
  height: 4px;
  border-radius: var(--corner-full);
  background: var(--primary-green);
  flex-shrink: 0;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  padding: var(--number) 12px var(--number) 7px;
  background: var(--fade-10);
  border: 3px solid var(--base-background);
  border-radius: var(--corner-full);
  box-shadow: var(--shadow-card-lift);
  box-sizing: border-box;
}

.source-chip img {
  display: block;
  flex-shrink: 0;
}

.source-chip p {
  margin: 0;
  color: var(--text-warm);
}

.source-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--corner-full);
  background: var(--primary-green);
  flex-shrink: 0;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 4px 8px;
  background: var(--fade-10);
  border: 1px solid var(--fade-20);
  border-radius: var(--corner-small);
  box-shadow: var(--shadow-card-lift);
}

.status-tag p {
  margin: 0;
  color: var(--text-warm);
}

.type-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 4px 8px;
  border-radius: var(--corner-small);
  box-sizing: border-box;
}

.type-primitive {
  background: var(--fade-primary);
  color: var(--primary-pink);
}

.type-semantic {
  background: var(--fade-10);
  color: var(--text-warm);
}

.token-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--number);
  padding: var(--corner-small) 10px var(--corner-small) 7px;
  border: 1px solid var(--fade-20);
  border-radius: var(--corner-small);
  background: var(--fade-10);
}

.token-chip span {
  color: var(--text-warm);
  white-space: nowrap;
}

.swatch {
  width: 13px;
  height: 13px;
  border: 1px solid var(--fade-20);
  border-radius: var(--xsmall);
  flex-shrink: 0;
  box-sizing: border-box;
}

.card {
  background: var(--fade-10);
  border-radius: var(--corner-medium);
  box-shadow: var(--shadow-card-lift);
}

.card-pad {
  padding: 32px;
}

.faq-item {
  display: flex;
  flex-direction: column;
  gap: var(--corner-small);
  width: 100%;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  cursor: pointer;
}

.faq-item summary span {
  min-width: 0;
  overflow-wrap: break-word;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary img {
  display: block;
  flex-shrink: 0;
}

.marker-dots {
  display: inline-flex;
  align-items: center;
  gap: var(--number);
  height: 6px;
}

.marker-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--corner-full);
  flex-shrink: 0;
}

.marker-dot-muted {
  background: var(--fade-20);
}

.marker-dot-active {
  background: var(--primary-pink);
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
li,
dt,
dd,
blockquote,
figcaption {
  text-wrap: balance;
}

html:has(dialog[open]),
html:has(dialog[open]) body,
html.is-dialog-open,
html.is-dialog-open body {
  overflow: hidden;
  overscroll-behavior: none;
}

html.is-dialog-open body {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

/* Reusable dialog. Use this shell for any centered modal:
   dialog.modal
     .modal-scene (edge patterns and the column lines)
     .modal-band
       .modal-rule
       .modal-card
         button.modal-close
         .modal-body
           .modal-mark (optional)
           .modal-main
             .modal-copy
             .modal-actions
       .modal-rule */
.modal {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-on-base);
}

.modal[open] {
  display: flex;
  align-items: safe center;
  justify-content: safe center;
  overflow: auto;
}

.modal-scene,
.modal-stripe,
.modal-guides,
.modal-band,
.modal-rule {
  pointer-events: none;
}

.modal-stripe {
  position: fixed;
  top: 0;
  width: 50px;
  height: 100vh;
  height: 100dvh;
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 var(--corner-small),
    var(--fade-primary) var(--corner-small) calc(var(--corner-small) + var(--xsmall))
  );
}

.modal-stripe-left {
  left: 0;
}

.modal-stripe-right {
  right: 0;
}

.modal-guides {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(800px, calc(100% - 100px));
  border-inline: 1px dashed var(--fade-20);
  transform: translateX(-50%);
}

.modal-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--corner-large) * 2 + var(--body-normal-size));
  width: min(800px, calc(100% - 100px));
}

.modal-rule {
  display: block;
  width: 100%;
  height: 0;
  border-top: 1px dashed var(--fade-20);
}

.modal-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: calc(var(--body-normal-size) + var(--corner-small));
  width: calc(100% - (var(--corner-large) * 4 + var(--body-normal-size) * 2));
  padding: calc(var(--corner-large) * 2) calc(var(--corner-large) * 2)
    calc(var(--corner-large) * 3 + var(--xsmall) * 2);
  border-radius: var(--corner-large);
  background: color-mix(in srgb, var(--base-background) 87%, var(--white));
  box-shadow:
    0 0 calc(var(--corner-large) * 3) 0 var(--fade-dark-10),
    0 var(--xsmall) calc(var(--corner-small) + var(--xsmall)) 0 var(--fade-dark-15);
  pointer-events: auto;
}

.modal::backdrop {
  background: color-mix(in srgb, var(--base-background) 42%, transparent);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

@media (prefers-reduced-motion: no-preference) {
  .modal,
  .modal::backdrop {
    opacity: 0;
    transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .modal[open],
  .modal[open]::backdrop {
    opacity: 1;
  }

  .modal[open].is-closing,
  .modal[open].is-closing::backdrop {
    opacity: 0;
  }

  .modal-band {
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .modal[open].is-closing .modal-band {
    transform: translateY(var(--corner-small));
  }

  @starting-style {
    .modal[open],
    .modal[open]::backdrop {
      opacity: 0;
    }

    .modal[open] .modal-band {
      transform: translateY(var(--corner-small));
    }
  }
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: calc(var(--body-normal-size) + var(--body-large-size));
  height: calc(var(--body-normal-size) + var(--body-large-size));
  padding: 0;
  border-radius: var(--corner-full);
  background: color-mix(in srgb, var(--white) 20%, transparent);
  color: var(--text-on-base);
  box-shadow: none;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--text-on-base);
  text-decoration: none;
  outline: var(--xsmall) solid var(--primary-pink);
  outline-offset: var(--xsmall);
}

.modal-body,
.modal-main,
.modal-copy,
.modal-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.modal-body {
  gap: calc(var(--body-normal-size) + var(--corner-small));
}

.modal-mark {
  position: relative;
  flex: none;
  width: 77px;
  height: 73px;
  overflow: hidden;
}

.modal-mark img {
  position: absolute;
  top: -9.23%;
  left: -8.7%;
  width: 115.95%;
  max-width: none;
  height: 118.46%;
}

.modal-main {
  gap: calc(var(--corner-large) * 2 + var(--body-normal-size));
}

.modal-copy {
  gap: calc(var(--xsmall) * 2);
  text-align: center;
}

.modal-copy h2,
.modal-copy p,
.modal-actions p {
  margin: 0;
}

.modal-copy h2 {
  width: 100%;
  color: var(--primary-pink);
  font-family: "New Spirit", serif;
  font-weight: var(--body-normal-weight);
}

.modal-copy p {
  max-width: 480px;
  color: var(--text-on-base);
}

.modal-actions {
  gap: calc(var(--corner-large) * 2);
}

@media (max-width: 1100px) {
  .modal-guides,
  .modal-rule {
    display: none;
  }

  .modal-stripe {
    display: block;
    top: auto;
    right: auto;
    bottom: auto;
    left: 0;
    width: 100%;
    height: 50px;
  }

  .modal-stripe-left {
    top: 0;
  }

  .modal-stripe-right {
    bottom: 0;
  }

  .modal-band {
    width: min(800px, calc(100% - var(--corner-large) * 2));
  }
}

@media (max-width: 520px) {
  .modal-card {
    width: min(560px, calc(100vw - var(--corner-large)));
    padding: var(--corner-large);
  }
}
