/* ============================================================
   Larry Griffin — The Hemingway of the Highway
   Shared stylesheet for the static site
   ------------------------------------------------------------
   Type:   Rye (display accent) · Spectral (body/headings)
           Barlow Condensed (nav, eyebrows, captions, buttons)
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Paper / ink */
  --paper:      #f4ecdd;   /* warm cream page background */
  --paper-2:    #ece2cf;   /* slightly deeper alt sections */
  --paper-card: #faf5ea;   /* raised surfaces */
  --ink:        #271f17;   /* warm near-black */
  --ink-soft:   #4d4234;   /* body brown-grey */
  --ink-mute:   #7b6c58;   /* captions, meta */

  /* Accents */
  --rust:       oklch(0.49 0.13 35);   /* brick red — primary accent */
  --rust-deep:  oklch(0.41 0.12 34);
  --rust-soft:  oklch(0.49 0.13 35 / 0.10);
  --gold:       oklch(0.62 0.09 70);   /* muted brass — fine rules */
  --wood:       #241a12;               /* dark walnut footer */
  --wood-2:     #2f2218;

  /* Lines */
  --line:       rgba(39, 31, 23, 0.14);
  --line-soft:  rgba(39, 31, 23, 0.08);

  /* Type families */
  --f-display:  "Rye", "Rockwell", serif;
  --f-serif:    "Spectral", Georgia, "Times New Roman", serif;
  --f-cond:     "Barlow Condensed", "Arial Narrow", sans-serif;

  /* Layout */
  --measure:    44rem;     /* reading column */
  --wide:       72rem;     /* page max width */
  --pad:        clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--f-serif);
  font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem);
  line-height: 1.72;
  color: var(--ink-soft);
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(155, 58, 38, 0.05), transparent 60%),
    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.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { color: var(--ink); line-height: 1.12; font-weight: 600; text-wrap: balance; }

.eyebrow {
  font-family: var(--f-cond);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-mute);
}
.eyebrow--rust { color: var(--rust); }

.display {
  font-family: var(--f-display);
  font-weight: 400;
  color: var(--rust);
  line-height: 1.04;
  letter-spacing: 0.005em;
}

/* Reading column prose */
.prose { max-width: var(--measure); margin-inline: auto; }
.prose > p { margin-bottom: 1.35em; }
.prose > p:first-of-type { margin-top: 0; }
.prose h2 { font-size: 1.9rem; margin: 2.4rem 0 1rem; }
.prose h3 { font-size: 1.4rem; margin: 2rem 0 0.75rem; }
.prose strong { color: var(--ink); }
.prose em { color: var(--ink); }
.prose .lead {
  font-size: 1.3em;
  line-height: 1.55;
  color: var(--ink);
}
.prose blockquote {
  border-left: 3px solid var(--rust);
  padding-left: 1.25rem;
  margin: 1.6rem 0;
  font-style: italic;
  color: var(--ink);
}
.dropcap::first-letter {
  font-family: var(--f-display);
  color: var(--rust);
  float: left;
  font-size: 3.6em;
  line-height: 0.72;
  padding: 0.06em 0.12em 0 0;
}

/* ---------- Layout helpers ---------- */
.wrap { width: min(100% - 2 * var(--pad), var(--wide)); margin-inline: auto; }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section--alt { background: var(--paper-2); border-block: 1px solid var(--line-soft); }
.center { text-align: center; }
.stack-sm > * + * { margin-top: 0.6rem; }

