@font-face {
  font-family: "Royal Fredoka";
  src: url("./assets/brand/fonts/RoyalFredoka-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Royal Fredoka";
  src: url("./assets/brand/fonts/RoyalFredoka-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Royal Nunito Sans";
  src: url("./assets/brand/fonts/RoyalNunitoSans-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Royal Nunito Sans";
  src: url("./assets/brand/fonts/RoyalNunitoSans-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Royal Nunito Sans";
  src: url("./assets/brand/fonts/RoyalNunitoSans-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Royal Nunito Sans";
  src: url("./assets/brand/fonts/RoyalNunitoSans-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --purple: #665bca;
  --purple-deep: #4e46af;
  --purple-soft: #8b58c3;
  --violet: #c76ce5;
  --lavender: #dfd0ff;
  --lavender-bright: #eadfff;
  --lavender-depth: #cbb2ff;
  --white: #ffffff;
  --ink: #312b66;
  --mint: #2fd8a0;
  --coral: #ff5a5f;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--purple-deep);
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--white);
  font-family: "Royal Nunito Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -28%, rgba(255, 255, 255, 0.17), transparent 41%),
    linear-gradient(155deg, var(--violet) 0%, #8b5fc7 43%, var(--purple) 72%, var(--purple-deep) 100%);
  isolation: isolate;
}

.page-shell::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 76%);
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
  padding: 28px 0 8px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 5px 6px 0 rgba(203, 178, 255, 0.36);
  backdrop-filter: blur(12px);
}

.brand-mark img {
  width: 34px;
  height: 34px;
}

.brand-copy {
  display: grid;
  line-height: 1;
}

.brand-copy strong {
  font-family: "Royal Fredoka", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--lavender-bright);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.header-trust {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(73, 54, 148, 0.2);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(12px);
}

.header-trust img {
  width: 26px;
  height: 26px;
}

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1440px, 100%);
  min-height: calc(100svh - 82px);
  margin: 0 auto;
  padding: 12px 32px 30px;
  flex-direction: column;
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 4;
  width: min(900px, 100%);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.eyebrow img {
  width: 25px;
  height: 25px;
}

h1 {
  max-width: 920px;
  margin: 5px auto 10px;
  font-family: "Royal Fredoka", sans-serif;
  font-size: clamp(42px, 5.2vw, 75px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.hero-copy > p {
  max-width: 820px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.91);
  font-size: clamp(16px, 1.55vw, 22px);
  font-weight: 500;
  line-height: 1.4;
  text-wrap: balance;
}

.workflow {
  position: relative;
  z-index: 3;
  display: grid;
  width: min(760px, 70vw);
  height: clamp(395px, 49vh, 500px);
  min-height: 395px;
  margin-top: 8px;
  padding: 24px 36px 0;
  grid-template-rows: minmax(0, 1fr) auto;
  row-gap: 56px;
}

.workflow-frame {
  position: absolute;
  inset: -44px -80px 56px;
  z-index: 4;
  width: calc(100% + 160px);
  height: calc(100% - 12px);
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.drop-zone {
  position: relative;
  z-index: 3;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 4px solid transparent;
  border-radius: 44px;
  /* background: rgba(78, 70, 175, 0.13); */
  transition: background 160ms ease, transform 160ms ease;
}

.drop-zone.dragging {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.008);
}

.drop-zone.ready {
  border-color: transparent;
}

.drop-zone[data-state="error"] {
  border-color: transparent;
}

.workflow-message {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  width: min(340px, calc(100% - 64px));
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.89);
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.34;
  text-align: center;
}

.workflow-message strong {
  color: var(--white);
  font-family: "Royal Fredoka", sans-serif;
  font-size: clamp(22px, 1.9vw, 28px);
  font-weight: 600;
}

.drop-instruction {
  position: absolute;
  right: 24px;
  bottom: 20px;
  left: 24px;
  z-index: 3;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

.upload-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 8px;
  width: 0%;
  background: var(--mint);
  box-shadow: 0 -3px 14px rgba(47, 216, 160, 0.3);
  transition: width 180ms ease;
}

.loader {
  position: absolute;
  bottom: 48px;
  left: 50%;
  z-index: 4;
  display: none;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  border: 4px solid rgba(102, 91, 202, 0.18);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

.drop-zone.loading .loader {
  display: block;
}

.folder-plus {
  position: absolute;
  top: -4px;
  right: 8px;
  z-index: 7;
  display: grid;
  width: 58px;
  height: 58px;
  padding: 0;
  place-items: center;
  border: 4px solid #c76ce5;
  border-radius: 50%;
  background: var(--white);
  color: #8b58c3;
  cursor: pointer;
  font-family: "Royal Fredoka", sans-serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 2px 2px 0px 0px var(--lavender-depth);
}

.folder-plus:hover {
  transform: scale(1.05);
  box-shadow: 3px 3px var(--lavender-depth);
}

.folder-plus:disabled {
  cursor: wait;
  opacity: 0.6;
}

.folder-plus:focus-visible,
.cleanup-button:focus-visible,
.sales-dialog button:focus-visible,
.sales-dialog input:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.55);
  outline-offset: 3px;
}

.cleanup-button {
  position: relative;
  z-index: 7;
  display: flex;
  min-width: 150px;
  min-height: 50px;
  padding: 8px 12px 8px 26px;
  justify-self: center;
  align-self: end;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--purple-deep);
  cursor: not-allowed;
  font-family: "Royal Fredoka", sans-serif;
  font-size: 20px;
  font-weight: 600;
  box-shadow: 1px 4px 0 rgba(203, 178, 255, 0.55);
  opacity: 0.52;
}

.cleanup-button.ready {
  cursor: pointer;
  box-shadow: 7px 8px 0 rgba(47, 216, 160, 0.72);
  opacity: 1;
}

.cleanup-button.ready:hover {
  transform: scale(1.05);
  box-shadow: 8px 9px 0 rgba(47, 216, 160, 0.72);
}

.cleanup-button img {
  width: 42px;
  height: 42px;
}

.folder-input {
  display: none;
}

.upload-facts {
  position: relative;
  z-index: 4;
  display: flex;
  margin-top: auto;
  padding-top: 6px;
  align-items: center;
  justify-content: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 600;
}

.upload-facts span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.upload-facts img {
  width: 22px;
  height: 22px;
}

.decor {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

.decor-cards {
  width: clamp(135px, 14vw, 210px);
}

.decor-cards-top {
  top: 13%;
  left: 3.2%;
  transform: rotate(-7deg);
}

.decor-cards-bottom {
  right: 3.4%;
  bottom: 9%;
  transform: rotate(7deg) scaleX(-1);
}

.decor-dots {
  width: clamp(135px, 15vw, 220px);
}

.decor-dots-top {
  top: 3%;
  right: 3.5%;
}

.decor-dots-bottom {
  bottom: 2%;
  left: 2.8%;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(49, 43, 102, 0.7);
  backdrop-filter: blur(12px);
}

.modal-backdrop.visible {
  display: flex;
}

.sales-dialog {
  display: grid;
  width: min(470px, calc(100vw - 40px));
  gap: 13px;
  padding: 30px;
  border: 0;
  border-radius: 32px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 10px 12px 0 var(--lavender-depth);
}

.dialog-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto;
}

.dialog-kicker {
  margin: 2px 0 -7px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.sales-dialog h2 {
  margin: 0;
  font-family: "Royal Fredoka", sans-serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.05;
  text-align: center;
}

.dialog-copy {
  margin: -2px 0 4px;
  color: #6e6891;
  line-height: 1.4;
  text-align: center;
}

.sales-dialog label {
  display: grid;
  gap: 5px;
  color: #514b77;
  font-size: 13px;
  font-weight: 700;
}

.sales-dialog input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 2px solid #e1daf5;
  border-radius: 14px;
  background: #fbf9ff;
  color: var(--ink);
}

.sales-dialog input:focus {
  border-color: var(--purple);
  outline-color: rgba(102, 91, 202, 0.25);
}

.sales-dialog button {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--purple);
  color: var(--white);
  cursor: pointer;
  font-family: "Royal Fredoka", sans-serif;
  font-size: 17px;
  font-weight: 600;
}

