/* ==========================================================================
   My Palace Initiative — site styles
   Single stylesheet, no build step, no external dependencies.

   The palette is lifted from the original 2008 site (terracotta header bars,
   olive divider rule, warm cream page) and re-balanced to meet WCAG AA.

   Image note: every photograph in images/ is between 121px and 334px wide —
   there are no larger originals. Layout rules therefore cap display width at
   each image's native size (--w) so nothing is ever upscaled.
   ========================================================================== */

/* --------------------------------------------------------------- tokens -- */
:root {
  --clay:       #7a3b21;
  --clay-deep:  #4f2614;
  --clay-soft:  #a8663f;
  --olive:      #6f7c2f;
  --olive-soft: #8d9a46;
  --sand:       #faf6ef;
  --sand-deep:  #f2e9db;
  --paper:      #ffffff;
  --ink:        #2b211c;
  --muted:      #6b5c52;
  --line:       #e3d8c7;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
           Arial, sans-serif;

  --measure: 68ch;
  --shell: 1120px;
  --gap: clamp(1.5rem, 4vw, 3rem);
  --radius: 10px;
  --shadow: 0 1px 2px rgba(43, 33, 28, .06), 0 8px 24px rgba(43, 33, 28, .07);
  --shadow-lift: 0 2px 6px rgba(43, 33, 28, .10), 0 16px 36px rgba(43, 33, 28, .13);
}

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

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

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .22vw, 1.09rem);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  color: var(--clay-deep);
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2.1rem); }
h3 { font-size: clamp(1.18rem, 1.08rem + .45vw, 1.42rem); }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700;
     letter-spacing: .02em; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--clay); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay-deep); }

:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ------------------------------------------------------------ structure -- */
.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--clay-deep);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; color: #fff; }

/* --------------------------------------------------------------- header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 239, .94);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--clay-deep);
}
.brand:hover { color: var(--clay-deep); }

.brand__mark {
  width: 34px;
  height: 42px;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 4px;
  flex: none;
  background: var(--sand-deep);
}

.brand__name {
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.brand__tag {
  display: block;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--olive);
  margin-top: .22rem;
}

/* ------------------------------------------------------------------ nav -- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .5rem .75rem;
  font: inherit;
  font-size: .9rem;
  color: var(--clay-deep);
  cursor: pointer;
}
.nav-toggle__box { display: block; width: 18px; height: 12px; position: relative; }
.nav-toggle__box::before,
.nav-toggle__box::after,
.nav-toggle__box span {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav-toggle__box::before { top: 0; }
.nav-toggle__box span { top: 5px; }
.nav-toggle__box::after { bottom: 0; }

.nav__list {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__list a {
  display: block;
  padding: .5rem .72rem;
  border-radius: 7px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.nav__list a:hover { background: var(--sand-deep); color: var(--clay-deep); }
.nav__list a[aria-current="page"] {
  color: var(--clay-deep);
  font-weight: 650;
  box-shadow: inset 0 -2px 0 var(--olive);
}

.nav__cta a {
  background: var(--clay);
  color: #fff !important;
  margin-left: .4rem;
}
.nav__cta a:hover { background: var(--clay-deep); }
.nav__cta a[aria-current="page"] { box-shadow: inset 0 -2px 0 rgba(255,255,255,.65); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--sand);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: .5rem 0 1rem;
  }
  .nav.is-open { display: block; }
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: min(100% - 2.5rem, var(--shell));
    margin-inline: auto;
  }
  .nav__list a { padding: .8rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__list li:last-child a { border-bottom: 0; }
  .nav__cta a { margin: .75rem 0 0; border-radius: 8px; text-align: center; }
}

/* Below ~430px the tagline wraps to two lines and unbalances the header. */
@media (max-width: 430px) {
  .brand__tag { display: none; }
}

/* ----------------------------------------------------------------- hero -- */
/* Typographic, not photographic: the largest asset on the site is 334px
   wide, so a full-bleed photo hero is not possible without upscaling. */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(90rem 40rem at 78% -22%, #9c4f2b 0%, transparent 62%),
    linear-gradient(135deg, var(--clay-deep) 0%, var(--clay) 58%, #8c472a 100%);
  color: #fdf3e7;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(255,255,255,.045) 25%, transparent 25%, transparent 50%,
                    rgba(255,255,255,.045) 50%, rgba(255,255,255,.045) 75%, transparent 75%);
  background-size: 44px 44px;
  opacity: .9;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.hero__inner { padding: clamp(3rem, 8vw, 5.75rem) 0 clamp(2.75rem, 7vw, 5rem); }

.hero__eyebrow {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #f3d9a8;
  border: 1px solid rgba(243, 217, 168, .45);
  border-radius: 999px;
  padding: .35rem .85rem;
  margin-bottom: 1.4rem;
}

.hero h1 { color: #fff; max-width: 20ch; margin-bottom: .5rem; }

.hero__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1rem + .6vw, 1.5rem);
  color: #f6e2c4;
  margin-bottom: 1.5rem;
}