.rule {
  display: flex; align-items: center; gap: 1rem;
  color: var(--rust); justify-content: center;
}
.rule::before, .rule::after {
  content: ""; height: 1px; flex: 1; max-width: 5rem;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.rule__dot { width: 6px; height: 6px; transform: rotate(45deg); background: var(--rust); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 72px;
}
.brand { display: flex; flex-direction: column; line-height: 1; text-decoration: none; }
.brand__name {
  font-family: var(--f-display);
  color: var(--rust);
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}
.brand__sub {
  font-family: var(--f-cond);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.62rem;
  color: var(--ink-mute);
  margin-top: 0.35rem;
}

.nav { display: flex; align-items: center; gap: 0.35rem; }
.nav a, .nav__btn {
  font-family: var(--f-cond);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 4px;
  background: none; border: 0;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav a:hover, .nav__btn:hover { color: var(--rust); }
.nav a[aria-current="page"] { color: var(--rust); }
.nav a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; margin-top: 4px;
  background: var(--rust);
}

/* Dropdown */
.nav__group { position: relative; }
.nav__menu {
  position: absolute; top: 100%; left: 0;
  margin-top: 8px;
  min-width: 240px; padding: 0.4rem;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px -20px rgba(39, 31, 23, 0.5);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.18s;
}
/* invisible hover-bridge so moving from the link to the menu never crosses dead space */
.nav__menu::before {
  content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px;
}
.nav__group:hover .nav__menu,
.nav__group:focus-within .nav__menu {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.nav__menu a { letter-spacing: 0.06em; padding: 0.6rem 0.75rem; }
.nav__menu a:hover { background: var(--rust-soft); }
.nav__caret { font-size: 0.7em; opacity: 0.7; }

/* Button */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--f-cond);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--paper);
  background: var(--rust);
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--rust);
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--rust-deep); }
.btn--ghost {
  background: transparent; color: var(--rust);
}
.btn--ghost:hover { background: var(--rust-soft); }
.btn--lg { padding: 0.85rem 1.6rem; font-size: 1.05rem; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 0.5rem;
}
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); transition: 0.2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(88vh, 780px);
  display: grid; align-items: center;
  color: #f3e8d6;
  overflow: hidden;
  background-color: var(--wood);
  background-image:
    radial-gradient(900px 520px at 72% 30%, rgba(155,58,38,0.30), transparent 62%),
    radial-gradient(700px 700px at 18% 90%, rgba(20,14,9,0.6), transparent 60%),
    linear-gradient(150deg, #34241790 0%, transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}
.hero__img { position: absolute; inset: 0; z-index: -2; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; filter: saturate(0.9) contrast(1.02); }
.hero--has-img::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(20,14,9,0.55) 0%, rgba(20,14,9,0.25) 40%, rgba(20,14,9,0.9) 100%);
}
/* faint oversized wordmark watermark */
.hero__mark {
  position: absolute; right: -2%; bottom: -8%; z-index: -1;
  font-family: var(--f-display); font-size: 32vw; line-height: 1;
  color: rgba(244,236,224,0.035); pointer-events: none; user-select: none;
}
.hero__inner { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero__kicker { color: #e9c8a0; }
.hero__title {
  font-family: var(--f-display);
  color: #f4ece0;
  font-size: clamp(3rem, 11vw, 8.5rem);
  line-height: 0.92;
  margin: 0.3rem 0 0.5rem;
  text-shadow: 0 4px 28px rgba(0,0,0,0.45);
}
.hero__sub {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  color: #f0dcc4;
  margin-bottom: 1.6rem;
}
.hero__cta { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.hero .btn--ghost { color: #f4ece0; border-color: rgba(244,236,224,0.5); }
.hero .btn--ghost:hover { background: rgba(244,236,224,0.12); }

/* ---------- Page header (interior) ---------- */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); text-align: center; }
.page-head__title {
  font-family: var(--f-display);
  color: var(--rust);
  font-size: clamp(2.5rem, 7vw, 5rem);
  margin: 0.4rem 0 0.7rem;
}
.page-head__sub { max-width: 40rem; margin-inline: auto; color: var(--ink-soft); }

/* ---------- Figure / captions ---------- */
figure { margin: 2.2rem auto; }
figure img { border-radius: 4px; box-shadow: 0 26px 50px -28px rgba(39,31,23,0.6); }
figcaption {
  font-family: var(--f-cond);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  color: var(--ink-mute);
  text-align: center;
  margin-top: 0.75rem;
}
figure.bleed { max-width: 56rem; }

/* ---------- Feature cards (home) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; }
.card {
  display: flex; flex-direction: column;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -26px rgba(39,31,23,0.55); border-color: var(--rust); }
.card__media { aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.card__title { font-family: var(--f-display); color: var(--rust); font-size: 1.35rem; }
.card__text { font-size: 0.98rem; color: var(--ink-soft); }
.card__more { font-family: var(--f-cond); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.85rem; color: var(--rust); margin-top: auto; padding-top: 0.6rem; }

/* ---------- Article list ---------- */
.articles { display: grid; gap: 0; max-width: 52rem; margin-inline: auto; }
.article-item {
  display: block; text-decoration: none; color: inherit;
  padding: 1.6rem 0; border-top: 1px solid var(--line);
  transition: padding-left 0.18s ease;
}
.article-item:last-child { border-bottom: 1px solid var(--line); }
.article-item:hover { padding-left: 0.6rem; }
.article-item__source { font-family: var(--f-cond); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: var(--ink-mute); }
.article-item__title { font-family: var(--f-serif); font-size: 1.5rem; color: var(--ink); margin: 0.3rem 0 0.5rem; line-height: 1.2; }
.article-item:hover .article-item__title { color: var(--rust); }
.article-item__blurb { color: var(--ink-soft); font-style: italic; }
.article-item__cta { font-family: var(--f-cond); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; color: var(--rust); margin-top: 0.6rem; display: inline-block; }

/* ---------- Memories ---------- */
.memory-list { max-width: 50rem; margin-inline: auto; display: flex; flex-direction: column; gap: 1.75rem; }
.memories { columns: 2; column-gap: 2.5rem; max-width: 64rem; margin-inline: auto; }
.memory {
  break-inside: avoid;
  display: inline-block; width: 100%;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.6rem 1.7rem 1.4rem;
  margin-bottom: 2.5rem;
}
.memory__label { font-family: var(--f-display); color: var(--rust); font-size: 1.4rem; margin-bottom: 0.8rem; }
.memory p { font-size: 1rem; line-height: 1.66; margin-bottom: 0.9em; }
.memory__by {
  font-family: var(--f-cond); text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.82rem; color: var(--ink-mute);
  margin-top: 1.1rem; padding-top: 0.8rem; border-top: 1px solid var(--line);
}

/* ---------- Photo gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.gallery .photo { aspect-ratio: 3 / 2; }
.gallery--masonry { grid-auto-rows: 10px; }
.photo {
  position: relative; overflow: hidden; border-radius: 6px;
  background: var(--paper-2); border: 1px solid var(--line);
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo figcaption {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(transparent, rgba(20,14,9,0.8));
  color: #f3e8d6; text-align: left;
  padding: 1.4rem 0.9rem 0.7rem; margin: 0;
  opacity: 0; transition: opacity 0.2s ease;
}
.photo:hover figcaption { opacity: 1; }

/* Panoramic showcase (stacked full-width) */
.panoramas { display: flex; flex-direction: column; gap: clamp(1.5rem, 4vw, 3rem); max-width: 68rem; margin-inline: auto; }
.pano { margin: 0; }
.pano img {
  width: 100%; height: auto; display: block; border-radius: 4px;
  box-shadow: 0 30px 60px -34px rgba(39,31,23,0.7);
}
.pano figcaption { margin-top: 0.75rem; }

/* Photography portfolio — masonry wall, preserves each photo's framing */
.portfolio { columns: 4 248px; column-gap: 1rem; }
.pf-item { break-inside: avoid; margin: 0 0 1rem; position: relative; overflow: hidden; border-radius: 4px; }
.pf-item img {
  width: 100%; height: auto; display: block;
  background: var(--paper-2);
  box-shadow: 0 16px 34px -22px rgba(39,31,23,0.6);
  transition: transform 0.4s ease;
}
.pf-item:hover img { transform: scale(1.03); }
@media (max-width: 540px) { .portfolio { columns: 2 140px; column-gap: 0.6rem; } .pf-item { margin-bottom: 0.6rem; } }

/* Memorial feature (Favourite Places) */
.memorial { max-width: 60rem; margin: 0 auto 3.5rem; }
.memorial__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.1rem; }
.memorial__grid figure { margin: 0; height: 100%; }
.memorial__grid img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; box-shadow: 0 26px 50px -30px rgba(39,31,23,0.65); }
.memorial__cap { text-align: center; margin-top: 1rem; font-style: italic; color: var(--ink-soft); }
@media (max-width: 680px) { .memorial__grid { grid-template-columns: 1fr; } }

