/* ============================================================
   AVONDALE CREST — Article System
   Shared static template for the article index and long-form pages.
   ============================================================ */

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.nav-links a[aria-current="page"] {
  color: var(--white);
}

.article-page,
.articles-index-page {
  background: var(--paper);
}

.article-page main,
.articles-index-page main {
  overflow: hidden;
}

/* ── SHARED ARTICLE TYPE ── */
.article-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--blue);
}

.article-eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  flex: 0 0 auto;
}

/* ── INDEX HERO ── */
.articles-hero {
  position: relative;
  background: var(--navy);
  padding: 5rem var(--pad) 5.5rem;
}

.articles-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(74, 173, 223, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 173, 223, 0.2) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to right, transparent 8%, black 58%, transparent 100%);
}

.articles-hero-inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
}

.articles-hero h1 {
  max-width: 790px;
  margin: 1.4rem 0 1.4rem;
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.articles-hero h1 em {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.05em;
  font-weight: 400;
  color: var(--blue);
  letter-spacing: -0.025em;
}

.articles-hero-inner > p:last-child {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.72;
}

/* ── INDEX LIST ── */
.articles-list {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) var(--pad);
}

.articles-list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.25rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.articles-list-head .section-eyebrow {
  margin: 0;
}

.articles-list-head h2 {
  color: var(--navy);
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}

.article-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--line);
  gap: 1px;
}

.article-card {
  min-width: 0;
  background: var(--warm);
}

.article-card-image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--navy);
}

.article-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 53, 97, 0.08);
  pointer-events: none;
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.article-card-image:hover {
  opacity: 1;
}

.article-card-image:hover img {
  transform: scale(1.018);
}

.article-card-copy {
  padding: clamp(1.6rem, 4vw, 2.5rem);
}

.article-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.article-card-meta span:first-child {
  color: var(--splash);
}

.article-card h3 {
  margin-bottom: 1rem;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.033em;
  line-height: 1.18;
}

.article-card h3 a {
  color: var(--navy);
}

.article-card h3 a:hover,
.article-card h3 a:focus-visible {
  color: var(--splash);
  opacity: 1;
}

.article-card-copy > p:not(.article-card-meta) {
  margin-bottom: 1.5rem;
  color: var(--graph);
  font-size: 0.96rem;
  line-height: 1.72;
}

.article-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(1, 115, 185, 0.35);
  color: var(--splash);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-card-link:hover {
  gap: 0.85rem;
  opacity: 1;
}

.articles-principle {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: end;
  padding: clamp(4rem, 8vw, 6.5rem) max(var(--pad), calc((100vw - var(--max-w)) / 2 + var(--pad)));
  background: var(--navy);
}

.articles-principle h2 {
  margin-top: 1rem;
  max-width: 520px;
  color: var(--white);
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.articles-principle > p {
  max-width: 600px;
  color: rgba(255, 255, 255, 0.64);
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.7vw, 2rem);
  font-style: italic;
  line-height: 1.4;
}

/* ── ARTICLE HEADER ── */
.article-header {
  position: relative;
  padding: 4rem var(--pad) 7rem;
  background: var(--navy);
}

.article-header::after {
  content: "";
  position: absolute;
  right: max(var(--pad), calc((100vw - var(--max-w)) / 2));
  bottom: 0;
  width: min(34vw, 420px);
  height: 1px;
  background: linear-gradient(90deg, var(--blue), transparent);
}

.article-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.article-back:hover {
  color: var(--blue);
  opacity: 1;
}

.article-header h1 {
  max-width: 920px;
  margin: 1rem 0 1rem;
  color: var(--white);
  font-size: 3.25rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.08;
  text-wrap: balance;
}

.article-summary {
  max-width: 740px;
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  font-style: italic;
  line-height: 1.48;
}

.article-byline {
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.48);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* ── FEATURE IMAGE ── */
.article-feature {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: clamp(-5.5rem, -7vw, -3.5rem) auto 0;
  padding: 0 var(--pad);
}

.article-feature img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(0, 53, 97, 0.12);
  box-shadow: 0 26px 70px rgba(10, 30, 53, 0.14);
}

/* Native embeds stay discoverable without a click-to-load script. */
.article-watch {
  scroll-margin-top: 100px;
}

.article-video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  background: var(--navy);
  box-shadow: 0 26px 70px rgba(10, 30, 53, 0.14);
}

.article-video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 200px;
  border: 0;
}

.article-video-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0;
}

.article-video-caption > div {
  flex: 1 1 24rem;
  min-width: 0;
}

.article-video-caption strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--splash);
}

.article-video-caption a {
  color: var(--splash);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  padding: 0.65rem 0;
}

