/*
Theme Name:  SpeculativeChic Theme
Description: GeneratePress child theme for speculativechic.com — AI, Gaming, Crypto & Lifestyle magazine
Author:      Alvi
Template:    generatepress
Version:     1.0.0
Text Domain: speculativechic
*/

/* ── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  --sc-accent:        #8B5CF6;
  --sc-accent-dark:   #7C3AED;
  --sc-accent-light:  #EDE9FE;
  --sc-text:          #0F172A;
  --sc-muted:         #64748B;
  --sc-border:        #E2E8F0;
  --sc-surface:       #F8FAFC;
  --sc-white:         #FFFFFF;
  --sc-card-radius:   10px;
  --sc-font:          'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sc-font-mono:     'JetBrains Mono', 'Fira Code', monospace;
  --sc-shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --sc-shadow-md:     0 4px 16px rgba(0,0,0,.10);
  --sc-shadow-lg:     0 12px 40px rgba(0,0,0,.14);
  --sc-header-h:      64px;
  --sc-transition:    220ms ease;
}

/* ── Reset / Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--sc-font);
  color: var(--sc-text);
  background: var(--sc-white);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Typography ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--sc-font);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .5em;
}
p { line-height: 1.7; margin: 0 0 1em; }

/* ── Layout Utilities ───────────────────────────────────────────────────────── */
.sc-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
.sc-section { padding: 56px 0; }
.sc-section-sm { padding: 32px 0; }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.sc-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--sc-white);
  border-bottom: 1px solid var(--sc-border);
  height: var(--sc-header-h);
  display: flex;
  align-items: center;
  transition: box-shadow var(--sc-transition);
}
.sc-header.scrolled { box-shadow: var(--sc-shadow-md); }

.sc-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Logo */
.sc-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -.5px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--sc-text);
}
.sc-logo__mark {
  width: 36px;
  height: 36px;
  background: var(--sc-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .85rem;
  font-weight: 900;
  letter-spacing: 0;
  flex-shrink: 0;
}
.sc-logo img { height: 36px; width: auto; }

/* Primary nav */
.sc-nav { flex: 1; display: flex; align-items: center; }
.sc-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}
.sc-nav__link {
  display: block;
  padding: 6px 12px;
  font-size: .875rem;
  font-weight: 600;
  border-radius: 6px;
  color: var(--sc-text);
  transition: background var(--sc-transition), color var(--sc-transition);
}
.sc-nav__link:hover,
.sc-nav__link.active {
  background: var(--sc-accent-light);
  color: var(--sc-accent);
}

/* Header actions */
.sc-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.sc-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: var(--sc-muted);
  display: flex;
  align-items: center;
  transition: background var(--sc-transition), color var(--sc-transition);
}
.sc-search-btn:hover { background: var(--sc-surface); color: var(--sc-accent); }
.sc-search-btn svg { width: 20px; height: 20px; }

.sc-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  flex-direction: column;
  gap: 5px;
}
.sc-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--sc-text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

/* Search overlay */
.sc-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15,23,42,.75);
  backdrop-filter: blur(4px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
.sc-search-overlay.open { display: flex; }
.sc-search-box {
  background: var(--sc-white);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 600px;
  box-shadow: var(--sc-shadow-lg);
}
.sc-search-box form { display: flex; gap: 12px; }
.sc-search-box input {
  flex: 1;
  border: 2px solid var(--sc-border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: var(--sc-font);
  outline: none;
  transition: border-color var(--sc-transition);
}
.sc-search-box input:focus { border-color: var(--sc-accent); }
.sc-search-box button[type="submit"] {
  background: var(--sc-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
}
.sc-search-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--sc-muted);
  display: block;
  margin: 12px 0 0 auto;
}

/* Mobile nav */
.sc-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: var(--sc-white);
  padding: 24px;
  overflow-y: auto;
}
.sc-mobile-nav.open { display: block; }
.sc-mobile-nav__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  float: right;
}
.sc-mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 48px 0 0;
}
.sc-mobile-nav ul li a {
  display: block;
  padding: 14px 0;
  font-size: 1.125rem;
  font-weight: 600;
  border-bottom: 1px solid var(--sc-border);
}

/* ── Breadcrumbs ────────────────────────────────────────────────────────────── */
.sc-breadcrumbs {
  background: var(--sc-surface);
  border-bottom: 1px solid var(--sc-border);
  padding: 10px 0;
  font-size: .8rem;
  color: var(--sc-muted);
}
.sc-breadcrumbs a { color: var(--sc-muted); }
.sc-breadcrumbs a:hover { color: var(--sc-accent); }
.sc-breadcrumbs .sep { margin: 0 6px; }

