/*
Theme Name: Photography
Theme URI: https://photography.franic.org
Author: franic.org
Description: Custom theme for the photography blog. Warm editorial design.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: photography
*/

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

:root {
  --bg:        #f7f5f0;
  --text:      #1a1814;
  --accent:    #c0392b;
  --border:    #e2ddd8;
  --muted:     #7a756e;
  --max-width: 72rem;
}

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1rem;
  line-height: 1.75;
}

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

a:hover {
  color: var(--accent);
}

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

/* ─── Layout ────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── Header ────────────────────────────────────────────────── */
.site-header {
  width: 100%;
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-bottom: 3rem;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-logo {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 1.1rem;
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.site-logo a:hover {
  color: var(--accent);
}

/* ─── Site nav ──────────────────────────────────────────────── */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2.5rem;
  justify-content: flex-end;
}

.site-nav__link {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif !important;
  font-size: 0.7rem !important;
  font-variant: small-caps !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em !important;
  color: var(--muted) !important;
  text-decoration: none !important;
  transition: color 0.2s;
}

.site-nav__link:hover,
.site-nav__link--active {
  color: var(--accent);
}

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 5rem;
  padding: 2rem 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* ─── Homepage intro ────────────────────────────────────────── */
.site-intro {
  max-width: 44rem;
  margin: 0 auto 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.site-intro__lead {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.site-intro p {
  margin-bottom: 1rem;
  color: var(--text);
}

.site-intro p:last-child {
  margin-bottom: 0;
}

/* ─── Section label ─────────────────────────────────────────── */
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ─── Post Grid (index / archive) ───────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.post-grid--small {
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.post-card {
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.post-card:hover {
  border-color: var(--accent);
}

.post-card__cover {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.post-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card__cover img {
  transform: scale(1.03);
}

.post-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card__category {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.post-card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.post-grid--small .post-card__title {
  font-size: 1rem;
}

.post-card__date {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: 1rem;
}

/* ─── Archive header ────────────────────────────────────────── */
.archive-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.archive-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.archive-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
}

/* ─── Single post ───────────────────────────────────────────── */
.post-cover {
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

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

.post-header {
  margin-bottom: 2rem;
}

.post-header .post-category {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.post-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.post-subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1rem;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ─── Gear bar ──────────────────────────────────────────────── */
.gear-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  background: #fff;
  margin: 2rem 0;
  font-size: 0.8rem;
}

.gear-bar__item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.gear-bar__label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.gear-bar__value {
  font-family: 'Source Serif 4', Georgia, serif;
}

/* ─── Post content ──────────────────────────────────────────── */
.post-content {
  max-width: 44rem;
  margin: 0 auto;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
}

.post-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 2rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-style: italic;
  color: var(--muted);
}

.post-content img {
  width: 100%;
  margin: 2rem 0;
}

.post-content figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: -1.5rem;
  margin-bottom: 2rem;
}

/* ─── Post navigation ───────────────────────────────────────── */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-nav__item {
  padding: 1rem;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.post-nav__item:hover {
  border-color: var(--accent);
}

.post-nav__item--next {
  text-align: right;
}

.post-nav__label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.post-nav__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  line-height: 1.3;
}

/* ─── Categories overview ───────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
  margin-bottom: 4rem;
}

.category-card {
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.category-card:hover {
  border-color: var(--accent);
}

.category-card__name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.category-card__count {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ─── 404 ───────────────────────────────────────────────────── */
.error-404 {
  text-align: center;
  padding: 6rem 0;
}

.error-404__code {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 6rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-404__message {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--text);
  color: var(--bg);
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .site-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  html { font-size: 16px; }

  .post-title { font-size: 1.75rem; }

  .post-nav {
    grid-template-columns: 1fr;
  }
}
