/* ChromeAttitude — style.css */
:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --border: #2a2d3a;
  --text: #e8e6e3;
  --text2: #9ca3af;
  --accent: #e63946;
  --accent2: #c5a355;
  --font-display: 'Oswald', 'Impact', sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', -apple-system, sans-serif;
  --max-w: 820px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ── NAV ── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,17,23,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .85rem 1.5rem;
  display: flex; align-items: center; gap: 1.2rem;
  overflow-x: auto;
}
.site-nav .logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  text-decoration: none;
}
.site-nav .logo span { color: var(--accent); }
.nav-tabs { display: flex; gap: .3rem; flex: 1; overflow-x: auto; }
.nav-tabs a {
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  padding: .35rem .7rem; border-radius: 4px;
  color: var(--text2); white-space: nowrap;
  text-decoration: none; transition: all .2s;
}
.nav-tabs a:hover, .nav-tabs a.active { color: var(--text); background: var(--surface); }
.nav-cta {
  font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  padding: .4rem .9rem; border-radius: 4px;
  background: var(--accent); color: #fff;
  white-space: nowrap; text-decoration: none; transition: opacity .2s;
}
.nav-cta:hover { opacity: .85; text-decoration: none; }

/* ── HERO IMAGE (article) ── */
.hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 0;
}
.hero-img-wrap {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  background: var(--surface);
}

/* ── ARTICLE ── */
.article-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}
.article-meta {
  display: flex; align-items: center; gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  font-size: .75rem; color: var(--text2);
  text-transform: uppercase; letter-spacing: .06em;
}
.article-meta .cat {
  background: var(--accent);
  color: #fff;
  padding: .15rem .55rem;
  border-radius: 3px;
  font-weight: 700;
  font-size: .65rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.12;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .01em;
}

.article-lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text2);
  margin-bottom: 2rem;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}

h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.2rem 0 .8rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--accent2);
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.8rem 0 .6rem;
}

p { margin-bottom: 1.2rem; }

blockquote {
  border-left: 3px solid var(--accent2);
  margin: 1.6rem 0;
  padding: .8rem 1.2rem;
  background: var(--surface);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--text2);
}

/* Article images */
.article-wrap figure {
  margin: 1.6rem 0;
}
.article-wrap figure img {
  border-radius: 6px;
  width: 100%;
}
.article-wrap figcaption {
  font-size: .75rem;
  color: var(--text2);
  margin-top: .4rem;
  font-style: italic;
}

ul, ol { margin: 0 0 1.2rem 1.4rem; }
li { margin-bottom: .4rem; }

strong { color: var(--text); }

.sources {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}
.sources h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent2); }
.sources ul { list-style: none; margin-left: 0; }
.sources li { font-size: .82rem; color: var(--text2); padding: .3rem 0; }
.sources a { color: var(--accent); }

/* ── RELATED ARTICLES ── */
.related {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
}
.related h4 {
  font-size: .7rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text2);
  margin-bottom: 1rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.related-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.related-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.related-card .card-body {
  padding: .8rem;
  flex: 1;
}
.related-card .card-cat {
  font-size: .55rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  font-weight: 700;
}
.related-card h5 {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  margin: .25rem 0 .3rem;
  line-height: 1.2;
  text-transform: uppercase;
}
.related-card .card-meta {
  font-size: .65rem;
  color: var(--text2);
}

/* ── HOMEPAGE CARDS ── */
.featured-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}
.featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color .25s, transform .25s;
  display: flex;
  flex-direction: column;
}
.featured-card:hover { border-color: var(--accent); transform: translateY(-3px); text-decoration: none; }
.featured-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.featured-card .card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.featured-card .card-cat {
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  font-weight: 700;
}
.featured-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: .3rem 0 .5rem;
  line-height: 1.2;
  text-transform: uppercase;
}
.featured-card .card-excerpt {
  font-size: .82rem;
  color: var(--text2);
  line-height: 1.5;
  flex: 1;
}
.featured-card .card-meta {
  font-size: .65rem;
  color: var(--text2);
  margin-top: .6rem;
  padding-top: .6rem;
  border-top: 1px solid var(--border);
}

/* ── TICKER ── */
.ticker-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem .5rem;
}
.ticker-wrap p {
  font-size: .85rem;
  line-height: 2;
  color: var(--text2);
}
.ticker-wrap strong { color: var(--accent2); }

/* ── SECTION HEADERS ── */
.section-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: .5rem 1.5rem;
  font-family: var(--font-display);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
}


