/* sitedrop — CloudGrid Web 2026 design language.
   Tokens synced from the Cloudgrid design project (claude.ai/design). */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700&family=JetBrains+Mono:wght@400;500&display=swap");
@import url("https://api.fontshare.com/v2/css?f%5B%5D=tanker@400&display=swap");

:root {
  /* brand */
  --cg-ink: #222222;
  --cg-primary: #5A47F0;
  --cg-secondary: #B6DE68;
  --cg-tertiary: #60E9F0;
  --cg-primary-press: #4B39DB;
  --cg-secondary-press: #A6CF57;
  /* neutrals */
  --cg-neutral-0: #FFFFFF;
  --cg-lavender-50: #F2F1F7;
  --cg-neutral-100: #F1F1F1;
  --cg-neutral-200: #E3E3E3;
  --cg-neutral-400: #ACACAC;
  --cg-neutral-500: #8E8E8E;
  --cg-neutral-700: #595959;
  /* semantic */
  --cg-surface-page: var(--cg-neutral-0);
  --cg-surface-panel: var(--cg-primary);
  --cg-text-primary: var(--cg-ink);
  --cg-text-secondary: var(--cg-neutral-700);
  --cg-text-muted: var(--cg-neutral-500);
  --cg-border-hairline: var(--cg-neutral-100);
  --cg-border-control: var(--cg-neutral-200);
  --cg-focus-ring: rgba(90, 71, 240, .28);
  /* type */
  --cg-font-display: "Tanker", "Arial Narrow", sans-serif;
  --cg-font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cg-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  /* radius */
  --cg-radius-lg: 14px;
  --cg-radius-2xl: 24px;
  --cg-radius-pill: 999px;
  /* elevation */
  --cg-shadow-panel: 0 10px 40px rgba(90, 71, 240, .18);
  /* motion */
  --cg-duration-fast: 120ms;
  --cg-duration: 180ms;
  --cg-duration-slow: 280ms;
  --cg-ease-out: cubic-bezier(0, 0, .2, 1);
  --cg-transition-control: background-color var(--cg-duration) var(--cg-ease-out), border-color var(--cg-duration) var(--cg-ease-out), color var(--cg-duration) var(--cg-ease-out), box-shadow var(--cg-duration) var(--cg-ease-out);
}

[data-cg-surface="panel"] {
  --cg-text-primary: #FFFFFF;
  --cg-text-secondary: rgba(255, 255, 255, .82);
  --cg-text-muted: rgba(255, 255, 255, .66);
  --cg-border-control: rgba(255, 255, 255, .62);
  --cg-border-hairline: rgba(255, 255, 255, .24);
  --cg-focus-ring: rgba(255, 255, 255, .5);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--cg-surface-page);
  color: var(--cg-text-primary);
  font-family: var(--cg-font-body);
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

.mono { font-family: var(--cg-font-mono); }

/* ── the panel / dropzone (white margin, purple inside the frame) ── */
.stage {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  padding: 14px;
  background: var(--cg-surface-page);
}

.panel {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--cg-surface-panel);
  border-radius: 16px;
  padding: 48px 32px 76px;
  overflow: hidden;
  transition: var(--cg-transition-control);
}

.panel.is-clickable { cursor: pointer; }

.panel-wordmark {
  position: absolute;
  top: 26px;
  left: 32px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.panel-wordmark svg { width: 25px; height: 25px; display: block; }

/* the live frame: a slow marching-ants dash */
.dash {
  position: absolute;
  inset: 9px;
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  color: #fff;
  pointer-events: none;
  transition: color var(--cg-duration) var(--cg-ease-out);
  overflow: visible;
}

.dash rect {
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  animation: ants 2.8s linear infinite;
}

@keyframes ants {
  to { stroke-dashoffset: -20; }
}

@media (prefers-reduced-motion: reduce) {
  .dash rect { animation: none; }
}

.panel.is-dragging { background: var(--cg-primary-press); }

.panel.is-dragging .dash {
  color: var(--cg-secondary);
  filter: drop-shadow(0 0 14px rgba(182, 222, 104, .45));
}

.panel.is-dragging .dash rect { animation-duration: .9s; }

/* ── states ─────────────────────────────────────────────── */
.state {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 720px;
  gap: 20px;
}

.state.is-active { display: flex; }

.eyebrow {
  font-family: var(--cg-font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cg-text-muted);
}

.drop-icon {
  color: #fff;
  margin-top: 6px;
  animation: drift 3s var(--cg-ease-in-out, ease-in-out) infinite;
}

.drop-icon svg { width: 64px; height: 64px; display: block; }

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@media (prefers-reduced-motion: reduce) {
  .drop-icon { animation: none; }
}

.linklike {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--cg-font-mono);
  font-size: 12.5px;
  color: var(--cg-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--cg-duration) var(--cg-ease-out);
}

