/* Journal Actuel corporate editorial system — v1.1 */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/roboto-latin.woff2") format("woff2");
}

:root {
  --ink: #0a1929;
  --red: #c92a3a;
  --blue: #2757c7;
  --warm: #f4f2ed;
  --white: #fff;
  --text: #17212b;
  --muted: #5e6b78;
  --border: #dce1e6;
  --green: #14734d;
  --violet: #6941c6;
  --amber: #a65e00;
  --teal: #0a726a;
  --paper: #f7f8fa;
  --shadow: 0 20px 52px rgba(10, 25, 41, 0.09);
  --shadow-soft: 0 10px 28px rgba(10, 25, 41, 0.07);
  --radius: 10px;
  --container: 1300px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-padding-top: 112px;
}

body {
  overflow-x: clip;
  color: var(--text);
  background: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

::selection {
  color: var(--white);
  background: var(--red);
}

a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

a {
  transition: color 180ms ease;
}

.container {
  width: min(calc(100% - 56px), var(--container));
}

.container-narrow,
.page-content {
  width: min(calc(100% - 40px), 760px);
}

.eyebrow,
.category-label,
.premium-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.14em;
}

.premium-label {
  gap: 7px;
  padding: 6px 10px;
  border-radius: 4px;
}

.premium-label::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.button,
.wp-element-button {
  min-height: 46px;
  padding: 11px 19px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.button:hover,
.wp-element-button:hover {
  box-shadow: 0 9px 22px rgba(10, 25, 41, 0.14);
  transform: translateY(-2px);
}

.button:active,
.wp-element-button:active {
  box-shadow: none;
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid #e5a50a;
  outline-offset: 3px;
}

/* Brand and navigation */
.site-header {
  position: sticky;
  top: 0;
  border-bottom-color: rgba(10, 25, 41, 0.12);
  background: rgba(255, 255, 255, 0.98);
}

.site-header.is-sticky {
  position: sticky;
  box-shadow: 0 12px 34px rgba(10, 25, 41, 0.1);
}

.utility-bar {
  background: var(--ink);
  color: #dce5ee;
  font-size: 12px;
  letter-spacing: 0.015em;
}

.utility-bar__inner {
  min-height: 32px;
}

.header-main {
  min-height: 82px;
  gap: 24px;
}

.brand {
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.ja-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: auto;
  min-width: 216px;
  height: 44px;
}

.ja-logo__mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 5px;
  background: var(--red);
  color: #fff;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.ja-logo__wordmark {
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.ja-logo__wordmark strong {
  font-weight: 700;
}

.ja-logo--light .ja-logo__wordmark {
  color: #fff;
}

.desktop-nav {
  min-width: 0;
}

.desktop-nav .menu {
  gap: clamp(12px, 1.25vw, 20px);
}

.desktop-nav a,
.account-link {
  position: relative;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 2px;
  background: var(--red);
  content: "";
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 180ms ease, transform 180ms ease;
}

.desktop-nav a:hover::after,
.desktop-nav .current-menu-item > a::after,
.desktop-nav .current-menu-ancestor > a::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-actions {
  gap: 10px;
}

.icon-button {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.icon-button svg {
  stroke: currentColor;
  stroke-width: 1.8;
}

.icon-button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.header-cta {
  white-space: nowrap;
}

.menu-toggle {
  border-radius: 6px;
}

.mobile-panel {
  top: 115px;
  background: rgba(10, 25, 41, 0.62);
  backdrop-filter: blur(4px);
}

.mobile-panel__inner {
  border-left: 1px solid var(--border);
  box-shadow: -18px 0 48px rgba(10, 25, 41, 0.16);
  transition-duration: 280ms;
  transition-timing-function: var(--ease);
}

.mobile-menu a {
  min-height: 48px;
  padding: 13px 0;
}

/* Editorial hero and cards */
.editorial-hero {
  padding: 64px 0 68px;
  background:
    linear-gradient(90deg, rgba(201, 42, 58, 0.04) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(180deg, #f5f3ee 0%, #fafafa 62%, #fff 100%);
}

.home-intro {
  max-width: 850px;
  margin-bottom: 36px;
}

.home-intro .eyebrow {
  margin-bottom: 12px;
}

.home-intro h1,
.page-hero h1,
.archive-header h1,
.article-header h1,
.error-page h1 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 66px);
  font-weight: 650;
  line-height: 0.99;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.42fr) minmax(240px, 0.79fr) minmax(240px, 0.79fr);
  gap: 26px;
}

.hero-grid .article-card--lead .article-card__image {
  aspect-ratio: 16 / 9;
}

.hero-grid .article-card--lead .article-card__title {
  max-width: 19ch;
  font-size: clamp(31px, 3vw, 45px);
  line-height: 1.02;
}

.article-card {
  position: relative;
}

.article-card__image {
  border-radius: var(--radius);
  background: #e9edf1;
  box-shadow: inset 0 0 0 1px rgba(10, 25, 41, 0.05);
}

.article-card__image img {
  filter: saturate(0.86) contrast(1.025);
  transform: scale(1.001);
  transition: filter 320ms ease, transform 520ms var(--ease);
}

.article-card:hover .article-card__image img,
.article-card:focus-within .article-card__image img {
  filter: saturate(1) contrast(1.035);
  transform: scale(1.045);
}

.article-card__body {
  padding-top: 15px;
}

.article-card__title {
  margin: 8px 0 9px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(23px, 2vw, 27px);
  font-weight: 650;
  line-height: 1.09;
  letter-spacing: -0.018em;
  text-wrap: pretty;
}

.article-card__title a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.article-card__title a:hover {
  color: var(--red);
}

.article-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 13px;
  color: #46525f;
  font-size: 15px;
  line-height: 1.57;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.article-card__meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.article-card--compact {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
}

.article-card--compact .article-card__image {
  border-radius: 8px;
}

.article-card--compact .article-card__title {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.08;
}

.article-card--compact .article-card__title a {
  -webkit-line-clamp: 4;
}

.topics {
  border-block-color: var(--border);
}

.topics__inner {
  min-height: 66px;
  scrollbar-width: none;
}

.topics__inner::-webkit-scrollbar {
  display: none;
}

.topics a {
  border-radius: 6px;
  background: #fff;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.topics a:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.home-section {
  padding: 84px 0;
}

.section-heading {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.section-heading h2 {
  color: var(--ink);
  font-size: clamp(32px, 3.8vw, 48px);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.027em;
  text-wrap: balance;
}

.article-grid {
  gap: 34px 28px;
}

.category-layout {
  gap: 28px;
}

.category-layout .article-card--featured .article-card__title {
  font-size: clamp(30px, 3vw, 39px);
  line-height: 1.04;
}

.section--dark {
  background: #091a2c;
}

.section--dark .section-heading {
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

.section--dark .section-heading h2,
.section--dark .article-card__title {
  color: #fff;
}

.section--tint {
  background: #f3f4f8;
}

.club-promo {
  background: linear-gradient(135deg, #a81f2f 0%, #c92a3a 58%, #8f1827 100%);
}

.club-promo__grid {
  gap: 72px;
}

.club-promo h2 {
  font-weight: 650;
  letter-spacing: -0.025em;
}

.club-preview .article-card {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(72, 7, 18, 0.18);
}

.resource-preview,
.newsletter-section {
  background: #f5f5f3;
}

.resource-card {
  border-radius: 8px;
  box-shadow: none;
  transition: border-color 180ms ease, box-shadow 220ms ease, transform 220ms var(--ease);
}

.resource-card:hover,
.resource-card:focus-within {
  border-color: #aeb8c2;
  box-shadow: var(--shadow-soft);
  transform: translateY(-4px);
}

.resource-card h3,
.trust-grid strong,
.site-footer h2 {
  font-weight: 650;
}

.newsletter-box {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: #0a1b2e;
  box-shadow: 0 22px 54px rgba(10, 25, 41, 0.16);
}

.newsletter-box h2 {
  font-weight: 650;
  letter-spacing: -0.025em;
}

.ja-newsletter-form input,
.ja-newsletter-form button,
.mobile-search input,
.mobile-search button,
.search-form-large input,
.search-form-large button,
.ja-form input,
.ja-form textarea,
.ja-form button {
  border-radius: 6px;
}

.trust-grid a {
  border-radius: 8px;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 220ms ease, transform 220ms var(--ease);
}

.trust-grid a:hover,
.trust-grid a:focus-visible {
  border-color: #aeb8c2;
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  transform: translateY(-3px);
}

/* Long-form and archive UX */
.archive-shell {
  padding-top: 58px;
}

.archive-header {
  max-width: 820px;
}

.archive-header h1,
.page-hero h1 {
  font-size: clamp(41px, 4.5vw, 60px);
}

.archive-description,
.archive-header > p,
.page-dek {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
}

.breadcrumbs {
  font-size: 12px;
}

.article-header {
  max-width: 940px;
  padding-top: 54px;
}

.article-header h1 {
  max-width: 18ch;
  margin-inline: auto;
  font-size: clamp(43px, 5.4vw, 66px);
}

.article-dek {
  max-width: 760px;
  color: #4b5865;
  font-family: var(--sans);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.52;
  text-wrap: pretty;
}

.article-byline {
  font-size: 13px;
}

.article-tools a,
.article-tools button,
.share-rail button {
  min-height: 40px;
  border-radius: 6px;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.article-tools a:hover,
.article-tools button:hover,
.share-rail button:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.article-feature {
  margin-top: 38px;
}

.article-feature img {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.02);
}

.article-feature figcaption {
  color: var(--muted);
  font-size: 12px;
}

.article-layout {
  grid-template-columns: 180px minmax(0, 720px) 56px;
  gap: 42px;
  padding-top: 52px;
}

.article-toc {
  top: 130px;
  font-size: 13px;
}

.article-toc > strong {
  color: var(--ink);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.11em;
}

.article-toc a {
  padding-left: 10px;
  border-left: 2px solid transparent;
  line-height: 1.4;
}

.article-toc a:hover,
.article-toc a.is-active {
  border-left-color: var(--red);
  color: var(--ink);
}

.article-content {
  max-width: 68ch;
}

.entry-content h2 {
  margin-top: 1.9em;
  color: var(--ink);
  font-size: clamp(29px, 3.3vw, 40px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.entry-content h3 {
  color: var(--ink);
  font-size: 26px;
  font-weight: 650;
}

.entry-content p,
.entry-content li {
  font-size: 18px;
  line-height: 1.76;
}

.entry-content p {
  margin-bottom: 1.18em;
}

.entry-content blockquote {
  margin: 2.1em 0;
  padding: 12px 0 12px 24px;
  border-left-width: 4px;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 550;
  line-height: 1.25;
}

.entry-content a {
  text-decoration-color: rgba(201, 42, 58, 0.45);
}

.entry-content a:hover {
  text-decoration-color: var(--red);
}

.ja-sources,
.article-toc,
.locked-box,
.author-box,
.correction-note {
  border-radius: 8px;
}

.page-numbers {
  border-radius: 6px;
}

.resource-hero h1 {
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.resource-cover {
  border-radius: 10px;
}

.site-footer {
  background: #081725;
}

.site-footer .ja-logo {
  min-width: 204px;
}

/* Progressive motion */
.motion-ready {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}

.motion-ready[data-motion-delay="1"] {
  transition-delay: 80ms;
}

.motion-ready[data-motion-delay="2"] {
  transition-delay: 150ms;
}

.motion-ready[data-motion-delay="3"] {
  transition-delay: 220ms;
}

.motion-ready.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1270px) {
  .account-link {
    display: none;
  }

  .ja-logo {
    min-width: 205px;
  }

  .desktop-nav .menu {
    gap: 12px;
  }
}

@media (max-width: 1160px) {
  .desktop-nav,
  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .header-actions {
    margin-left: auto;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
  }

  .hero-grid .article-card--lead {
    grid-row: span 4;
  }

  .category-layout {
    grid-template-columns: 1fr 1fr;
  }

  .category-layout .article-card--featured {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .container {
    width: min(calc(100% - 40px), var(--container));
  }

  .home-section {
    padding: 68px 0;
  }

  .article-layout {
    grid-template-columns: 150px minmax(0, 690px);
    gap: 30px;
  }

  .club-promo__grid {
    gap: 44px;
  }
}

@media (max-width: 780px) {
  html {
    scroll-padding-top: 86px;
  }

  .container {
    width: min(calc(100% - 36px), var(--container));
  }

  .header-main {
    min-height: 74px;
  }

  .ja-logo {
    min-width: 0;
    height: 40px;
    gap: 10px;
  }

  .ja-logo__mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 16px;
  }

  .ja-logo__wordmark {
    font-size: 14px;
    letter-spacing: 0.095em;
  }

  .mobile-panel {
    top: 75px;
  }

  .editorial-hero {
    padding: 44px 0 52px;
    background:
      linear-gradient(90deg, rgba(201, 42, 58, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
      linear-gradient(180deg, #f5f3ee, #fff);
  }

  .home-intro {
    margin-bottom: 26px;
  }

  .home-intro h1,
  .article-header h1 {
    font-size: clamp(36px, 10.2vw, 45px);
    line-height: 1.01;
  }

  .hero-grid,
  .article-grid,
  .category-layout,
  .club-promo__grid,
  .newsletter-box,
  .footer-grid,
  .resource-hero__grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 30px;
  }

  .hero-grid .article-card--lead {
    grid-row: auto;
  }

  .hero-grid .article-card--lead .article-card__title {
    max-width: none;
    font-size: 32px;
  }

  .article-card--compact {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .article-card--compact .article-card__title {
    font-size: 19px;
  }

  .home-section {
    padding: 58px 0;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading h2 {
    font-size: clamp(31px, 8vw, 39px);
  }

  .article-header {
    padding-top: 38px;
    text-align: left;
  }

  .article-header h1 {
    max-width: none;
    margin-inline: 0;
  }

  .article-dek {
    font-size: 19px;
  }

  .article-layout {
    display: block;
    padding-top: 28px;
  }

  .article-toc {
    margin-bottom: 30px;
    padding: 18px;
  }

  .article-feature {
    width: 100%;
  }

  .article-feature img {
    border-radius: 8px;
  }

  .entry-content p,
  .entry-content li {
    font-size: 17px;
    line-height: 1.72;
  }
}

@media (max-width: 560px) {
  .container,
  .container-narrow,
  .page-content {
    width: calc(100% - 32px);
  }

  .header-main {
    gap: 8px;
  }

  .header-actions {
    gap: 7px;
  }

  .icon-button {
    display: none;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
  }

  .editorial-hero {
    padding-top: 38px;
  }

  .article-card__title {
    font-size: 24px;
  }

  .article-card--compact {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 13px;
  }

  .article-card--compact .article-card__title {
    font-size: 18px;
  }

  .article-card--compact .article-card__meta {
    display: none;
  }

  .section-heading {
    display: grid;
    gap: 12px;
  }

  .newsletter-box {
    padding: 28px 20px;
  }

  .newsletter-box h2 {
    font-size: 38px;
  }

  .page-hero h1,
  .archive-header h1,
  .resource-hero h1 {
    font-size: 38px;
  }

  .entry-content h2 {
    font-size: 30px;
  }
}

@media (max-width: 390px) {
  .ja-logo__wordmark {
    font-size: 13px;
    letter-spacing: 0.075em;
  }

  .home-intro h1,
  .article-header h1 {
    font-size: 36px;
  }

  .home-intro .eyebrow {
    font-size: 10px;
  }

  .article-card--compact {
    grid-template-columns: 92px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-ready,
  .motion-ready.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .article-card__image img,
  .article-card:hover .article-card__image img,
  .article-card:focus-within .article-card__image img {
    transform: none;
    transition: none;
  }
}
