/* ArchivedDreams — upload page.
   Design system lifted from the Phase 1/2/3 comps. */

:root {
  --paper:       #e9e9e7;
  --panel:       #e2e2df;
  --ink:         #1a1a1a;
  --body:        #4a4540;
  --warm:        #8a7f78;
  --mute:        #6a625d;
  --faint:       #9a938d;
  --rule-strong: #b3b0ac;
  --rule:        #cfccc8;
  --edge:        #a9a29c;
  --stone:       #c5bab4;
  --track:       #c9c6c2;
  --alert:       #8f3a2f;

  --sans:  'Archivo', system-ui, -apple-system, sans-serif;
  --serif: 'Times New Roman', Times, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { opacity: .6; }

/* ---------------------------------------------------------------- shell */

.page {
  min-height: 100vh;
  min-height: 100svh;
  padding: 44px 56px;
  display: flex;
  flex-direction: column;
}

.rule       { height: 2px; background: var(--rule-strong); }
.rule-close { height: 2px; background: var(--rule); }

.head {
  display: flex;
  justify-content: flex-end;
  padding-top: 18px;
}

.mark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -.06em;
  color: var(--warm);
}

/* The photo-mosaic AD. Bigger than the lettered mark it replaces — below
   ~36px the tiles stop resolving and it reads as a smudge. */
.mark-logo {
  display: block;
  height: 40px;
  width: auto;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 60px 0;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
}

.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--mute);
}

.copyright {
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--faint);
}

/* ----------------------------------------------------------------- views */

.view { display: none; }

.view.is-active {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.view.is-active.split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.narrow { max-width: 760px; }

/* ------------------------------------------------------------- typography */

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 26px;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 4.6vw, 52px);
  line-height: 1.06;
  letter-spacing: .01em;
  color: var(--ink);
  margin-bottom: 22px;
}

h1.display {
  font-size: clamp(44px, 6.5vw, 66px);
  line-height: 1.04;
  margin-bottom: 24px;
}

.lead {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--body);
  text-wrap: pretty;
}

.lead.wide {
  font-size: 22px;
  line-height: 1.5;
  max-width: 560px;
}

.note {
  border-left: 2px solid var(--stone);
  padding: 12px 0 12px 18px;
  font-size: 13px;
  letter-spacing: .08em;
  line-height: 1.85;
  color: var(--mute);
}

.note > span { display: block; }

/* Bodies can hold more than one paragraph; blank lines in the config split. */
.lead .para { display: block; }
.lead .para + .para { margin-top: .8em; }

/* --------------------------------------------------------------- consent */

.consent {
  background: var(--panel);
  padding: 22px 24px;
}

.consent-text {
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: .01em;
  color: var(--mute);
  margin-bottom: 16px;
}

.consent-agree {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}

.consent-agree input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0;
  border: 1px solid var(--edge);
  background: var(--paper);
  cursor: pointer;
  display: grid;
  place-content: center;
}

.consent-agree input::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 1.6px solid var(--paper);
  border-bottom: 1.6px solid var(--paper);
  transform: translateY(-1px) rotate(-45deg);
  opacity: 0;
}

.consent-agree input:checked {
  background: var(--ink);
  border-color: var(--ink);
}

.consent-agree input:checked::after { opacity: 1; }

.consent-agree input:focus-visible { outline: 2px solid var(--warm); outline-offset: 2px; }

.legend {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mute);
}

.error {
  font-size: 13px;
  letter-spacing: .04em;
  line-height: 1.6;
  color: var(--alert);
}

/* ---------------------------------------------------------------- badges */

.badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--stone);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.badge.solid { background: var(--warm); }

/* --------------------------------------------------------------- actions */

.button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 0;
  padding: 14px 28px;
  cursor: pointer;
}

.button:hover { opacity: .8; }

.button:disabled {
  background: var(--stone);
  color: var(--paper);
  cursor: not-allowed;
  opacity: 1;
}

.link-button {
  align-self: flex-start;
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
  border-bottom: 1px solid var(--stone);
  cursor: pointer;
}

.link-button:hover { color: var(--ink); }

/* ---------------------------------------------------------------- meters */

.meter-row {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.meter-label {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
}

.meter {
  width: 200px;
  height: 2px;
  background: var(--track);
  display: block;
  position: relative;
  overflow: hidden;
}

.meter > span {
  position: absolute;
  inset: 0 100% 0 0;
  background: var(--warm);
  transition: right .3s linear;
}

.meter.indeterminate > span {
  inset: 0;
  width: 40%;
  right: auto;
  animation: sweep 1.4s ease-in-out infinite;
}

@keyframes sweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* -------------------------------------------------------------- dropzone */

.dropzone {
  border: 2px dashed var(--edge);
  background: var(--panel);
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.dropzone:hover,
.dropzone:focus-within { border-color: var(--warm); }

.dropzone.is-dragging {
  border-color: var(--ink);
  background: var(--stone);
}

.dropzone-title {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: .02em;
  color: var(--ink);
  margin-bottom: 10px;
}

.dropzone-hint {
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--mute);
  margin-bottom: 30px;
}

.dropzone .badge { margin-bottom: 26px; }

.dropzone .button { align-self: center; }

/* --------------------------------------------------------------- file list */

.files {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.files-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.files-total {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
}

.file {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  background: var(--panel);
}

.file-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warm);
  flex-shrink: 0;
}

.file-name {
  flex: 1;
  min-width: 0;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--mute);
  flex-shrink: 0;
}

.file-remove {
  background: none;
  border: 0;
  padding: 0 0 0 6px;
  font-size: 18px;
  line-height: 1;
  color: var(--mute);
  cursor: pointer;
  flex-shrink: 0;
}

.file-remove:hover { color: var(--ink); }

/* ------------------------------------------------------------------ form */

.field { display: flex; flex-direction: column; }

.field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 8px;
}

.field input {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--edge);
  padding: 8px 0;
  border-radius: 0;
}

.field input:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.stack { display: flex; flex-direction: column; gap: 26px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.hidden { display: none !important; }

.mt-26 { margin-top: 26px; }
.mt-40 { margin-top: 40px; }
.mb-22 { margin-bottom: 22px; }
.mb-26 { margin-bottom: 26px; }
.mb-46 { margin-bottom: 46px; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .view.is-active.split {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 44px;
  }
}

@media (max-width: 640px) {
  .page { padding: 26px 22px; }
  .mark-logo { height: 32px; }
  .main { padding: 44px 0; }
  .dropzone { padding: 44px 24px; }
  .foot { flex-direction: column; gap: 8px; }
  .meter { width: 100%; }
  .lead, .lead.wide { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .meter > span { transition: none; }
  .meter.indeterminate > span { animation: none; inset: 0 60% 0 0; width: auto; }
}
