/* Out of the Color — Ted Mahle memorial site
   Modernized responsive stylesheet, 2026. Replaces the 2008 table layout styling. */

:root {
  --ink: #2b2622;
  --muted: #6f655c;
  --line: #e4ddd3;
  --bg: #faf7f2;
  --panel: #ffffff;
  --accent: #b06a3b;
  --accent-dark: #8a4f29;
  --maxw: 1040px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 18px;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Header / nav ---- */
.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 6px;
}
.brand {
  font-family: Georgia, serif;
  font-size: 1.7rem;
  letter-spacing: .5px;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}
.brand small {
  display: block;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  margin-top: 4px;
}

.site-nav {
  width: 100%;
  border-top: 1px solid var(--line);
  margin-top: 14px;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
}
.site-nav a {
  display: inline-block;
  padding: 12px 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---- Main ---- */
main { padding: 36px 0 10px; }

h1.page-title {
  font-weight: normal;
  font-size: 1.9rem;
  margin: 0 0 6px;
}
.page-title + .subtitle {
  margin: 0 0 28px;
  color: var(--muted);
  font-style: italic;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px 30px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 760px) {
  .two-col { grid-template-columns: 2fr 1fr; }
}
.aside img { border-radius: 4px; border: 1px solid var(--line); }
.aside figcaption { font-size: .8rem; color: var(--muted); margin-top: 8px; font-family: Arial, sans-serif; }

/* ---- Slideshow ---- */
.slideshow {
  position: relative;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 542 / 452;
}
.slideshow .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}
.slideshow .slide.is-active { opacity: 1; }
.slideshow .slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ss-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.4);
  color: #fff;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  width: 44px; height: 56px;
  cursor: pointer;
  transition: background .2s;
}
.ss-btn:hover { background: rgba(0,0,0,.7); }
.ss-prev { left: 0; border-radius: 0 4px 4px 0; }
.ss-next { right: 0; border-radius: 4px 0 0 4px; }
.ss-dots {
  position: absolute;
  bottom: 12px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 10px;
}
.ss-dots button {
  width: 11px; height: 11px; padding: 0;
  border-radius: 50%;
  border: 1px solid #fff;
  background: rgba(255,255,255,.35);
  cursor: pointer;
}
.ss-dots button[aria-current="true"] { background: #fff; }

/* ---- Gallery grids ---- */
.gallery-index .lead {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-bottom: 30px;
}
@media (min-width: 720px) {
  .gallery-index .lead { grid-template-columns: 1fr 1fr; }
}
.gallery-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px 22px;
}
.gallery-card h2 { margin: 0 0 10px; font-weight: normal; font-size: 1.25rem; }
.gallery-card img { float: left; margin: 4px 16px 8px 0; border-radius: 3px; max-width: 110px; }
.gallery-card .more { display: inline-block; margin-top: 8px; font-family: Arial, sans-serif; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
}
.thumb-grid a {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px;
  transition: border-color .2s, transform .1s;
}
.thumb-grid a:hover { border-color: var(--accent); transform: translateY(-2px); }
.thumb-grid img { display: block; width: 100%; }

/* gallery sub-nav (categories) */
.gal-tabs {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-family: Arial, sans-serif; font-size: .78rem; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 24px;
}
.gal-tabs a { text-decoration: none; color: var(--muted); }
.gal-tabs a:hover, .gal-tabs a[aria-current="page"] { color: var(--ink); }

/* pagination */
.pager {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  margin: 26px 0; font-family: Arial, sans-serif; font-size: .85rem;
}
.pager a, .pager span {
  display: inline-block; min-width: 34px; text-align: center;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px;
  text-decoration: none; color: var(--accent-dark); background: var(--panel);
}
.pager .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* single image view */
.viewer { text-align: center; }
.viewer img { border: 1px solid var(--line); border-radius: 4px; background:#fff; }
.viewer-nav {
  display: flex; justify-content: space-between; align-items: center;
  font-family: Arial, sans-serif; font-size: .85rem; margin: 18px 0;
}
.viewer-nav a { text-decoration: none; }
.viewer-nav .spacer { color: var(--muted); }

/* ---- Lists / testimonials ---- */
.testimonials li { margin-bottom: 1.1em; }

/* ---- Obituary ---- */
.obituary h2 { font-weight: normal; font-size: 1.3rem; margin: 1.4em 0 .4em; }
.obituary .dates { color: var(--muted); font-style: italic; margin-top: 0; }
.memorial-note {
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line);
  color: var(--muted); font-style: italic;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 26px 0 40px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .8rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

.text-cols p { max-width: 64ch; }
