/* ==========================================================
   CC Sews — site styles
   Change the brand colors and fonts in :root below.
   ========================================================== */

:root {
  --brand: #8a3b5c;         /* main accent (thread berry) */
  --brand-dark: #6b2a45;
  --brand-soft: #f6e9ee;
  --ink: #2b2326;           /* body text */
  --muted: #6d6266;
  --paper: #fdfaf7;         /* page background */
  --card: #ffffff;
  --line: #e8dfe2;
  --ok: #2f7d4f;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(43, 35, 38, .06), 0 4px 16px rgba(43, 35, 38, .06);
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

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

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: 1.2rem; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px; flex-wrap: wrap;
}
.logo {
  font-family: var(--font-head);
  font-size: 1.5rem; font-weight: 700;
  color: var(--ink); text-decoration: none;
  display: flex; align-items: center;
}
.logo img { height: 40px; width: auto; margin-right: 10px; }
.logo .dot { color: var(--brand); }

.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--ink);
  padding: 8px 12px; border-radius: 8px; font-weight: 500;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.nav a[aria-current="page"] { background: var(--brand); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 48px;
  background:
    radial-gradient(1200px 300px at 80% -50%, var(--brand-soft), transparent),
    var(--paper);
}
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }

.stitch {
  border: 0; height: 2px; margin: 24px 0;
  background: repeating-linear-gradient(90deg, var(--brand) 0 10px, transparent 10px 18px);
  opacity: .5; max-width: 220px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  background: var(--brand); color: #fff; border: 0;
  padding: 12px 20px; border-radius: 999px; font: inherit; font-weight: 600;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn.secondary { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn.secondary:hover { background: var(--brand-soft); color: var(--brand-dark); }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Sections ---------- */
section { padding: 40px 0; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }

/* ---------- Show cards ---------- */
.shows { display: grid; gap: 16px; }
.show {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  display: grid; grid-template-columns: 96px 1fr; overflow: hidden;
}
.show .date-badge {
  background: var(--brand); color: #fff; text-align: center;
  display: flex; flex-direction: column; justify-content: center; padding: 12px 8px;
}
.show .date-badge .mon { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.show .date-badge .day { font-family: var(--font-head); font-size: 2rem; line-height: 1; font-weight: 700; }
.show .date-badge .yr { font-size: .8rem; opacity: .85; }
.show .body { padding: 16px 20px; }
.show .body h3 { margin-bottom: .25em; }
.show .meta { color: var(--muted); font-size: .95rem; margin: 0; }
.show .meta strong { color: var(--ink); font-weight: 600; }
.show .notes { margin: .5em 0 0; }
.show .links { margin-top: 10px; display: flex; gap: 16px; flex-wrap: wrap; font-size: .95rem; }
.tag {
  display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); margin-left: 6px; vertical-align: middle;
}
.show.past { opacity: .7; }
.show.past .date-badge { background: var(--muted); }

.empty, .loading {
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 24px; color: var(--muted); text-align: center;
}

details.archive { margin-top: 32px; }
details.archive summary { cursor: pointer; font-weight: 600; color: var(--brand); }
details.archive .shows { margin-top: 16px; }

/* ---------- Forms ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
}
.form-grid { display: grid; gap: 16px; }
.form-row-2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
label .req { color: var(--brand); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 10px 12px; border: 1px solid #cfc3c7; border-radius: 8px; background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--brand-soft); border-color: var(--brand);
}
textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -9999px; }   /* spam honeypot */
.form-status { margin: 0; font-weight: 600; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: #b3261e; }

.contact-layout { display: grid; gap: 24px; grid-template-columns: 2fr 1fr; align-items: start; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--card);
  padding: 24px 0; color: var(--muted); font-size: .95rem;
}
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .contact-layout, .form-row-2 { grid-template-columns: 1fr; }
  .show { grid-template-columns: 72px 1fr; }
  .show .date-badge .day { font-size: 1.6rem; }
  .hero { padding: 40px 0 32px; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a { transition: background .15s, color .15s; }
}

/* ---------- Gallery ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  font: inherit; font-weight: 500; cursor: pointer;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.gallery {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.gallery .empty, .gallery .loading { grid-column: 1 / -1; }
.quilt {
  margin: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.quilt-open {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; background: var(--brand-soft);
  aspect-ratio: 1 / 1; overflow: hidden;
}
.quilt-open img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quilt-open:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.quilt figcaption { padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.quilt figcaption strong { font-family: var(--font-head); font-weight: 600; }
.quilt figcaption .meta { width: 100%; color: var(--muted); font-size: .9rem; }
.tag.status-sold { background: #eee8ea; color: var(--muted); }
.tag.status-available { background: #e3f2e8; color: var(--ok); }
.gallery-cta { margin-top: 32px; color: var(--muted); }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100%; height: 100%; color: #fff;
}
.lightbox::backdrop { background: rgba(20, 14, 17, .88); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; max-width: min(900px, 92vw); text-align: center; }
.lightbox img { max-width: 100%; max-height: 70vh; border-radius: 8px; background: #fff; }
.lightbox figcaption { margin-top: 12px; }
.lightbox h2 { color: #fff; font-size: 1.4rem; margin: 0 0 .2em; }
.lightbox p { margin: .2em 0; color: #e9dfe3; }
.lightbox .lb-count { font-size: .85rem; opacity: .7; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; line-height: 1;
}
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 16px; right: 16px; font-size: 1.2rem !important; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 720px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}
.quilt figcaption .tag { margin-left: 0; }
