/* Dust to Dust Ranch — splash. Weathered editorial. The Hard-Bitten Sage. */
:root {
  --ink: #17130f;
  --ink-2: #211b15;
  --paper: #e9e1d3;
  --paper-dim: #b6ab97;
  --rust: #b5573d;
  --ochre: #c89a52;
  --sage: #6f7d5c;
  --line: rgba(233, 225, 211, 0.16);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: "Archivo", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Film grain over everything */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- HERO ---------- */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; }
.hero-img {
  position: absolute; inset: -4% 0 0 0; background-size: cover; background-position: center 42%;
  filter: saturate(0.92) contrast(1.04) brightness(0.82);
  transform: scale(1.06); animation: slowzoom 22s ease-out forwards;
}
@keyframes slowzoom { to { transform: scale(1); } }
.hero-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 18%, transparent 30%, rgba(23,19,15,0.55) 100%),
    linear-gradient(180deg, rgba(23,19,15,0.55) 0%, transparent 28%, transparent 52%, rgba(23,19,15,0.92) 100%);
}
.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px clamp(22px, 5vw, 64px);
  font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--paper-dim);
}
.mark {
  border: 1px solid var(--line); border-radius: 2px; padding: 5px 9px 4px;
  letter-spacing: 0.18em; color: var(--paper);
}
.hero-content {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: clamp(72px, 13vh, 140px);
  padding: 0 clamp(22px, 5vw, 64px); text-align: center;
}
.eyebrow {
  font-size: 12px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--ochre);
  margin-bottom: 22px;
}
h1 {
  font-family: "Fraunces", serif; font-weight: 340; line-height: 0.86;
  letter-spacing: -0.015em; text-wrap: balance;
}
h1 .l1 { display: inline-block; font-size: clamp(58px, 13vw, 188px); }
h1 .l2 {
  display: inline-block; font-style: italic; font-weight: 400; color: var(--ochre);
  font-size: clamp(34px, 7vw, 96px); margin: 0 0.12em; transform: translateY(-0.18em);
}
h1 .ranch {
  display: block; font-family: "Archivo", sans-serif; font-weight: 500;
  font-size: clamp(15px, 2.4vw, 26px); letter-spacing: 0.62em; text-transform: uppercase;
  color: var(--paper); margin-top: 18px; padding-left: 0.62em;
}
.bio {
  font-family: "Fraunces", serif; font-style: italic; font-weight: 400;
  font-size: clamp(18px, 3vw, 30px); color: var(--paper); margin-top: 30px;
}
.sub { color: var(--paper-dim); font-size: clamp(13px, 1.7vw, 16px); margin-top: 10px; letter-spacing: 0.01em; }

/* Blends the hero photo smoothly into the dark section below — no hard seam. */
.hero-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 38%; z-index: 2;
  background: linear-gradient(to bottom, transparent 0%, rgba(23,19,15,0.4) 45%, var(--ink) 100%);
  pointer-events: none;
}

/* ---------- STATEMENT ---------- */
.statement {
  max-width: 880px; margin: 0 auto; padding: clamp(80px, 14vh, 160px) clamp(24px, 6vw, 40px) clamp(60px, 9vh, 120px);
  opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1s ease;
}
.statement.in { opacity: 1; transform: none; }
.kicker {
  font-size: 12px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--rust);
  margin-bottom: 26px;
}
.lede {
  font-family: "Fraunces", serif; font-weight: 340; font-size: clamp(21px, 3.1vw, 33px);
  line-height: 1.42; letter-spacing: -0.01em; text-wrap: pretty;
}
.lede.dim { color: var(--paper-dim); margin-top: 26px; font-size: clamp(18px, 2.4vw, 25px); }

/* ---------- GALLERY ---------- */
/* Equal tiles, perfectly gap-free at any width (no spanning = no holes). */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  padding: 0 10px 10px;
}
.g {
  position: relative; overflow: hidden; background: var(--ink-2); border-radius: 2px;
  aspect-ratio: 4 / 5;
  opacity: 0; transform: translateY(28px) scale(0.99);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.g.in { opacity: 1; transform: none; }
.g img { width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(0.96) contrast(1.02); transition: transform 1.2s ease, filter 1.2s ease; }
.g:hover img { transform: scale(1.04); filter: saturate(1.05) contrast(1.04); }
.g::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 70px rgba(23,19,15,0.45);
}

