/*
 * IRONFORGE THEME
 * Visual DNA transferred from: Industrial HTML Template (Industro)
 *
 * Palette: Deep navy + vivid orange accent on neutral base
 * Typography: Geometric sans-serif, bold display headings, uppercase labels
 * Layout: Full-width alternating dark/light sections, contained content
 * Features: Angled/skewed decorative elements, hover reveal cards, bordered stat-style blocks
 */

/* ===== CSS VARIABLES ===== */
:root {
  --clr-primary: #FF5E14;
  --clr-primary-dark: #E04D05;
  --clr-dark: #0A1D3B;
  --clr-dark-deep: #06132A;
  --clr-secondary: #5F6B7A;
  --clr-light: #F4F5F6;
  --clr-white: #FFFFFF;
  --clr-border: rgba(255,255,255,.1);
  --clr-text: #3A3F47;
  --clr-text-light: #B0B8C4;

  --font-heading: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --max-w: 1200px;
  --gap: 2rem;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--clr-text);
  background: var(--clr-white);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--clr-primary); text-decoration: none; transition: color .3s; }
a:hover { color: var(--clr-primary-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--clr-dark);
}

/* ===== UTILITY ===== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--clr-primary);
  margin-bottom: .5rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}

.section-title--light { color: var(--clr-white); }

/* ===== SKIP NAV ===== */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--clr-primary);
  color: #fff;
  padding: .5rem 1rem;
  z-index: 9999;
  border-radius: 0 0 4px 4px;
  font-weight: 600;
}
.skip-nav:focus { top: 0; color: #fff; }

/* ===== TOPBAR ===== */
.topbar {
  background: var(--clr-dark-deep);
  display: none;
}
@media (min-width: 768px) {
  .topbar { display: block; }
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem 0;
  font-size: .8rem;
  color: var(--clr-text-light);
}
.topbar__inner a {
  color: var(--clr-text-light);
  transition: color .3s;
}
.topbar__inner a:hover { color: var(--clr-primary); }
.topbar__right {
  position: relative;
  background: var(--clr-primary);
  color: #fff;
  padding: .5rem 1.5rem .5rem 2rem;
  font-weight: 600;
}
.topbar__right::before {
  content: "";
  position: absolute;
  top: 0;
  left: -14px;
  width: 28px;
  height: 100%;
  background: var(--clr-primary);
  transform: skewX(-20deg);
}

/* ===== HEADER / NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--clr-white);
  box-shadow: 0 2px 20px rgba(0,0,0,.07);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--clr-white);
  background: var(--clr-primary);
  padding: 0 2.5rem 0 1.25rem;
  height: 64px;
  position: relative;
  text-decoration: none;
}
.site-logo:hover { color: #fff; }
.site-logo::after {
  content: "";
  position: absolute;
  top: 0; right: -18px;
  width: 36px; height: 100%;
  background: var(--clr-primary);
  transform: skewX(-20deg);
}
.site-logo img {
  height: 32px;
  width: auto;
  position: relative;
  z-index: 1;
}
.site-logo span { position: relative; z-index: 1; }

/* Desktop nav */
.main-nav { display: none; }
@media (min-width: 768px) {
  .main-nav {
    display: flex;
    list-style: none;
    gap: .25rem;
    align-items: center;
  }
}
.main-nav a {
  display: block;
  padding: .5rem 1rem;
  font-size: .95rem;
  font-weight: 500;
  color: var(--clr-dark);
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0; left: 1rem; right: 1rem;
  height: 2px;
  background: var(--clr-primary);
  transform: scaleX(0);
  transition: transform .3s;
}
.main-nav a:hover { color: var(--clr-primary); }
.main-nav a:hover::after { transform: scaleX(1); }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .75rem 1.25rem;
  z-index: 1001;
}
@media (min-width: 768px) {
  .hamburger { display: none; }
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-dark);
  transition: .3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--clr-dark);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
  color: var(--clr-white);
  font-size: 1.35rem;
  font-weight: 600;
}
.mobile-nav a:hover { color: var(--clr-primary); }

