/* Notes From A Changing Yard — editorial field journal */

:root {
  --bg: #f7f5ef;
  --text: #252525;
  --muted: #6b675e;
  --accent: #788d6b;
  --accent-dark: #44533d;
  --border: rgba(40, 40, 40, 0.12);
  --panel: rgba(255, 255, 255, 0.73);
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: Arial, Helvetica, sans-serif;
  --measure: 760px;
  --header-h: 4.5rem;
  --ease: 0.28s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.8;
  background:
    linear-gradient(rgba(247, 245, 239, 0.84), rgba(247, 245, 239, 0.84)),
    url("../images/background_roundrock_yard.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("../images/background_paper_grain.jpg");
  background-size: 500px 500px;
  opacity: 0.035;
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(247, 245, 239, 0.84), rgba(247, 245, 239, 0.84)),
    url("../images/background_roundrock_yard.jpg") center center / cover no-repeat;
  pointer-events: none;
  display: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  background: var(--accent-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.skip-link:focus {
  top: 1rem;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent-dark);
  z-index: 80;
  transform-origin: left;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 239, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.logo-mark {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.logo-sub {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 22rem;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
  border-radius: 2px;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.15rem;
  height: 1.5px;
  background: var(--text);
  margin: 0 auto;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
}

.site-nav a {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--accent-dark);
  color: var(--accent-dark);
}

/* Surfaces */

.editorial-panel {
  background: var(--panel);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: 0 18px 50px rgba(20, 20, 20, 0.07);
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.narrow {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

.section {
  padding: 5.5rem 0;
}

.section + .section {
  padding-top: 0;
}

.field-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0 0 1rem;
}

.kicker {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
h3 {
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(3rem, 7vw, 6.2rem);
  margin: 0 0 1.5rem;
}

h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.8rem);
  margin: 0 0 1.25rem;
}

h3 {
  font-size: 1.35rem;
  margin: 2.2rem 0 0.7rem;
}

p {
  margin: 0 0 1.25rem;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.75;
  max-width: 40rem;
}

.italic-lede {
  font-style: italic;
  color: #3a3a3a;
  font-size: 1.2rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

hr.rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Buttons / links as editorial actions */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  align-items: center;
  margin-top: 2rem;
}

.btn-primary {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent-dark);
  padding: 0.9rem 1.4rem;
  border: 1px solid var(--accent-dark);
}

.btn-primary:hover {
  background: #33402e;
  color: #fff;
}

.btn-text {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

/* Hero */

.hero {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: end;
  padding: 4rem 0 5rem;
}

.hero-copy {
  padding: 2.5rem 2.4rem 2.7rem;
  max-width: 46rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  line-height: 1.05;
  max-width: 14ch;
}

.hero-aside {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 2rem;
}

.margin-note {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  line-height: 1.6;
  max-width: 16rem;
  margin-left: auto;
  border-left: 1px solid var(--accent);
  padding-left: 1.1rem;
}

/* Varied homepage sections */

.offset-essay {
  display: grid;
  grid-template-columns: minmax(0, 0.32fr) minmax(0, 0.68fr);
  gap: 2rem 3rem;
  align-items: start;
}

.offset-essay .section-meta {
  position: sticky;
  top: 6.5rem;
  padding-top: 0.4rem;
}

.entry-num {
  font-style: italic;
  font-size: 2.4rem;
  color: var(--accent);
  line-height: 1;
  display: block;
  margin-bottom: 0.8rem;
}

.meta-line {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.split-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.split-block .split-text {
  padding: 3.2rem 3rem;
}

.split-block .split-quote {
  display: flex;
  align-items: center;
  padding: 3rem;
  background: rgba(68, 83, 61, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.pull-quote {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.02em;
}

.pull-quote cite {
  display: block;
  margin-top: 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-style: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-essay {
  padding: 3.4rem 8% 3.6rem;
  max-width: 1080px;
  margin: 0 auto;
}

.panel-essay .essay-inner {
  max-width: 760px;
}

.hang-quote {
  margin: 2.4rem 0 2.4rem -1.5rem;
  padding: 0 0 0 1.4rem;
  border-left: 2px solid var(--accent);
  font-size: 1.45rem;
  line-height: 1.45;
  max-width: 36rem;
}

.wide-note {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.wide-note .note-index {
  padding: 2rem 0 0;
}

.wide-note .note-body {
  padding: 2.5rem 2.6rem;
}

/* Featured entries */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.entry-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  padding: 1.6rem 1.5rem 1.5rem;
  min-height: 100%;
  transition: transform var(--ease), box-shadow var(--ease);
}

.entry-card:hover {
  transform: translateY(-4px);
  color: inherit;
}

.entry-card .kicker {
  margin-bottom: 0.7rem;
}

.entry-card h3 {
  margin: 0 0 0.7rem;
  font-size: 1.45rem;
}

.entry-card p {
  color: #3d3d3d;
  flex: 1;
  font-size: 1.02rem;
}

.card-meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.read-link {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-top: 1rem;
}

/* Journal dashboard */

.page-hero {
  padding: 4.5rem 0 2.5rem;
}

.page-hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
}

.season-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 2rem 0 3rem;
}

.season-chip {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent-dark);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.5);
  padding: 0.55rem 0.9rem;
}

.season-chip:hover,
.season-chip:focus-visible {
  background: rgba(255, 255, 255, 0.85);
}

.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
  padding-bottom: 5rem;
}

.journal-grid .entry-card:first-child {
  grid-column: span 2;
  min-height: 18rem;
}

/* Article */

.breadcrumb {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 1.6rem;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: #b0aba1;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.article-header {
  padding: 3.5rem 0 1rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.article-body {
  padding: 0 0 3rem;
}

.article-body h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  margin: 2.6rem 0 0.9rem;
}

.related {
  padding: 1rem 0 4rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0 4rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
}

.pager a {
  text-decoration: none;
  max-width: 18rem;
}

.pager span {
  display: block;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

/* About / contact / privacy */

.prose {
  padding-bottom: 4.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  padding-bottom: 5rem;
}

.contact-card,
.form-card {
  padding: 2rem 1.8rem;
}

.contact-card address {
  font-style: normal;
  line-height: 1.7;
}

label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}

input,
textarea,
select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  margin-bottom: 1.1rem;
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

button[type="submit"] {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--accent-dark);
  color: #fff;
  border: 0;
  padding: 0.9rem 1.4rem;
  cursor: pointer;
}

