/* ===================================================================
   ASG Grading Co — single hand-written stylesheet (PLAN.md §1, §5)
   Mobile-first. Design tokens up top; components below are the full
   library used by every phase (pages, wizard, admin) so no other
   phase needs to edit this file.
   =================================================================== */

/* ---------- tokens ---------- */
:root {
  /* brand — sampled from reference/assets/logo.png (#ff3131 / #064aac);
     button red deepened slightly so white text keeps AA contrast */
  --red: #e02528;
  --red-dark: #b81d20;
  --red-bright: #ff3131;
  --blue: #064aac;
  --blue-dark: #093a80;

  /* neutrals */
  --navy: #101623;          /* dark navbar / footer / hero base */
  --navy-2: #1a2233;
  --ink: #1c2434;
  --muted: #5c6577;
  --line: #e2e6ee;
  --bg: #ffffff;
  --bg-alt: #f4f6fa;

  /* semantic */
  --success: #1c7c3c;
  --success-bg: #e8f6ed;
  --error: #b3261e;
  --error-bg: #fdeceb;
  --warn-bg: #fff7e0;
  --warn-ink: #7a5a00;

  /* type + rhythm */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(16, 22, 35, 0.08), 0 8px 24px rgba(16, 22, 35, 0.07);
  --container: 68rem;
}

/* ---------- reset-ish ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
h1,
h2,
h3,
h4 {
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 800;
  letter-spacing: -0.015em;
}
h1 {
  font-size: clamp(1.9rem, 5.5vw, 3rem);
}
h2 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
}
h3 {
  font-size: 1.2rem;
}
p {
  margin: 0 0 1em;
}
a {
  color: var(--blue);
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.1rem;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.muted {
  color: var(--muted);
}
.text-center {
  text-align: center;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  border-radius: var(--radius);
  padding: 0.7rem 1.4rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn--primary {
  background: var(--red);
  color: #fff;
}
.btn--primary:hover {
  background: var(--red-dark);
}
.btn--secondary {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn--secondary:hover {
  background: var(--blue);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.btn--ghost:hover {
  border-color: #fff;
}
.btn--sm {
  padding: 0.45rem 1rem;
  border-radius: 8px;
}
.btn--block {
  display: block;
  width: 100%;
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn--link {
  background: none;
  border: none;
  padding: 0;
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- navbar (dark) ---------- */
.nav {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-block: 0.6rem;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #fff;
}
.nav__logo {
  width: auto;
  height: 44px;
  background: #fff;
  border-radius: 6px;
  padding: 3px 6px;
}
.nav__brandname {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.nav__links a {
  color: #e8ecf5;
  text-decoration: none;
  font-weight: 600;
  padding: 0.3rem 0.1rem;
}
.nav__links a:hover {
  color: #fff;
}
.nav__links a[aria-current="page"] {
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--red);
}
.nav__links .btn {
  color: #fff;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.38;
}
.hero__content {
  position: relative;
  padding-block: clamp(4rem, 12vw, 7.5rem);
  max-width: 44rem;
}
.hero__kicker {
  display: inline-block;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #ffd7d9;
  background: rgba(232, 35, 43, 0.25);
  border: 1px solid rgba(232, 35, 43, 0.55);
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  margin-bottom: 1rem;
}
.hero h1 {
  color: #fff;
  text-wrap: balance;
}
.hero .btn {
  margin-top: 0.75rem;
}

/* ---------- sections ---------- */
.section {
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}
.section--alt {
  background: var(--bg-alt);
}
.section__head {
  max-width: 46rem;
  margin-bottom: 2rem;
}

/* ---------- cards ---------- */
.cards-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 {
  color: var(--blue);
}

/* ---------- pricing tiers ---------- */
.tier-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.tier-card--featured {
  border-top-color: var(--red);
}
.tier-card__name {
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}
.tier-card__range {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.tier-card__price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}
.tier-card__price small {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}
.tier-card__blurb {
  margin-block: 0.9rem 1.2rem;
  color: var(--muted);
}
.tier-card__turnaround {
  font-weight: 600;
  color: var(--success);
  margin-bottom: 1rem;
}
.tier-card .btn {
  margin-top: auto;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy), var(--blue-dark));
  color: #fff;
  text-align: center;
}
.cta-band h2 {
  color: #fff;
}
.cta-band p {
  max-width: 40rem;
  margin-inline: auto;
  color: #dbe3f3;
}

/* ---------- forms ---------- */
.field {
  margin-bottom: 1.1rem;
}
.field > label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.input {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
}
.input:focus {
  border-color: var(--blue);
  outline: none;
}
.input[aria-invalid="true"] {
  border-color: var(--error);
}
select.input {
  appearance: auto;
}
.field__error {
  color: var(--error);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.3rem;
}
.hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.3rem;
}
.code-input {
  font-size: 1.8rem;
  letter-spacing: 0.45em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- wizard ---------- */
.wizard {
  max-width: 34rem;
}
.steps {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  padding: 0;
  list-style: none;
}
.steps li {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}
.steps li[aria-current="step"],
.steps li.is-done {
  background: var(--red);
}
.wizard__step[hidden] {
  display: none;
}
.wizard__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
}
.tier-choice {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.tier-choice label {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-weight: 600;
}
.tier-choice input {
  position: absolute;
  opacity: 0;
}
.tier-choice label:has(input:checked) {
  border-color: var(--blue);
  background: #eef3fd;
}
.tier-choice label:has(input:focus-visible) {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.tier-choice .price {
  color: var(--blue);
  font-weight: 800;
  white-space: nowrap;
}
.estimate {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.estimate strong {
  font-size: 1.25rem;
}

/* ---------- panels & banners ---------- */
.panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.banner {
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}
.banner--info {
  background: #eef3fd;
  color: var(--blue-dark);
}
.banner--error {
  background: var(--error-bg);
  color: var(--error);
}
.banner--success {
  background: var(--success-bg);
  color: var(--success);
}
.banner--warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

/* ---------- admin table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 46rem;
}
.table th,
.table td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table th {
  background: var(--bg-alt);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.status-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  background: var(--bg-alt);
  color: var(--muted);
}
.status-pill--awaiting_cards {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.status-pill--received {
  background: #eef3fd;
  color: var(--blue-dark);
}
.status-pill--graded,
.status-pill--shipped {
  background: var(--success-bg);
  color: var(--success);
}

/* ---------- about / prose ---------- */
.prose {
  max-width: 44rem;
}
.about-photos {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-top: 2rem;
}
@media (min-width: 640px) {
  .about-photos {
    grid-template-columns: 1fr 1fr;
  }
}
.about-photos img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  width: 100%;
  object-fit: cover;
}

/* ---------- footer (dark) ---------- */
.footer {
  background: var(--navy);
  color: #c6cddc;
  margin-top: 3rem;
}
.footer__inner {
  padding-block: 2.2rem;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 700px) {
  .footer__inner {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .footer__legal {
    text-align: right;
  }
}
.footer a {
  color: #fff;
}
.footer__heading {
  font-weight: 700;
  color: #fff;
}
.footer__legal p {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

/* ---------- misc ---------- */
.error-page {
  padding-block: 5rem;
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
@media print {
  .nav,
  .footer {
    display: none;
  }
}
