@font-face {
  font-family: 'Joane';
  src: url('../fonts/Joane-Bold.woff2') format('woff2'),
    url('../fonts/Joane-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inconsolata';
  src: url('../fonts/Inconsolata-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: 'Inconsolata';
  src: url('../fonts/Inconsolata-600.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: 'Inconsolata';
  src: url('../fonts/Inconsolata-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: 'Inconsolata';
  src: url('../fonts/Inconsolata-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: optional;
}

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

html {
  height: 100%;
  -webkit-font-smoothing: antialiased;
}

body.send-files-page {
  --sf-inset-top: clamp(1rem, 2.5vw, 1.75rem);
  --sf-inset-side: clamp(2rem, 5vw, 3.5rem);
  --sf-navy: #0a1136;
  --sf-muted: rgba(10, 17, 54, 0.62);
  --sf-line: rgba(10, 17, 54, 0.12);
  --sf-accent: #767bd7;
  --sf-surface: #f3f7fa;

  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: #0a1136;
  color: var(--sf-navy);
  font-family: 'Inconsolata', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
    'Courier New', monospace;
}

.send-files__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #0a1136;
}

.send-files__bg-inner {
  position: absolute;
  inset: -2.5rem;
  filter: blur(16px);
  transform: scale(1.08);
  animation: send-files-bg-drift 32s ease-in-out infinite alternate;
}

.send-files__bg-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.send-files__bg-scrim {
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(10, 17, 54, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(10, 17, 54, 0.22) 0%, rgba(10, 17, 54, 0.4) 55%, rgba(10, 17, 54, 0.68) 100%);
}

@keyframes send-files-bg-drift {
  from {
    transform: scale(1.08) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(0, -1.2%, 0);
  }
}

.send-files__back {
  position: fixed;
  top: calc(var(--sf-inset-top) + 1.35rem);
  left: calc(var(--sf-inset-side) / 2 + 1.35rem);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.15rem 0.7rem 0.95rem;
  border-radius: 999px;
  background: #fff;
  color: var(--sf-navy);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(10, 17, 54, 0.12);
  transition: box-shadow 0.25s ease;
}

.send-files__back:hover,
.send-files__back:focus-visible {
  box-shadow: 0 8px 24px rgba(10, 17, 54, 0.16);
}

.send-files__back-icon {
  width: 1.5rem;
  height: 0.8rem;
  flex-shrink: 0;
  overflow: visible;
}

.send-files__back-line {
  transform-box: fill-box;
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.send-files__back:hover .send-files__back-line,
.send-files__back:focus-visible .send-files__back-line {
  transform: scaleX(1.4);
}

.send-files {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: clamp(6rem, 14vw, 8rem) var(--sf-inset-side) clamp(3rem, 8vw, 5rem);
}

.send-files__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 34rem);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 24px 70px rgba(8, 10, 24, 0.28),
    0 0 0 1px rgba(10, 17, 54, 0.04);
  backdrop-filter: blur(14px);
  animation: send-files-panel-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes send-files-panel-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.send-files__brand {
  margin: 0 0 0.85rem;
  color: var(--sf-accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.send-files__title {
  margin: 0 0 0.85rem;
  font-family: 'Joane', system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--sf-navy);
}

.send-files__lead {
  margin: 0 0 2rem;
  color: var(--sf-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.send-files__gate-label {
  display: block;
  margin-bottom: 0.75rem;
  color: rgba(10, 17, 54, 0.45);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.send-files__code {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.send-files__code-cell {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--sf-line);
  border-radius: 14px;
  background: #fff;
  color: var(--sf-navy);
  font-family: inherit;
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  font-weight: 600;
  text-align: center;
  caret-color: var(--sf-accent);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.send-files__code-cell:focus {
  outline: none;
  border-color: var(--sf-accent);
  box-shadow: 0 0 0 3px rgba(118, 123, 215, 0.18);
}

.send-files__code-cell.is-filled {
  background: rgba(118, 123, 215, 0.06);
  border-color: rgba(118, 123, 215, 0.35);
}

.send-files__hint {
  margin: 0 0 1.5rem;
  color: rgba(10, 17, 54, 0.45);
  font-size: 0.875rem;
  line-height: 1.5;
}

.send-files__primary,
.send-files__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.send-files__primary {
  width: 100%;
  border: 1px solid var(--sf-navy);
  background: var(--sf-navy);
  color: #f4f1ec;
}

.send-files__primary:hover:not(:disabled),
.send-files__primary:focus-visible:not(:disabled) {
  background: #141d4d;
  border-color: #141d4d;
}

.send-files__primary:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.send-files__secondary {
  border: 1px solid rgba(118, 123, 215, 0.4);
  background: transparent;
  color: var(--sf-accent);
}

.send-files__secondary:hover,
.send-files__secondary:focus-visible {
  background: rgba(118, 123, 215, 0.1);
  border-color: var(--sf-accent);
}

.send-files__upload[hidden],
.send-files__list[hidden] {
  display: none !important;
}

.send-files__upload {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  animation: send-files-reveal 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes send-files-reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.send-files__gate.is-leaving {
  animation: send-files-leave 0.28s ease forwards;
}

@keyframes send-files-leave {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.send-files__dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: clamp(1.75rem, 5vw, 2.5rem) 1.25rem;
  border: 1.5px dashed rgba(118, 123, 215, 0.45);
  border-radius: 22px;
  background: rgba(243, 247, 250, 0.7);
  color: var(--sf-navy);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.send-files__dropzone:hover,
.send-files__dropzone:focus-visible,
.send-files__dropzone.is-dragover {
  border-color: var(--sf-accent);
  background: rgba(118, 123, 215, 0.08);
  outline: none;
}

.send-files__dropzone.is-dragover {
  transform: scale(1.01);
}

.send-files__file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.send-files__dropzone-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.35rem;
  border-radius: 50%;
  background: #fff;
  color: var(--sf-accent);
  box-shadow: 0 6px 18px rgba(10, 17, 54, 0.08);
}

.send-files__dropzone-icon svg {
  width: 1.65rem;
  height: 1.65rem;
}

.send-files__dropzone-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.send-files__dropzone-text {
  margin: 0;
  color: var(--sf-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.send-files__list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.send-files__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--sf-line);
  border-radius: 16px;
  background: #fff;
  animation: send-files-reveal 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.send-files__item-name {
  margin: 0;
  overflow: hidden;
  color: var(--sf-navy);
  font-size: 0.925rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.send-files__item-meta {
  margin: 0.2rem 0 0;
  color: var(--sf-muted);
  font-size: 0.8rem;
}

.send-files__item-remove {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--sf-line);
  border-radius: 50%;
  background: transparent;
  color: var(--sf-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.send-files__item-remove:hover,
.send-files__item-remove:focus-visible {
  color: var(--sf-navy);
  border-color: rgba(10, 17, 54, 0.28);
  background: rgba(10, 17, 54, 0.04);
}

.send-files__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.send-files__status {
  min-height: 1.4em;
  margin: 0;
  color: var(--sf-accent);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
}

.send-files__status.is-success {
  color: #2f6b4f;
}

@media (max-width: 900px) {
  .send-files__back {
    top: var(--sf-inset-top);
    right: var(--sf-inset-side);
    left: auto;
  }

  .send-files {
    padding-top: clamp(5.5rem, 18vw, 7rem);
  }

  .send-files__actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .send-files__bg-inner,
  .send-files__panel,
  .send-files__upload,
  .send-files__item,
  .send-files__gate.is-leaving {
    animation: none;
  }

  .send-files__back-line,
  .send-files__code-cell,
  .send-files__dropzone,
  .send-files__primary,
  .send-files__secondary {
    transition: none;
  }
}