/* Image placeholder slot */
.slot {
  display: grid; place-content: center; gap: 0.5rem; text-align: center;
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(45deg, var(--paper-2), var(--paper-2) 10px, var(--paper-card) 10px, var(--paper-card) 20px);
  border: 1px dashed var(--ink-mute);
  border-radius: 6px;
  color: var(--ink-mute);
  padding: 1rem;
}
.slot__tag { font-family: var(--f-cond); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem; }
.slot__hint { font-family: var(--f-cond); font-size: 0.78rem; letter-spacing: 0.05em; opacity: 0.8; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-card {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: 12px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.contact-row { display: flex; flex-direction: column; gap: 0.2rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 0; }
.contact-row__k { font-family: var(--f-cond); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem; color: var(--ink-mute); }
.contact-row__v { font-size: 1.1rem; color: var(--ink); }
.contact-row__v a { color: var(--rust); text-decoration: none; }
.contact-row__v a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--wood);
  color: #cdb595;
  background-image:
    radial-gradient(800px 300px at 20% 0%, rgba(155,58,38,0.12), transparent 60%),
    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.7' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}
.site-footer a { color: #e7d4b4; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-top { display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: space-between; padding-block: clamp(2.5rem, 6vw, 4rem); }
.footer-brand__name { font-family: var(--f-display); color: #e9c8a0; font-size: 1.8rem; }
.footer-brand__sub { font-family: var(--f-cond); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.72rem; color: #a99373; margin-top: 0.4rem; }
.footer-brand__quote { font-style: italic; max-width: 26rem; margin-top: 1rem; color: #bda988; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 2.5rem; }
.footer-nav a { font-family: var(--f-cond); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.92rem; padding: 0.2rem 0; }
.footer-bottom {
  border-top: 1px solid rgba(231,212,180,0.16);
  padding-block: 1.4rem;
  display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: space-between;
  font-family: var(--f-cond); letter-spacing: 0.06em; font-size: 0.85rem; color: #a99373;
}

/* ---------- Reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper-card);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--pad) 1.5rem;
    box-shadow: 0 24px 40px -24px rgba(39,31,23,0.4);
    transform: translateY(-120%); transition: transform 0.25s ease;
    max-height: calc(100vh - 72px); overflow-y: auto;
  }
  .nav.is-open { transform: none; }
  .nav a, .nav__btn { padding: 0.85rem 0.5rem; font-size: 1.05rem; border-bottom: 1px solid var(--line-soft); }
  .nav a[aria-current="page"]::after { display: none; }
  .nav__group .nav__menu {
    position: static; display: flex; box-shadow: none; border: 0;
    background: transparent; padding: 0 0 0 1rem; min-width: 0;
    margin-top: 0; opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  }
  .nav__menu a { border-bottom: 1px solid var(--line-soft); }
  .nav .btn { margin-top: 0.8rem; justify-content: center; }
  .memories { columns: 1; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .footer-nav { grid-template-columns: 1fr; }
}