/* -- TICKER (dynamic) -- */
.ticker-wrap { overflow: hidden; max-width: 1100px; margin: 0 auto; }
.ticker-track {
  display: flex;
  animation: ticker-scroll 60s linear infinite;
  white-space: nowrap;
}
.ticker-track a.ticker-item {
  display: inline-block;
  padding: .6rem 1.5rem;
  font-size: .82rem;
  color: var(--text2);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}
.ticker-track a.ticker-item:hover { color: var(--text); }
.ticker-track a.ticker-item strong { color: var(--accent2); }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* -- HERO SECTION (dynamic) -- */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: .5rem 1.5rem 1.5rem;
}
.hero .hero-lbl, .hero h2 {
  font-family: var(--font-display);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .5rem;
}
.hero-set {
  display: none;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
}
.hero-set.active { display: grid; }
.hero-set .fm {
  grid-row: 1 / -1;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform .25s;
}
.hero-set .fm:hover { transform: translateY(-3px); text-decoration: none; }
.fm-bg { position: absolute; inset: 0; border-radius: 10px; z-index: 0; }
.fm-body {
  position: relative; z-index: 1;
  padding: 1.5rem;
  background: linear-gradient(transparent 0%, rgba(0,0,0,.7) 100%);
  border-radius: 0 0 10px 10px;
}
.fm-body h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  text-transform: uppercase;
  line-height: 1.15;
  margin: .4rem 0;
  color: #fff;
}
.fm-body p { font-size: .82rem; color: rgba(255,255,255,.8); margin-bottom: .4rem; line-height: 1.5; }
.fm-meta { font-size: .65rem; color: rgba(255,255,255,.6); }
.hero-set .fs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color .25s, transform .25s;
}
.hero-set .fs:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.hero-set .fs h4 {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
  margin: .3rem 0;
  color: var(--text);
}
.tag-hist, .tag-tech, .tag-prt, .tag-mkt, .tag-rst {
  display: inline-block;
  font-size: .55rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  padding: .12rem .45rem; border-radius: 3px;
}
.tag-hist { background: #2d2a4a; color: #a78bfa; }
.tag-tech { background: #1e3a5f; color: #60a5fa; }
.tag-prt { background: #3b2f1e; color: var(--accent2); }
.tag-mkt { background: #1e3b2f; color: #4ade80; }
.tag-rst { background: #3b1e1e; color: #f87171; }

/* -- ARTICLE GRID (dynamic) -- */
#articleGrid, #archiveGrid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}
.ac {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: border-color .25s, transform .25s;
}
.ac:hover { border-color: var(--accent); transform: translateY(-3px); text-decoration: none; }
.ac h3 {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  text-transform: uppercase; line-height: 1.2;
  margin: .4rem 0; color: var(--text);
}
.ac p { font-size: .82rem; color: var(--text2); line-height: 1.5; flex: 1; margin-bottom: .5rem; }
.ac-meta { font-size: .65rem; color: var(--text2); padding-top: .5rem; border-top: 1px solid var(--border); }

@media (max-width: 768px) {
  .hero-set { grid-template-columns: 1fr; }
  .hero-set .fm { min-height: 220px; }
  #articleGrid, #archiveGrid { grid-template-columns: 1fr; }
}

/* ── NEWSLETTER ── */
.nl-box {
  max-width: var(--max-w);
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.nl-box h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  text-transform: uppercase;
  margin-bottom: .4rem;
}
.nl-box p { font-size: .85rem; color: var(--text2); margin-bottom: 1rem; }
.nl-box input[type="email"] {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); padding: .6rem 1rem;
  border-radius: 5px; font-size: .85rem;
  width: 60%; max-width: 300px;
}
.nl-box button {
  background: var(--accent); color: #fff; border: none;
  padding: .6rem 1.2rem; border-radius: 5px;
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  cursor: pointer; transition: opacity .2s;
}
.nl-box button:hover { opacity: .85; }
.nl-box .nl-fine { font-size: .65rem; color: var(--text2); margin-top: .6rem; }

/* ── FOOTER ── */
.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  font-size: .78rem;
  color: var(--text2);
}
.site-footer a { color: var(--text2); }
.site-footer a:hover { color: var(--text); }
.footer-brand .logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  text-decoration: none;
}
.footer-brand .logo span { color: var(--accent); }
.footer-brand p { margin-top: .5rem; line-height: 1.5; }
.site-footer h4 {
  font-size: .6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--text); margin-bottom: .6rem;
}
.site-footer ul { list-style: none; }
.site-footer li { padding: .2rem 0; }
.copyright {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: .65rem;
  color: var(--text2);
  border-top: 1px solid var(--border);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .site-footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .site-footer { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .nl-box input[type="email"] { width: 100%; margin-bottom: .5rem; }
}
