/* Hymn & Hue platform — shared styles, on the Hymn & Hue brand.
   Palette and type match the marketing site (marketing/css/site.css).
   Mobile-clean by default. */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Montserrat:wght@400;500;600;700&display=swap');
:root {
  /* brand palette (mood board): Ink Navy, Antique Gold, Soft Clay, Sage Gray, Cream */
  --plum: #0f2740;       /* primary: Ink Navy (kept the --plum name for compatibility) */
  --plum-2: #1d456b;     /* lighter navy for gradients, links, accents */
  --gold: #c9a96b;       /* Antique Gold */
  --clay: #c47856;       /* Soft Clay */
  --sage: #7a8476;       /* Sage Gray */
  --ink: #0f2740;        /* body ink = navy */
  --muted: #5b6570;      /* readable muted */
  --line: #e7dfce;       /* warm border */
  --bg: #f8f4eb;         /* Cream */
  --card: #fffdf8;       /* warm white surface */
  --ok: #2f7d54;
  --warn: #b8860b;
  --danger: #b23a48;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 6px 22px rgba(15, 39, 64, 0.08);
}
* { box-sizing: border-box; }
/* site-wide prototype ribbon */
.proto-ribbon {
  background: #0f2740; color: #fff; text-align: center; font-size: 12.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; padding: 6px 12px;
}
.proto-ribbon span { color: var(--gold); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55; font-size: 17px; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--plum-2); }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; letter-spacing: .005em; }

/* ---- masthead ---- */
.masthead {
  background: linear-gradient(135deg, var(--plum), var(--plum-2));
  color: #fff; padding: 30px 20px; text-align: center;
}
.masthead .kicker { letter-spacing: .22em; text-transform: uppercase; font-size: 12px; opacity: .85; }
.masthead h1 { margin: 6px 0 4px; font-size: 34px; }
.masthead p { margin: 8px auto 0; max-width: 640px; opacity: .92; font-size: 15px; }
.logo-badge {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 10px;
  background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-size: 26px; font-weight: bold; border: 2px solid rgba(255,255,255,.4);
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 18px 80px; }

/* ---- campus + gallery ---- */
.campus-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 6px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--plum-2);
  padding: 7px 14px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 600;
}
.chip.active, .chip:hover { background: var(--plum-2); color: #fff; border-color: var(--plum-2); }

/* Gallery "why this ministry" intro block (ITEM 10): a headline, a short mission paragraph, and an
   optional scripture line above the art grid. Understated and centered so it frames the gallery
   without competing with the artwork. Mobile-clean: it reflows to full width on small screens. */
.gallery-intro {
  max-width: 720px; margin: 22px auto 8px; padding: 22px 24px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.gallery-intro h2 { margin: 0 0 10px; font-size: 26px; line-height: 1.2; }
.gallery-intro .intro-body { margin: 0; color: var(--ink); font-size: 16px; line-height: 1.6; }
.gallery-intro .intro-scripture {
  margin: 12px 0 0; color: var(--sage); font-style: italic; font-size: 15px;
}
@media (max-width: 560px) {
  .gallery-intro { margin: 16px 4px 6px; padding: 18px 18px; }
  .gallery-intro h2 { font-size: 22px; }
}

.campus-title {
  font-size: 24px; margin: 34px 0 4px; padding-bottom: 8px; border-bottom: 2px solid var(--gold);
}
.campus-sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }

/* Two columns on desktop/tablet, one on phones. */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; align-items: start; }

.piece {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); scroll-margin-top: 20px;
}
/* Uniform image frame so titles line up across a row. object-fit: contain shows
   the whole artwork at its true proportions (matted with space around it) and
   NEVER crops or stretches. */
