/* Merriweather (serif) – local woff2 */
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/merriweather-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/merriweather-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/merriweather-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/merriweather-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/merriweather-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/merriweather-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Merriweather Sans – local woff2 */
@font-face {
  font-family: 'Merriweather Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/merriweather-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Merriweather Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/merriweather-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Merriweather Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/merriweather-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Merriweather Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/merriweather-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Merriweather Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/merriweather-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Merriweather Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/merriweather-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --hw-bg-tan: #F5F0E9;
  --hw-olive: #63715C;
  --hw-sage-brown: #694A40;
  --hw-text-main: #2b2620;
  --hw-text-muted: #6b6258;
  --hw-border-subtle: #ddd;

  --hw-font-sans: "Merriweather Sans", system-ui, Arial, sans-serif;
  --hw-font-serif: "Merriweather", Georgia, serif;

  --hw-nav-size: 14px;
  --hw-header-size: 24px;
  --hw-body-size: 16px;
  --hw-body-bold-size: 18px;
  --hw-tag-size: 14px;
  --hw-label-size: 12px;
  --hw-button-size: 10px;

  --hw-max-width: 1360px;
  --hw-page-gutter: 24px;

  --hw-radius-sm: 4px;
  --hw-radius-md: 6px;
  --hw-shadow-soft: 0 6px 18px rgba(0,0,0,0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--hw-font-sans);
  font-size: var(--hw-body-size);
  line-height: 1.5;
  background: var(--hw-bg-tan);
  color: var(--hw-text-main);
}

.notice {
  background: #fef3cd;
  padding: 0.75rem;
  border-radius: 4px;
}

.meta {
  color: #666;
  font-size: 0.9rem;
}

.hw-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--hw-bg-tan);
}

.hw-page-main {
  flex: 1;
  background: #fff;
}

.hw-header {
  width: 100%;
  background: #f9f4ee;
  border-bottom: 1px solid var(--hw-border-subtle);
}

.hw-header-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px var(--hw-page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-sizing: border-box;
}

/* Logo link: whole brand clicks through to home */
.hw-header-brand-link {
  text-decoration: none;
  color: inherit;
}
.hw-header-brand-link:hover,
.hw-header-brand-link:focus-visible {
  color: var(--hw-olive);
}

/* Logo: "Frank & Lottie Hatch" in serif per comp */
.hw-header-brand {
  font-family: var(--hw-font-serif);
  font-size: var(--hw-header-size);
  font-weight: 400;
  line-height: 1.1;
  color: var(--hw-olive);
}

/* "FAMILY ARCHIVE" line: sans per comp */
.hw-header-subtitle {
  font-family: var(--hw-font-sans);
  display: block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hw-text-muted);
}

.hw-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: var(--hw-nav-size);
}

.hw-nav a {
  text-decoration: none;
  color: var(--hw-text-main);
  position: relative;
}

.hw-nav a:hover,
.hw-nav a:focus-visible {
  color: var(--hw-olive);
}

.hw-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--hw-olive);
  transition: width 0.18s ease-out;
}

.hw-nav a:hover::after,
.hw-nav a:focus-visible::after {
  width: 100%;
}

.hw-nav-search {
  font-size: 18px;
  cursor: pointer;
}

.hw-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .hw-header-inner {
    align-items: flex-start;
  }

  .hw-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 12px;
  }

  .hw-nav.is-open {
    display: flex;
  }

  .hw-nav-toggle {
    display: block;
  }
}

.hw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: var(--hw-radius-sm);
  border: none;
  cursor: pointer;
  font-size: var(--hw-button-size);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: var(--hw-font-sans);
  transition: background 0.18s ease-out, transform 0.08s ease-out;
}

.hw-button-primary {
  background: var(--hw-olive);
  color: #fff;
}

.hw-button-accent {
  background: var(--hw-sage-brown);
  color: #fff;
}

.hw-button-outline {
  background: transparent;
  color: var(--hw-olive);
  border: 1px solid var(--hw-olive);
}

