/* North Pole Media Group — Parent portal
   Direction: North Pole office paperwork. Each video is a filed slip with a
   rubber stamp for its status. The stamp is the one loud element. */

:root {
  --frost: #e9f0f3;        /* page */
  --paper: #fdfdfb;        /* slips */
  --paper-edge: #d5e0e5;   /* slip borders, rules */
  --spruce: #14352d;       /* ink, primary buttons */
  --spruce-soft: #2c5248;
  --slate: #56666d;        /* secondary text */
  --cranberry: #a8232d;    /* stamps, errors */
  --brass: #9a7426;        /* "filming" stamp */
  --pine: #2f6b45;         /* "delivered" stamp */
  --focus: #1f6fb2;

  --font-display: "Young Serif", Georgia, serif;
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-stamp: "Special Elite", "Courier New", monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: 2.25rem;

  --radius-slip: 3px;
  --radius-control: 8px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--frost);
  color: var(--spruce);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
}

a { color: var(--spruce); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.shell {
  max-width: 620px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}

/* ---------------------------------------------------------------- masthead */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--spruce);
  margin-bottom: 28px;
}
.wordmark {
  font-family: var(--font-display);
  font-size: var(--step-0);
  letter-spacing: 0.01em;
  margin: 0;
}
.wordmark small {
  display: block;
  font-family: var(--font-body);
  font-size: var(--step--1);
  color: var(--slate);
  letter-spacing: 0;
}
.link-button {
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  font-size: var(--step--1);
  color: var(--slate);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover { color: var(--spruce); }

/* ---------------------------------------------------------------- type */

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; margin: 0; }
h1 { font-size: var(--step-3); margin-bottom: 10px; }
h2 { font-size: var(--step-2); margin-bottom: 8px; }
h3 { font-size: var(--step-1); }
p { margin: 0 0 14px; max-width: 34em; }
.lede { color: var(--slate); font-size: var(--step-0); }
.muted { color: var(--slate); }
.small { font-size: var(--step--1); }

/* ---------------------------------------------------------------- forms */

.form { display: grid; gap: 18px; margin-top: 22px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; }
.field .hint { font-size: var(--step--1); color: var(--slate); margin: 0; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--spruce);
  background: var(--paper);
  border: 1.5px solid #b9c8cf;
  border-radius: var(--radius-control);
  padding: 12px 14px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--spruce); outline: none; box-shadow: 0 0 0 3px rgba(31, 111, 178, 0.25); }
.field .count { font-size: var(--step--1); color: var(--slate); justify-self: end; }
.code-input { font-size: var(--step-2) !important; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 6px; }

.button {
  appearance: none;
  border: 2px solid var(--spruce);
  background: var(--spruce);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--radius-control);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}
.button:hover { background: var(--spruce-soft); border-color: var(--spruce-soft); }
.button.secondary { background: transparent; color: var(--spruce); }
.button.secondary:hover { background: rgba(20, 53, 45, 0.06); }
.button[disabled] { opacity: 0.55; cursor: progress; }

/* ---------------------------------------------------------------- notices */

.notice {
  border-left: 4px solid var(--spruce);
  background: var(--paper);
  padding: 12px 16px;
  margin: 0 0 22px;
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
}
.notice p { margin: 0; }
.notice.error { border-left-color: var(--cranberry); }
.notice.good { border-left-color: var(--pine); }

/* ---------------------------------------------------------------- orders & slips */

.order { margin-top: 34px; }
.order-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid var(--paper-edge);
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.order-head h2 { font-size: var(--step-1); margin: 0; }

.slip {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-slip);
  padding: 20px 20px 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 0 #c9d6dc, 0 3px 0 -1px var(--paper), 0 4px 0 -1px #c9d6dc; /* a second sheet underneath */
}
.slip h3 { padding-right: 132px; margin-bottom: 6px; }
.slip p { margin-bottom: 14px; }
.slip .actions { margin-top: 0; }

/* The stamp: the one loud thing */
.stamp {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-stamp);
  font-size: 0.95rem;
  line-height: 1;
  padding: 7px 10px 6px;
  border: 2.5px solid currentColor;
  border-radius: 4px;
  transform: rotate(-6deg);
  color: var(--cranberry);
  opacity: 0.88;
  white-space: nowrap;
  mix-blend-mode: multiply;
}
.stamp.filming { color: var(--brass); }
.stamp.delivered { color: var(--pine); transform: rotate(4deg); }
.stamp.delayed { color: var(--slate); }

.stamp.fresh { animation: stamp-down 380ms cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes stamp-down {
  from { transform: rotate(-6deg) scale(1.9); opacity: 0; }
  to   { transform: rotate(-6deg) scale(1);   opacity: 0.88; }
}

.empty {
  border: 1.5px dashed #b9c8cf;
  border-radius: var(--radius-slip);
  padding: 22px;
  margin-top: 26px;
}

.footer-actions {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--paper-edge);
}

/* ---------------------------------------------------------------- review ("the script") */

.script {
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-slip);
  padding: 6px 20px;
  margin: 22px 0;
}
.script dl { margin: 0; }
.script .row { padding: 14px 0; border-bottom: 1px dashed var(--paper-edge); }
.script .row:last-child { border-bottom: 0; }
.script dt { font-size: var(--step--1); color: var(--slate); }
.script dd { margin: 2px 0 0; font-size: var(--step-1); font-family: var(--font-display); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- video */

.player {
  background: #0c1a16;
  border-radius: var(--radius-slip);
  overflow: hidden;
  margin: 18px auto;
  max-width: 380px;          /* videos are portrait 720x1280 */
  aspect-ratio: 9 / 16;
  display: grid;
  place-items: center;
  color: #cfdcd7;
}
.player video { width: 100%; height: 100%; display: block; background: #000; }

/* ---------------------------------------------------------------- share list */

.share-list { list-style: none; padding: 0; margin: 18px 0 0; }
.share-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--paper-edge);
}
.share-list .who { overflow-wrap: anywhere; }
.copy-box { display: flex; gap: 8px; margin: 10px 0 4px; }
.copy-box input { flex: 1; min-width: 0; font: inherit; font-size: var(--step--1); padding: 10px 12px; border: 1.5px solid #b9c8cf; border-radius: var(--radius-control); background: var(--frost); color: var(--spruce); }

.back { display: inline-block; margin-bottom: 18px; }

.loading { color: var(--slate); padding: 40px 0; }

@media (max-width: 420px) {
  h1 { font-size: var(--step-2); }
  .slip h3 { padding-right: 0; padding-top: 34px; }
  .stamp { top: 12px; right: auto; left: 18px; }
  .button { width: 100%; }
  .actions .link-button { width: 100%; text-align: center; }
  .copy-box { flex-direction: column; }
  .copy-box .button { width: 100%; }
  .share-list li { align-items: flex-start; }
  .share-list .actions { flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
  .share-list .actions .link-button { width: auto; }
}

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