@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #090909;
  color: #f3f1ec;
  font-optical-sizing: auto;
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 5px;
}

.site-header,
.site-footer {
  width: min(100% - 96px, 1440px);
  margin-inline: auto;
  display: flex;

  align-items: center;
  justify-content: space-between;
}

.site-header {
  --header-height: 96px;
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  margin: 0;
  isolation: isolate;
  border-bottom: 1px solid #252525;
}

.site-header::before {
  position: absolute;
  z-index: -1;
  background: #1d1d1d;
  content: "";
  inset: 0;
  opacity: 1;
  pointer-events: none;
  transition: opacity 1000ms ease;
}

.site-header.is-scrolled::before {
  opacity: 0;
}

.site-header-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 96px, 1440px);
  min-height: 96px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.07em;
}

.wordmark-dot {
  color: #38bdf8;
  font-weight: bolder;
  font-size: 30px;
}

.menu-toggle,
.menu-close {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #383838;
  border-radius: 4px;
  background: transparent;
  color: #f3f1ec;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.menu-toggle:hover,
.menu-close:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}

.menu-toggle:focus-visible,
.menu-close:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 3px;
}

.menu-toggle svg,
.menu-close svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.menu-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  border: 0;
  background: #000a;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease, visibility 240ms ease;
  visibility: hidden;
}

.menu-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.site-menu {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  padding: clamp(24px, 5vw, 48px);
  border-left: 1px solid #30302d;
  background: #171717;
  box-shadow: -20px 0 60px #0005;
  transform: translateX(100%);
  transition: transform 260ms ease, visibility 260ms ease;
  visibility: hidden;
}

.site-menu.is-open {
  transform: translateX(0);
  visibility: visible;
}

.menu-close {
  position: absolute;
  top: calc((var(--header-height) - 44px) / 2);
  right: max(48px, calc((100vw - 1440px) / 2));
  margin: 0;
}

.site-menu .header-navigation {
  align-items: stretch;
  flex-direction: column;
  gap: 0;
  padding-top: 100px;
}

.site-menu nav {
  align-items: stretch;
  flex-direction: column;
  gap: 0;
  font-size: 18px;
}

.site-menu nav a {
  min-height: 56px;
  border-bottom: 1px solid #30302d;
}

.site-menu .header-account {
  align-items: flex-start;
  flex-direction: column;
}

.site-menu .header-account .drive-nav-link {
  align-self: stretch;
  min-height: 56px;
  border-bottom: 1px solid #30302d;
}

.site-menu .header-account-name {
  max-width: 100%;
  overflow-wrap: anywhere;
}

body.menu-open {
  overflow: hidden;
}

nav {
  display: flex;
  align-items: center;
  gap: 36px;
  color: #a4a4a0;
  font-size: 13px;
}

nav a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.header-navigation {
  display: flex;
  align-items: center;
  gap: 36px;
}

nav a,
.site-footer a,
.text-link {
  transition: color 160ms ease;
}

nav a:hover,
.site-footer a:hover,
.text-link:hover {
  color: #38bdf8;
}

nav span,
.site-footer a span,
.text-link span {
  margin-left: 4px;
}

.header-account {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #a4a4a0;
  font-size: 12px;
  line-height: 1;
}

.drive-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  color: inherit;
  font-size: 18px;
  line-height: 1;
}

.drive-nav-link svg {
  width: 1em;
  height: 1em;
  margin-left: 4px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.drive-nav-link:hover {
  color: #38bdf8;
}

.logout-button {
  border: 1px solid #494944;
  border-radius: 3px;
  padding: 8px 12px;
  background: transparent;
  color: #d3d2cc;
  font: inherit;
  cursor: pointer;
}

.logout-button:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}

.logout-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

main {
  flex: 1;
  display: grid;
  place-items: center;
}

.hero {
  position: relative;
  width: min(100% - 96px, 1440px);
  padding-block: 140px 160px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 30px;
  color: #a4a4a0;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 12px #38bdf866;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(56px, 7.5vw, 104px);
  font-weight: 500;
  letter-spacing: -0.09em;
  line-height: 0.98;
}

h1 span {
  color: #777773;
}

.hero-copy {
  max-width: 380px;
  margin: 32px 0 25px;
  color: #a4a4a0;
  font-size: 15px;
  line-height: 1.8;
}

.text-link {
  display: inline-block;
  padding-bottom: 7px;
  border-bottom: 1px solid #60605b;
  font-size: 13px;
}

.hero-index {
  position: absolute;
  right: 0;
  bottom: 60px;
  color: #62625e;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.site-footer {
  min-height: 88px;
  border-top: 1px solid #252525;
  color: #a4a4a0;
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #f3f1ec;
}

.copyright {
  color: #62625e;
}

.login-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 72px 20px;
}

.login-card {
  width: min(100%, 420px);
}

.login-card .eyebrow {
  margin-bottom: 24px;
}