.sales-dialog .dialog-cancel {
  min-height: 38px;
  background: transparent;
  color: #766e9a;
  font-family: "Royal Nunito Sans", sans-serif;
  font-size: 13px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1040px) {
  .decor-cards {
    opacity: 0.76;
  }

  .workflow {
    width: min(700px, 76vw);
  }

  .upload-facts {
    margin-top: 12px;
  }
}

@media (max-width: 760px) {
  .page-shell {
    min-height: 100svh;
    overflow-y: auto;
  }

  .site-header {
    width: calc(100% - 36px);
    padding-top: 18px;
  }

  .header-trust span {
    display: none;
  }

  .header-trust {
    padding: 7px;
  }

  .hero {
    min-height: calc(100svh - 72px);
    padding: 18px 18px 28px;
  }

  h1 {
    margin-top: 8px;
    font-size: clamp(42px, 12vw, 64px);
  }

  .hero-copy > p {
    max-width: 560px;
  }

  .workflow {
    width: 100%;
    height: 410px;
    min-height: 410px;
    margin-top: 10px;
    padding: 24px 10px 0;
    row-gap: 56px;
  }

  .workflow-frame {
    inset: -30px -46px 58px;
    width: calc(100% + 92px);
    height: calc(100% - 28px);
  }

  .drop-zone {
    border-radius: 34px;
  }

  .folder-plus {
    right: -2px;
  }

  .decor-cards,
  .decor-dots {
    opacity: 0.2;
  }

  .decor-cards-top {
    top: 16%;
    left: -7%;
  }

  .decor-cards-bottom {
    right: -7%;
    bottom: 14%;
  }

  .upload-facts {
    flex-wrap: wrap;
    gap: 8px 16px;
  }
}

