/* Umbrela Files — styled after umbrela.us: charcoal tile, cream canopy, rain blue. */

@font-face { font-family: "Outfit"; src: url("fonts/outfit.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  --bg: #121312;
  --bg-2: #171817;
  --panel: #1d1e1c;
  --panel-2: #232422;
  --cream: #fcf5f0;
  --fg: #f3ece4;
  --fg-2: rgba(243, 236, 228, .74);
  --fg-3: rgba(243, 236, 228, .5);
  --line: rgba(243, 236, 228, .1);
  --line-2: rgba(243, 236, 228, .2);
  --rain: #87c6fa;
  --rain-2: #5aa9f0;
  --rain-soft: rgba(135, 198, 250, .14);
  --amber: #f5b06a;
  --live: #5fd08b;
  --danger: #f27a6b;
  --mark-blue: #87c6fa;

  --ff: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ff-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --pad: clamp(16px, 4vw, 48px);
  --r: 20px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --drop-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 30'%3E%3Cpath d='M12 0C12 0 23.5 13 23.5 19.6A11.5 11.5 0 0 1 .5 19.6C.5 13 12 0 12 0Z'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(135, 198, 250, .07), transparent 60%), var(--bg);
  color: var(--fg); font: 350 16px/1.55 var(--ff);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
svg { display: block; fill: currentColor; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--rain); color: #0b0c0d; }
:focus-visible { outline: 2px solid var(--rain); outline-offset: 3px; }

.eyebrow { display: inline-block; font: 400 12px/1.7 var(--ff); letter-spacing: .24em; text-transform: uppercase; color: var(--fg-2); }
.dot { display: inline-block; width: 4px; height: 4px; margin: 0 .8em; border-radius: 50%; background: var(--rain); vertical-align: middle; }
.display { font: 300 clamp(44px, 7vw, 84px)/1 var(--ff); letter-spacing: -.035em; color: var(--cream); margin-top: 10px; }
.display em { font: italic 400 1.08em/1 var(--ff-serif); letter-spacing: -.01em; color: var(--rain); }
.display--sm { font-size: clamp(36px, 5vw, 56px); }
.lede { margin-top: 18px; font-size: 19px; font-weight: 300; color: var(--fg-2); max-width: 32ch; }
.muted { color: var(--fg-2); font-size: 15px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  height: 50px; padding: 0 24px; border: 0; border-radius: 999px;
  font: 500 15px/1 var(--ff); white-space: nowrap; text-decoration: none;
  transition: box-shadow .3s, background-color .25s, color .25s, opacity .2s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn--solid { background: var(--cream); color: #121312; }
.btn--solid:hover:not(:disabled) { box-shadow: 0 0 0 6px rgba(252, 245, 240, .12); }
.btn--rain { background: var(--rain); color: #0b1620; }
.btn--rain:hover { box-shadow: 0 0 0 6px var(--rain-soft); }
.btn--ghost { background: rgba(18, 19, 18, .35); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--cream), 0 0 0 6px rgba(252, 245, 240, .06); }
.btn--danger { background: var(--danger); color: #1c0d0b; }
.link { border: 0; background: none; padding: 6px 0; color: var(--fg-2); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.link:hover { color: var(--cream); }
.tool {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; min-width: 38px; padding: 0 12px;
  border: 0; border-radius: 999px; background: rgba(18, 19, 18, .3); box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--fg-2); font-size: 14px; justify-content: center; transition: color .2s, box-shadow .2s;
}
.tool:hover { color: var(--cream); box-shadow: inset 0 0 0 1px var(--cream); }
.tool svg { width: 16px; height: 16px; }
.tool.is-on { color: var(--live); }

/* ---------- Header / footer ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px var(--pad); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; }
.brand__mark { width: 40px; height: 35px; }
.brand__word { width: 92px; height: 20px; }
.brand__tag { padding: 3px 10px; border-radius: 999px; font: 500 11px/1.4 var(--ff-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--rain); box-shadow: inset 0 0 0 1px rgba(135, 198, 250, .4); }
.who { display: flex; align-items: center; gap: 8px; }
.who__email { margin-right: 6px; font-size: 14px; color: var(--fg-3); }
.foot { margin-top: auto; padding: 36px var(--pad); font-size: 13px; color: var(--fg-3); text-align: center; }
main { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--pad); }

/* ---------- Cards / forms ---------- */
.card { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); }
.field { display: grid; gap: 6px; margin-top: 16px; }
.field span { font-size: 13px; color: var(--fg-2); }
.field input, .search {
  height: 48px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-2); outline: none; transition: box-shadow .2s;
}
.field input:focus, .search:focus { box-shadow: inset 0 0 0 1px var(--rain), 0 0 0 4px var(--rain-soft); }
.form__error { min-height: 20px; margin-top: 12px; color: var(--danger); font-size: 14px; }
form h2, .dialog h2 { font-size: 24px; font-weight: 500; letter-spacing: -.015em; color: var(--cream); margin-bottom: 6px; }

/* ---------- Auth ---------- */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; padding: clamp(20px, 7vh, 90px) 0; }
.auth__card { padding: 32px; }
.auth__card form { display: grid; }
.auth__card .btn { margin-top: 8px; }
.auth__card .link { justify-self: center; margin-top: 12px; }

/* ---------- App ---------- */
.app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 12px 0 20px; }
.app > *, .auth > * { min-width: 0; }
.nudge { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; background: var(--rain-soft); box-shadow: inset 0 0 0 1px rgba(135, 198, 250, .3); }
.nudge > svg { width: 22px; height: 22px; flex: none; color: var(--rain); }
.nudge p { flex: 1; font-size: 15px; color: var(--fg); }
.nudge__actions { display: flex; align-items: center; gap: 14px; }
.head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.meter { min-width: min(320px, 100%); }
.meter__text { font-size: 14px; color: var(--fg-2); margin-bottom: 8px; text-align: right; }
.meter__text b { color: var(--cream); font-weight: 500; }
.meter__bar, .bar { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.meter__bar i, .bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--rain-2), var(--rain)); transition: width .4s var(--ease-out); }
.meter.is-high .meter__bar i { background: linear-gradient(90deg, #e9944f, var(--amber)); }

.drop {
  position: relative; display: grid; justify-items: center; gap: 10px; padding: clamp(36px, 6vw, 60px) 20px;
  border-radius: 24px; text-align: center; outline: none;
  background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(243, 236, 228, .015) 14px 28px), var(--bg-2);
  box-shadow: inset 0 0 0 1.5px var(--line-2); transition: box-shadow .25s, background-color .25s, transform .3s var(--ease-out);
}
.drop::before { content: ""; position: absolute; inset: 10px; border-radius: 16px; border: 1.5px dashed var(--line-2); pointer-events: none; transition: border-color .25s; }
.drop.is-over { background-color: rgba(135, 198, 250, .06); box-shadow: inset 0 0 0 1.5px var(--rain), 0 0 0 8px var(--rain-soft); transform: scale(1.005); }
.drop.is-over::before { border-color: var(--rain); }
.drop.is-busy { opacity: .55; pointer-events: none; }
.drop__drops { display: flex; gap: 10px; align-items: end; height: 40px; margin-bottom: 6px; }
.drop__drops i { width: 18px; height: 23px; background: var(--rain); -webkit-mask: var(--drop-mask) center / contain no-repeat; mask: var(--drop-mask) center / contain no-repeat; animation: fall 2.4s var(--ease-out) infinite; }
.drop__drops i:nth-child(2) { width: 24px; height: 30px; animation-delay: .3s; }
.drop__drops i:nth-child(3) { animation-delay: .6s; }
.drop.is-over .drop__drops i { animation-duration: 1s; }
@keyframes fall { 0% { transform: translateY(-14px); opacity: 0; } 30% { opacity: 1; } 70% { transform: none; opacity: 1; } 100% { transform: translateY(4px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .drop__drops i { animation: none; } }
.drop__title { font-size: clamp(20px, 2.6vw, 26px); font-weight: 400; color: var(--cream); letter-spacing: -.01em; }
.drop__hint { font-size: 14px; color: var(--fg-3); }
.drop__hint b { color: var(--fg-2); font-weight: 500; }
.drop__buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }

.queue { padding: 22px 24px; display: grid; gap: 14px; }
.queue__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.queue__head h2 { font-size: 19px; font-weight: 500; color: var(--cream); }
.queue__list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; display: grid; gap: 2px; }
.queue__list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 2px; font-size: 14px; border-top: 1px solid var(--line); }
.queue__list .q-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue__list .q-state { font: 400 12px/1.6 var(--ff-mono); color: var(--fg-3); }
.queue__list .q-bar { grid-column: 1 / -1; height: 3px; border-radius: 9px; background: var(--panel-2); overflow: hidden; }
.queue__list .q-bar i { display: block; height: 100%; width: 0; background: var(--rain); }
.queue__list li.is-done .q-state { color: var(--live); }
.queue__list li.is-done .q-bar i { background: var(--live); }
.queue__list li.is-error .q-state { color: var(--danger); }
.queue__more { font-size: 13px; color: var(--fg-3); padding-top: 6px; }

