/* Southport Postcard Archive — standalone public website styles.
   Self-contained: system fonts only, no external resources. */
:root {
  --ink: #17201d; --ink-soft: #26322e; --paper: #f5f1e8; --paper-deep: #ebe4d5;
  --card: #fffdf8; --gold: #b88932; --gold-dark: #795820; --gold-pale: #f0e3bd;
  --line: #d9cfbd; --muted: #6f746f; --shadow: 0 8px 28px rgba(33,36,31,.10);
  --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Segoe UI", Arial, sans-serif; line-height: 1.6; }
img { max-width: 100%; }
a { color: var(--gold-dark); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.button { appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 9px; padding: .68rem 1rem; font-weight: 700; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; }
.button.primary { background: var(--gold); border-color: var(--gold); color: #171713; }
.eyebrow { color: var(--gold-dark); text-transform: uppercase; letter-spacing: .16em; font-size: .68rem; font-weight: 800; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem clamp(1rem,4vw,3rem); background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; position: sticky; top: 0; z-index: 10; }
.site-brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--ink); }
.site-brand-mark { width: 46px; height: 46px; border: 1px solid var(--gold); display: grid; place-items: center; color: var(--gold-dark); font: 700 1.6rem Georgia, serif; }
.site-brand strong { display: block; font-family: Georgia, serif; font-size: 1.15rem; }
.site-brand small { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.site-main { max-width: 1120px; margin: 0 auto; padding: clamp(1.4rem,4vw,2.8rem) clamp(1rem,4vw,3rem) 3rem; }
.site-footer { border-top: 1px solid var(--line); padding: 1.8rem clamp(1rem,4vw,3rem); color: var(--muted); font-size: .8rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.site-hero { background: radial-gradient(120% 140% at 85% 0%, #33453b 0%, #1b241f 60%); color: #fff; border-radius: 20px; padding: clamp(2rem,5vw,4rem); box-shadow: var(--shadow); margin-bottom: 2.4rem; position: relative; overflow: hidden; }
.site-hero::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(184,137,50,.35); border-radius: 12px; pointer-events: none; }
.site-hero-inner { position: relative; max-width: 640px; }
.site-hero .eyebrow { color: var(--gold); }
.site-hero h1 { font-family: Georgia, serif; font-size: clamp(2.1rem,5vw,3.4rem); line-height: 1.08; margin: .4rem 0 .8rem; }
.site-hero p { color: #e7dcc4; margin: 0; max-width: 52ch; font-size: 1.02rem; }
.site-search { display: flex; gap: .5rem; margin-top: 1.6rem; max-width: 460px; }
.site-search input { flex: 1; border: 1px solid transparent; border-radius: 9px; padding: .72rem .85rem; min-height: 48px; background: #fffefa; color: var(--ink); font-size: 1rem; }
.site-search input:focus { outline: 3px solid rgba(184,137,50,.4); }
.site-hero-stats { display: flex; gap: 2.4rem; margin-top: 2rem; flex-wrap: wrap; }
.site-hero-stats div { display: flex; flex-direction: column; }
.site-hero-stats strong { font: 700 1.5rem Georgia, serif; color: var(--gold); }
.site-hero-stats span { color: #ccc0a6; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; }

.site-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 1.2rem; padding-bottom: .7rem; border-bottom: 2px solid var(--gold-pale); }
.site-section-head h2 { font-family: Georgia, serif; margin: 0; font-size: 1.35rem; }
.site-section-head a { color: var(--gold-dark); font-weight: 700; text-decoration: none; font-size: .85rem; }
.site-count { color: var(--muted); font-size: .82rem; }

.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.site-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: 0 4px 16px rgba(31,35,30,.05); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.site-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.site-card-mat { padding: 12px 12px 0; }
.site-card-image { aspect-ratio: 3 / 2; background: #e9e1d1; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 3px #fff; }
.site-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.site-card-noimage { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: .8rem; min-height: 150px; }
.site-card-body { padding: .8rem 1rem 1.15rem; }
.site-card-body h3 { font-family: Georgia, serif; font-size: 1.05rem; margin: 0 0 .3rem; line-height: 1.25; }
.site-card-meta { color: var(--muted); font-size: .78rem; margin: 0; }
.site-chip { position: absolute; top: 20px; right: 20px; background: rgba(23,32,29,.86); color: #f3ead3; font-size: .62rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding: .22rem .5rem; border-radius: 5px; }
.site-noresults { color: var(--muted); text-align: center; padding: 2.5rem 1rem; }

.site-back { display: inline-block; margin-bottom: 1.4rem; color: var(--gold-dark); font-weight: 700; text-decoration: none; }
.site-detail { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.4rem; align-items: start; }
.site-viewer { display: grid; justify-items: center; }
.site-viewer-stage { width: 100%; background: linear-gradient(160deg, #efe8d9, #e3d9c4); border: 1px solid var(--line); border-radius: var(--radius); min-height: 340px; display: grid; place-items: center; overflow: hidden; padding: clamp(1rem,3vw,2rem); box-shadow: inset 0 2px 14px rgba(31,35,30,.08); }
.site-viewer-stage img { max-width: 100%; max-height: 72vh; object-fit: contain; box-shadow: 0 12px 34px rgba(23,28,24,.28); background: #fff; border-radius: 2px; }
.site-flip { display: inline-flex; margin-top: 1rem; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px; gap: 2px; }
.site-flip-btn { appearance: none; border: 0; background: transparent; color: var(--ink-soft); font-weight: 700; padding: .45rem 1.3rem; border-radius: 999px; cursor: pointer; min-height: 40px; }
.site-flip-btn.is-on { background: var(--gold); color: #171713; }
.site-info h1 { font-family: Georgia, serif; font-size: clamp(1.6rem,3vw,2.3rem); margin: .2rem 0 .35rem; line-height: 1.15; }
.site-date { color: var(--gold-dark); font-weight: 700; margin: 0 0 1.1rem; }
.site-approx { color: var(--muted); font-weight: 400; }
.site-description { color: var(--ink-soft); line-height: 1.7; }
.site-facts { display: grid; gap: .8rem; margin: 1.4rem 0; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.site-facts div { display: grid; grid-template-columns: 150px 1fr; gap: .8rem; }
.site-facts dt { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin: 0; padding-top: .1rem; }
.site-facts dd { margin: 0; }
.site-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.site-tags span { background: var(--gold-pale); color: var(--gold-dark); border-radius: 999px; padding: .18rem .6rem; font-size: .76rem; font-weight: 600; }
.site-transcription { background: #fffef9; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 1.1rem 1.3rem; margin: 1.4rem 0 0; }
.site-transcription figcaption { font-family: Georgia, serif; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .5rem; }
.site-transcription blockquote { margin: 0; font-style: italic; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.6; }
.site-more { margin-top: 3rem; }

/* Landing / welcome page */
.landing-body { min-height: 100vh; margin: 0; display: grid; place-items: center; padding: 2rem; background: radial-gradient(120% 140% at 85% 0%, #33453b 0%, #1b241f 60%); }
.landing { width: 100%; max-width: 720px; }
.landing-card { position: relative; text-align: center; color: #fff; padding: clamp(2rem, 6vw, 4rem); border: 1px solid rgba(184,137,50,.45); border-radius: 22px; background: rgba(0,0,0,.12); box-shadow: var(--shadow); }
.landing-eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; font-weight: 800; }
.landing-badge { position: relative; width: 104px; height: 104px; margin: 1.2rem auto 1.4rem; border: 2px solid var(--gold); border-radius: 50%; display: grid; place-items: center; font: 700 2.8rem Georgia, serif; color: var(--gold); cursor: pointer; }
.landing-card h1 { font-family: Georgia, serif; font-weight: 700; font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.1; margin: .4rem 0 1.1rem; }
.landing-message { font-size: clamp(1.05rem, 2.5vw, 1.3rem); font-style: italic; color: #ecdfc0; max-width: 34ch; margin: 0 auto 1.8rem; line-height: 1.6; }
.landing-sub { color: #cdbf9f; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 2.2rem; }
.landing-enter { text-decoration: none; padding: .8rem 1.6rem; }
.landing-foot { color: #b7ac93; font-size: .82rem; margin: 1.8rem 0 0; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }
.landing { position: relative; z-index: 2; }
@media (prefers-reduced-motion: no-preference) {
  .landing-eyebrow, .landing-badge, .landing-card h1, .landing-message, .landing-sub, .landing-enter, .landing-foot {
    opacity: 0; transform: translateY(16px); animation: landing-rise .7s ease forwards;
  }
  .landing-eyebrow { animation-delay: .10s; }
  .landing-badge   { animation-delay: .28s; }
  .landing-card h1 { animation-delay: .46s; }
  .landing-message { animation-delay: .68s; }
  .landing-sub     { animation-delay: .86s; }
  .landing-enter   { animation-delay: 1.02s; }
  .landing-foot    { animation-delay: 1.18s; }
  .landing-badge::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; animation: landing-glow 3s ease-in-out 1.8s infinite; }
}
@keyframes landing-rise { to { opacity: 1; transform: none; } }
@keyframes landing-glow { 0%, 100% { box-shadow: 0 0 4px rgba(184,137,50,.15); } 50% { box-shadow: 0 0 30px rgba(184,137,50,.60); } }
@media (max-width: 820px) {
  .site-detail { grid-template-columns: 1fr; }
  .site-facts div { grid-template-columns: 120px 1fr; }
  .site-header { position: static; }
}