.hero__lede {
  max-width: 56ch;
  font-size: clamp(1.02rem, .98rem + .25vw, 1.16rem);
  color: #f7e9d9;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* Compact hero used on interior pages */
.hero--page .hero__inner { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2.25rem, 5vw, 3.25rem); }
.hero--page .hero__lede { max-width: 62ch; }

/* ---------------------------------------------------------------- button -- */
.btn {
  display: inline-block;
  padding: .78rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .97rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: #f6e2c4; color: var(--clay-deep); }
.btn--primary:hover { background: #fff; color: var(--clay-deep); }
.btn--ghost { border-color: rgba(246, 226, 196, .55); color: #f6e2c4; }
.btn--ghost:hover { background: rgba(246, 226, 196, .14); color: #fff; }
.btn--solid { background: var(--clay); color: #fff; }
.btn--solid:hover { background: var(--clay-deep); color: #fff; }
.btn--outline { border-color: var(--clay); color: var(--clay); }
.btn--outline:hover { background: var(--clay); color: #fff; }

/* --------------------------------------------------------------- layout -- */
main { display: block; }

.section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.section--tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.section--paper { background: var(--paper); border-block: 1px solid var(--line); }
.section--deep { background: var(--sand-deep); border-block: 1px solid var(--line); }

.section__head { max-width: var(--measure); margin-bottom: 2rem; }
.section__head p { color: var(--muted); }

.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8rem; }

/* Two-column: prose beside a photo rail */
.split {
  display: grid;
  gap: var(--gap);
  align-items: start;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) auto; }
  .split--rev { grid-template-columns: auto minmax(0, 1fr); }
  .split--rev > .split__media { order: -1; }
}

.eyebrow {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: .7rem;
}

.rule {
  border: 0;
  height: 3px;
  width: 64px;
  background: var(--olive);
  border-radius: 2px;
  margin: 0 0 1.5rem;
}

/* ---------------------------------------------------------------- media -- */
/* .figure is capped at the image's native width via the inline --w custom
   property, which is why no photo is ever displayed larger than it really is. */
.figure {
  margin: 0;
  max-width: min(100%, var(--w, 334px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
}
.figure img { border-radius: 5px; width: 100%; }
.figure figcaption {
  font-size: .85rem;
  line-height: 1.45;
  color: var(--muted);
  padding: .7rem .25rem .15rem;
}

.figure--plain { background: none; border: 0; box-shadow: none; padding: 0; }

.media-rail {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}
@media (max-width: 899px) {
  .media-rail { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 334px)); }
}

/* Row of figures that wraps, each capped at native width */
.figure-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: start;
}
.figure-row > .figure { flex: 0 1 auto; }

/* ---------------------------------------------------------------- cards -- */
.cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .98rem; }

.card--link { display: block; text-decoration: none; color: inherit;
              transition: transform .15s ease, box-shadow .15s ease; }
.card--link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); color: inherit; }
.card--link .more { color: var(--clay); font-weight: 600; font-size: .92rem; }

/* Numbered outcome list ("When restored, these palaces will…") */
.outcomes { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.outcomes li {
  position: relative;
  padding-left: 2.1rem;
  font-size: 1.02rem;
}
.outcomes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--olive);
  transform: rotate(45deg);
}