@media (max-width: 520px) {
  .brand-copy strong {
    font-size: 19px;
  }

  .hero {
    padding-top: 12px;
  }

  .eyebrow {
    font-size: 13px;
  }

  .workflow {
    height: 370px;
    min-height: 370px;
    padding: 22px 6px 0;
    row-gap: 50px;
  }

  .workflow-frame {
    inset: -15px -72px 54px;
    width: calc(100% + 144px);
    height: calc(100% - 28px);
    opacity: 0.92;
  }

  .drop-zone {
    border-width: 3px;
    border-radius: 28px;
  }

  .folder-plus {
    top: -4px;
    right: -4px;
    width: 52px;
    height: 52px;
    font-size: 30px;
  }

  .loader {
    bottom: 42px;
  }

  .drop-instruction {
    right: 12px;
    bottom: 15px;
    left: 12px;
    font-size: 10px;
  }

  .cleanup-button {
    width: min(270px, calc(100% - 70px));
    min-width: 0;
    min-height: 54px;
  }

  .upload-facts {
    width: 300px;
    padding-top: 12px;
  }

  .sales-dialog {
    padding: 24px 20px;
    border-radius: 26px;
  }
}

@media (max-height: 760px) and (min-width: 761px) {
  .site-header {
    padding-top: 18px;
  }

  .hero {
    padding-top: 2px;
  }

  h1 {
    font-size: clamp(42px, 4.6vw, 64px);
  }

  .workflow {
    height: 370px;
    min-height: 370px;
  }

  .decor-cards {
    width: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Payment confirmation */
.payment-page {
  display: grid;
  min-height: 100svh;
  padding: 28px;
  place-items: center;
  background:
    url("./assets/brand/graphic_dot_grid.svg") 106% -80px / 260px no-repeat,
    url("./assets/brand/graphic_spark_cluster.svg") -70px 90% / 250px no-repeat,
    linear-gradient(155deg, var(--violet), var(--purple) 62%, var(--purple-deep));
}

.payment-card {
  width: min(620px, 100%);
  padding: clamp(26px, 5vw, 52px);
  border-radius: 38px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 12px 14px 0 var(--lavender-depth);
}

.payment-icon {
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
}

.payment-card h1 {
  margin: 0 auto 12px;
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1;
}

.payment-card > p {
  margin: 0 auto 28px;
  color: #6e6891;
  line-height: 1.45;
  text-align: center;
}

.payment-card form {
  display: grid;
  gap: 15px;
}

.payment-card label {
  display: grid;
  gap: 6px;
  color: #514b77;
  font-size: 13px;
  font-weight: 700;
}

.payment-card input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 2px solid #e1daf5;
  border-radius: 14px;
  background: #fbf9ff;
  color: var(--ink);
}

.payment-card button {
  min-height: 56px;
  margin-top: 5px;
  border: 0;
  border-radius: 999px;
  background: var(--purple);
  color: var(--white);
  cursor: pointer;
  font-family: "Royal Fredoka", sans-serif;
  font-size: 19px;
  font-weight: 600;
  box-shadow: 6px 7px 0 var(--lavender-depth);
}

.payment-card button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.payment-status {
  min-height: 24px;
  margin-top: 18px;
  color: var(--purple-deep);
  font-weight: 700;
  text-align: center;
}