.browser { padding: 8px 0 10px; overflow: hidden; }
.browser__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px 12px 22px; flex-wrap: wrap; }
.browser__tools { display: flex; gap: 8px; align-items: center; }
.search { height: 38px; width: 220px; border-radius: 999px; font-size: 14px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 15px; }
.crumbs button { border: 0; background: none; padding: 4px 6px; border-radius: 8px; color: var(--fg-2); }
.crumbs button:hover { color: var(--cream); background: var(--panel-2); }
.crumbs button[aria-current] { color: var(--cream); font-weight: 500; }
.crumbs span { color: var(--fg-3); }

.list { display: grid; }
.row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) 100px 120px auto; align-items: center; gap: 14px;
  min-height: 56px; padding: 6px 18px 6px 22px; border-top: 1px solid var(--line); transition: background-color .15s;
}
.row:hover { background: rgba(243, 236, 228, .03); }
.row__icon { width: 22px; height: 22px; color: var(--fg-3); }
.row--folder .row__icon { color: var(--rain); }
.row__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; text-align: left; border: 0; background: none; padding: 0; color: var(--fg); }
.row--folder .row__name { cursor: pointer; font-weight: 500; }
.row--folder .row__name:hover { color: var(--rain); }
.row__name small { display: block; font-size: 12px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; }
.row__size, .row__date { font: 400 13px/1.4 var(--ff-mono); color: var(--fg-3); text-align: right; }
.row__actions { display: flex; gap: 6px; justify-content: flex-end; }
.row__actions .tool { height: 34px; min-width: 34px; padding: 0 10px; }
.row__actions .tool--danger:hover { color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.empty { padding: 36px 22px; text-align: center; color: var(--fg-3); border-top: 1px solid var(--line); }

/* ---------- Dialogs / toast ---------- */
.dialog { width: min(440px, calc(100vw - 32px)); padding: 30px; border: 0; border-radius: var(--r); background: var(--panel); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 80px rgba(0, 0, 0, .5); }
.dialog::backdrop { background: rgba(8, 9, 8, .7); backdrop-filter: blur(4px); }
.dialog form:not(.dialog__close) { display: grid; }
.dialog .btn { margin-top: 10px; }
.dialog__close { position: absolute; top: 14px; right: 14px; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.qr { display: grid; place-items: center; margin: 20px auto 12px; padding: 14px; width: max-content; border-radius: 14px; background: var(--cream); }
.qr img, .qr canvas { width: 180px; height: 180px; }
.secret { font-size: 13px; color: var(--fg-3); text-align: center; overflow-wrap: anywhere; }
.secret code { font: 500 13px var(--ff-mono); color: var(--fg-2); letter-spacing: .06em; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 999px;
  background: var(--cream); color: #121312; font-size: 14px; font-weight: 500; box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
  transform: translate(-50%, 140%); opacity: 0; transition: transform .45s var(--ease-out), opacity .3s; pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast.is-error { background: var(--danger); color: #1c0d0b; }

@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; }
  .who__email, .tool__label { display: none; }
  .row { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; padding: 8px 12px; }
  .row__size, .row__date { display: none; }
  .search { width: 100%; }
  .browser__tools { flex: 1; }
  .browser__bar { padding: 12px; }
  .drop__buttons .btn { flex: 1; }
  .nudge { flex-wrap: wrap; }
  .meter__text { text-align: left; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
