/* William's Daughter — redesign 2026. Warm, wood-toned, mobile-first. */
:root {
  --brown: #8a4f16;
  --brown-dark: #6e3f11;
  --terracotta: #b3541e;
  --cream: #faf6f0;
  --card: #ffffff;
  --ink: #322c26;
  --muted: #7a6f63;
  --line: #e8ddcf;
  --maxw: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}
img { max-width: 100%; height: auto; }
a { color: var(--terracotta); }
a:hover { color: var(--brown-dark); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--brown-dark); }
h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h2 { font-size: clamp(1.3rem, 3.2vw, 1.7rem); }
h3 { font-size: clamp(1.15rem, 2.6vw, 1.35rem); }
hr { border: 0; border-top: 2px solid var(--line); margin: 2rem 0; }

/* ---------- banner ---------- */
.banner {
  background: var(--brown-dark) url("/assets/img/header-292e80de0c.png") center / cover no-repeat;
  color: #f3e2d3;
}
.banner-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.4rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  background: rgba(78, 44, 10, 0.45);
}
.logo img {
  display: block;
  background: #fff;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.banner-text p { margin: 0.15rem 0; font-size: clamp(0.8rem, 2.3vw, 1rem); }
.banner-text .lead { font-weight: 700; font-size: clamp(0.95rem, 2.8vw, 1.2rem); color: #fff; }

/* ---------- navigation ---------- */
.mainnav {
  background: var(--card);
  border-bottom: 3px solid var(--brown);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(50, 30, 5, 0.08);
}
.mainnav ul {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 0.6rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}
.mainnav a {
  display: block;
  padding: 0.8rem 1rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
}
.mainnav a:hover { color: var(--terracotta); }
.mainnav a.active { color: var(--brown); box-shadow: inset 0 -3px 0 var(--brown); }
.navburger { display: none; }
#navtoggle { display: none; }

.subnav {
  max-width: var(--maxw);
  margin: 1rem auto 0;
  padding: 0 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.subnav a {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  text-decoration: none;
  font-size: 0.95rem;
}

/* ---------- layout ---------- */
.layout {
  max-width: var(--maxw);
  margin: 1.2rem auto 2rem;
  padding: 0 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 1.5rem;
  align-items: start;
}
main {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(1rem, 3vw, 2.2rem);
  min-width: 0;
}
aside {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
}
aside .rich p { margin: 0.3rem 0; font-size: 0.95rem; }
aside figure { margin: 0.7rem 0; }
aside img { border-radius: 10px; width: 100%; }

/* ---------- content ---------- */
.rich p { margin: 0.7rem 0; }
figure { margin: 1.2rem auto; text-align: center; }
figure img { border-radius: 10px; box-shadow: 0 2px 10px rgba(50, 30, 5, 0.12); }
figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }

.cols { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.cols .col { flex: 1 1 var(--w, 25%); min-width: 130px; }
.cols figure { margin: 0.4rem auto; }

.text-img { display: flow-root; }
.text-img figure { margin: 0.3rem 0 0.8rem; }
.text-img-left figure { float: left; margin-right: 1.2rem; max-width: 45%; }
.text-img-right figure { float: right; margin-left: 1.2rem; max-width: 45%; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.7rem;
  margin: 1.2rem 0;
}
.gallery a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; }
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.gallery a:hover img { transform: scale(1.05); }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 1.2rem 0;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.cta { text-align: center; margin: 1.4rem 0; }
.btn {
  display: inline-block;
  background: var(--brown);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--terracotta); }

.download { margin: 1rem 0; }
.dl {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  text-decoration: none;
  color: var(--ink);
}
.dl:hover { border-color: var(--brown); }
.dl-icon { font-size: 1.4rem; color: var(--brown); }
.dl-text .dl-meta { display: block; font-size: 0.85rem; color: var(--muted); }
.dl-go {
  margin-left: auto;
  background: var(--brown);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}

.table-wrap { overflow-x: auto; margin: 1.2rem 0; }
table { border-collapse: collapse; width: 100%; }
td, th { padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
tr:nth-child(even) td { background: var(--cream); }

ul.sitemap { columns: 2; gap: 2rem; }
ul.sitemap li { margin: 0.3rem 0; }

/* ---------- footer ---------- */
footer {
  background: var(--brown-dark);
  color: #f3e2d3;
  text-align: center;
  padding: 1.4rem 1rem 1.6rem;
}
footer a { color: #ffd9b3; }
footer a:hover { color: #ffffff; }
footer p { margin: 0.3rem 0; }

/* ---------- lightbox ---------- */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 4, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.lb-overlay img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}
.lb-btn {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  opacity: 0.8;
}
.lb-btn:hover { opacity: 1; }
.lb-close { top: 0.5rem; right: 0.5rem; }
.lb-prev { left: 0.3rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.3rem; top: 50%; transform: translateY(-50%); }
.lb-title {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  text-align: center;
  color: #f3e2d3;
  font-size: 0.95rem;
}

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  aside { text-align: center; }
  aside figure { display: inline-block; width: 45%; margin: 0.4rem 1%; vertical-align: top; }
}

@media (max-width: 760px) {
  .banner-inner { flex-direction: column; text-align: center; gap: 0.8rem; }
  .navburger {
    display: block;
    padding: 0.7rem 1.2rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
  }
  .mainnav ul { display: none; flex-direction: column; padding-bottom: 0.5rem; }
  #navtoggle:checked ~ ul { display: flex; }
  .mainnav a.active { box-shadow: inset 3px 0 0 var(--brown); }
  .text-img-left figure, .text-img-right figure {
    float: none;
    margin: 0.8rem auto;
    max-width: 100%;
  }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  ul.sitemap { columns: 1; }
}
