/*
Theme Name: Arachnula
Theme URI: https://arachnula.com
Description: Dark editorial blog
Version: 1.5
Author: Arachnula
Text Domain: arachnula
*/

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

body {
  background: #070707;
  color: #d0ccc4;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* canvas — fixed, covers viewport always */
#arc-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(0deg,transparent 0px,transparent 3px,rgba(0,0,0,0.07) 3px,rgba(0,0,0,0.07) 4px);
  pointer-events: none; z-index: 998;
}

a { color: inherit; text-decoration: none; }

/* ── HEADER ── */
.arc-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(7,7,7,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #161616;
  padding: 1rem 1.8rem;
  display: flex; justify-content: space-between; align-items: center;
}
.arc-logo {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase; color: #d0ccc4;
}
.arc-date { font-size: 0.55rem; letter-spacing: 0.14em; color: #262626; }

/* ── FEED — single column ── */
.arc-main {
  position: relative; z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 6rem;
}

.arc-col { display: flex; flex-direction: column; gap: 0; }

/* ── CARD ── */
.arc-card {
  position: relative;
  overflow: hidden;
  background: #0c0c0c;
  cursor: zoom-in;
  margin-bottom: 2.5rem;
}

/* shimmer */
.arc-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg,#0c0c0c 0%,#181818 40%,#1e1e1e 50%,#181818 60%,#0c0c0c 100%);
  background-size: 200% 100%;
  animation: arc-shim 1.8s infinite;
  z-index: 1; transition: opacity 0.5s ease;
}
.arc-card.arc-loaded::before { opacity: 0; pointer-events: none; }
@keyframes arc-shim { from{background-position:200% 0} to{background-position:-200% 0} }

.arc-ph {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%) blur(16px) contrast(1.1);
  transform: scale(1.08);
  z-index: 2; opacity: 1; transition: opacity 0.7s ease;
}
.arc-card.arc-loaded .arc-ph { opacity: 0; }

/* final image — natural aspect ratio */
.arc-fin {
  display: block; width: 100%; height: auto;
  position: relative; z-index: 3; opacity: 0;
  filter: grayscale(100%) contrast(1.06) brightness(0.80);
  transition: opacity 0.9s ease, filter 1.6s ease, transform 0.5s ease;
}
.arc-card.arc-loaded .arc-fin { opacity: 1; }

/* MOST VISIBLE card in viewport gets subtle color */
.arc-card.arc-color .arc-fin {
  filter: grayscale(55%) contrast(1.05) brightness(0.90);
}

/* hover → slightly more color, not full */
.arc-card:hover .arc-fin {
  filter: grayscale(35%) contrast(1.07) brightness(0.95) !important;
  transform: scale(1.01);
}

/* text overlay */
.arc-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 4;
  padding: 3.5rem 1.2rem 1.1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.3) 55%, transparent 100%);
  opacity: 0; transition: opacity 0.6s ease;
}
.arc-card.arc-loaded .arc-overlay { opacity: 1; }

.arc-overlay-index {
  font-size: 0.5rem; color: rgba(255,255,255,0.22);
  letter-spacing: 0.14em; margin-bottom: 0.2rem;
}
.arc-overlay-title {
  font-size: 0.95rem; font-weight: 700;
  color: #fff; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 0.2rem;
}
.arc-overlay-caption {
  font-size: 0.62rem; color: rgba(255,255,255,0.38);
  font-style: italic; line-height: 1.4;
}
.arc-overlay-date {
  font-size: 0.5rem; color: rgba(255,255,255,0.18);
  letter-spacing: 0.1em; margin-top: 0.4rem;
}

/* ── LIGHTBOX ── */
.arc-lb {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.97);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease; cursor: zoom-out;
}
.arc-lb.open { opacity: 1; pointer-events: all; }
.arc-lb img {
  max-width: 92vw; max-height: 92vh; object-fit: contain;
  filter: none !important;
  transform: scale(0.97); transition: transform 0.35s ease;
}
.arc-lb.open img { transform: scale(1); }
.arc-lb-close {
  position: absolute; top: 1.5rem; right: 1.8rem;
  font-size: 1.4rem; color: #2a2a2a; cursor: pointer;
  transition: color 0.2s; font-weight: 300;
}
.arc-lb-close:hover { color: #d0ccc4; }

/* ── PAGINATION ── */
.arc-pagination {
  padding: 2rem 0 0; display: flex; justify-content: space-between;
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
}
.arc-pagination a { color: #444; transition: color 0.2s; }
.arc-pagination a:hover { color: #d0ccc4; }

.arc-empty { font-style:italic; color:#222; padding:5rem 0; text-align:center; }

/* ── FOOTER ── */
.arc-footer {
  position: relative; z-index: 1;
  border-top: 1px solid #111; padding: 1.8rem 1.8rem;
  display: flex; justify-content: space-between; align-items: center;
}
.arc-foot-logo { font-size:0.65rem; font-weight:700; letter-spacing:0.28em; text-transform:uppercase; color:#161616; }
.arc-foot-note { font-size:0.52rem; letter-spacing:0.12em; color:#121212; }

@media (min-width: 860px) {
  .arc-main { max-width: 820px; padding: 3rem 2rem 6rem; }
  .arc-card { margin-bottom: 3.5rem; }
  .arc-overlay-title { font-size: 1.05rem; }
}

/* ── VIDEO EMBED ── */
.arc-video-card { cursor: default; }
.arc-video-card:hover .arc-fin { transform: none !important; }

.arc-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  background: #0c0c0c;
}
.arc-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: none;
}

/* overlay sits on top of video but doesn't block it */
.arc-video-card .arc-overlay {
  pointer-events: none;
}
