/* gamma.saka.ac — dusk design system, hand-ported from saka.ac
   (src/app/globals.css, the [data-mood="dusk"] block). Own tokens, no
   shared import — same approach unit.saka.ac uses for its own styling. */

@font-face {
  font-family: "Geist Sans";
  src: url("/fonts/Geist-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Geist Sans";
  src: url("/fonts/Geist-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Geist Sans";
  src: url("/fonts/Geist-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #f3efe8;
  --fg-secondary: rgba(243, 239, 232, 0.84);
  --fg-muted: rgba(243, 239, 232, 0.74);
  --fg-faint: rgba(243, 239, 232, 0.68);

  --accent: #eb9a72;
  --ember: #e8875a;

  --hairline: rgba(255, 255, 255, 0.1);

  --glass-blur: 28px;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-edge: rgba(255, 255, 255, 0.13);
  --shadow-glass: 0 22px 50px -24px rgba(0, 0, 0, 0.6);

  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-xl: 44px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --dur: 200ms;

  --font-display: "Inter Tight", var(--font-sans), system-ui, sans-serif;
  --font-sans: "Geist Sans", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  color-scheme: dark;
}

body {
  min-height: 100vh;
  background-color: #17181d;
  background-image: linear-gradient(175deg, #1d1e25 0%, #17181d 52%, #121317 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(235, 154, 114, 0.3);
  color: var(--ink);
}

a {
  color: inherit;
}

/* ── Glass surfaces ────────────────────────────────────── */
.glass {
  position: relative;
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-glass);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.25);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.25);
}

.pane {
  position: relative;
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-glass);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.25);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.25);
}

@media (prefers-reduced-transparency: reduce) {
  .glass,
  .pane {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(28, 29, 35, 0.92);
  }
}

/* ── Layout shell ──────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.page {
  position: relative;
  padding: clamp(24px, 6vh, 64px) 0 96px;
  min-height: 100vh;
}

/* ── Type ──────────────────────────────────────────────── */
.title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 7vw, 56px);
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}

.subtitle {
  margin: 14px 0 0;
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--fg-muted);
  max-width: 46ch;
}

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--fg-faint);
}

/* ── Controls ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  color: var(--ink);
  font-family: inherit;
  transition:
    transform 160ms var(--ease-out),
    background-color var(--dur) ease,
    opacity var(--dur) ease;
}
.btn:active {
  transform: scale(0.97);
}
.btn[disabled] {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.btn-solid {
  background: var(--ink);
  color: #17181d;
  box-shadow: 0 12px 26px -12px rgba(0, 0, 0, 0.7);
}
@media (hover: hover) and (pointer: fine) {
  .btn-solid:hover {
    background: #fff;
  }
}

.btn-glass {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--glass-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
}
@media (hover: hover) and (pointer: fine) {
  .btn-glass:hover {
    background: rgba(255, 255, 255, 0.14);
  }
}

.btn-ghost {
  color: var(--fg-muted);
}
@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover {
    color: var(--ink);
  }
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12.5px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-edge);
  font-size: 12px;
  color: var(--fg-secondary);
}
.chip--ember {
  color: var(--ember);
  border-color: rgba(232, 135, 90, 0.4);
  background: rgba(232, 135, 90, 0.12);
}

/* ── Nav ───────────────────────────────────────────────── */
.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 18px;
  border-radius: var(--radius-pill);
  margin-bottom: clamp(32px, 8vh, 64px);
}
.nav-pill a {
  text-decoration: none;
  font-size: 13px;
  color: var(--fg-muted);
  transition: color var(--dur) ease;
}
.nav-pill a:hover {
  color: var(--ink);
}

/* ── Upload card ───────────────────────────────────────── */
.dropzone {
  border-radius: var(--radius-xl);
  padding: clamp(28px, 6vw, 48px);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur) ease, background-color var(--dur) ease;
}
.dropzone.is-dragover {
  border-color: var(--accent);
  background: rgba(235, 154, 114, 0.08);
}
.dropzone input[type="file"] {
  display: none;
}
.dropzone-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  color: var(--fg-muted);
}
.dropzone-text {
  color: var(--fg-secondary);
  font-size: 15px;
}
.dropzone-hint {
  margin-top: 6px;
  color: var(--fg-faint);
  font-size: 13px;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  margin-top: 16px;
}
.file-row-name {
  font-size: 14px;
  color: var(--fg-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-row {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

.error-pane {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(232, 135, 90, 0.1);
  border: 1px solid rgba(232, 135, 90, 0.3);
  color: var(--ember);
  font-size: 13.5px;
}
.error-pane[hidden] {
  display: none;
}

/* ── Motion ────────────────────────────────────────────── */
.settle {
  animation: settle 620ms var(--ease-out) backwards;
}
@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
.settle--1 {
  animation-delay: 60ms;
}
.settle--2 {
  animation-delay: 140ms;
}
.settle--3 {
  animation-delay: 220ms;
}

@media (prefers-reduced-motion: reduce) {
  .settle,
  .settle--1,
  .settle--2,
  .settle--3 {
    animation: none;
  }
  .btn,
  .dropzone {
    transition: none;
  }
}

footer.site-footer {
  margin-top: 48px;
  text-align: center;
  color: var(--fg-faint);
  font-size: 12.5px;
}
footer.site-footer a {
  text-decoration: underline;
  text-decoration-color: var(--hairline);
}
