/* Jackie's Whimsical Collection — site stylesheet
   Ported from the approved "Whimsical Dark Fantasy" design concept. */

:root {
  --bg: #12312B;
  --card: #1B453C;
  --ink: #F4E8C9;
  --muted: #B9A77C;
  --line: #3E6157;
  --accent: #C9A24B;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  background:
    radial-gradient(ellipse 900px 700px at 78% 8%, rgba(201, 162, 75, 0.16), transparent 60%),
    var(--bg);
  font-family: 'Libre Franklin', sans-serif;
  line-height: 1.5;
}

a { color: var(--ink); text-decoration: none; }
a:hover { opacity: 0.75; }

.serif { font-family: 'Fraunces', serif; }
.mono { font-family: 'Courier Prime', monospace; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Nav */
.site-nav {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.site-title {
  font-size: 19px;
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
}
.nav-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Hero */
.hero {
  padding: 72px 0;
}
.hero .wrap {
  display: flex;
  gap: 56px;
  align-items: center;
  flex-wrap: wrap;
}
.hero-text { flex: 1 1 420px; }
.hero-eyebrow {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero-text h1 {
  margin: 0 0 20px;
  font-size: 52px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.12;
}
.hero-text p {
  margin: 0 0 22px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 560px;
}
.hero-cta {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
  display: inline-block;
}

.specimen-frame {
  flex: 0 0 340px;
  width: 340px;
  height: 400px;
  position: relative;
}
.specimen-frame .corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: var(--accent);
  border-style: solid;
  border-width: 0;
}
.specimen-frame .corner.tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.specimen-frame .corner.br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.specimen-box {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 240px 240px at 50% 38%, rgba(201, 162, 75, 0.22), transparent 70%),
    var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
}
.specimen-box img {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  object-fit: cover;
  cursor: zoom-in;
}
.specimen-box .pin {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-bottom: -4px;
}
.specimen-label {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px dotted var(--muted);
  padding-top: 10px;
  width: 100%;
}

/* Section headings */
.section { padding: 40px 0 64px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.section-head h2 {
  margin: 0;
  font-size: 26px;
  font-style: italic;
  font-weight: 600;
}
.section-head .index-link {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Filter pills */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.filters a {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 100px;
}
.filters a.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.piece-card {
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex;
  flex-direction: column;
}
.piece-card-photo {
  position: relative;
}
.piece-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.piece-card-photo-empty {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--bg);
}
.photo-count-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(18, 49, 43, 0.85);
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--line);
}
.piece-card-body {
  padding: 18px 20px 20px;
}
.piece-card-title {
  font-size: 18px;
  font-style: italic;
  font-weight: 600;
  margin-bottom: 10px;
}
.piece-card-meta {
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px dotted var(--line);
  padding-top: 8px;
}

/* Piece detail page */
.piece-detail-back {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 24px;
}
.piece-detail-head {
  margin-bottom: 32px;
}
.piece-detail-head h1 {
  margin: 0 0 8px;
  font-size: 38px;
}
.piece-detail-meta {
  font-family: 'Courier Prime', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.piece-photos {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.piece-photos img {
  width: 100%;
  max-width: 900px;
  display: block;
  box-shadow: inset 0 0 0 1px var(--line);
}
.piece-detail-empty {
  color: var(--muted);
  font-style: italic;
}

/* Field Notes feed page */
.fieldnote-feed {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 720px;
}
.fieldnote-post {
  border-bottom: 1px dotted var(--line);
  padding-bottom: 40px;
}
.fieldnote-post:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.fieldnote-post-head { margin-bottom: 10px; }
.fieldnote-post-head h3 {
  margin: 0 0 4px;
  font-size: 24px;
  font-style: italic;
  font-weight: 600;
}
.fieldnote-post-date {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.fieldnote-post-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
  white-space: pre-line;
  margin: 14px 0 0;
}
.fieldnote-post-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}
.fieldnote-post-photos img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px var(--line);
}

/* About */
.about-block {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.about-photo {
  flex: 0 0 220px;
  width: 220px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: zoom-in;
}
.about-body {
  flex: 1 1 420px;
  max-width: 680px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted);
  white-space: pre-line;
}