/* ===== HERO ===== */
.hero {
  position: relative;
  background: var(--clr-dark);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,29,59,.95) 0%, rgba(10,29,59,.6) 60%, rgba(10,29,59,.3) 100%);
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 4rem 0;
  max-width: 720px;
}
.hero__label {
  display: inline-block;
  background: var(--clr-primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: .35rem .9rem;
  margin-bottom: 1.25rem;
  position: relative;
}
.hero__label::after {
  content: "";
  position: absolute;
  right: -10px; top: 0;
  width: 20px; height: 100%;
  background: var(--clr-primary);
  transform: skewX(-20deg);
}
.hero__title {
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  color: var(--clr-white);
  margin-bottom: 1.25rem;
  line-height: 1.1;
}
.hero__subtitle {
  color: var(--clr-text-light);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.hero__subtitle p { margin-bottom: .5rem; }
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--clr-primary);
  color: #fff;
  font-weight: 600;
  padding: .85rem 2rem;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  transition: background .3s, transform .2s;
  text-decoration: none;
}
.hero__cta:hover {
  background: var(--clr-primary-dark);
  color: #fff;
  transform: translateY(-2px);
}
.hero__cta::after {
  content: "→";
  font-size: 1.1rem;
}

/* Decorative angled bottom */
.hero__angle {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  z-index: 2;
}
.hero__angle svg { display: block; width: 100%; height: 100%; }

/* ===== LATEST POSTS ===== */
.latest-posts {
  padding: 5rem 0 4rem;
}
.latest-posts__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.latest-posts__grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 600px) {
  .latest-posts__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .latest-posts__grid { grid-template-columns: repeat(3, 1fr); }
}

/* Post card — industrial feel with angled overlay */
.post-card {
  background: var(--clr-white);
  box-shadow: 0 4px 30px rgba(0,0,0,.06);
  transition: transform .4s, box-shadow .4s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
}
.post-card__img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--clr-light);
}
.post-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.post-card:hover .post-card__img img {
  transform: scale(1.06);
}
/* Skewed bottom edge on image */
.post-card__img::after {
  content: "";
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 30px;
  background: var(--clr-white);
  transform: skewY(-3deg);
  transform-origin: bottom right;
}
.post-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card__date {
  font-size: .75rem;
  color: var(--clr-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: .5rem;
}
.post-card__title {
  font-size: 1.1rem;
  margin-bottom: .75rem;
  line-height: 1.35;
}
.post-card__title a {
  color: var(--clr-dark);
  text-decoration: none;
}
.post-card__title a:hover { color: var(--clr-primary); }
.post-card__excerpt {
  font-size: .9rem;
  color: var(--clr-secondary);
  flex: 1;
  line-height: 1.65;
}
.post-card__link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--clr-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.post-card__link:hover { gap: .7rem; }
.post-card__link::after { content: "→"; }

/* All articles link in header */
.btn-outline {
  display: inline-block;
  padding: .6rem 1.5rem;
  border: 2px solid var(--clr-primary);
  color: var(--clr-primary);
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: .3s;
}
.btn-outline:hover {
  background: var(--clr-primary);
  color: #fff;
}

/* ===== TOPICS ===== */
.topics {
  background: var(--clr-dark);
  padding: 5rem 0;
  position: relative;
}
/* Angled top edge */
.topics::before {
  content: "";
  position: absolute;
  top: -30px; left: 0; right: 0;
  height: 60px;
  background: var(--clr-dark);
  transform: skewY(-2deg);
}
.topics__grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 600px) {
  .topics__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .topics__grid { grid-template-columns: repeat(3, 1fr); }
}

.topic-card {
  border: 1px solid rgba(255,255,255,.1);
  padding: 2rem 1.75rem;
  position: relative;
  transition: border-color .3s, transform .3s;
  overflow: hidden;
}
.topic-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 0;
  background: var(--clr-primary);
  transition: height .4s;
}
.topic-card:hover {
  border-color: rgba(255,255,255,.2);
  transform: translateY(-4px);
}
.topic-card:hover::before { height: 100%; }
.topic-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clr-white);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.topic-card__name::before {
  content: "";
  display: inline-block;
  width: 24px; height: 2px;
  background: var(--clr-primary);
  flex-shrink: 0;
}
.topic-card__desc {
  color: var(--clr-text-light);
  font-size: .9rem;
  line-height: 1.65;
}
.topic-card__desc p { margin-bottom: .5rem; }
.topic-card__desc p:last-child { margin-bottom: 0; }

