/*
Theme Name: Lupocreante
Theme URI: https://lupocreante.it
Author: lupocreante
Description: Portfolio fotografico minimalista dark
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Space+Mono:wght@400&display=swap');

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

:root {
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #161616;
  --border: #1e1e1e;
  --text: #c8c4bc;
  --text-dim: #555555;
  --text-light: #e8e4dc;
  --accent: #444440;
  --serif: 'Cormorant Garamond', serif;
  --mono: 'Space Mono', monospace;
}

html { font-size: 16px; }

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

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* NAV */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px 24px;
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.site-logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.12em;
  color: var(--text-light);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.current { color: var(--text); }

/* HERO GRID */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 60vh;
  min-height: 400px;
  border-bottom: 0.5px solid var(--border);
}

.hero-main {
  position: relative;
  overflow: hidden;
  border-right: 0.5px solid var(--border);
  background: var(--bg2);
}

.hero-main img {
  opacity: 0.7;
  transition: opacity 0.6s, transform 0.8s;
}

.hero-main:hover img {
  opacity: 0.85;
  transform: scale(1.02);
}

.hero-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.hero-sub {
  position: relative;
  overflow: hidden;
  background: var(--bg2);
  border-bottom: 0.5px solid var(--border);
}

.hero-sub:last-child { border-bottom: none; }

.hero-sub img {
  opacity: 0.6;
  transition: opacity 0.5s, transform 0.7s;
}

.hero-sub:hover img {
  opacity: 0.8;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 28px;
  background: linear-gradient(transparent, rgba(10,10,10,0.92));
  pointer-events: none;
}

.hero-main .hero-overlay { padding: 32px 36px; }

.post-category {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.post-title-display {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  color: var(--text-light);
  line-height: 1.15;
}

.hero-main .post-title-display { font-size: 32px; }
.hero-sub .post-title-display { font-size: 20px; }

/* PHOTO GRID */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.grid-item {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg2);
  border-right: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
}

.grid-item:nth-child(3n) { border-right: none; }

.grid-item img {
  opacity: 0.6;
  transition: opacity 0.5s, transform 0.7s;
}

.grid-item:hover img {
  opacity: 0.85;
  transform: scale(1.04);
}

.grid-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 18px;
  background: linear-gradient(transparent, rgba(10,10,10,0.9));
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
}

.grid-item:hover .grid-info {
  opacity: 1;
  transform: translateY(0);
}

.grid-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 300;
  font-style: italic;
  color: var(--text-light);
}

/* SINGLE POST */
.single-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 48px;
}

.single-hero {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg2);
  margin-bottom: 40px;
}

.single-hero img { opacity: 0.85; }

.single-meta {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.single-title {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 300;
  font-style: italic;
  color: var(--text-light);
  line-height: 1.1;
  margin-bottom: 32px;
}

.single-content {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text);
  max-width: 640px;
}

.single-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  margin-top: 48px;
}

.single-gallery .gallery-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg2);
}

.single-gallery .gallery-img img { opacity: 0.8; transition: opacity 0.4s; }
.single-gallery .gallery-img:hover img { opacity: 1; }

/* BACK LINK */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 48px;
  transition: color 0.3s;
}

.back-link:hover { color: var(--text); }

/* FOOTER */
.site-footer {
  padding: 24px 48px;
  border-top: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.footer-copy {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2a2a2a;
}

.footer-tagline {
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  color: #333;
}

/* NO POSTS */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  gap: 16px;
  color: var(--text-dim);
}

.empty-state .empty-title {
  font-family: var(--serif);
  font-size: 24px;
  font-style: italic;
  color: var(--accent);
}

/* PLACEHOLDER quando non c'è featured image */
.img-placeholder {
  width: 100%; height: 100%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .site-nav { padding: 20px 24px; }
  .hero-grid { grid-template-columns: 1fr; height: auto; }
  .hero-main { height: 55vw; border-right: none; border-bottom: 0.5px solid var(--border); }
  .hero-side { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; height: 40vw; }
  .hero-sub:last-child { border-bottom: none; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid .grid-item:nth-child(2n) { border-right: none; }
  .photo-grid .grid-item:nth-child(3n) { border-right: 0.5px solid var(--border); }
  .single-wrap { padding: 40px 24px; }
  .single-title { font-size: 32px; }
  .nav-links { gap: 20px; }
}

@media (max-width: 480px) {
  .photo-grid { grid-template-columns: 1fr; }
  .photo-grid .grid-item { border-right: none; }
  .hero-side { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; height: 80vw; }
}

/* LOGO CON IMMAGINE */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.12em;
  color: var(--text-light);
}

/* INTESTAZIONE HERO */
.site-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 48px 32px;
  border-bottom: 0.5px solid var(--border);
}

.site-header-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.site-header-logo {
  width: auto;
  height: 180px;
  object-fit: contain;
  display: block;
  opacity: 0.95;
  transition: opacity 0.4s;
}

.site-header-link:hover .site-header-logo {
  opacity: 1;
}

.site-header-name {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.18em;
  color: var(--text-light);
  text-transform: lowercase;
}

/* NAV ora senza logo, solo links centrati */
.site-nav {
  justify-content: center;
  padding: 16px 48px;
}

.site-nav .site-logo { display: none; }

@media (max-width: 768px) {
  .site-header-logo { height: 120px; }
  .site-header-name { font-size: 22px; }
}