button[type="submit"]:hover {
  background: #33402e;
}

.form-status {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 1rem;
}

.privacy h2 {
  font-size: 1.55rem;
  margin-top: 2.4rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(247, 245, 239, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2.2rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.site-footer h2 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.site-footer p,
.site-footer a,
.site-footer li {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--muted);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.4rem;
}

.site-footer a {
  text-decoration: none;
  color: var(--text);
}

.site-footer a:hover {
  color: var(--accent-dark);
}

.copyright {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
  margin-top: 0.5rem;
}

/* Reveals */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s ease forwards;
}

.reveal-delay-1 { animation-delay: 0.12s; }
.reveal-delay-2 { animation-delay: 0.24s; }
.reveal-delay-3 { animation-delay: 0.36s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Responsive */

@media (max-width: 1024px) {
  .hero,
  .offset-essay,
  .split-block,
  .wide-note,
  .contact-grid,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 2.5rem;
  }

  .journal-grid,
  .featured-grid,
  .related-grid {
    grid-template-columns: 1fr 1fr;
  }

  .journal-grid .entry-card:first-child {
    grid-column: span 2;
  }

  .logo-sub {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
    background-image: none;
    background-color: var(--bg);
  }

  body::after {
    display: block;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: rgba(247, 245, 239, 0.96);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1.2rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.85rem 0;
    font-size: 0.9rem;
  }

  .hero,
  .offset-essay,
  .split-block,
  .wide-note,
  .contact-grid,
  .footer-inner,
  .featured-grid,
  .journal-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .journal-grid .entry-card:first-child {
    grid-column: auto;
  }

  .hero-copy,
  .split-block .split-text,
  .split-block .split-quote,
  .panel-essay,
  .wide-note .note-body {
    padding: 1.6rem 1.25rem;
  }

  h1,
  .hero h1,
  .page-hero h1 {
    font-size: clamp(2.1rem, 11vw, 3.4rem);
  }

  .hang-quote {
    margin-left: 0;
  }

  .section {
    padding: 3.2rem 0;
  }

  .logo-sub {
    display: none;
  }

  body {
    font-size: 1.0625rem;
  }

  .pager {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .entry-card {
    transition: none;
  }
}