.linklike:hover { color: #fff; }

.display {
  margin: 0;
  font-family: var(--cg-font-display);
  font-weight: 400;
  font-size: clamp(44px, 7.5vw, 88px);
  line-height: 1.02;
  letter-spacing: .012em;
  text-transform: uppercase;
  color: #fff;
}

.display .lime { color: var(--cg-secondary); }

.lede {
  margin: 0;
  max-width: 54ch;
  font-size: 17px;
  color: var(--cg-text-secondary);
}

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ── buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cg-font-body);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--cg-radius-lg);
  padding: 12px 22px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--cg-transition-control), transform var(--cg-duration-fast) var(--cg-ease-out);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--cg-focus-ring); }
.btn svg { width: 16px; height: 16px; }

.btn-light { background: #fff; color: var(--cg-ink); }
.btn-light:hover { background: var(--cg-lavender-50); }

.btn-ghost { background: transparent; color: #fff; border-color: var(--cg-border-control); }
.btn-ghost:hover { border-color: #fff; }

.btn-lime { background: var(--cg-secondary); color: var(--cg-ink); }
.btn-lime:hover { background: var(--cg-secondary-press); }

/* ── uploading ──────────────────────────────────────────── */
.upload-meta {
  font-family: var(--cg-font-mono);
  font-size: 13px;
  color: var(--cg-text-muted);
  display: flex;
  gap: 18px;
}

.bar {
  width: min(440px, 70vw);
  height: 6px;
  border-radius: var(--cg-radius-pill);
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--cg-secondary);
  transition: width var(--cg-duration) var(--cg-ease-out);
}

/* ── success ────────────────────────────────────────────── */
.url-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: var(--cg-radius-lg);
  padding: 8px 8px 8px 20px;
  max-width: min(680px, 86vw);
}

.url-pill .url {
  font-family: var(--cg-font-mono);
  font-size: 15px;
  color: var(--cg-ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.url-pill .url:hover { color: var(--cg-primary); }

.url-pill .btn { padding: 10px 16px; font-size: 14px; }

.fineprint {
  font-family: var(--cg-font-mono);
  font-size: 12.5px;
  line-height: 2;
  color: var(--cg-text-muted);
}

.fineprint a { color: #fff; }

.warnbox {
  font-family: var(--cg-font-mono);
  font-size: 12.5px;
  text-align: left;
  color: var(--cg-text-secondary);
  background: rgba(0, 0, 0, .18);
  border: 1px solid var(--cg-border-hairline);
  border-radius: var(--cg-radius-lg);
  padding: 12px 16px;
  max-width: min(680px, 86vw);
}

.warnbox strong { color: var(--cg-secondary); font-weight: 500; }

/* ── error ──────────────────────────────────────────────── */
.err-msg { max-width: 52ch; color: var(--cg-text-secondary); margin: 0; }

/* ── panel footer ───────────────────────────────────────── */
.panel-foot {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: var(--cg-font-mono);
  font-size: 12px;
  color: var(--cg-text-muted);
}

.top-count {
  position: absolute;
  top: 30px;
  right: 32px;
  font-size: 12.5px;
  color: var(--cg-text-muted);
}

.runson { display: inline-flex; align-items: center; gap: 8px; }
.runson svg { height: 13px; width: auto; display: block; opacity: .9; }

@media (max-width: 720px) {
  .panel { padding: 40px 20px 100px; }
  .panel-wordmark { top: 20px; left: 20px; font-size: 17px; }
  .panel-foot { flex-direction: column; gap: 4px; bottom: 18px; align-items: center; }
  .upload-meta { flex-direction: column; gap: 4px; align-items: center; }
}
