/* ═══════════════════════════════════════════════════════════════
   The Advisers AI Brief — archive + issue styles
   Loaded after styles.css; uses its brand tokens throughout.

   Covers are drawn in CSS, not uploaded as images, on purpose. A
   fortnightly publication that needs a bespoke graphic per issue
   quietly acquires a design job it will eventually skip, and the
   first missed issue is the one that kills a newsletter. The cover
   is generated from the issue number and title, so publishing an
   issue never waits on artwork. If a real image is wanted later,
   drop an <img> into .brief-cover and it takes over.
   ═══════════════════════════════════════════════════════════════ */

/* ── Archive grid ─────────────────────────────────────────────── */
.brief-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.4rem;
}

.brief-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.brief-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(26, 86, 219, 0.3);
}

/* The generated cover. aspect-ratio keeps every card the same shape
   whether or not an issue ever gets a real image. */
.brief-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-soft) 55%, #1B3557 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 1.6rem;
  overflow: hidden;
}
/* Faint diamond echo of the logo mark, bled off the bottom-right corner. */
.brief-cover::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  background: linear-gradient(135deg, rgba(91, 140, 245, 0.22), rgba(26, 86, 219, 0.04));
  transform: rotate(45deg);
  border-radius: 28px;
  pointer-events: none;
}
.brief-cover > * { position: relative; z-index: 1; }

.brief-cover-masthead {
  font-family: 'Raleway', sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-soft);
}
.brief-cover-no {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 3.4rem;
  line-height: 0.9;
  color: var(--white);
}
.brief-cover-no span {
  display: block;
  font-family: 'Raleway', sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.5rem;
}
/* An issue that does get real artwork: the img simply covers the panel. */
.brief-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

.brief-card-body {
  padding: 1.5rem 1.6rem 1.7rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.brief-card-meta {
  font-family: 'Raleway', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.7rem;
}
.brief-card-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.3;
  margin-bottom: 0.7rem;
}
.brief-card-body h2 a { color: var(--text); text-decoration: none; }
.brief-card:hover .brief-card-body h2 a { color: var(--blue); }
.brief-card-body p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-mid);
  margin-bottom: 1.2rem;
}
.brief-card-read {
  margin-top: auto;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.brief-card-read:hover { text-decoration: underline; }

/* Empty state, used until the first issue is live. */
.brief-empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2.6rem 2rem;
  text-align: center;
  color: var(--text-mid);
  line-height: 1.75;
}

/* ── Issue page ───────────────────────────────────────────────── */
.brief-wrap { max-width: 760px; margin: 0 auto; }

.section-label {
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.3rem;
}

.brief-lead { font-size: 1.08rem; line-height: 1.85; color: var(--text); }
.brief-lead p { margin-bottom: 1.25rem; }
.brief-lead p:last-child { margin-bottom: 0; }

.brief-rule { border: 0; border-top: 1px solid var(--border); margin: 3rem 0; }

.brief-item { padding: 2.2rem 0; border-bottom: 1px solid var(--border); }
.brief-item:first-of-type { border-top: 1px solid var(--border); }
.brief-item h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.35;
  margin-bottom: 0.45rem;
}
.brief-source {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}
.brief-item p { font-size: 1.01rem; line-height: 1.8; color: var(--text-mid); margin-bottom: 1rem; }
.brief-item p:last-child { margin-bottom: 0; }

.brief-signoff { font-size: 0.95rem; line-height: 1.75; color: var(--text-light); margin-top: 2.4rem; }

/* House ad. The only sell in the publication, and it stays down here.
   Deliberately reuses the site's existing .card-grid / .card / .card-icon
   pattern from styles.css rather than inventing a second card style, so the
   hover behaviour matches the home page for free. Everything below is only the
   difference needed to make a whole card clickable. */
.brief-offers { margin-top: 3rem; }
.brief-offers .card-grid { margin-top: 1.6rem; }

a.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
a.card h3 { color: var(--text); }
a.card:hover h3 { color: var(--blue); }

/* The icon tile fills with blue on hover, so the whole card reacts as one
   object rather than just the border changing. */
a.card .card-icon { transition: background-color 0.25s ease; }
a.card .card-icon svg { transition: stroke 0.25s ease; }
a.card:hover .card-icon { background: var(--blue); }
a.card:hover .card-icon svg { stroke: var(--white); }

.card-cta {
  margin-top: auto;
  padding-top: 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
}

/* ── Sign-up form (sits inside the dark .cta-band) ────────────── */
/* styles.css already covers input[type=email] here; the optional
   first-name field just needs the same treatment. */
.register-form input[type="text"] {
  flex: 1 1 180px;
  min-width: 150px;
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
}
.register-form input[type="text"]::placeholder { color: rgba(255, 255, 255, 0.5); }
.register-form input[type="text"]:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(255, 255, 255, 0.1);
}
.register-fineprint {
  display: block;
  max-width: 540px;
  margin: 1rem auto 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 600px) {
  .brief-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .brief-cover-no { font-size: 2.8rem; }
  .brief-card-body h2 { font-size: 1.2rem; }
  .brief-item h3 { font-size: 1.15rem; }
  .brief-housead { padding: 1.8rem 1.4rem; }
}
