/* ==========================================================================
   Bright Digest / Practical Copywriting Academy — shared component styles
   Tailwind (CDN) handles utility spacing/color/type. This file only defines
   named components whose shapes, states or fluid sizing Tailwind utilities
   alone can't express cleanly.
   ========================================================================== */

:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  min-width: 320px;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---- theme variables --------------------------------------------------- */

body.theme-pub {
  --ink: #1a2233;
  --ink-soft: #3a4152;
  --paper: #ffffff;
  --paper-alt: #f5f1e9;
  --accent: #a3122a;
  --accent-dark: #7c0e20;
  --navy: #101a33;
  --line: #e4dfd3;
  --focus: #2f6fed;
}

body.theme-offer {
  --ink: #12141a;
  --ink-soft: #454955;
  --paper: #ffffff;
  --paper-alt: #f6f6f3;
  --accent: #e2481c;
  --accent-dark: #b8360f;
  --navy: #0d0e12;
  --line: #e6e5e0;
  --focus: #2f6fed;
}

/* ---- global focus + skip link ------------------------------------------ */

a,
button,
input,
textarea,
summary {
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus, #2f6fed);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: #111;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 8px;
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

/* ==========================================================================
   PUBLICATION FAMILY (advertorial + about)
   ========================================================================== */

.pub-masthead {
  background: var(--navy);
  color: #f4f1ea;
}

.pub-ribbon {
  background: var(--accent);
  color: #fff;
}

.pub-ribbon__tag {
  background: #ffffff;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.pub-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.75rem;
  border-radius: 3px;
}

.pub-kicker {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1.pub-h1,
.pub-h1 {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.pub-h2 {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  color: var(--ink);
  line-height: 1.15;
}

.pub-deck {
  font-style: italic;
  color: var(--ink-soft);
  border-left: 3px solid var(--accent);
  padding-left: 0.9rem;
}

.pub-byline {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.pub-byline__avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
}

.pub-share-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pub-share-btn:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.pub-figure {
  border: 1px solid var(--line);
  background: var(--paper-alt);
}

.pub-figure figcaption {
  color: var(--ink-soft);
}

.article-body {
  color: #262b35;
}

.article-body > p {
  margin-bottom: 1.15em;
  line-height: 1.75;
}

.article-body p:first-of-type::first-letter {
  font-family: ui-serif, Georgia, serif;
  font-size: 3.1em;
  line-height: 0.85;
  float: left;
  padding: 0.05em 0.12em 0 0;
  color: var(--accent);
  font-weight: 700;
}

.listicle-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.listicle-item__num {
  font-family: ui-serif, Georgia, serif;
  color: var(--accent);
  line-height: 1;
  font-weight: 800;
}

.listicle-item--offer {
  border: 2px solid var(--accent);
  background: linear-gradient(180deg, #fff 0%, var(--paper-alt) 100%);
}

.listicle-item--offer::before {
  content: "Featured";
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 0 0 0 10px;
}

.worked-example {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-alt);
}

.worked-example__figure {
  font-family: ui-serif, Georgia, serif;
  color: var(--accent-dark);
  font-weight: 800;
}

.figure-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .figure-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

.figure-strip__item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  text-align: center;
}

.figure-strip__amount {
  font-family: ui-serif, Georgia, serif;
  font-weight: 800;
  color: var(--ink);
}

.summary-box {
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  background: var(--paper-alt);
  border-radius: 8px;
}

.expert-box {
  border-left: 4px solid var(--accent);
  background: var(--paper-alt);
}

/* ==========================================================================
   OFFER FAMILY (academy + legal pages under offer design family)
   ========================================================================== */

.offer-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}

.offer-nav a.nav-link {
  color: var(--ink-soft);
  font-weight: 600;
  transition: color 0.15s ease;
}

.offer-nav a.nav-link:hover {
  color: var(--ink);
}

.offer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: #fff;
}

h1.offer-h1,
.offer-h1 {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  line-height: 1.03;
  letter-spacing: -0.02em;
}

