/* GCV Advisory design tokens (see GCVWeb DESIGN.md). Dark is the brand default; light follows the system setting. */

@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-display: swap; src: url("/static/fonts/SchibstedGrotesk-Regular.ttf") format("truetype"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 600; font-display: swap; src: url("/static/fonts/SchibstedGrotesk-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/static/fonts/IBMPlexMono-Medium.ttf") format("truetype"); }

:root {
  --background: oklch(.16 .012 215);
  --foreground: oklch(.96 .006 210);
  --card: oklch(.22 .025 218);
  --primary: oklch(.85 .045 226);
  --primary-foreground: oklch(.16 .012 215);
  --secondary: oklch(.32 .04 210);
  --muted-foreground: oklch(.70 .02 210);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(.74 .06 225);
  --eyebrow: oklch(.74 .06 225);
  --destructive: oklch(.704 .191 22.216);
  --success: oklch(.80 .14 150);
  --radius: .625rem;
  --font-sans: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --background: oklch(.96 .006 210);
    --foreground: oklch(.16 .012 215);
    --card: oklch(1 0 0);
    --primary: oklch(.32 .04 210);
    --primary-foreground: oklch(.96 .006 210);
    --secondary: oklch(.94 .01 210);
    --muted-foreground: oklch(.44 .03 210);
    --border: oklch(.90 .01 210);
    --input: oklch(.90 .01 210);
    --eyebrow: oklch(.44 .05 205);
    --destructive: oklch(.577 .245 27.325);
    --success: oklch(.50 .14 150);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--background); color: var(--foreground);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.5;
  font-feature-settings: "rlig" 1, "calt" 1; -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: 56rem; margin: 0 auto; padding: 0 1rem; }
header.site { border-bottom: 1px solid var(--border); }
header.site .container { display: flex; align-items: center; justify-content: space-between; padding-top: .75rem; padding-bottom: .75rem; }
.brand { display: flex; align-items: center; gap: .75rem; font-weight: 600; font-size: 1.125rem; letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; border-radius: 6px; }
main { flex: 1; padding: 3rem 0; }
footer.site { border-top: 1px solid var(--border); padding: 1.25rem 0; color: var(--muted-foreground); font-size: .875rem; }

.eyebrow { font-family: var(--font-mono); font-weight: 500; font-size: .75rem; text-transform: uppercase; letter-spacing: .3em; color: var(--eyebrow); margin: 0 0 .75rem; }
h1 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 1rem; }
h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; margin: 0 0 .5rem; }
.lead { font-size: 1.125rem; color: var(--muted-foreground); max-width: 40rem; margin: 0 0 2rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted-foreground); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 500; font-size: .9375rem; cursor: pointer;
  padding: .625rem 1.125rem; border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent; background: var(--primary); color: var(--primary-foreground);
  text-decoration: none; transition: opacity .15s, background .15s;
}
.btn:hover { opacity: .9; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--foreground); border-color: var(--input); }
.btn.secondary:hover { background: var(--secondary); opacity: 1; }
.btn.link { background: none; border: 0; color: var(--muted-foreground); padding: 0; text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* drop zone */
.dropzone {
  display: block; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--input); border-radius: var(--radius);
  padding: 3rem 1.5rem; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--ring); background: color-mix(in oklab, var(--ring) 8%, transparent); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { outline: 2px solid var(--ring); outline-offset: 2px; }
.dropzone .title { font-size: 1.125rem; font-weight: 600; margin-bottom: .25rem; }
.dropzone .hint { color: var(--muted-foreground); font-size: .875rem; }

.bar { height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; margin-top: 1rem; }
.bar::after { content: ""; display: block; height: 100%; width: 35%; background: var(--ring); border-radius: 2px; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .bar::after { animation: none; width: 100%; opacity: .6; } }

.status { margin-top: 1.5rem; }
.status h2 { font-size: 1.25rem; }
.error { color: var(--destructive); }
.ok { color: var(--success); }
.downloads { display: grid; gap: .75rem; margin: 1.25rem 0; }
.file {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px); padding: .875rem 1rem;
}
.file .name { font-weight: 600; word-break: break-all; }
.file .size { font-family: var(--font-mono); font-size: .75rem; color: var(--muted-foreground); }
.actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
[hidden] { display: none !important; }

/* data protection notes */
.notes { margin-top: 3.5rem; }
.notes-grid { display: grid; gap: 1rem; margin-top: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .notes-grid { grid-template-columns: 1fr 1fr; } }
.note { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; background: var(--card); }
.note h3 { font-size: 1rem; font-weight: 600; margin: 0 0 .375rem; }
.note p { color: var(--muted-foreground); font-size: .9375rem; margin: 0; }
.note .num { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .3em; color: var(--eyebrow); margin-bottom: .5rem; display: block; }

/* login */
.login { max-width: 24rem; margin: 3rem auto 0; }
label { display: block; font-weight: 500; font-size: .875rem; margin-bottom: .375rem; }
input[type="password"] {
  width: 100%; font: inherit; padding: .625rem .75rem; color: var(--foreground);
  background: transparent; border: 1px solid var(--input); border-radius: calc(var(--radius) - 2px);
}
.field { margin-bottom: 1rem; }
.login .btn { width: 100%; }
.login .error { min-height: 1.5rem; margin-top: .75rem; font-size: .9375rem; }
.h1-sm { font-size: 1.75rem; }
.questions { margin-top: 1.5rem; }
a { color: var(--primary); }

.notes-list { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--border); }
.notes-list li { padding: .875rem 0; border-bottom: 1px solid var(--border); color: var(--muted-foreground); }
.notes-list strong { color: var(--foreground); font-weight: 600; }