.hw-button-danger {
  background: transparent;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.hw-button-danger:hover {
  background: #f8d7da;
}

.hw-button:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
}

.hw-hero {
  background: #fff;
  color: var(--hw-text-main);
}

.hw-hero-inner {
  max-width: var(--hw-max-width);
  margin: 0 auto;
  padding: 24px var(--hw-page-gutter) 16px;
  display: grid;
  grid-template-columns: minmax(0, 3.2fr) minmax(0, 1.3fr);
  gap: 20px;
  align-items: stretch;
}

.hw-hero-photo {
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.hw-hero-photo img {
  width: 100%;
  height: 100%;
  max-height: 560px;
  min-height: 320px;
  object-fit: cover;
  display: block;
}

/* Hero overlay: serif (Merriweather), italic per comp – Sage Brown */
.hw-hero-title {
  font-family: var(--hw-font-serif);
  font-style: italic;
  position: absolute;
  left: 32px;
  top: 32px;
  font-size: 40px;
  line-height: 1.1;
  color: var(--hw-sage-brown);
}

.hw-hero-title span {
  display: block;
}

.hw-sidebar-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  height: 100%;
}

.hw-sidebar-card {
  position: relative;
  border-radius: var(--hw-radius-md);
  overflow: hidden;
  box-shadow: var(--hw-shadow-soft);
  cursor: pointer;
  flex: 1 1 0;
  min-height: 80px;
}

.hw-sidebar-card img {
  width: 100%;
  height: 100%;
  min-height: 80px;
  object-fit: cover;
  display: block;
}

.hw-sidebar-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.65));
}

.hw-sidebar-card-title {
  position: absolute;
  left: 16px;
  bottom: 12px;
  z-index: 1;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.hw-intro {
  background: var(--hw-bg-tan);
  border-top: 1px solid #ebdfd2;
  border-bottom: 1px solid #ebdfd2;
}

.hw-intro-inner {
  max-width: var(--hw-max-width);
  margin: 0 auto;
  padding: 24px var(--hw-page-gutter) 32px;
}

/* Section heading below hero: serif per comp */
.hw-intro-title {
  font-family: var(--hw-font-serif);
  font-size: var(--hw-header-size);
  margin: 0 0 8px;
}

.hw-intro-body {
  color: var(--hw-text-muted);
  column-count: 2;
  column-gap: 40px;
}

.hw-category-grid {
  max-width: var(--hw-max-width);
  margin: 24px auto 40px;
  padding: 0 var(--hw-page-gutter);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.hw-category-card {
  position: relative;
  border-radius: var(--hw-radius-md);
  overflow: hidden;
  box-shadow: var(--hw-shadow-soft);
  cursor: pointer;
}

.hw-category-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease-out, filter 0.18s ease-out;
}

.hw-category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.05));
}