.offer-h2 {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.offer-lede {
  color: var(--ink-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.85rem 1.6rem;
  min-height: 44px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-align: center;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.35);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}

.btn-secondary:hover {
  border-color: var(--ink);
}

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
}

.media-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-alt);
}

.media-frame video,
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--wide {
  aspect-ratio: 16 / 9;
}

.leverage-band {
  background: var(--navy);
  color: #f2f1ee;
}

.leverage-band .offer-h2,
.leverage-band .leverage-kicker {
  color: #fff;
}

.leverage-kicker {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rate-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.rate-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.rate-table th,
.rate-table td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.rate-table thead th {
  background: var(--paper-alt);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.rate-table tbody tr:last-child td {
  border-bottom: none;
}

.rate-table tbody tr:nth-child(even) {
  background: #fbfbf9;
}

.pricing-card {
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.pricing-card--highlight {
  border-color: var(--accent);
  box-shadow: 0 20px 45px -20px rgba(226, 72, 28, 0.45);
  position: relative;
}

.pricing-card--highlight .pricing-card__badge {
  position: absolute;
  top: -0.9rem;
  left: 1.5rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

.pricing-card__price {
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.check-list li {
  position: relative;
  padding-left: 1.6rem;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.05em;
  color: var(--accent);
  font-weight: 800;
}

.addon-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.perk-stack li {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  position: relative;
  padding-left: 3rem;
}

.perk-stack li::before {
  content: "★";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
}

.limits-block {
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--paper-alt);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item:first-child {
  border-top: 1px solid var(--line);
}

.faq-item__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  padding: 1.15rem 0.25rem;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
}

.faq-item__icon {
  flex: none;
  transition: transform 0.2s ease;
}

.faq-item__icon.is-open {
  transform: rotate(180deg);
}

.audience-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.lead-form {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}

.form-field label {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field textarea {
  min-height: 110px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(226, 72, 28, 0.15);
  outline: none;
}

.form-field .field-error {
  color: #b3122e;
  font-size: 0.85rem;
  margin-top: 0.35rem;
  display: none;
}

.form-field.has-error input,
.form-field.has-error textarea {
  border-color: #b3122e;
}

.form-field.has-error .field-error {
  display: block;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.consent-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  flex: none;
  margin-top: 0.15rem;
  accent-color: var(--accent);
}

.form-success {
  border: 1.5px solid #1c7a3e;
  background: #eaf7ee;
  color: #145a2c;
  border-radius: 12px;
}

.mobile-nav-panel {
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   SHARED: page-close disclaimer + footer
   ========================================================================== */

.site-disclaimer {
  background: #fbf6ec;
  border-top: 1px solid #ecdfc4;
  border-bottom: 1px solid #ecdfc4;
  color: #4a4232;
}

.site-disclaimer a {
  color: #7c0e20;
  font-weight: 700;
  text-decoration: underline;
}

.site-footer {
  background: #12141a;
  color: #cfd0d6;
}

.site-footer a {
  color: #f2f1ee;
}

.site-footer__company {
  color: #e7e7ea;
  line-height: 1.7;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
}

.site-footer__links a {
  font-weight: 600;
}

.site-footer__links a:hover,
.site-disclaimer a:hover {
  text-decoration: none;
}

/* ==========================================================================
   Sticky mobile CTA bar (offer family)
   ========================================================================== */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.25);
}

body.has-sticky-cta {
  padding-bottom: 84px;
}

@media (min-width: 768px) {
  .sticky-cta {
    display: none;
  }
  body.has-sticky-cta {
    padding-bottom: 0;
  }
}

/* ==========================================================================
   Legal / policy pages typography
   ========================================================================== */

.legal-body h2 {
  color: var(--ink);
}

.legal-body p,
.legal-body li {
  color: var(--ink-soft);
  line-height: 1.75;
}

.legal-body ul {
  list-style: disc;
  padding-left: 1.4rem;
}

/* ---- utility: hide until Alpine ready ----------------------------------- */

[x-cloak] {
  display: none !important;
}