.login-card h1 {
  font-size: clamp(56px, 10vw, 76px);
}

.login-note {
  color: #a4a4a0;
  font-size: 14px;
  line-height: 1.7;
}

#login-title {
  margin: 0 0 34px;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  margin-top: 6px;
  color: #d3d2cc;
  font-size: 12px;
}

.login-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #30302d;
  border-radius: 3px;
  background: #10100f;
  color: #f3f1ec;
  font: inherit;
  font-size: 14px;
}

.login-form input::placeholder {
  color: #62625e;
}

.login-form input:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.login-form button {
  min-height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 3px;
  background: #38bdf8;
  color: #090909;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.login-form button:hover {
  background: #7dd3fc;
}

.login-form button:disabled,
.login-form button[aria-disabled="true"],
.login-form button:disabled:hover,
.login-form button[aria-disabled="true"]:hover {
  background: #555650;
  color: #b7b7b1;
  cursor: not-allowed;
}

.login-form button:focus-visible {
  outline: 2px solid #f3f1ec;
  outline-offset: 3px;
}

.login-note {
  margin-top: 20px;
  font-size: 12px;
}

.drive-main {
  display: block;
}

.drive-page {
  width: min(100% - 96px, 1440px);
  margin: 0 auto;
  padding-block: 72px 120px;
}

.drive-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #292929;
  border-radius: 8px;
  background: #111;
  margin-bottom: 20px;
}

.drive-inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drive-selection-count {
  color: #a4a4a0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.drive-move-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(80vh, 680px);
  padding: 0;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  background: #111;
  color: #f3f1ec;
  box-shadow: 0 16px 48px #000b;
}

.drive-move-dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(3px);
}

.drive-move-dialog-content {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.drive-move-dialog-content h2,
.drive-move-dialog-content p {
  margin: 0;
}

.drive-move-dialog-content h2 {
  font-size: 20px;
}

.drive-move-dialog-content header p,
.drive-move-message {
  color: #a4a4a0;
  font-size: 13px;
}

.drive-move-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #858580;
  font-size: 13px;
}

.drive-move-breadcrumb {
  padding: 0;
  border: 0;
  background: none;
  color: #38bdf8;
  font: inherit;
  cursor: pointer;
}

.drive-move-folders {
  max-height: min(40vh, 320px);
  min-height: 72px;
  margin: 0;
  padding: 4px;
  overflow: auto;
  border: 1px solid #30302d;
  border-radius: 6px;
  list-style: none;
}

.drive-move-folders li {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 4px 8px;
  color: #858580;
  font-size: 13px;
}

.drive-move-folders .drive-move-folder {
  width: 100%;
  min-height: 40px;
  padding: 8px;
  border-radius: 4px;
}

.drive-move-folder:hover {
  background: #172b35;
}

.drive-move-message {
  min-height: 1.5em;
}

.drive-move-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.drive-inline-form input {
  min-height: 40px;
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid #383838;
  border-radius: 6px;
  background: #090909;
  color: #f3f1ec;
  font: inherit;
}

.drive-inline-form input.visually-hidden {
  min-height: 1px;
  padding: 0;
  border: 0;
}

.drive-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.drive-button-secondary {
  border-color: #3a3a3a;
  background: #191919;
  color: #f3f1ec;
}

.drive-button-secondary:hover {
  border-color: #585858;
  background: #222;
}

.drive-button-primary {
  background: #38bdf8;
  color: #090909;
}

.drive-button-primary:hover {
  background: #7dd3fc;
}

.drive-button-upload {
  background: #292929;
  color: #f3f1ec;
}

.drive-button-upload:not(:disabled):hover {
  background: #383838;
}

.drive-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.drive-upload-form {
  flex: 1;
  min-width: min(100%, 360px);
  justify-content: flex-end;
  padding-left: 12px;
  border-left: 1px solid #303030;
}

.drive-selected-file {
  min-width: 0;
  overflow: hidden;
  color: #969690;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-inline-form[hidden] {
  display: none;
}

.drive-file-size,
.drive-breadcrumbs {
  font-variant-numeric: tabular-nums;
}

.drive-storage {
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid #292929;
  border-radius: 8px;
  background: #111;
}

.drive-storage-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  color: #d7d7d1;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.drive-storage progress {
  width: 100%;
  height: 8px;
  display: block;
  margin-top: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: #30302d;
}

.drive-storage progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #30302d;
}

.drive-storage progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #ef4444 0%,
    #f97316 17%,
    #eab308 34%,
    #22c55e 51%,
    #3b82f6 68%,
    #8b5cf6 85%,
    #ec4899 100%
  );
}

.drive-storage progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #ef4444 0%,
    #f97316 17%,
    #eab308 34%,
    #22c55e 51%,
    #3b82f6 68%,
    #8b5cf6 85%,
    #ec4899 100%
  );
}