.ticks { list-style: none; margin: 0 0 1.15em; padding: 0; display: grid; gap: .6rem; }
.ticks li { position: relative; padding-left: 1.7rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: .15rem;
  top: .52em;
  width: .5rem;
  height: .85rem;
  border: solid var(--olive);
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

/* --------------------------------------------------------------- quotes -- */
.quote {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--olive);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: var(--shadow);
}
.quote p {
  font-family: var(--serif);
  font-size: clamp(1.04rem, 1rem + .3vw, 1.2rem);
  line-height: 1.6;
}
.quote cite {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: .88rem;
  color: var(--muted);
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
}
.quote--feature {
  background: linear-gradient(140deg, var(--clay-deep), var(--clay));
  border-color: transparent;
  border-left-color: #f3d9a8;
  color: #f8ecdc;
}
.quote--feature p { color: #fdf3e7; }
.quote--feature cite { color: #e9cfae; border-top-color: rgba(255,255,255,.22); }

.quote-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.quote-grid .quote { padding: 1.4rem; }
.quote-grid .quote p { font-size: 1rem; }

/* ------------------------------------------------------------ name list -- */
.namelist { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
@media (min-width: 760px) { .namelist { grid-template-columns: 1fr 1fr; gap: .1rem 2.5rem; } }

.namelist li {
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .96rem;
  line-height: 1.5;
  color: var(--muted);
}
.namelist b { display: block; color: var(--ink); font-weight: 650; font-size: 1rem; }

.roster { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.roster li { font-size: .98rem; color: var(--muted); }
.roster b { color: var(--ink); font-weight: 650; }

/* -------------------------------------------------------------- gallery -- */
/* 334×250 source photos: cells never exceed 334px, so no upscaling. */
.gallery {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
.gallery__item {
  margin: 0;
  max-width: 334px;
  border: 0;
  padding: 0;
  background: none;
  box-shadow: none;
}
.gallery__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: zoom-in;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.gallery__btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.gallery__btn img { width: 100%; }
.gallery__item figcaption {
  font-size: .84rem;
  color: var(--muted);
  padding-top: .6rem;
  line-height: 1.45;
}

/* lightbox */
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 420px);
  max-height: 92vh;
  color: var(--ink);
}
.lightbox::backdrop { background: rgba(32, 22, 16, .82); }
.lightbox__inner {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-lift);
}
.lightbox img { border-radius: 6px; margin-inline: auto; }
.lightbox__cap { font-size: .88rem; color: var(--muted); padding: .75rem .3rem .2rem; }
.lightbox__close {
  position: absolute;
  top: -42px;
  right: 0;
  background: none;
  border: 0;
  color: #f6e2c4;
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
  padding: .4rem .2rem;
}

/* --------------------------------------------------------------- callout -- */
.callout {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
}
.callout--olive { border-left: 4px solid var(--olive); }

.contact-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.contact-grid dt {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: .4rem;
}
.contact-grid dd { margin: 0 0 1.25rem; font-size: 1rem; line-height: 1.6; }
.contact-grid dd:last-child { margin-bottom: 0; }

.address { font-style: normal; line-height: 1.7; }

/* ------------------------------------------------------------- timeline -- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  padding: 0 0 1.5rem 1.9rem;
  border-left: 2px solid var(--line);
}
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: .45em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--olive);
  border: 3px solid var(--sand);
}
.timeline b {
  display: block;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--clay-deep);
  margin-bottom: .2rem;
}
.section--paper .timeline li::before { border-color: var(--paper); }

/* ---------------------------------------------------------------- entry -- */
.entry + .entry { margin-top: 3rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.entry__date {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: .5rem;
}

.signoff {
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--clay-deep);
  margin-top: 1.5rem;
}
.signoff b { display: block; font-weight: 600; }
.signoff span { font-family: var(--sans); font-size: .88rem; color: var(--muted); }

/* --------------------------------------------------------------- footer -- */
.site-footer {
  background: var(--clay-deep);
  color: #e8d6c2;
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  font-size: .94rem;
}
.site-footer a { color: #f3d9a8; }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
}
.footer-grid h2 {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #d8b48b;
  margin-bottom: .9rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-grid p { color: #ddc8b2; }

.footer-brand__name {
  font-family: var(--serif);
  font-size: 1.22rem;
  color: #fff;
  margin-bottom: .3rem;
}
.footer-brand__tag { font-style: italic; color: #e9cfae; }

.legal {
  padding-top: 1.75rem;
  font-size: .84rem;
  color: #c9b199;
  line-height: 1.8;
}
.legal p { margin: 0; }

/* --------------------------------------------------------------- utility -- */
.lede { font-size: clamp(1.06rem, 1rem + .35vw, 1.22rem); color: var(--muted); }
.muted { color: var(--muted); }
.center { text-align: center; }
.stack > * + * { margin-top: 1.5rem; }
.stack-lg > * + * { margin-top: 2.5rem; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.notice {
  background: var(--sand-deep);
  border: 1px solid var(--line);
  border-left: 4px solid var(--clay-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  font-size: .98rem;
}
.notice p { margin: 0; }

/* ---------------------------------------------------------------- print -- */
@media print {
  .site-header, .nav, .hero__actions, .gallery__btn { box-shadow: none; }
  .site-header { position: static; }
  body { background: #fff; }
}