.hw-category-card-title {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 1;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.hw-category-card:hover img {
  filter: brightness(0.85);
  transform: scale(1.02);
}

.hw-gallery-header {
  max-width: var(--hw-max-width);
  margin: 24px auto 8px;
  padding: 0 var(--hw-page-gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.hw-gallery-header h1 {
  font-family: var(--hw-font-serif);
  font-size: 24px;
  font-weight: 400;
  margin: 0;
}

.hw-gallery-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hw-photo-masonry {
  max-width: var(--hw-max-width);
  margin: 8px auto 32px;
  padding: 0 var(--hw-page-gutter);
  column-gap: 16px;
  column-fill: balance;
}

.hw-photo-card {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--hw-radius-md);
  box-shadow: var(--hw-shadow-soft);
  background: #fff;
  overflow: hidden;
}

.hw-photo-card img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.hw-photo-card-body {
  padding: 8px 10px 10px;
}

.hw-photo-card-caption {
  font-size: var(--hw-body-size);
  margin-bottom: 2px;
}

.hw-photo-card-meta {
  font-size: 13px;
  color: var(--hw-text-muted);
}

@media (min-width: 1024px) {
  .hw-photo-masonry { column-count: 4; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .hw-photo-masonry { column-count: 3; }
}
@media (min-width: 480px) and (max-width: 767px) {
  .hw-photo-masonry { column-count: 2; }
}
@media (max-width: 479px) {
  .hw-photo-masonry { column-count: 1; }
}

.hw-photo-detail {
  max-width: var(--hw-max-width);
  margin: 24px auto 40px;
  padding: 0 var(--hw-page-gutter);
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
  gap: 32px;
}

.hw-photo-detail-image {
  background: #000;
  border-radius: var(--hw-radius-md);
  overflow: hidden;
}

.hw-photo-detail-image img {
  width: 100%;
  display: block;
  object-fit: contain;
  max-height: 640px;
}

.hw-photo-detail-meta {
  background: #fff;
  border-radius: var(--hw-radius-md);
  box-shadow: var(--hw-shadow-soft);
  padding: 20px 18px 18px;
}

.hw-photo-detail-meta h2 {
  margin-top: 0;
  font-size: 20px;
}

.hw-meta-label {
  font-size: var(--hw-label-size);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--hw-text-muted);
  margin-top: 14px;
  margin-bottom: 4px;
}

.hw-meta-value {
  font-size: var(--hw-body-size);
}

.hw-meta-description {
  white-space: pre-wrap;
}

.hw-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hw-tag-pill {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: #ebe2d8;
  font-size: var(--hw-tag-size);
}

.hw-tag-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hw-footer {
  border-top: 1px solid var(--hw-border-subtle);
  background: var(--hw-bg-tan);
}

.hw-footer-inner {
  max-width: var(--hw-max-width);
  margin: 0 auto;
  padding: 12px var(--hw-page-gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.hw-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.hw-footer-links a {
  text-decoration: none;
  color: inherit;
}

@media (max-width: 1024px) {
  .hw-hero-inner {
    grid-template-columns: minmax(0, 3.1fr) minmax(0, 1.4fr);
  }

  .hw-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .hw-hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hw-hero-photo img {
    max-height: none;
  }

  .hw-sidebar-cards {
    order: 2;
    height: auto;
  }

  .hw-sidebar-card {
    flex: none;
  }

  .hw-sidebar-card img {
    height: 130px;
    min-height: 0;
  }

  .hw-intro-body {
    column-count: 1;
  }

  .hw-category-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hw-photo-detail {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* On wide screens (1200px+), expand homepage to use full width – hero, intro, and category grid */
@media (min-width: 1200px) {
  .hw-page-main {
    width: 100%;
  }

  .hw-hero,
  .hw-intro,
  .hw-page-main section[aria-label="Featured categories"] {
    width: 100%;
  }

  .hw-hero-inner,
  .hw-intro-inner,
  .hw-category-grid {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 40px;
    padding-right: 40px;
    box-sizing: border-box;
  }

  /* Let hero image grow taller on wide screens */
  .hw-hero-photo img {
    max-height: 640px;
  }
}

/* At 1400px+, keep 4 columns but larger category card images */
@media (min-width: 1400px) {
  .hw-category-grid {
    gap: 20px;
  }

  .hw-category-card img {
    height: 200px;
  }
}

/* At 1600px+, even larger hero and category images */
@media (min-width: 1600px) {
  .hw-hero-photo img {
    max-height: 720px;
  }

  .hw-category-grid {
    gap: 24px;
  }

  .hw-category-card img {
    height: 220px;
  }
}

/* Admin area – reuse site typography and card feel */
.hw-admin-body {
  background: var(--hw-bg-tan);
}

.hw-admin-main {
  max-width: var(--hw-max-width);
  margin: 32px auto 40px;
  padding: 24px var(--hw-page-gutter);
  background: #fff;
  border-radius: var(--hw-radius-md);
  box-shadow: var(--hw-shadow-soft);
}

.hw-admin-main h1 {
  margin-top: 0;
}

.hw-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.hw-admin-table th,
.hw-admin-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #e0d4c6;
  text-align: left;
}

.hw-admin-table th {
  background: #f3ebe0;
}

.hw-admin-table tr:nth-child(even) td {
  background: #fbf7f1;
}