/* ── Category Badge ─────────────────────────────────────────────────────────── */
.sc-cat {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--sc-accent-light);
  color: var(--sc-accent);
  text-decoration: none;
}
.sc-cat:hover { background: var(--sc-accent); color: #fff; }

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.sc-card {
  background: var(--sc-white);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--sc-transition), transform var(--sc-transition);
}
.sc-card:hover {
  box-shadow: var(--sc-shadow-md);
  transform: translateY(-2px);
}
.sc-card__img { aspect-ratio: 16/9; overflow: hidden; }
.sc-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.sc-card:hover .sc-card__img img { transform: scale(1.04); }
.sc-card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sc-card__title { font-size: 1rem; font-weight: 700; line-height: 1.35; margin: 0; }
.sc-card__title a:hover { color: var(--sc-accent); }
.sc-card__meta { font-size: .75rem; color: var(--sc-muted); margin-top: auto; }

/* ── List Items ─────────────────────────────────────────────────────────────── */
.sc-list-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--sc-border);
}
.sc-list-item:last-child { border-bottom: none; }
.sc-list-item__thumb {
  flex-shrink: 0;
  width: 100px;
  height: 68px;
  border-radius: 8px;
  overflow: hidden;
}
.sc-list-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sc-list-item__info { flex: 1; min-width: 0; }
.sc-list-item__title { font-size: .9rem; font-weight: 700; margin: 0 0 4px; line-height: 1.35; }
.sc-list-item__title a:hover { color: var(--sc-accent); }
.sc-list-item__meta { font-size: .72rem; color: var(--sc-muted); }

/* ── Grid ───────────────────────────────────────────────────────────────────── */
.sc-grid { display: grid; gap: 24px; }
.sc-grid--3 { grid-template-columns: repeat(3,1fr); }
.sc-grid--4 { grid-template-columns: repeat(4,1fr); }
.sc-grid--2 { grid-template-columns: repeat(2,1fr); }

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.sc-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 21/9;
  min-height: 300px;
  background: var(--sc-surface);
}
.sc-hero__img { position: absolute; inset: 0; }
.sc-hero__img img { width: 100%; height: 100%; object-fit: cover; }
.sc-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,.85) 35%, transparent 70%);
}
.sc-hero__body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 32px 28px;
}
.sc-hero__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #fff;
  margin: 8px 0 0;
  line-height: 1.2;
}
.sc-hero__title a { color: #fff; }
.sc-hero__title a:hover { color: var(--sc-accent-light); }
.sc-hero__meta { font-size: .8rem; color: rgba(255,255,255,.7); margin-top: 10px; }

/* ── Section Heading ────────────────────────────────────────────────────────── */
.sc-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--sc-border);
}
.sc-section-header h2 {
  font-size: 1.125rem;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sc-section-header h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--sc-accent);
  border-radius: 2px;
}
.sc-section-header .sc-view-all {
  font-size: .8rem;
  font-weight: 600;
  color: var(--sc-accent);
}
.sc-section-header .sc-view-all:hover { text-decoration: underline; }

/* ── Homepage Layout ────────────────────────────────────────────────────────── */
.sc-home { padding: 32px 0 56px; }
.sc-home__top { display: grid; grid-template-columns: 1fr 340px; gap: 28px; margin-bottom: 40px; }
.sc-home__sidebar { display: flex; flex-direction: column; gap: 0; }

/* ── Category Section ───────────────────────────────────────────────────────── */
.sc-cat-section { margin-bottom: 40px; }
.sc-cat-section__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sc-cat-section__list { display: flex; flex-direction: column; }

/* ── Single Post ────────────────────────────────────────────────────────────── */
.sc-single { max-width: 780px; margin: 0 auto; padding: 40px 24px 64px; }
.sc-single__header { margin-bottom: 28px; }
.sc-single__title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.2; margin: 12px 0 16px; }
.sc-single__meta { font-size: .82rem; color: var(--sc-muted); display: flex; gap: 16px; flex-wrap: wrap; }
.sc-single__featured { border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; margin-bottom: 32px; }
.sc-single__featured img { width: 100%; height: 100%; object-fit: cover; }
.sc-single__content { font-size: 1.05rem; line-height: 1.8; }
.sc-single__content h2,
.sc-single__content h3 { margin-top: 2em; }
.sc-single__content p { margin-bottom: 1.4em; }
.sc-single__content a { color: var(--sc-accent); text-decoration: underline; }
.sc-single__content ul,
.sc-single__content ol { padding-left: 1.5em; margin-bottom: 1.4em; }
.sc-single__content img { border-radius: 8px; margin: 1em 0; }
.sc-single__content blockquote {
  border-left: 4px solid var(--sc-accent);
  margin: 1.5em 0;
  padding: .5em 1.5em;
  color: var(--sc-muted);
  font-style: italic;
  background: var(--sc-surface);
  border-radius: 0 8px 8px 0;
}

/* Tags */
.sc-tags { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.sc-tags a {
  padding: 5px 12px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--sc-muted);
  transition: background var(--sc-transition), color var(--sc-transition);
}
.sc-tags a:hover { background: var(--sc-accent-light); color: var(--sc-accent); }