/* ── LONG-FORM BODY ── */
.article-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 710px);
  justify-content: center;
  gap: clamp(3rem, 7vw, 6rem);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 8rem) var(--pad) clamp(5rem, 10vw, 9rem);
}

.article-rail {
  align-self: start;
  position: sticky;
  top: 92px;
  padding-top: 0.35rem;
}

.article-rail > p {
  margin-bottom: 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.article-rail ol {
  list-style: none;
}

.article-rail li + li {
  margin-top: 0.45rem;
}

.article-rail a {
  display: block;
  padding: 0.25rem 0 0.25rem 0.8rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.article-rail a:hover,
.article-rail a:focus-visible {
  border-left-color: var(--blue);
  color: var(--splash);
  opacity: 1;
}

.article-copy {
  min-width: 0;
  color: #2a4055;
}

.article-copy > p {
  margin-bottom: 1.5rem;
  font-size: clamp(1rem, 1.4vw, 1.075rem);
  line-height: 1.82;
}

.article-copy > p:first-child {
  color: var(--ink);
  font-size: clamp(1.14rem, 2vw, 1.28rem);
  line-height: 1.72;
}

.article-copy h2 {
  scroll-margin-top: 100px;
  margin: 4.2rem 0 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--navy);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.article-copy h2::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: 1rem;
  background: var(--blue);
}

.article-copy strong {
  color: var(--navy);
  font-weight: 600;
}

.article-copy a {
  color: var(--splash);
  text-decoration: underline;
  text-decoration-color: rgba(1, 115, 185, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.article-copy a:hover {
  color: var(--navy);
  text-decoration-color: currentColor;
  opacity: 1;
}

.article-list {
  margin: 0.25rem 0 2rem;
  padding: 1.3rem 1.5rem 1.3rem 2.9rem;
  border: 1px solid var(--line);
  background: var(--warm);
}

.article-list li {
  padding-left: 0.3rem;
  color: var(--graph);
  font-size: 1rem;
  line-height: 1.65;
}

.article-list li + li {
  margin-top: 0.55rem;
}

.article-list li::marker {
  color: var(--splash);
}

.article-note {
  margin: 2rem 0 !important;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--blue);
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: 0.84rem !important;
  line-height: 1.65 !important;
}

.article-next {
  max-width: var(--max-w);
  margin: 0 auto clamp(4rem, 9vw, 8rem);
  padding: clamp(2rem, 5vw, 3.4rem);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  border-left: 4px solid var(--blue);
  background: var(--navy);
}

.article-next-label {
  margin-bottom: 0.7rem;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.article-next h2 {
  color: var(--white);
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.05;
}

.article-next-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.8rem;
  flex: 0 0 auto;
}

.article-next-links a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-next-links a:hover {
  color: var(--blue);
  opacity: 1;
}

.article-page .footer-legal a,
.articles-index-page .footer-legal a {
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 880px) {
  .article-layout {
    grid-template-columns: minmax(0, 710px);
  }

  .article-rail {
    display: none;
  }

  .article-next {
    margin-right: var(--pad);
    margin-left: var(--pad);
  }
}

@media (max-width: 720px) {
  .articles-hero {
    padding-top: 4.4rem;
  }

  .articles-list-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.9rem;
  }

  .article-cards,
  .articles-principle {
    grid-template-columns: 1fr;
  }

  .article-header {
    padding-top: 2rem;
    padding-bottom: 5rem;
  }

  .article-back {
    margin-bottom: 1.25rem;
  }

  .article-header h1 {
    font-size: 2.25rem;
  }

  .article-feature {
    padding-right: 0;
    padding-left: 0;
  }

  .article-feature img {
    border-right: 0;
    border-left: 0;
    box-shadow: 0 18px 42px rgba(10, 30, 53, 0.12);
  }

  .article-video-caption {
    margin: 0 var(--pad);
  }

  .article-layout {
    padding-top: 3.7rem;
  }

  .article-copy h2 {
    margin-top: 3.4rem;
  }

  .article-next {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-next-links {
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .articles-hero h1 {
    font-size: 2rem;
  }

  .article-card-copy {
    padding: 1.45rem;
  }

  .article-card-meta {
    flex-direction: column;
  }

  .articles-principle {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .article-header {
    padding-bottom: 5rem;
  }

  .article-summary {
    font-size: 1.18rem;
  }

  .article-layout {
    padding-right: 1.15rem;
    padding-left: 1.15rem;
  }

  .article-copy > p {
    font-size: 1rem;
    line-height: 1.78;
  }

  .article-next {
    margin-right: 1.15rem;
    margin-left: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-card-image img,
  .article-card-link {
    transition: none;
  }
}
