/* Jack Sazonov — Artemii Lebedev–inspired design */
:root {
  --bg: #0a0a0a;
  --bg-elevated: #111;
  --text: #f5f5f5;
  --text-muted: #888;
  --border: rgba(255,255,255,0.08);
  --accent: #fff;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Instrument Serif", "Georgia", serif;
  --space: 1.5rem;
  --radius: 2px;
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; }
h1 { font-size: clamp(2.5rem, 8vw, 5rem); line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
a { color: inherit; text-decoration: none; transition: color var(--transition), opacity var(--transition); }
a:hover { opacity: 0.8; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  padding: var(--space) 2rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background var(--transition);
}
.site-header.scrolled { background: rgba(10,10,10,0.9); backdrop-filter: saturate(180%) blur(12px); }
.logo { font-family: var(--font-serif); font-size: 1.25rem; }
.live-time { font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: 0.9rem; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-size: 0.9rem; }
.inquiries { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.inquiries .arrow { flex-shrink: 0; }
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span { display: block; width: 22px; height: 1.5px; background: currentColor; }

@media (max-width: 768px) {
  .nav-links, .inquiries { display: none; }
  .menu-toggle { display: flex; }
  .live-time { font-size: 0.8rem; }
}

/* Menu overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.menu-overlay.open { opacity: 1; visibility: visible; }
.menu-nav { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.menu-nav a { font-family: var(--font-serif); font-size: 1.75rem; }
.menu-social { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.menu-social a { font-size: 0.9rem; color: var(--text-muted); }
.menu-close {
  position: absolute;
  top: var(--space);
  right: 2rem;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Main */
main { padding-top: 5rem; min-height: 100vh; }

/* Hero */
.hero {
  padding: 4rem 2rem 6rem;
  max-width: 56rem;
  margin: 0 auto;
}
.hero-title { margin: 0 0 1rem; }
.hero-tagline { font-size: 1.15rem; color: var(--text-muted); max-width: 38em; margin: 0 0 0.75rem; }
.hero-sub { color: var(--text-muted); max-width: 38em; margin: 0; }

/* Featured */
.featured { padding: 2rem 2rem 6rem; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  margin-bottom: 2rem;
}
.section-head h2 { margin: 0; font-size: 1rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.section-count { margin-left: 0.25rem; }
.count-num { color: var(--text-muted); }
.view-all { margin-left: auto; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.35rem; }
.view-all::after { content: ''; display: inline-block; width: 14px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23888' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Cpath d='M7 17L17 7M17 7H7M17 7V17'/%3E%3C/svg%3E") no-repeat center; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
}
.project-card {
  position: relative;
  background: var(--bg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background var(--transition);
}
.project-card:hover { background: var(--bg-elevated); }
.card-label { font-family: var(--font-serif); font-size: 1.25rem; }
.card-year { font-size: 0.8rem; color: var(--text-muted); }
.card-desc { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.card-tags { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.card-arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  opacity: 0;
  transform: translate(0, 4px);
  transition: opacity var(--transition), transform var(--transition);
}
.project-card:hover .card-arrow { opacity: 1; transform: translate(0, 0); }

/* Key services */
.key-services {
  padding: 4rem 2rem;
  border-top: 1px solid var(--border);
}
.key-title { margin: 0 0 0.5rem; font-size: 1rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.key-intro { margin: 0 0 1.5rem; color: var(--text-muted); font-size: 0.95rem; }
.key-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}
.key-list li { font-size: 1rem; }

/* Newsletter */
.newsletter {
  padding: 4rem 2rem 6rem;
  max-width: 32rem;
  margin: 0 auto;
  text-align: center;
}
.newsletter h2 { margin: 0 0 0.5rem; }
.newsletter p { color: var(--text-muted); margin: 0 0 1.5rem; font-size: 0.95rem; }
.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.subscribe-form input {
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  border-radius: var(--radius);
}
.subscribe-form input::placeholder { color: var(--text-muted); }
.subscribe-form input:focus { outline: none; border-color: var(--text-muted); }
.subscribe-form button {
  padding: 0.9rem 1.5rem;
  background: var(--text);
  color: var(--bg);
  border: none;
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius);
  transition: opacity var(--transition);
}
.subscribe-form button:hover { opacity: 0.9; }
.subscribe-success { color: #6b9b6b; margin-top: 1rem !important; }

/* Footer */
.site-footer {
  padding: 3rem 2rem 2rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 1.5rem;
}
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-logo { font-family: var(--font-serif); font-size: 1rem; }
.footer-nav { display: flex; gap: 1.5rem; font-size: 0.9rem; }
.footer-legal a { font-size: 0.8rem; color: var(--text-muted); }
.footer-social { display: flex; gap: 1rem; font-size: 0.85rem; }
.footer-social a { color: var(--text-muted); }
.footer-copy { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.to-top.visible { opacity: 1; pointer-events: auto; }

/* Page: Releases */
.page-releases .page-hero { padding: 4rem 2rem 2rem; max-width: 56rem; margin: 0 auto; }
.page-hero h1 { margin: 0 0 0.5rem; }
.page-hero p { color: var(--text-muted); margin: 0; }
.releases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}
.release-card {
  position: relative;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  display: block;
}
.release-img-wrap { width: 100%; height: 100%; }
.release-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.release-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-size: 0.9rem;
}
.release-arrow {
  position: absolute;
  top: 1rem;
  right: 1rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.release-card:hover .release-arrow { opacity: 1; }

/* Page: Article */
.page-article { padding: 4rem 2rem 6rem; }
.page-article article { max-width: 42rem; margin: 0 auto; }
.article-header { margin-bottom: 2rem; }
.article-header h1 { margin: 0 0 0.5rem; }
.article-header time, .read-time { font-size: 0.85rem; color: var(--text-muted); }
.article-body h2 { margin: 2rem 0 0.75rem; font-size: 1.25rem; }
.article-body p { margin: 0 0 1rem; }

/* Page: About */
.page-about .page-hero { padding: 4rem 2rem 4rem; max-width: 42rem; margin: 0 auto; }
.about-names { font-size: 0.9rem; color: var(--text-muted); margin: 0 0 1rem; }
.about-bio { margin: 0; color: var(--text-muted); line-height: 1.6; }