/* Author box */
.sc-author {
  margin-top: 40px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.sc-author__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.sc-author__avatar img { width: 100%; height: 100%; object-fit: cover; }
.sc-author__name { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.sc-author__bio { font-size: .85rem; color: var(--sc-muted); line-height: 1.6; margin: 0; }

/* Related posts */
.sc-related { margin-top: 48px; }
.sc-related h3 { font-size: 1.1rem; margin-bottom: 20px; }
.sc-related__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }

/* ── Archive / Index ─────────────────────────────────────────────────────────── */
.sc-archive { padding: 40px 0 64px; }
.sc-archive__header {
  text-align: center;
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--sc-border);
  margin-bottom: 32px;
}
.sc-archive__header h1 { font-size: clamp(1.5rem,3vw,2.2rem); }
.sc-archive__header p { color: var(--sc-muted); margin: 8px 0 0; }
.sc-archive__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.sc-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.sc-pagination a,
.sc-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  border: 1px solid var(--sc-border);
  transition: background var(--sc-transition), color var(--sc-transition);
}
.sc-pagination a:hover { background: var(--sc-accent-light); border-color: var(--sc-accent); color: var(--sc-accent); }
.sc-pagination .current { background: var(--sc-accent); color: #fff; border-color: var(--sc-accent); }

/* ── Search ─────────────────────────────────────────────────────────────────── */
.sc-search-page { padding: 40px 0 64px; }
.sc-search-page__header { margin-bottom: 32px; }
.sc-search-page__header h1 { font-size: 1.5rem; }
.sc-search-page__header h1 span { color: var(--sc-accent); }

/* ── 404 ────────────────────────────────────────────────────────────────────── */
.sc-404 { text-align: center; padding: 80px 24px; }
.sc-404__code { font-size: 6rem; font-weight: 900; color: var(--sc-accent); line-height: 1; }
.sc-404 h2 { font-size: 1.5rem; margin: 16px 0 8px; }
.sc-404 p { color: var(--sc-muted); margin-bottom: 28px; }
.sc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--sc-accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  transition: background var(--sc-transition);
}
.sc-btn:hover { background: var(--sc-accent-dark); color: #fff; }
.sc-btn--outline {
  background: none;
  color: var(--sc-accent);
  border: 2px solid var(--sc-accent);
}
.sc-btn--outline:hover { background: var(--sc-accent); color: #fff; }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.sc-footer {
  background: #0F172A;
  color: rgba(255,255,255,.75);
  padding: 56px 0 0;
}
.sc-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sc-footer__brand .sc-logo { color: #fff; margin-bottom: 14px; }
.sc-footer__about { font-size: .875rem; line-height: 1.7; color: rgba(255,255,255,.6); margin: 0 0 20px; }
.sc-footer__social { display: flex; gap: 10px; }
.sc-footer__social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: .8rem;
  font-weight: 700;
  transition: background var(--sc-transition), color var(--sc-transition);
}
.sc-footer__social a:hover { background: var(--sc-accent); color: #fff; }

.sc-footer__col h4 {
  color: #fff;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 16px;
}
.sc-footer__col ul { list-style: none; margin: 0; padding: 0; }
.sc-footer__col ul li { margin-bottom: 10px; }
.sc-footer__col ul li a {
  font-size: .875rem;
  color: rgba(255,255,255,.6);
  transition: color var(--sc-transition);
}
.sc-footer__col ul li a:hover { color: var(--sc-accent-light); }

.sc-footer__bottom {
  padding: 20px 0;
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.35);
}
.sc-footer__bottom a { color: rgba(255,255,255,.5); }
.sc-footer__bottom a:hover { color: var(--sc-accent-light); }

/* ── No Image Placeholder ───────────────────────────────────────────────────── */
.sc-no-img {
  background: linear-gradient(135deg, var(--sc-accent-light), #DDD6FE);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--sc-accent);
  width: 100%;
  height: 100%;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sc-home__top { grid-template-columns: 1fr; }
  .sc-home__sidebar { display: none; }
  .sc-grid--4 { grid-template-columns: repeat(2,1fr); }
  .sc-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .sc-nav { display: none; }
  .sc-hamburger { display: flex; }
  .sc-grid--3,
  .sc-archive__grid,
  .sc-related__grid { grid-template-columns: 1fr 1fr; }
  .sc-cat-section__grid { grid-template-columns: 1fr; }
  .sc-footer__grid { grid-template-columns: 1fr; }
  .sc-hero { aspect-ratio: 4/3; }
  .sc-hero__body { padding: 20px; }
}

@media (max-width: 480px) {
  .sc-grid--3,
  .sc-archive__grid,
  .sc-related__grid,
  .sc-grid--2 { grid-template-columns: 1fr; }
  .sc-grid--4 { grid-template-columns: 1fr; }
  .sc-single { padding: 24px 16px 48px; }
  .sc-footer__grid { grid-template-columns: 1fr; }
}
