/*
Theme Name: Roxom Insights
Theme URI: https://insights.roxom.com
Author: Roxom
Author URI: https://roxom.com
Description: Custom dark theme for Roxom Insights — Bitcoin-native capital markets blog.
Version: 1.1.0
License: GNU General Public License v2 or later
Text Domain: roxom-insights
*/

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

:root {
  --bg:        #0d0d0d;
  --bg2:       #161616;
  --bg3:       #1e1e1e;
  --border:    #2a2a2a;
  --text:      #f0f0f0;
  --muted:     #888;
  --purple:    #7c3aed;
  --purple-h:  #6d28d9;
  --white:     #ffffff;
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h3 { font-size: clamp(1rem, 2vw, 1.2rem); }

/* ── LAYOUT ───────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ── HEADER ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(13,13,13,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
  padding: 0 40px;
  width: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.site-logo img { height: 28px; width: auto; }

.logo-icon {
  width: 32px; height: 32px;
  background: var(--white);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 0.9rem; color: var(--bg);
}

.main-nav { display: flex; align-items: center; gap: 32px; }

.main-nav a {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

.main-nav a:hover { color: var(--white); }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--font);
  transition: color 0.2s;
}
.btn-ghost:hover { color: var(--white); }

.btn-subscribe {
  background: var(--purple);
  color: var(--white);
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s;
}
.btn-subscribe:hover { background: var(--purple-h); }

.btn-go-roxom {
  background: var(--purple);
  color: var(--white);
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.2s;
}
.btn-go-roxom:hover { background: var(--purple-h); }

/* ── SEARCH ───────────────────────────────────────────────── */
.btn-search {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.btn-search:hover { color: var(--white); }

.search-overlay {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  align-items: center;
  gap: 12px;
  z-index: 100;
}
.search-overlay.active { display: flex; }
.search-overlay form {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
}
.search-overlay input[type="search"] {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--font);
  outline: none;
}
.search-overlay input[type="search"]:focus { border-color: var(--purple); }
.search-overlay button[type="submit"] {
  background: var(--purple);
  border: none;
  color: var(--white);
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.search-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}
.search-close:hover { color: var(--white); }

/* ── HERO / FEATURED ──────────────────────────────────────── */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
  border-bottom: 1px solid var(--border);
}

.hero-visual {
  position: relative;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid var(--border);
  min-height: 400px;
}

.hero-visual img { width: 100%; height: 100%; object-fit: cover; }

.hero-visual-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #111 0%, #1a1a2e 50%, #111 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.floating-logos {
  position: relative;
  width: 100%;
  height: 300px;
}

.float-logo {
  position: absolute;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  animation: float 6s ease-in-out infinite;
}

.float-logo:nth-child(1)  { top: 10%; left: 15%; animation-delay: 0s; }
.float-logo:nth-child(2)  { top: 5%;  left: 45%; animation-delay: 0.8s; }
.float-logo:nth-child(3)  { top: 20%; left: 70%; animation-delay: 1.6s; }
.float-logo:nth-child(4)  { top: 50%; left: 8%;  animation-delay: 2.4s; }
.float-logo:nth-child(5)  { top: 55%; left: 38%; animation-delay: 3.2s; }
.float-logo:nth-child(6)  { top: 45%; left: 65%; animation-delay: 0.4s; }
.float-logo:nth-child(7)  { top: 75%; left: 20%; animation-delay: 1.2s; }
.float-logo:nth-child(8)  { top: 78%; left: 55%; animation-delay: 2s; }

.hero-title-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
}

.hero-title-overlay h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: var(--white);
  margin-bottom: 8px;
}

.hero-title-overlay .hero-date {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--bg3);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.hero-content {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.hero-content h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--white);
  line-height: 1.25;
}

.hero-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.hero-meta {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-meta .sep { opacity: 0.4; }

/* ── ARTICLES SECTION ─────────────────────────────────────── */
.articles-section { padding: 48px 0; }

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.section-label::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--purple);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── ARTICLE CARD ─────────────────────────────────────────── */
.article-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
}

.article-card:hover {
  border-color: #444;
  transform: translateY(-2px);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg3);
  overflow: hidden;
}

.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.article-card:hover .card-image img { transform: scale(1.03); }

.card-image-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a2e, #0d0d1a);
}

.card-body { padding: 20px; }

.card-category {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 10px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.35;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-meta .sep { opacity: 0.4; }

/* ── SINGLE POST ──────────────────────────────────────────── */
/* Override: WordPress adds 'single-post' as a body class too — reset it on body */
body.single-post { max-width: 100%; margin: 0; padding: 0; }
/* Article page container: 720px centered with 40px top margin */
body.single-post .container { max-width: 720px; margin: 40px auto 0px; }
/* Apply max-width only to the content wrapper div */
div.single-post { max-width: 720px; margin: 0 auto; padding: 60px 24px; }

.post-header { margin-bottom: 40px; }

.post-category {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 16px;
}

.post-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 20px;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.post-featured-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 40px;
  aspect-ratio: 16/9;
}

.post-featured-image img { width: 100%; height: 100%; object-fit: cover; }

.post-content { font-size: 1.05rem; line-height: 1.8; color: #ccc; }
.post-content h2 { color: var(--white); margin: 2em 0 0.8em; font-size: 1.5rem; }
.post-content h3 { color: var(--white); margin: 1.5em 0 0.6em; font-size: 1.2rem; }
.post-content p  { margin-bottom: 1.2em; }
.post-content a  { color: var(--purple); border-bottom: 1px solid rgba(124,58,237,0.4); }
.post-content a:hover { border-bottom-color: var(--purple); }
.post-content blockquote {
  border-left: 3px solid var(--purple);
  padding: 12px 20px;
  margin: 1.5em 0;
  color: var(--muted);
  font-style: italic;
}

/* ── PAGINATION ───────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
}

.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  font-size: 0.85rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.2s;
}

.pagination a:hover, .pagination .current {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 60px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-copy { font-size: 0.82rem; color: var(--muted); }

.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.82rem; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-section { grid-template-columns: 1fr; }
  .hero-visual  { min-height: 260px; }
  .hero-content { padding: 32px 24px; }
  .articles-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
}