/* Field notes / footer widgets */
.widgets {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.pinned-card {
  flex: 1 1 380px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 24px;
  position: relative;
}
.pinned-card .corner { position: absolute; width: 18px; height: 18px; border-color: var(--accent); border-style: solid; border-width: 0; }
.pinned-card .corner.tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.pinned-card .corner.br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.pinned-label {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.pinned-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.pinned-photo {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px var(--line);
}
.pinned-text-block { flex: 1 1 auto; min-width: 0; }
.pinned-text {
  font-size: 18px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.4;
}
.pinned-date {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.pinned-excerpt {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  margin-top: 12px;
  white-space: pre-line;
}
.pinned-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-block { flex: 1 1 280px; }
.contact-block h3 {
  font-size: 22px;
  font-style: italic;
  font-weight: 600;
  margin: 0 0 10px;
}
.contact-block .mono { font-size: 13px; color: var(--muted); display: block; margin-top: 4px; }

.contact-block .social-icon {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.contact-block .social-icon svg { flex-shrink: 0; }
.contact-block .social-icon:hover { text-decoration: underline; opacity: 0.85; }

/* Lightbox (click-to-enlarge) */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 18, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  z-index: 1000;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  box-shadow: 0 0 0 1px var(--line);
  display: block;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #F4EEDD;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 48px;
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-text h1 { font-size: 40px; }
}
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .specimen-frame { width: 100%; height: 320px; }
  .wrap { padding: 0 20px; }
  .fieldnote-post-photos img { width: 100%; height: auto; aspect-ratio: 1 / 1; }
}

/* --- Admin --- */
.admin-body {
  background: #F5EFE6;
  color: #3A2E22;
  font-family: 'Libre Franklin', system-ui, sans-serif;
  min-height: 100vh;
}
.admin-wrap { max-width: 860px; margin: 0 auto; padding: 40px 24px 80px; }
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px; flex-wrap: wrap; gap: 12px;
}
.admin-header h1 { font-family: 'Fraunces', serif; font-size: 26px; margin: 0; }
.admin-header a.logout { font-size: 13px; color: #8A7A63; }
.admin-card {
  background: #fff; border: 1px solid #E4DCCB; border-radius: 8px;
  padding: 24px; margin-bottom: 24px;
}
.admin-card h2 { font-family: 'Fraunces', serif; font-size: 19px; margin: 0 0 16px; }
.admin-field { margin-bottom: 16px; }
.admin-field label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: #8A7A63; margin-bottom: 6px;
}
.admin-field input[type="text"],
.admin-field input[type="email"],
.admin-field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #DED2BC; border-radius: 6px;
  font-size: 15px; font-family: inherit; background: #FBF8F2; color: #3A2E22;
}
.admin-field textarea { min-height: 90px; resize: vertical; }
.admin-piece {
  border: 1px solid #E4DCCB; border-radius: 6px; padding: 16px; margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.admin-piece .fields { display: grid; gap: 8px; }
.admin-piece .fields input { padding: 8px 10px; border: 1px solid #DED2BC; border-radius: 5px; font-size: 14px; }
.admin-piece .upload-row { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.admin-photos { display: flex; flex-wrap: wrap; gap: 14px; }
.admin-photo-thumb { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
.admin-photo-thumb img {
  width: 92px; height: 92px; object-fit: cover; border-radius: 4px; display: block;
  background: #1B453C;
}
.btn-remove-photo {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%;
  background: #B5533C; color: #fff; border: 2px solid #fff; font-size: 14px; line-height: 1;
  cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; z-index: 2;
}
.btn-move-photo {
  position: absolute; bottom: -9px; width: 24px; height: 24px; border-radius: 50%;
  background: #8A7A63; color: #fff; border: 2px solid #fff; font-size: 15px; line-height: 1;
  cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; z-index: 2;
}
.btn-move-photo:hover { background: #6E6150; }
.btn-move-left { left: -9px; }
.btn-move-right { right: -9px; }
.admin-specimen-thumb {
  width: 90px; height: 90px; object-fit: cover; border-radius: 4px; display: block;
  flex-shrink: 0; background: #1B453C;
}
.admin-actions { display: flex; gap: 10px; margin-top: 6px; }
button, .btn {
  font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.03em;
  border-radius: 6px; padding: 10px 18px; cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: #B5533C; color: #fff; }
.btn-secondary { background: #fff; border-color: #DED2BC; color: #3A2E22; }
.btn-danger { background: #fff; border-color: #C97B5C; color: #B5533C; }
.admin-note { font-size: 13px; color: #8A7A63; margin-top: -6px; margin-bottom: 16px; }
.login-card { max-width: 360px; margin: 90px auto; }
.flash { background: #EFE3D0; border: 1px solid #DED2BC; padding: 10px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 20px; }
