/*
Theme Name: HFD Editorial - Header Lines Test
Theme URI: https://homefitdigital.com
Author: HFD
Description: Clean editorial portal theme for HFD, based on the V2 prototype.
Version: 0.2.2-featured-lead-archive-images
Text Domain: hfd-editorial
*/

:root {
  --navy: #052962;
  --navy-dark: #041f4a;
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #d6dce5;
  --paper: #ffffff;
  --wash: #f4f1ea;
  --yellow: #ffe500;
  --red: #c70000;
  --blue: #0b65c2;
  --green: #1b7f56;
  --font-ui: "Libre Franklin", Arial, Helvetica, sans-serif;
  --font-editorial: "Newsreader", Georgia, "Times New Roman", serif;
  --max: 1180px;
  --single-column: 720px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-ui);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: var(--navy);
}

.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  top: 34px;
  bottom: 46px;
  width: 1px;
  background: rgba(255, 255, 255, .16);
  pointer-events: none;
}

.site-header::before {
  left: max(24px, calc((100vw - var(--max)) / 2));
}

.site-header::after {
  right: max(24px, calc((100vw - var(--max)) / 2));
}

.support-bar {
  background: var(--navy-dark);
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.support-inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  font-size: 12px;
}

.utility-menu {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.masthead-inner {
  position: relative;
  min-height: 132px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto 250px;
  align-items: end;
  gap: 28px;
  padding-top: 28px;
  padding-bottom: 24px;
}

.masthead-inner::before,
.masthead-inner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18) 14%, rgba(255, 255, 255, .18) 86%, transparent);
  pointer-events: none;
}

.masthead-inner::before {
  top: 18px;
}

.masthead-inner::after {
  bottom: 14px;
}

.brand {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
}

.brand::before,
.brand::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, .22);
  pointer-events: none;
}

.brand::before {
  left: 7%;
}

.brand::after {
  right: 9%;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(360px, 44vw, 580px);
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .04),
    0 0 0 1px rgba(0, 0, 0, .08);
}

.edition-block {
  padding-bottom: 7px;
  color: #d7e5ff;
  text-align: right;
  font-size: 12px;
}

.edition-block strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
}

.search-form {
  padding-bottom: 2px;
}

.search-field {
  width: 100%;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .35);
  color: #ffffff;
  background: rgba(255, 255, 255, .12);
  padding: 0 13px;
  font-size: 13px;
}

.search-field::placeholder {
  color: #d7e5ff;
}

.main-nav {
  border-top: 1px solid rgba(255, 255, 255, .28);
  border-bottom: 4px solid var(--yellow);
}

.main-nav .menu {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 21px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

.main-nav a:hover,
.support-inner a:hover {
  color: var(--yellow);
}

.interest-strip {
  border-top: 1px solid rgba(255, 255, 255, .16);
  background: #ffffff;
  color: var(--navy);
}

.interest-strip-inner {
  min-height: 42px;
}

.interest-topic-menu {
  list-style: none;
  margin: 0;
  padding: 7px 0;
  display: flex;
  align-items: center;
  gap: 9px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.interest-topic-menu li {
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

.interest-strip a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 5px 12px;
  color: #14396f;
  background: #f8fafc;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
}

.interest-strip a:hover {
  border-color: var(--navy);
  color: #ffffff;
  background: var(--navy);
  text-decoration: none;
}

.top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, .82fr) minmax(230px, .72fr);
  align-items: start;
  gap: 22px;
  padding-top: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.lead-story,
.secondary-stack,
.briefing-card {
  min-width: 0;
}

.lead-story,
.secondary-stack article,
.briefing-card,
.feature-grid article,
.topic-layout article,
.sections-grid a,
.archive-card {
  border-top: 1px solid var(--ink);
}

.lead-image,
.feature-image,
.stack-image {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  margin-top: 10px;
  background: #d7dce5;
}

.lead-image {
  aspect-ratio: 16 / 9;
}

.feature-image {
  aspect-ratio: 4 / 3;
}

.stack-image {
  aspect-ratio: 16 / 9;
  margin-bottom: 14px;
}

.secondary-stack .stack-image {
  max-height: 150px;
}

.lead-image::before,
.feature-image::before,
.stack-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 45%, rgba(0,0,0,.18)), var(--visual);
}

