/*
Theme Name: Glassey Alley
Theme URI: https://example.com/glassey-alley
Author: Ryan
Description: A photography-first WordPress theme with dark, cinematic aesthetics.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
Tags: photography, dark, full-width, featured-images, blog
Text Domain: glassey-alley
*/

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

:root {
  --bg:        #0e0e0e;
  --surface:   #181818;
  --border:    #2a2a2a;
  --text:      #d4d4d4;
  --muted:     #6b6b6b;
  --accent:    #c8a96e;
  --white:     #f0f0f0;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --max-w:     740px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

/* ─── Site Header ──────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: linear-gradient(to bottom, rgba(14,14,14,.9) 0%, transparent 100%);
  backdrop-filter: blur(0px);
  transition: background .3s, backdrop-filter .3s;
}

.site-header.scrolled {
  background: rgba(14,14,14,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-branding a {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--white);
}

.site-branding .tagline {
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .1rem;
}

/* ─── Navigation ───────────────────────────────────────────── */
.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.main-navigation a {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a { color: var(--white); }

/* ─── Home / Archive Feed ──────────────────────────────────── */
.feed-wrap {
  padding-top: 5rem; /* clear fixed header */
}

.post-card {}

/* Featured image */
.post-card__image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 3 / 2;
  width: 90%;
  margin: 0 auto;
}

.post-card__image-wrap a {
  position: absolute;
  inset: 0;
}

.post-card__image-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Card text area */
.post-card__body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.post-card__meta {
  display: flex;
  gap: 1rem;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .8rem;
}

.cat { white-space: nowrap; }

.post-card__meta .cat a {
  color: var(--accent);
}

.post-card__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: .9rem;
}

.post-card__title a { color: var(--white); transition: color .2s; }
.post-card__title a:hover { color: var(--accent); }

.post-card__excerpt {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 1.25rem;
  max-width: 56ch;
}

.post-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  transition: gap .2s;
}

.post-card__read-more:hover { gap: .7rem; }

.post-card__read-more::after { content: '→'; }

/* No featured image fallback */
.post-card--no-image .post-card__body {
  padding-top: 6rem;
}

/* ─── Single Post ──────────────────────────────────────────── */
/* Full-viewport hero */
.single-hero {
  position: relative;
  width: 100%;
  height: 100svh;
  overflow: hidden;
}

.single-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(14,14,14,.15) 0%,
    rgba(14,14,14,.0)  40%,
    rgba(14,14,14,.8)  80%,
    rgba(14,14,14,1)   100%
  );
}

.single-hero__caption {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  padding: 0 1.5rem;
}

.single-hero__meta {
  display: flex;
  gap: 1rem;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(240,240,240,.6);
  margin-bottom: .75rem;
}

.single-hero__meta .cat a { color: var(--accent); }

.single-hero__title {
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--white);
  text-shadow: 0 2px 24px rgba(0,0,0,.5);
}

/* Scroll-down cue */
.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  font-size: .65rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(240,240,240,.4);
}

.scroll-cue__line {
  width: 1px;
  height: 40px;
  background: rgba(240,240,240,.3);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: .3; }
  50%       { transform: scaleY(.5); opacity: .8; }
}

/* Article body */
.entry-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

.entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
}

.entry-content p    { margin-bottom: 1.5rem; }
.entry-content h2,
.entry-content h3   { margin: 2.5rem 0 1rem; color: var(--white); }
.entry-content a    { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote {
  border-left: 3px solid var(--accent);
  padding: .5rem 1.5rem;
  margin: 2rem 0;
  color: var(--muted);
  font-style: italic;
}

/* Inline images — landscape bleeds wide, portrait stays column-width */
.entry-content figure {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
  /* bleed landscape figures wider than the text column */
  width: 80vw;
  margin-left: calc(((var(--max-w) - 80vw) / 2) - 1.5rem);
  margin-right: calc(((var(--max-w) - 80vw) / 2) - 1.5rem);
}

.entry-content figure img {
  width: 100%;
  height: auto;
  display: block;
}

.entry-content figure.portrait {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  max-width: var(--max-w);
}

.entry-content figure.portrait img {
  width: auto;
  max-height: 85vh;
  margin: 0 auto;
}

@media (max-width: 780px) {
  .entry-content figure {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}
.entry-content figcaption {
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
  margin-top: .5rem;
  font-style: italic;
}

/* ─── Post no hero (no featured image on single) ───────────── */
.entry-wrap--no-hero {
  padding-top: 8rem;
}

.entry-wrap--no-hero .entry-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin-bottom: .5rem;
}

.entry-wrap--no-hero .entry-meta {
  display: flex;
  gap: 1rem;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* ─── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1.5rem;
}

.pagination a,
.pagination span {
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .4rem .8rem;
  border: 1px solid var(--border);
  transition: color .2s, border-color .2s;
}

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

/* ─── Site Footer ──────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .75rem;
  color: var(--muted);
}

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .site-header { padding: 1rem 1.25rem; }
  .main-navigation { display: none; }
  .site-branding .tagline { display: none; }
  .post-card__image-wrap { aspect-ratio: 3 / 2; }

  /* Single post hero: natural 4/3 crop instead of full viewport */
  .single-hero {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .single-hero__title {
    font-size: clamp(1.4rem, 6vw, 2rem);
  }
}
