/* Rastro Digital — tokenbr.click | tech-blue-gray editorial */

:root {
  --blue-900: #1a2d44;
  --blue-700: #2b4c7e;
  --blue-500: #3d6b9e;
  --blue-300: #7ba3c9;
  --blue-100: #e4edf5;
  --gray-900: #1a2332;
  --gray-700: #3d4654;
  --gray-500: #5a6578;
  --gray-300: #8b95a5;
  --gray-200: #c5ccd6;
  --gray-100: #e8ecf1;
  --gray-50: #f7f9fc;
  --white: #ffffff;
  --accent: #4a7ab5;
  --line: #d0d8e2;
  --container: 960px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --shadow-soft: 0 2px 12px rgba(26, 45, 68, 0.06);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--gray-700);
  background: var(--gray-50);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue-700); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--blue-500); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--gray-900);
  line-height: 1.25;
  font-weight: 700;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Cookie top strip */
.cookie-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--blue-900);
  color: var(--gray-100);
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  transform: translateY(-100%);
  transition: transform 0.35s ease;
}

.cookie-strip.is-visible { transform: translateY(0); }
.cookie-strip p { margin: 0; max-width: 42rem; }
.cookie-strip a { color: var(--blue-300); text-decoration: underline; }

body.has-cookie-strip .site-header { top: 2.75rem; }
body.has-cookie-strip { padding-top: 2.75rem; }

/* Header — split-nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--blue-900);
  letter-spacing: -0.02em;
}

.brand-tagline {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-300);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-desktop a {
  font-size: 0.9rem;
  color: var(--gray-700);
  font-weight: 500;
}

.nav-desktop a.is-active { color: var(--blue-700); border-bottom: 2px solid var(--blue-500); padding-bottom: 2px; }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  color: var(--gray-900);
  font-size: 0.85rem;
}

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(280px, 85vw);
  height: 100vh;
  background: var(--white);
  z-index: 1100;
  padding: 4rem 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 24px rgba(26, 45, 68, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-drawer.is-open { transform: translateX(0); }

.nav-drawer a {
  display: block;
  padding: 0.75rem 0;
  font-size: 1rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}

.drawer-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-500);
  line-height: 1;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 35, 50, 0.4);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }

/* Buttons — subtle-ghost */
.btn {
  display: inline-block;
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--blue-700);
  transition: background 0.2s, border-color 0.2s;
  font-family: var(--font-sans);
}

.btn:hover { background: var(--blue-100); border-color: var(--blue-300); }
.btn-primary { border-color: var(--blue-500); color: var(--blue-700); }

/* Tags — bracket-label */
.tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-500);
  font-weight: 600;
}

.tag::before { content: "["; margin-right: 0.15em; }
.tag::after { content: "]"; margin-left: 0.15em; }

/* Hero carousel — no autoplay */
.hero-section { padding: 2.5rem 0 1.5rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
}

.carousel-track { position: relative; }

.carousel-slide {
  display: none;
  padding: 0;
}

.carousel-slide.is-active { display: block; }

.carousel-slide img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.carousel-body {
  padding: 1.35rem 1.5rem 1rem;
  border-top: 3px solid var(--blue-500);
}

.carousel-body h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.carousel-body p {
  font-size: 0.95rem;
  color: var(--gray-500);
  margin-bottom: 0.75rem;
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
  padding: 0 1.5rem 1.25rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--blue-300);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.carousel-dot.is-active { background: var(--blue-500); border-color: var(--blue-500); }

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 0.5rem;
}

.hero-aside h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--gray-500);
  border-left: 3px solid var(--blue-300);
  padding-left: 1rem;
}

.hero-meta {
  font-size: 0.8rem;
  color: var(--gray-300);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Bento grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2.5rem 0;
}

.bento-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue-700);
  padding: 1.15rem;
  border-radius: var(--radius-md);
}

