/* ---- Alloy brand tokens ----------------------------------------------
   Hardcoded per-Element for now (standalone build). If/when the portfolio
   moves to a shared tokens file, only this block needs to change. */
:root {
  --graphite: #1c1917;
  --ivory: #f3ede4;
  --ember: #d9622b;
  --ember-deep: #b84e1f;
  --bronze: #9c6b3e;
  --steel: #b9afa0;

  --font-display: "Fraunces", serif;
  --font-body: "IBM Plex Sans", sans-serif;
}
/* ------------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--graphite);
  color: var(--ivory);
  font-family: var(--font-body);
  min-height: 100%;
}

h1,
h2 {
  font-family: var(--font-display);
  color: var(--ember);
  margin: 0 0 0.4em;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
}

p {
  line-height: 1.5;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ivory);
}

.reset-hint {
  color: var(--steel);
  font-size: 0.85rem;
  margin: 0;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* ---- Drop screen ---- */

.drop-screen {
  text-align: center;
  padding: 2rem 0 1rem;
}

.lede {
  color: var(--steel);
  font-size: 1.05rem;
  margin-top: 0;
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 2rem auto;
  padding: 3rem 1.5rem;
  max-width: 480px;
  border: 2px dashed var(--bronze);
  border-radius: 12px;
  color: var(--steel);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.drop-zone:hover,
.drop-zone:focus-within,
.drop-zone:focus-visible {
  border-color: var(--ember);
  background: rgba(217, 98, 43, 0.06);
  outline: none;
}

.drop-zone svg {
  color: var(--ember);
}

.drop-zone-text {
  font-weight: 500;
}

.status-message {
  min-height: 1.4em;
  color: var(--ember);
  font-weight: 500;
}

.status-message.is-error {
  color: #e08b6a;
}

.trust-note {
  max-width: 520px;
  margin: 2rem auto 0;
  text-align: left;
  color: var(--steel);
  font-size: 0.92rem;
  border-top: 1px solid rgba(185, 175, 160, 0.25);
  padding-top: 1.25rem;
}

.trust-note strong {
  color: var(--ivory);
}

.howto {
  max-width: 520px;
  margin: 1.5rem auto 0;
  text-align: left;
  color: var(--steel);
  font-size: 0.92rem;
}

.howto summary {
  cursor: pointer;
  color: var(--ivory);
  font-weight: 500;
}

/* ---- Results screen ---- */

.results-screen {
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.results-screen:not([hidden]) {
  display: flex;
}

.stat-card {
  background: var(--ivory);
  color: var(--graphite);
  border-radius: 12px;
  padding: 1.5rem;
}

.stat-card h2 {
  color: var(--ember-deep);
}

.section-note {
  color: #5c5652;
  margin-top: -0.5rem;
  font-size: 0.9rem;
}

.rewatch-card {
  text-align: center;
}

.big-number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--ember-deep);
  margin: 0.2em 0 0;
  line-height: 1;
}

.big-number-label {
  color: #5c5652;
  margin-top: 0.3em;
  font-size: 0.9rem;
}

.rewatch-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  text-align: left;
  max-width: 360px;
  margin-inline: auto;
}

.rewatch-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(28, 25, 23, 0.1);
  font-size: 0.95rem;
}

.rewatch-list li:last-child {
  border-bottom: none;
}

.rewatch-list .count {
  color: var(--ember-deep);
  font-weight: 600;
}

/* ---- Heatmap ---- */

.heatmap {
  display: grid;
  grid-template-columns: auto repeat(12, 1fr);
  gap: 3px;
  font-size: 0.72rem;
  overflow-x: auto;
}

.heatmap-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-width: 22px;
  border-radius: 3px;
  color: var(--graphite);
}

.heatmap-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 4px;
  color: #5c5652;
  font-weight: 500;
}

.heatmap-label.month {
  justify-content: center;
  padding-right: 0;
}

/* ---- Footer ---- */

.site-footer {
  text-align: center;
  color: var(--steel);
  font-size: 0.85rem;
  padding: 1.5rem 0 2.5rem;
}

/* ---- Drag overlay ---- */

.drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.92);
  border: 3px dashed var(--ember);
  align-items: center;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
}

.drop-overlay:not([hidden]) {
  display: flex;
}

.drop-overlay p {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--ember);
}

@media (max-width: 480px) {
  .heatmap {
    font-size: 0.6rem;
  }
}
