/**
 * Hero, licence card.
 *
 * The band, the split grid, the H1 and the breadcrumb are `.page-hero` in
 * pages.css §1–2. `.link-cta` on the verify link and `.card__icon` on the
 * shield are the kit's too. Everything below belongs to the licence card, which
 * the kit does not carry and which is the single most important object on the
 * site: it is what an applicant checks before they trust anything else here.
 *
 * The card is deliberately drawn as a certificate on a desk rather than as a
 * flat panel – an offset dashed layer behind it and a dashed seal arc over the
 * corner – because the design's whole argument is "this is a document you can
 * verify", and a document should look like one.
 */

.hero-licence__eyebrow { margin-block-start: var(--s-4); }

/* The card ------------------------------------------------------------------ */
.hero-licence__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-5);
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--r-card);
  border-block-start: var(--border-accent) solid var(--gold);
  box-shadow: var(--shadow-lift);
}

/* The offset layer behind it. z-index:-1 keeps it inside the hero's stacking
   context, so it sits under the card and over the blue ground. */
.hero-licence__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: rotate(2.4deg) translateY(var(--s-1));
  border-radius: var(--r-card);
  background: var(--gold-wash);
  border: var(--border-rule) dashed var(--gold-arc);
}

/* The seal, echoing the logo's route arcs. Decorative, and clipped by the
   hero's own overflow on a narrow viewport, which is the intended behaviour. */
.hero-licence__card::after {
  content: "";
  position: absolute;
  top: -2.5rem;
  inset-inline-end: -2.25rem;
  inline-size: 8.25rem;
  block-size: 8.25rem;
  border-radius: 50%;
  border: var(--border-rule) dashed var(--gold);
  opacity: 0.65;
  pointer-events: none;
}

/* Issuing body -------------------------------------------------------------- */
.hero-licence__head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

/* The kit's `.card__icon` is exactly this box – 46px, --r-m, blue tint – so it
   is composed rather than declared again. The only difference is that it sits
   in a centred row here instead of above a heading, so the kit's trailing
   margin has to go. */
.hero-licence__head .card__icon { margin-block-end: 0; }

.hero-licence__head b {
  display: block;
  font-family: var(--display);
  font-size: var(--text-base);
  line-height: var(--leading-snug);
  color: var(--navy);
}

.hero-licence__head span {
  display: block;
  margin-block-start: 0.2em;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-faint);
}

/* The number ----------------------------------------------------------------
   Monospace, because this is a reference code that gets read out and typed
   into a government search box. `overflow-wrap` because it is one long
   unbroken token and a narrow phone must not push the card sideways. */
.hero-licence__no {
  padding: var(--s-2) var(--s-3);
  background: var(--blue-tint-05);
  border: var(--border-hairline) dashed var(--blue-tint-20);
  border-radius: var(--r-s);
}

.hero-licence__no span {
  display: block;
  margin-block-end: 0.15em;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero-licence__no b {
  font-family: var(--mono);
  font-size: var(--text-lg);
  letter-spacing: 0.04em;
  color: var(--navy);
  overflow-wrap: anywhere;
}

/* Validity ------------------------------------------------------------------
   `grid-auto-flow: column` gives two equal cells when the stored validity
   splits into a from and an until, and one full-width cell when it does not,
   with no second class to keep in step with the PHP. */
.hero-licence__dates {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: var(--s-3);
}

.hero-licence__dates > div + div {
  border-inline-start: var(--border-hairline) dashed var(--line);
  padding-inline-start: var(--s-3);
}

.hero-licence__dates dt {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero-licence__dates dd {
  margin-block-start: 0.25em;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--text-s);
  color: var(--navy);
}

/* Scope and verification ----------------------------------------------------
   TWO CLASSES, DELIBERATELY. This is the only <p> inside the card, and the card
   sits inside `.page-hero`, whose kit rule `.page-hero p` (one class + one
   element) paints hero copy white for the blue ground behind it. A single-class
   `.hero-licence__scope` loses that fight, and the scope line renders white on
   the card's white paper – invisible. `.hero-licence .hero-licence__scope` is
   two classes and wins, which puts --ink-soft back on --paper at 8.91:1. */
.hero-licence .hero-licence__scope {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
  font-size: var(--text-s);
  color: var(--ink-soft);
}

.hero-licence__scope svg {
  flex: none;
  inline-size: 1.2em;
  block-size: 1.2em;
  margin-block-start: 0.15em;
  color: var(--gold-deep);
}

.hero-licence__verify { font-size: var(--text-s); }

/* Below this the two date cells stack, and a vertical divider between stacked
   rows would read as a table rule. */
@media (max-width: 560px) {
  .hero-licence__dates { grid-auto-flow: row; }

  .hero-licence__dates > div + div {
    border-inline-start: none;
    padding-inline-start: 0;
    border-block-start: var(--border-hairline) dashed var(--line);
    padding-block-start: var(--s-3);
  }
}