.bento-item:nth-child(2) { border-top-color: var(--blue-500); margin-top: 1.5rem; }
.bento-item:nth-child(3) { border-top-color: var(--blue-300); }
.bento-item:nth-child(4) { grid-column: span 2; border-top-color: var(--accent); }
.bento-item:nth-child(5) { margin-top: -0.75rem; }

.bento-item h3 { font-size: 1rem; margin: 0.5rem 0 0.35rem; }
.bento-item p { font-size: 0.85rem; color: var(--gray-500); }

/* Editorial line cards */
.card-editorial {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue-500);
  padding: 1.25rem 1.35rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 1rem;
}

/* Compact dense list — article_list */
.feed-section { padding: 1rem 0 3rem; }

.feed-section h2 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-900);
  display: inline-block;
}

.feed-list { list-style: none; }

.feed-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.feed-item:first-child { border-top: 1px solid var(--gray-100); }

.feed-thumb {
  width: 72px;
  height: 54px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--blue-100);
}

.feed-thumb img { width: 100%; height: 100%; object-fit: cover; }

.feed-content h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.feed-content h3 a { color: var(--gray-900); }
.feed-content h3 a:hover { color: var(--blue-700); }

.feed-meta {
  font-size: 0.75rem;
  color: var(--gray-300);
}

.feed-date {
  font-size: 0.8rem;
  color: var(--gray-300);
  white-space: nowrap;
}

/* Page layouts */
.page-hero {
  padding: 2.5rem 0 1.5rem;
}

.page-hero h1 { font-size: 2.25rem; margin-bottom: 0.75rem; }

.page-intro {
  font-size: 1.1rem;
  color: var(--gray-500);
  max-width: 38rem;
}

.content-section { padding: 1.5rem 0 3rem; }

.prose { max-width: 42rem; }
.prose p { margin-bottom: 1.15rem; }
.prose h2 { font-size: 1.35rem; margin: 2rem 0 0.75rem; }
.prose h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.prose ul, .prose ol { margin: 0 0 1.15rem 1.25rem; }
.prose li { margin-bottom: 0.4rem; }

/* Article sidebar layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  padding: 2rem 0 3rem;
  align-items: start;
}

.article-main img.hero-img {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.article-header { margin-bottom: 1.5rem; }
.article-header h1 { font-size: 2rem; margin: 0.75rem 0; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--gray-300);
}

.article-body p { margin-bottom: 1.15rem; }
.article-body h2 { font-size: 1.35rem; margin: 2rem 0 0.75rem; }

/* Sidebar — author-widget-only */
.sidebar { position: sticky; top: 5rem; }

.author-bio-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue-700);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.author-bio-box img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.author-bio-box h3 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.author-role {
  font-size: 0.75rem;
  color: var(--blue-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.65rem;
}

.author-bio-box p {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.55;
}

/* Articles listing */
.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  padding: 2rem 0 3rem;
}

.contact-info p { margin-bottom: 0.75rem; }

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--gray-700);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  background: var(--white);
}

.contact-form textarea { min-height: 140px; resize: vertical; }

/* Footer — stacked-links */
.site-footer {
  background: var(--blue-900);
  color: var(--gray-200);
  padding: 2.5rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--white);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--gray-200);
  font-size: 0.9rem;
}

.footer-links a:hover { color: var(--white); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  width: 100%;
}

.footer-legal a {
  color: var(--gray-300);
  font-size: 0.8rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--gray-300);
  margin-top: 0.5rem;
}

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

.text-center { text-align: center; }

/* Responsive */
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: block; }

  .hero-grid { grid-template-columns: 1fr; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-item:nth-child(4) { grid-column: span 1; }
  .bento-item:nth-child(2),
  .bento-item:nth-child(5) { margin-top: 0; }

  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }

  .contact-grid { grid-template-columns: 1fr; }

  .feed-item {
    grid-template-columns: 56px 1fr;
  }
  .feed-date { grid-column: 2; font-size: 0.75rem; }
}