/* ===== FAQ ===== */
.faq {
  padding: 5rem 0;
  background: var(--clr-light);
}
.faq__layout {
  display: grid;
  gap: 3rem;
}
@media (min-width: 768px) {
  .faq__layout { grid-template-columns: 1fr 2fr; align-items: start; }
}
.faq__intro {
  position: sticky;
  top: 100px;
}
.faq__list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.faq-item {
  background: var(--clr-white);
  border-left: 3px solid transparent;
  transition: border-color .3s;
}
.faq-item.open { border-left-color: var(--clr-primary); }
.faq-item__q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  color: var(--clr-dark);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  gap: 1rem;
}
.faq-item__q:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: -2px;
}
.faq-item__icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-light);
  transition: .3s;
  font-size: 1.1rem;
  color: var(--clr-secondary);
}
.faq-item.open .faq-item__icon {
  background: var(--clr-primary);
  color: #fff;
  transform: rotate(45deg);
}
.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s;
}
.faq-item.open .faq-item__a {
  max-height: 600px;
}
.faq-item__a-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--clr-secondary);
  font-size: .9rem;
  line-height: 1.7;
}
.faq-item__a-inner p { margin-bottom: .5rem; }
.faq-item__a-inner p:last-child { margin-bottom: 0; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--clr-dark-deep);
  color: var(--clr-text-light);
  padding: 4rem 0 0;
}
.footer__grid {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 600px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer__brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--clr-white);
  margin-bottom: .75rem;
}
.footer__tagline {
  margin-bottom: 1rem;
  font-size: .9rem;
  line-height: 1.6;
}
.footer__email {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--clr-primary);
  font-weight: 600;
  font-size: .9rem;
}
.footer__email:hover { color: var(--clr-primary-dark); }
.footer__heading {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--clr-white);
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.footer__nav { list-style: none; }
.footer__nav li { margin-bottom: .5rem; }
.footer__nav a {
  color: var(--clr-text-light);
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.footer__nav a::before {
  content: "›";
  color: var(--clr-primary);
  font-weight: 700;
}
.footer__nav a:hover { color: var(--clr-white); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 3rem;
  padding: 1.5rem 0;
  text-align: center;
  font-size: .82rem;
  color: var(--clr-text-light);
}

/* ===== PAGE / POST CONTENT ===== */
.page-hero {
  background: linear-gradient(135deg, var(--clr-dark) 0%, var(--clr-dark-deep) 100%);
  padding: 4rem 0 3rem;
  position: relative;
}
.page-hero::after {
  content: "";
  position: absolute;
  bottom: -20px; left: 0; right: 0;
  height: 40px;
  background: var(--clr-white);
  transform: skewY(-1.5deg);
}
.page-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--clr-white);
}
.page-hero__date {
  color: var(--clr-primary);
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: .75rem;
}

.content-area {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}
.content-area h2 {
  font-size: 1.6rem;
  margin: 2rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--clr-primary);
  display: inline-block;
}
.content-area h3 { font-size: 1.3rem; margin: 1.5rem 0 .75rem; }
.content-area p { margin-bottom: 1rem; }
.content-area ul, .content-area ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.content-area li { margin-bottom: .35rem; }
.content-area img { margin: 1.5rem 0; }
.content-area a { font-weight: 500; text-decoration: underline; }
.content-area blockquote {
  border-left: 4px solid var(--clr-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--clr-light);
  color: var(--clr-secondary);
  font-style: italic;
}

.post-cover {
  margin-bottom: 2rem;
}
.post-cover img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.post-excerpt {
  font-size: 1.1rem;
  color: var(--clr-secondary);
  border-left: 3px solid var(--clr-primary);
  padding-left: 1rem;
  margin-bottom: 2rem;
}

/* ===== BLOG INDEX ===== */
.blog-index {
  padding: 3rem 0 5rem;
}
.blog-index__grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 600px) {
  .blog-index__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .blog-index__grid { grid-template-columns: repeat(3, 1fr); }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .35rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 .75rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--clr-dark);
  border: 2px solid var(--clr-light);
  transition: .3s;
}
.pagination a:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
}
.pagination .active {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}
.pagination .prev-next {
  text-transform: uppercase;
  font-size: .8rem;
  letter-spacing: 1px;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--clr-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 900;
  transition: .3s;
}
.back-to-top:hover {
  background: var(--clr-primary-dark);
  transform: translateY(-3px);
}
.back-to-top.visible { display: flex; }

/* ===== FOCUS STYLES ===== */
:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}

/* ===== PRINT ===== */
@media print {
  .site-header, .site-footer, .back-to-top, .topbar { display: none !important; }
  body { color: #000; }
}