/* ---------- FOOTER ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 10px; padding: clamp(70px, 11vh, 130px) 24px clamp(50px, 8vh, 90px); text-align: center; }
.foot-mark { font-family: "Fraunces", serif; font-size: clamp(26px, 5vw, 44px); font-weight: 340; }
.foot-line { color: var(--paper-dim); margin-top: 12px; font-size: 14px; }
.links { display: flex; gap: 30px; justify-content: center; margin: 34px 0 40px; flex-wrap: wrap; }
.links a {
  color: var(--paper); text-decoration: none; font-size: 13px; letter-spacing: 0.22em;
  text-transform: uppercase; padding-bottom: 5px; border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.links a:hover { color: var(--ochre); border-color: var(--ochre); }
.copyright { color: #6f6655; font-size: 11px; letter-spacing: 0.1em; }

/* ---------- reveal on load ---------- */
.reveal { opacity: 0; transform: translateY(18px); animation: rise 1.1s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* nav links in the top bar */
.navlinks { display: flex; gap: 26px; }
.navlinks a {
  color: var(--paper-dim); text-decoration: none; font-size: 12px;
  letter-spacing: 0.28em; text-transform: uppercase; transition: color 0.3s;
}
.navlinks a:hover { color: var(--ochre); }

@media (max-width: 720px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  h1 .ranch { letter-spacing: 0.4em; padding-left: 0.4em; }
  .navlinks { gap: 18px; }
  .navlinks a { font-size: 11px; letter-spacing: 0.18em; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-img { animation: none; transform: scale(1); }
  .reveal, .statement, .g { animation: none; opacity: 1; transform: none; transition: none; }
}

/* ---------- content pages (About / Journal) ---------- */
.pagebar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px clamp(22px, 5vw, 64px); border-bottom: 1px solid var(--line);
}
.pagebar .mark { text-decoration: none; }
.prose { max-width: 760px; margin: 0 auto; padding: clamp(50px, 9vh, 96px) clamp(24px, 6vw, 40px) 40px; }
.article h1 {
  font-family: "Fraunces", serif; font-weight: 360; line-height: 1.05;
  font-size: clamp(34px, 6vw, 60px); letter-spacing: -0.02em; margin: 6px 0 28px;
}
.article h2 {
  font-family: "Fraunces", serif; font-weight: 400; font-size: clamp(22px, 3.4vw, 30px);
  margin: 40px 0 14px; color: var(--paper);
}
.article p { font-size: clamp(17px, 1.9vw, 19px); line-height: 1.7; margin: 0 0 20px; color: #ddd3c2; }
.article p:first-of-type { color: var(--paper); }
.article a { color: var(--ochre); text-decoration: none; border-bottom: 1px solid rgba(200,154,82,0.4); }
.article a:hover { border-color: var(--ochre); }
.post-hero {
  margin: 0 0 34px; border-radius: 3px; overflow: hidden; aspect-ratio: 16 / 9;
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}
.post-hero img { width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(0.97) contrast(1.02); }
.post-date { color: var(--rust); font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase; margin-bottom: 0; }
.kicker { color: var(--rust); font-size: 12px; letter-spacing: 0.4em; text-transform: uppercase; margin-bottom: 16px; }
.lede-sm { color: var(--paper-dim); font-size: 17px; margin-bottom: 36px; }
.back { margin-top: 44px; }

.post-list { display: flex; flex-direction: column; gap: 2px; margin-top: 20px; }
.post-link {
  display: grid; grid-template-columns: 120px 1fr; gap: 4px 24px; align-items: baseline;
  padding: 22px 0; border-top: 1px solid var(--line); text-decoration: none; border-bottom: none;
}
.post-link:last-child { border-bottom: 1px solid var(--line); }
.post-link .post-date { grid-row: 1; align-self: baseline; }
.post-link .post-title {
  grid-column: 2; font-family: "Fraunces", serif; font-size: clamp(22px, 3vw, 28px);
  color: var(--paper); transition: color 0.3s;
}
.post-link .post-sum { grid-column: 2; color: var(--paper-dim); font-size: 15px; margin-top: 4px; }
.post-link:hover .post-title { color: var(--ochre); }
@media (max-width: 560px) {
  .post-link { grid-template-columns: 1fr; gap: 4px; }
  .post-link .post-title, .post-link .post-sum { grid-column: 1; }
}