.drive-message {
  min-height: 1.5em;
  color: #a4a4a0;
  font-size: 13px;
}

.drive-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 28px 0 12px;
  color: #a4a4a0;
  font-size: 13px;
}

.drive-breadcrumbs a:hover,
.drive-folder-link:hover,
.drive-items a:hover {
  color: #38bdf8;
}

.drive-items {
  margin: 0;
  padding: 0;
  border-top: 1px solid #30302d;
  list-style: none;
}

.drive-items li {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-bottom: 1px solid #30302d;
  cursor: default;
}

.drive-items li.is-selected {
  background: #172b35;
  box-shadow: inset 3px 0 #38bdf8;
}

.drive-selection-marquee {
  position: fixed;
  z-index: 20;
  border: 1px solid #38bdf8;
  background: #38bdf833;
  pointer-events: none;
}

.drive-selection-marquee[hidden] {
  display: none;
}

.drive-file-item {
  gap: 12px;
}

.drive-item-checkbox {
  width: 24px;
  height: 24px;
  display: grid;
  place-content: center;
  flex: none;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #555650;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.drive-item-checkbox:hover {
  border-color: #38bdf8;
}

.drive-item-checkbox:checked {
  border-color: #38bdf8;
  background: #38bdf8;
}

.drive-item-checkbox::after {
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #071015;
  border-left: 2px solid #071015;
  content: "";
  opacity: 0;
  transform: translateY(-1px) rotate(-45deg) scale(0.7);
  transition: opacity 140ms ease, transform 140ms ease;
}

.drive-item-checkbox:checked::after {
  opacity: 1;
  transform: translateY(-1px) rotate(-45deg) scale(1);
}

.drive-item-checkbox:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 3px;
}

.drive-file-details {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 16px;
}

.drive-file-details > a,
.drive-file-details > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.drive-file-content {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.drive-video-player {
  width: min(100%, 720px);
  max-height: 70vh;
  border-radius: 8px;
  background: #000;
}

.drive-actions {
  position: relative;
  flex: none;
}

.drive-actions > summary {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b7b7b1;
  cursor: pointer;
  list-style: none;
}

.drive-actions > summary::-webkit-details-marker {
  display: none;
}

.drive-actions > summary:hover,
.drive-actions[open] > summary {
  color: #38bdf8;
}

.drive-actions > summary:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 3px;
}

.drive-actions > summary svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.drive-actions-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  right: 0;
  min-width: 148px;
  display: grid;
  gap: 2px;
  padding: 5px;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  background: #191919;
  box-shadow: 0 8px 24px #0009;
}

.drive-actions:not([open]) > .drive-actions-menu {
  display: none;
}

.drive-actions-menu .drive-button,
.drive-actions-menu .drive-delete-button,
.drive-actions-menu .drive-edit-button {
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  height: auto;
  display: flex;
  justify-content: flex-start;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #d3d2cc;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.drive-actions-menu .drive-button:hover,
.drive-actions-menu .drive-edit-button:hover,
.drive-actions-menu .drive-delete-button:hover {
  background: #172b35;
  color: #38bdf8;
}

.drive-actions-menu button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.drive-delete-button svg,
.drive-edit-button svg,
.drive-actions-menu .drive-button svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.drive-folder-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.drive-folder-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 12px;
}

.drive-item-actions {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 4px;
}

.drive-file-size {
  flex: none;
  color: #858580;
  font-size: 12px;
}

.drive-upload-progress {
  flex: none;
  color: #d7c9a8;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.visually-hidden:focus-visible + .drive-selected-file {
  outline: 2px solid #38bdf8;
  outline-offset: 3px;
}

@media (max-width: 800px) {
  .site-header-inner {
    min-height: 80px;
  }

  .site-header {
    --header-height: 80px;
  }
}

@media (max-width: 600px) {
  .site-footer,
  .hero {
    width: calc(100% - 40px);
  }

  .site-header-inner {
    width: calc(100% - 40px);
    min-height: 76px;
  }

  .site-header {
    --header-height: 76px;
  }

  .menu-close {
    right: 20px;
  }

  .hero {
    padding-block: 110px 130px;
  }

  .drive-page {
    width: calc(100% - 40px);
    padding-block: 48px 80px;
  }

  .drive-toolbar,
  .drive-inline-form {
    width: 100%;
  }

  .drive-toolbar {
    align-items: stretch;
    padding: 10px;
  }

  .drive-upload-form {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 12px 0 0;
    border-top: 1px solid #303030;
    border-left: 0;
  }

  .drive-selected-file {
    flex: 1 1 100%;
    order: 1;
  }

  .drive-inline-form input {
    flex: 1;
    min-width: 0;
  }

  h1 {
    font-size: clamp(48px, 12vw, 72px);
  }

  .hero-index {
    bottom: 42px;
  }

  .site-footer {
    min-height: 76px;
    gap: 20px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-header::before {
    transition-duration: 500ms!important;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