.has-post-thumbnail::before {
  display: none;
}

.lead-image img,
.feature-image img,
.stack-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.image-car {
  --visual:
    radial-gradient(circle at 18% 72%, #0f172a 0 5%, transparent 5.2%),
    radial-gradient(circle at 76% 72%, #0f172a 0 5%, transparent 5.2%),
    linear-gradient(10deg, transparent 0 48%, rgba(255,255,255,.72) 49% 56%, transparent 57%),
    linear-gradient(145deg, #dfe8ef 0 46%, #8fa7bb 47% 100%);
}

.image-soccer {
  --visual:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,.9) 0 4%, transparent 4.3%),
    linear-gradient(160deg, #052962 0 44%, #16704f 45% 100%);
}

.image-space {
  --visual:
    radial-gradient(circle at 28% 30%, #ffe500 0 3%, transparent 3.4%),
    radial-gradient(circle at 68% 45%, #a4d4ff 0 10%, transparent 10.5%),
    linear-gradient(135deg, #07152f 0 48%, #2d5f8f 49% 100%);
}

.image-home {
  --visual:
    radial-gradient(circle at 68% 34%, #ffe500 0 9%, transparent 9.5%),
    linear-gradient(145deg, #efe8d8 0 48%, #8aa0a8 49% 100%);
}

.image-news {
  --visual:
    radial-gradient(circle at 24% 30%, rgba(255,255,255,.88) 0 11%, transparent 11.5%),
    linear-gradient(90deg, rgba(255,255,255,.55) 0 8%, transparent 8.5% 100%),
    linear-gradient(145deg, #052962 0 42%, #c70000 43% 100%);
}

.image-tech {
  --visual:
    linear-gradient(90deg, rgba(255,255,255,.72) 0 2%, transparent 2.4% 12%, rgba(255,255,255,.42) 12.5% 14%, transparent 14.5%),
    radial-gradient(circle at 72% 30%, #8fd3ff 0 8%, transparent 8.6%),
    linear-gradient(145deg, #10233f 0 46%, #0b65c2 47% 100%);
}

.image-guide {
  --visual:
    linear-gradient(90deg, transparent 0 18%, rgba(255,255,255,.78) 18.5% 20%, transparent 20.5% 100%),
    radial-gradient(circle at 72% 30%, #ffe500 0 8%, transparent 8.6%),
    linear-gradient(145deg, #fff4c2 0 48%, #c70000 49% 100%);
}

.image-money {
  --visual:
    radial-gradient(circle at 70% 28%, #ffe500 0 11%, transparent 11.5%),
    linear-gradient(90deg, rgba(255,255,255,.68) 0 8%, transparent 8.5% 100%),
    linear-gradient(145deg, #f3e6ba 0 46%, #1b7f56 47% 100%);
}

.image-travel {
  --visual:
    radial-gradient(circle at 28% 30%, #ffffff 0 7%, transparent 7.5%),
    linear-gradient(15deg, transparent 0 46%, rgba(255,255,255,.8) 47% 51%, transparent 52%),
    linear-gradient(145deg, #cdeaff 0 46%, #0b65c2 47% 100%);
}

.image-wellness {
  --visual:
    radial-gradient(circle at 72% 28%, #ffe500 0 8%, transparent 8.5%),
    linear-gradient(145deg, #e8f5ee 0 48%, #1b7f56 49% 100%);
}

.image-entertainment {
  --visual:
    radial-gradient(circle at 74% 32%, #ffe500 0 7%, transparent 7.5%),
    linear-gradient(90deg, rgba(255,255,255,.7) 0 12%, transparent 12.5% 100%),
    linear-gradient(145deg, #251048 0 46%, #c70000 47% 100%);
}

.section-label {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
}

.section-label.cars {
  color: var(--green);
}

.section-label.news {
  color: var(--red);
}

.section-label.sport {
  color: #bf4c00;
}

.section-label.tech {
  color: var(--blue);
}

.section-label.science {
  color: #3867c8;
}

.section-label.guide {
  color: var(--red);
}

.section-label.money {
  color: #7a5a00;
}

.section-label.travel {
  color: #0077a8;
}

.section-label.home {
  color: #5d6f2f;
}

.section-label.wellness {
  color: var(--green);
}

.section-label.entertainment {
  color: #7b2cbf;
}

.lead-story h1 {
  margin: 15px 0 12px;
  font-size: clamp(34px, 4.35vw, 52px);
  line-height: .98;
  font-weight: 900;
  letter-spacing: 0;
  font-family: var(--font-editorial);
}

.lead-story p {
  max-width: 670px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.35;
}

.lead-story ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.lead-story li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 800;
}

.secondary-stack article {
  padding: 13px 0 18px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.secondary-stack h2,
.topic-layout h2,
.archive-card h2 {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.05;
  font-weight: 900;
  font-family: var(--font-editorial);
}

.secondary-stack p,
.topic-layout p,
.sections-grid span,
.archive-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.briefing-card {
  padding-top: 13px;
  position: relative;
  z-index: 1;
  background: var(--paper);
}

.briefing-card h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 23px;
  line-height: 1;
  font-family: var(--font-editorial);
}

.briefing-card ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: briefing;
}

.briefing-card li {
  counter-increment: briefing;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
}

.briefing-card li::before {
  content: counter(briefing);
  color: var(--navy);
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.feature-row,
.sections-panel,
.content-shell {
  padding-top: 30px;
  padding-bottom: 30px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  border-top: 2px solid var(--navy);
  padding-top: 8px;
}

.section-heading h2,
.archive-title,
.single-title {
  margin: 0;
  color: var(--navy);
  font-size: 34px;
  line-height: .95;
  font-weight: 900;
  font-family: var(--font-editorial);
}

.feature-grid,
.topic-layout,
.sections-grid,
.archive-grid {
  display: grid;
  gap: 22px;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid h3 {
  margin: 8px 0 0;
  font-size: 25px;
  line-height: 1.05;
  font-weight: 900;
  font-family: var(--font-editorial);
}

.topic-band {
  background: var(--wash);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.topic-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 28px;
  padding-bottom: 30px;
}

.topic-layout article {
  padding-top: 12px;
}

.sections-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 24px;
}

.sections-grid a {
  display: block;
  min-height: 112px;
  padding-top: 12px;
}

.sections-grid strong {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
  font-size: 23px;
  line-height: 1;
  font-family: var(--font-editorial);
}

.content-shell {
  max-width: 860px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding-left: 54px;
  padding-right: 54px;
}

.page-shell {
  padding-top: 44px;
  padding-bottom: 56px;
}

.single-meta {
  margin: 12px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.section-label,
.single-title,
.single-standfirst,
.single-meta,
.single-content {
  max-width: var(--single-column);
  margin-left: 0;
  margin-right: auto;
}

.single-standfirst {
  margin: 12px auto 0 0;
  color: #263447;
  font-family: var(--font-editorial);
  font-size: 23px;
  line-height: 1.28;
  font-weight: 600;
}

.single-featured {
  max-width: var(--single-column);
  margin: 0 0 28px;
}

.single-featured img {
  display: block;
  width: 100%;
  height: clamp(190px, 45vw, 430px);
  object-fit: cover;
  object-position: center center;
  border-top: 3px solid var(--navy);
}

.single-caption {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.single-content {
  font-family: var(--font-editorial);
  font-size: 18px;
  line-height: 1.65;
}

.single-content > * {
  max-width: var(--single-column);
}

.page-content {
  max-width: 720px;
  margin: 0 auto;
}

.page-content .single-title {
  margin-bottom: 28px;
  padding-top: 10px;
  border-top: 2px solid var(--navy);
}

.single-content h2 {
  margin-top: 46px;
  padding-top: 0;
  border-top: 0;
  color: var(--navy);
  font-size: 28px;
  line-height: 1.1;
}

.single-content h3 {
  margin: 30px 0 8px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.single-content p {
  margin: 0 0 20px;
}

.single-content a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.single-content img {
  max-width: 100%;
  height: auto;
}

.single-content svg {
  max-width: 100%;
  height: auto;
}

.editorial-divider {
  width: 100%;
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--line);
  box-shadow: inset 0 3px 0 var(--yellow);
}

.key-takeaway,
.what-we-know {
  position: relative;
  margin: 30px 0;
  padding: 18px 22px 18px 26px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--navy);
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
}

.key-takeaway::before,
.what-we-know::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -6px;
  width: 6px;
  height: 34px;
  background: var(--yellow);
}

.key-takeaway strong,
.what-we-know strong {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pull-quote {
  position: relative;
  margin: 36px 0;
  padding: 24px 28px 24px 56px;
  border-top: 3px solid var(--navy);
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
  color: var(--navy);
  font-family: var(--font-editorial);
  font-size: 29px;
  line-height: 1.12;
  font-weight: 800;
}

.pull-quote::before {
  content: "\201C";
  position: absolute;
  top: 14px;
  left: 18px;
  color: var(--yellow);
  font-size: 58px;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
}

.single-content .wp-block-image,
.single-content .editorial-image {
  margin: 34px 0;
}

.single-content .alignwide,
.single-content .editorial-wide {
  width: min(840px, calc(100vw - 48px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.single-content figcaption,
.editorial-image figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.35;
}

.related-posts {
  margin-top: 46px;
  padding-top: 14px;
  border-top: 3px solid var(--navy);
}

.related-posts h2 {
  margin: 0 0 16px;
  color: var(--navy);
  font-family: var(--font-editorial);
  font-size: 27px;
  line-height: 1.05;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.related-card {
  display: block;
  min-height: 112px;
  padding-top: 10px;
  border-top: 1px solid var(--ink);
}

.related-card span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.related-card strong {
  color: var(--ink);
  font-family: var(--font-editorial);
  font-size: 19px;
  line-height: 1.08;
}

.post-focus {
  margin-top: 52px;
}

.post-focus .feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0;
}

.post-focus .feature-grid h3 {
  font-size: 22px;
}

.archive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.archive-card {
  padding-top: 12px;
}

.archive-card-image {
  display: block;
  margin: 0 0 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--wash);
}

.archive-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease;
}

.archive-card-image:hover img {
  transform: scale(1.02);
}

.site-footer {
  margin-top: 40px;
  padding: 28px 0;
  color: #d7e5ff;
  background: var(--navy);
}

.site-footer strong {
  color: #ffffff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
}

.footer-links a {
  color: #ffffff;
}

.footer-note {
  max-width: 520px;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .22);
  color: #ffffff;
  font-family: var(--font-editorial);
  font-size: 19px;
  line-height: 1.25;
  font-style: italic;
}

@media (max-width: 960px) {
  .masthead-inner,
  .top-grid,
  .topic-layout {
    grid-template-columns: 1fr;
  }

  .masthead-inner::before,
  .masthead-inner::after {
    left: 0;
    right: 0;
  }

  .edition-block {
    text-align: left;
  }

  .feature-grid,
  .related-grid,
  .sections-grid,
  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(100% - 32px, var(--max));
  }

  .content-shell {
    border-left: 0;
    border-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .support-inner {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .masthead-inner {
    min-height: 0;
    padding-top: 22px;
  }

  .site-header::before,
  .site-header::after {
    opacity: .55;
    top: 58px;
    bottom: 44px;
  }

  .masthead-inner::before,
  .masthead-inner::after {
    opacity: .65;
  }

  .brand {
    width: 100%;
  }

  .brand-logo {
    width: min(100%, 410px);
  }

  .brand::before {
    left: 8%;
  }

  .brand::after {
    right: 8%;
  }

  .main-nav .menu {
    gap: 17px;
  }

  .interest-strip-inner {
    width: min(100% - 32px, var(--max));
  }

  .lead-story h1 {
    font-size: 38px;
  }

  .lead-story p {
    font-size: 16px;
  }

  .single-title {
    font-size: 32px;
  }

  .single-standfirst {
    font-size: 20px;
  }

  .pull-quote {
    font-size: 25px;
  }

  .feature-grid,
  .related-grid,
  .sections-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }
}
