/* Modern & Clean design for donttrashstalbert.com */

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

:root {
  --color-text: #1a1a2e;
  --color-text-muted: #64748b;
  --color-bg: #ffffff;
  --color-bg-subtle: #f8fafc;
  --color-border: #e2e8f0;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-success: #059669;
  --color-warning: #d97706;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --max-width: 1000px;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -0.01em;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(32px, 4vw, 44px); margin: 0 0 8px; }
h2 { font-size: clamp(24px, 3vw, 30px); margin: 40px 0 16px; }
h3 { font-size: 20px; margin: 28px 0 12px; }

p { margin: 0 0 16px; }

a {
  color: var(--color-accent);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}

ul { padding-left: 24px; margin: 0 0 16px; }
li { margin-bottom: 6px; }

/* Layout */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* Hero */
.hero {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
  pointer-events: none;
}
.hero img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

@media (max-width: 640px) {
  .hero, .hero img { height: 320px; }
}

/* Home content */
.home-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
}

.home-content:first-of-type {
  padding-top: 0;
  margin-top: -60px;
  position: relative;
  z-index: 10;
}

/* Header row */
.header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  background: var(--color-bg);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.header-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: contain;
}

.title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.1;
}

.tagline {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: 16px;
  font-weight: 400;
}

.lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0 auto 24px;
  padding: 0 48px;
}

/* Buttons */
.take-action-wrap {
  margin: 32px 0;
  text-align: center;
}

.take-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  border-radius: var(--radius-md);
  background: var(--color-success);
  color: #ffffff;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
}
.take-action-button:hover {
  background: #047857;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.primary-button {
  display: block;
  width: 100%;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.primary-button:hover {
  background: var(--color-accent-hover);
  text-decoration: none;
}

.flickr-link-wrap {
  text-align: center;
  margin-top: 32px;
}

.flickr-link-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  background: var(--color-text);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.flickr-link-button:hover {
  background: #0f172a;
  transform: translateY(-1px);
  text-decoration: none;
}

/* Photo gallery */
.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.photo-gallery-item {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all 0.25s ease;
}
.photo-gallery-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.photo-gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.photo-gallery-caption {
  padding: 16px;
}

.photo-location {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 2px;
}

.photo-date {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
}

@media (max-width: 900px) {
  .photo-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .photo-gallery-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* Content boxes */
.highlight,
.issue-box,
.cta-box {
  padding: 28px;
  border-radius: var(--radius-lg);
  margin: 12px 0;
}

.highlight {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border: 1px solid #dbeafe;
}

.highlight h2 {
  margin: 0 0 20px;
  color: var(--color-text);
}

.issue-box {
  background: linear-gradient(135deg, #fffbeb 0%, #fefce8 100%);
  border: 1px solid #fde68a;
}

.issue-box h2 {
  color: var(--color-warning);
}

.cta-box {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid #bbf7d0;
}

.cta-box h2 {
  color: var(--color-success);
}

.cta-box.purple {
  background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
  border: 1px solid #e9d5ff;
}

.cta-box.purple h2 {
  color: #7c3aed;
}

/* Stories list */
.stories {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stories li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.stories li:last-child { border-bottom: none; }

.stories li span {
  font-size: 20px;
  line-height: 1.4;
  flex-shrink: 0;
}

.stories li a {
  font-weight: 500;
}

/* Issue box lists */
.issue-box ul {
  margin-bottom: 8px;
}
.issue-box li {
  margin-bottom: 10px;
  line-height: 1.6;
}
.issue-box ul ul {
  margin-top: 16px;
  padding-left: 20px;
}

/* Letter section */
.mailto-fields label {
  display: block;
  margin-bottom: 16px;
}

.mailto-fields label > div {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.mailto-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  transition: all 0.15s ease;
}
.mailto-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.copy-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.copy-icon-btn:hover {
  background: var(--color-bg-subtle);
  color: var(--color-text);
  border-color: var(--color-text-muted);
}
.copy-icon-btn.copied {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.letter-preview {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  font-size: 15px;
  line-height: 1.7;
  max-height: 320px;
  overflow-y: auto;
}

.letter-preview p {
  margin: 0 0 16px;
}
.letter-preview p:last-child {
  margin-bottom: 0;
}

.button-row {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.button-row p {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
  text-align: center;
}

/* Navigation (if used) */
nav.top-menu {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav.top-menu .nav-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
}

nav.top-menu .nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #f9fafb;
  font-weight: 600;
  font-size: 15px;
}

nav.top-menu .nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

nav.top-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: flex-end;
}

nav.top-menu a {
  display: block;
  padding: 16px 16px;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}
nav.top-menu a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 48px 24px;
  margin-top: 60px;
  text-align: center;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-footer p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

/* Breadcrumbs */
.breadcrumb {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}
.breadcrumb a {
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}

/* Notes/callouts */
.note {
  background: var(--color-bg-subtle);
  border-left: 3px solid var(--color-accent);
  padding: 16px 20px;
  font-size: 15px;
  margin: 20px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Galleries (neighbourhood pages) */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-subtle);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-caption {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 8px;
}

@media (max-width: 640px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

/* Two column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; }
}

/* Photo grid (home) */
.photo-grid-section {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0 24px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.photo-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-subtle);
  text-decoration: none;
  min-height: 160px;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.photo-card:hover img {
  transform: scale(1.05);
}

.photo-card-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Action block */
.action-block {
  margin-top: 32px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
}

/* Navigation links */
.nav-links {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 15px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  body { font-size: 16px; }

  .home-content { padding: 32px 16px; }
  .home-content:first-of-type { margin-top: -40px; }

  .header-row {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    gap: 16px;
  }

  .header-logo { width: 64px; height: 64px; }
  .title { font-size: 28px; }
  .tagline { font-size: 15px; }
  .lede { font-size: 18px; padding: 0 16px; }

  .highlight, .issue-box, .cta-box { padding: 20px; }

  .take-action-button { width: 100%; padding: 16px 24px; }

  .site-footer { padding: 40px 16px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