.piece img.art {
  width: 100%; height: 300px; display: block;
  object-fit: contain; background: #f2ede2; padding: 10px;
  border-bottom: 1px solid var(--line);
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
@media (max-width: 640px) { .piece img.art { height: 260px; } }

/* Masonry galleries on desktop/tablet only (public gallery + past exhibits): vertical and horizontal
   pieces pack tightly by column (Pinterest-style) with no wasted whitespace, each image at its
   natural aspect ratio (never cropped, matted, or stretched). The whole card — image AND its caption
   (title, artist, medium, scripture, statement preview + Read more) — stays together, so a piece is
   never image-only. On phones the gallery falls back to the simple, easy-to-read single-column card
   layout (the base .grid / .piece rules), which is the most legible and space-efficient on a narrow
   screen. Scoped to .grid.masonry so the printable ID-card grid (also .grid) is unaffected. */
@media (min-width: 641px) {
  .grid.masonry { display: block; columns: 2; column-gap: 26px; }
  .grid.masonry .piece { break-inside: avoid; -webkit-column-break-inside: avoid; margin: 0 0 26px; }
  .grid.masonry .piece img.art { height: auto; padding: 0; }
}
/* Watermark overlay: a faint repeat of the ministry name running vertically down
   the left edge of each artwork. Deters casual copying while staying out of the
   way of the piece. pointer-events are off so it never interferes with viewing. */
.piece .artwrap { position: relative; display: block; }
.piece .artwrap .wm {
  position: absolute; inset: 0; pointer-events: none;
  background-repeat: repeat-y; background-position: left top;
}
.piece .body { padding: 16px 18px 20px; }
.piece h3 { margin: 0 0 2px; font-size: 21px; }
.piece .badges { margin: 4px 0 6px; }
.piece .artist { color: var(--plum-2); font-weight: 600; margin: 0 0 2px; }
.piece .meta { color: var(--muted); font-size: 13.5px; margin: 6px 0; }
.piece .scripture { font-style: italic; color: var(--ink); font-size: 14px; margin: 8px 0; }
.piece .statement { font-size: 15px; margin: 10px 0 0; }
.piece .statement.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.readmore { background: none; border: none; color: var(--plum-2); font-weight: 600; padding: 6px 0 0; cursor: pointer; font-size: 14px; }

/* Help feedback ("was this helpful?") control, shared by the admin and submission help. */
.help-fb { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.help-fb-q { color: var(--muted); font-size: 12.5px; }
.help-fb-btn { background: #fff; border: 1px solid var(--line); color: var(--plum-2); border-radius: 7px; padding: 3px 12px; font-size: 12.5px; cursor: pointer; }
.help-fb-btn:hover { border-color: var(--plum-2); }
.help-fb-cmt { flex: 1; min-width: 160px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; vertical-align: middle; }
.badge.nfs { background: #eef0ea; color: var(--plum-2); }
.badge.sale { background: #eaf5ee; color: var(--ok); }
.badge.sold { background: #fbeaec; color: var(--danger); }
.badge.pending { background: #fff4dc; color: var(--warn); }
.badge.hidden { background: #ececec; color: #666; }
.badge.license { background: #eef1fb; color: #3a4a86; }

.audio-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 600; font-size: 14px; text-decoration: none; }
.prev-works { display: block; margin-top: 12px; font-size: 14px; font-weight: 600; }

/* Written work: full text of a poem, song lyrics, or prose, formatting kept. */
.piece .fulltext {
  white-space: pre-wrap; font-family: Georgia, "Times New Roman", serif;
  font-size: 15px; line-height: 1.55; margin: 10px 0 0; color: var(--ink);
}
.piece .fulltext.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
/* Song materials: recording, lead sheet, sheet music, video. */
.downloads { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.downloads a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; text-decoration: none; }
.license-line { font-size: 13.5px; color: var(--muted); margin: 10px 0 0; }

.notice {
  background: #fff8e6; border: 1px solid #f0dca6; color: #7a5c12;
  padding: 10px 14px; border-radius: 10px; font-size: 14px; margin: 0 0 18px;
}
footer.site { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 16px 60px; }
/* Subtle, respectful "Donate to the ministry" line: quieter than the primary footer links so it
   never competes with the artwork. */
footer.site .donate-line { margin-top: 14px; font-size: 12px; }
footer.site .donate-line a { color: var(--muted); text-decoration: none; border-bottom: 1px solid rgba(0,0,0,.18); padding-bottom: 1px; }
footer.site .donate-line a:hover { color: var(--plum-2); border-bottom-color: currentColor; }

/* ---- website embed (chrome-light) ----
   When the gallery or submission page runs inside a church's own website (the /embed/gallery and
   /embed/submit routes, which add ?embed=1 so embed-frame.js sets the .hh-embed class), drop the
   parts that only make sense on the standalone hosted site: the site footer nav (Past exhibits,
   Submit, Administrator sign in) which would break a visitor out of the church's page. The church's
   branding masthead, gallery intro, accent, logo, and all the content stay. A transparent page
   background lets the church's site color show through around the embed, and the top/bottom padding
   is trimmed since the church's own page supplies the surrounding chrome. */
html.hh-embed, body.hh-embed { background: transparent; }
body.hh-embed footer.site { display: none; }
body.hh-embed .masthead { padding-top: 22px; }
body.hh-embed main.wrap { padding-top: 8px; padding-bottom: 12px; }

/* Body-only ("gallery only") embed (/embed/gallery?layout=body). For a church that wants to drop
   just the art grid into an existing page on its own site, we also hide the branding masthead and
   the "why this ministry" intro, leaving the exhibit heading, campus filter, and gallery grid. The
   footer is already hidden by the .hh-embed rule above. Nothing the grid needs to function is
   touched. */
body.hh-embed-body .masthead { display: none; }
body.hh-embed-body .gallery-intro { display: none; }
body.hh-embed-body main.wrap { padding-top: 0; }

/* ---- buttons + forms ---- */
.btn {
  display: inline-block; background: var(--plum-2); color: #fff; border: none; cursor: pointer;
  padding: 12px 20px; border-radius: 10px; font-size: 16px; font-weight: 600; text-decoration: none;
}
.btn.secondary { background: #fff; color: var(--plum-2); border: 1px solid var(--plum-2); }
.btn.ghost { background: transparent; color: var(--plum-2); border: 1px solid var(--line); }
.btn.small { padding: 7px 12px; font-size: 14px; }
.btn.danger { background: var(--danger); }
.btn.ok { background: var(--ok); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

label { display: block; font-weight: 600; font-size: 14px; margin: 16px 0 6px; }
label .req { color: var(--danger); }
input[type=text], input[type=email], input[type=number], input[type=date], input[type="datetime-local"], input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 16px; font-family: inherit; background: #fff; color: var(--ink);
}
/* Search boxes match the height of other inputs (they default to a shorter native control). */
input[type=search] { -webkit-appearance: none; appearance: none; }
input[type=password] { min-height: 48px; padding-top: 14px; padding-bottom: 14px; }
textarea { min-height: 110px; resize: vertical; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.card-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 520px) {
  .masthead h1 { font-size: 27px; }
  body { font-size: 16px; }
  .wrap { padding: 16px 14px 70px; }
}
