/*
Theme Name:   Blocksy Child
Theme URI:    https://crsny.org
Description:  Blocksy child theme for crsny.org redesign
Author:       crsny.org
Template:     blocksy
Version:      1.0.0
Text Domain:  blocksy-child
*/

/* ─── Design tokens ────────────────────────────────────────────────────────── */
:root {
  /* Colors */
  --color-bg:       #faf8f5;
  --color-text:     #181e3c;
  --color-gold:     #f1d476;
  --color-cobalt:   #1d348d;
  --color-green:    #487054;
  --color-border:   #d4cfc8;

  /* Typography */
  --font-heading:   'Lora', Georgia, serif;
  --font-body:      'Jost', system-ui, sans-serif;

  /* Override Blocksy's font variable so its bundle picks up our fonts */
  --theme-font-family: var(--font-body);

  /* Override Blocksy's color palette */
  --theme-palette-color-1: #1d348d; /* cobalt — primary, links, buttons */
  --theme-palette-color-2: #487054; /* forest green — link hover */
  --theme-palette-color-3: #181e3c; /* navy — body text */
  --theme-palette-color-4: #181e3c; /* navy — headings */
  --theme-palette-color-5: #d4cfc8; /* border / divider */
  --theme-palette-color-6: #ede8df; /* subtle section background */
  --theme-palette-color-7: #faf8f5; /* page background */
  --theme-palette-color-8: #ffffff; /* white */
}

h1, h2, h3, h4, h5, h6 {
  /* Override Blocksy's per-element font variable for headings */
  --theme-font-family: var(--font-heading);
}

/* ─── Base typography ──────────────────────────────────────────────────────── */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text);
}

a {
  color: var(--color-cobalt);
}

a:hover {
  color: var(--color-green);
}

hr,
.wp-block-separator {
  border-color: var(--color-border);
}

/* ─── Homepage sections ────────────────────────────────────────────────────── */
.crsny-section {
  padding: 2.5rem 2rem;
  border-bottom: 0.5px solid var(--color-border);
}

.crsny-eyebrow,
.crsny-sec-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.crsny-eyebrow        { color: var(--color-cobalt); margin-bottom: 1.2rem; }
.crsny-sec-label      { color: var(--color-green); }

/* ── Hero ── */
.crsny-hero { padding-top: 3.5rem; padding-bottom: 3rem; }

.crsny-hero__inner { align-items: center; gap: 3rem; }

.crsny-hero .wp-block-heading { font-weight: 400; font-size: 2.4rem; line-height: 1.3; margin: 0 0 0; }

.crsny-gold-rule {
  width: 44px !important;
  height: 2px !important;
  background-color: var(--color-gold) !important;
  border: none !important;
  margin: 1.25rem 0 !important;
  border-radius: 1px;
}

.crsny-hero__welcome {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  line-height: 1.85;
  opacity: 0.82;
  margin-bottom: 1.75rem;
}

.crsny-hero__image-col .wp-block-image img {
  border-radius: 4px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  background: var(--color-text);
}

/* ── Buttons ── */
.crsny-btn-primary .wp-block-button__link,
.crsny-btn-secondary .wp-block-button__link {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.06em;
  border-radius: 2px;
  padding: 0.65rem 1.4rem;
}

.crsny-btn-primary .wp-block-button__link  { background: var(--color-text) !important; color: var(--color-bg) !important; }
.crsny-btn-secondary .wp-block-button__link { background: transparent !important; color: var(--color-text) !important; border: 0.5px solid var(--color-text) !important; opacity: 0.7; }

/* ── Cards ── */
.crsny-card {
  padding: 1.4rem;
  border: 0.5px solid var(--color-border);
  border-radius: 4px;
  background: #fff;
}

.crsny-card__title {
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  margin: 0 0 0.5rem !important;
}

.crsny-card__body {
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.62;
  margin: 0;
}

/* ── Events ── */
.crsny-events .tribe-events-calendar,
.crsny-events .tribe_events_cat,
.crsny-events .tribe-events-loop { font-family: var(--font-body); }

/* ── Notes (Query block) ── */
.crsny-notes-query .wp-block-post-template { list-style: none; padding: 0; margin: 0; }

.crsny-note__inner {
  display: grid !important;
  grid-template-columns: 72px 1fr;
  gap: 1.25rem;
  padding: 0.9rem 0;
  border-bottom: 0.5px solid var(--color-border);
  align-items: baseline;
}

.crsny-ndate {
  font-size: 12px;
  color: var(--color-text);
  opacity: 0.45;
  white-space: nowrap;
}

.crsny-ntitle a {
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--color-text);
  text-decoration: none;
}

.crsny-nexcerpt,
.crsny-nexcerpt p {
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--color-text);
  opacity: 0.55;
  margin: 0.2rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Remove WP block Query default spacing inside notes */
.crsny-notes-query ul.wp-block-post-template,
.crsny-notes-query .wp-block-post-template { margin: 0; padding: 0; gap: 0; }
.crsny-notes-query .wp-block-post-template > li { list-style: none; margin: 0; padding: 0; }

/* ── Ecosystem ── */
.crsny-eco {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 0.5px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 1.5rem;
}

.crsny-eco .wp-block-columns { margin: 0; gap: 0; }

.crsny-eco__item {
  background: var(--color-bg);
  padding: 1.4rem !important;
}

.crsny-eco__title {
  font-family: var(--font-heading) !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  letter-spacing: 0;
  margin: 0 0 0.5rem !important;
}

.crsny-eco__desc {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.65;
  margin: 0 0 0.85rem;
}

.crsny-eco__link a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-cobalt);
  text-decoration: none;
}

/* ── Last section has no bottom border ── */
.crsny-ecosystem { border-bottom: none; }

/* ── Hide Blocksy page title on the static front page ── */
.home .entry-header { display: none !important; height: 0 !important; margin: 0 !important; padding: 0 !important; }

/* ── Custom events list (replaces TEC calendar widget) ── */
.crsny-events-list { display: flex; flex-direction: column; }

.crsny-erow {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1.25rem;
  padding: 0.9rem 0;
  border-bottom: 0.5px solid var(--color-border);
  align-items: baseline;
}

.crsny-edate {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-cobalt);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.crsny-etitle a {
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--color-text);
  text-decoration: none;
}

.crsny-etype {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-green);
  white-space: nowrap;
}

/* ── Hero image placeholder (before image is set) ── */
.crsny-hero__image-col .wp-block-image:not(:has(img[src])) {
  background: var(--color-text);
  border-radius: 4px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

/* ─── About Page ───────────────────────────────────────────────────────────── */

.crsny-about-lede {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--color-text);
}

.crsny-leaders { gap: 3rem !important; }

.crsny-leader-name {
  font-family: var(--font-heading) !important;
  font-size: 1.2rem !important;
  font-weight: 400 !important;
  margin: 1rem 0 0.25rem !important;
}

.crsny-leader-title {
  font-family: var(--font-body) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--color-green) !important;
  margin: 0 0 0.85rem !important;
}

.crsny-leader-bio {
  font-size: 14px;
  line-height: 1.75;
  opacity: 0.75;
  margin-bottom: 1rem;
}

.crsny-leader-card .wp-block-image:not(:has(img[src])) {
  background: var(--color-border);
  border-radius: 4px;
  aspect-ratio: 3/4;
  min-height: 240px;
  display: block;
}

.crsny-leadership { border-bottom: none; }

/* Profile header: fixed-width photo + compact credentials */
.crsny-profile-header.wp-block-columns {
  align-items: flex-start;
  gap: 2rem !important;
}
.crsny-profile-header .wp-block-column:first-child {
  flex: 0 0 180px !important;
  width: 180px !important;
  min-width: 0;
}
.crsny-profile-header .wp-block-column:last-child {
  flex: 0 1 auto !important;
  min-width: 0;
}
.crsny-profile-header .wp-block-column:last-child ul {
  margin-top: 0.5rem;
}

.crsny-staff-item {
  font-size: 14px;
  color: var(--color-text);
  margin-top: 0.25rem;
}

/* ─── Single Event Page ────────────────────────────────────────────────────── */

/* Back link */
.single-tribe_events .tribe-events-back a {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-green);
  text-decoration: none;
}

/* Title */
.single-tribe_events .tribe-events-single-event-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--color-text);
  margin: 1.25rem 0 0.4rem;
  line-height: 1.25;
}

/* Date/time header line */
.single-tribe_events .tribe-events-schedule {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-cobalt);
  margin-bottom: 1.75rem;
}

/* Hide prev/next nav and organizer (always CRS) */
.single-tribe_events #tribe-events-header,
.single-tribe_events .tribe-events-meta-group-organizer { display: none !important; }

/* Remove TEC's auto-generated separator line */
.tribe-events-event-meta::before,
.tribe-events-event-meta ~ div:not(.tribe-events-event-meta, .event-tickets) { border-top: none !important; }

/* "This event has passed" notice */
.single-tribe_events .tribe-events-notices {
  background: var(--color-gold);
  color: var(--color-text);
  font-size: 12px;
  font-family: var(--font-body);
  padding: 0.5rem 1rem;
  border-radius: 2px;
  margin-bottom: 1rem;
  opacity: 0.8;
}
.single-tribe_events .tribe-events-notices ul { margin: 0; padding: 0; list-style: none; }

/* ── Two-column grid layout ── */
.single-tribe_events .type-tribe_events {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto;
  column-gap: 2.5rem;
  align-items: start;
}

/* Featured image — full width */
.single-tribe_events .tribe-events-event-image {
  grid-column: 1 / -1;
  grid-row: 1;
  margin-bottom: 2rem;
}
.single-tribe_events .tribe-events-event-image img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* Description — left column */
.single-tribe_events .tribe-events-single-event-description {
  grid-column: 1;
  grid-row: 2;
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text);
}

/* Subscribe / Add to calendar — left column below description */
.single-tribe_events .tribe-events.tribe-common {
  grid-column: 1;
  grid-row: 3;
  margin-top: 1.5rem;
}

/* Details (primary) and Venue (secondary) — right column */
.single-tribe_events .tribe-events-single-section.primary {
  grid-column: 2;
  grid-row: 2;
}
.single-tribe_events .tribe-events-single-section.secondary {
  grid-column: 2;
  grid-row: 3;
  margin-top: 1rem;
}

/* Meta card style */
.single-tribe_events .tribe-events-single-section {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 0 0 0.5px var(--color-border);
  padding: 1.25rem 1.4rem;
}

/* Meta section heading */
.single-tribe_events .tribe-events-single-section-title {
  font-family: var(--font-body) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-green) !important;
  margin: 0 0 0.85rem !important;
  padding: 0 !important;
  border: none !important;
}

/* Meta list */
.single-tribe_events .tribe-events-meta-list { list-style: none; margin: 0; padding: 0; }
.single-tribe_events .tribe-events-meta-item {
  font-size: 13px;
  padding: 0.3rem 0;
  border-bottom: 0.5px solid var(--color-border);
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.single-tribe_events .tribe-events-meta-item:last-child { border-bottom: none; }

.single-tribe_events .tribe-events-meta-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0.55;
  min-width: 52px;
  flex-shrink: 0;
}
.single-tribe_events .tribe-events-meta-value { color: var(--color-text); }
.single-tribe_events .tribe-events-meta-value a { color: var(--color-cobalt); }

/* ── Mobile: stack with meta before description ── */
@media (max-width: 782px) {
  .single-tribe_events .type-tribe_events {
    display: flex;
    flex-direction: column;
  }
  .single-tribe_events .tribe-events-event-image      { order: 1; }
  .single-tribe_events .tribe-events-single-section.primary   { order: 2; margin-top: 0; }
  .single-tribe_events .tribe-events-single-section.secondary { order: 3; margin-top: 0.75rem; }
  .single-tribe_events .tribe-events-single-event-description { order: 4; margin-top: 1.5rem; }
  .single-tribe_events .tribe-events.tribe-common              { order: 5; }
}

/* ─── Our Communities / Artists & Projects Page ──────────────────────────── */

/* Hide auto-generated Blocksy page title — add "crs-communities-page" to Additional CSS Classes */
.crs-communities-page .entry-header {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Page intro */
.crs-intro {
  max-width: 660px;
  margin: clamp(3rem, 7vw, 5rem) 0 clamp(3.5rem, 7vw, 5.5rem);
}

.crs-intro__title {
  font-family: var(--font-heading) !important;
  font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  color: var(--color-text) !important;
  margin: 0 0 1.5rem !important;
}

.crs-intro__body {
  font-size: 0.9375rem;
  line-height: 1.78;
  color: rgba(24, 30, 60, 0.72);
}
.crs-intro__body p + p { margin-top: 0.9rem; }

/* Section head */
.crs-sec-head {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.crs-sec-head__label {
  font-family: var(--font-body);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(24, 30, 60, 0.45);
  white-space: nowrap;
}

.crs-sec-head__rule {
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.crs-spacer { margin-top: clamp(2.5rem, 5vw, 4rem); }

/* Artist row */
.crs-row {
  display: grid;
  grid-template-columns: 45fr 55fr;
  grid-template-areas: "img txt";
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin-bottom: clamp(4rem, 8vw, 6rem);
}

.crs-row.flip {
  grid-template-columns: 55fr 45fr;
  grid-template-areas: "txt img";
}

.crs-row .crs-img { grid-area: img; }
.crs-row .crs-txt { grid-area: txt; }

/* Image */
.crs-img {
  aspect-ratio: 4 / 3;
  border-radius: 2px;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.crs-img:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.crs-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder — swap for <img> when photo is ready */
.crs-img-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem 1rem;
}

.crs-img-ph__credit {
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.ph-shyu       { background: linear-gradient(150deg, #362515, #7a5228); }
.ph-chaker     { background: linear-gradient(150deg, #0e1430, #243480); }
.ph-dream      { background: linear-gradient(150deg, #111111, #2a2828); }
.ph-eda        { background: linear-gradient(150deg, #152030, #283f58); }
.ph-kotohogi   { background: linear-gradient(150deg, #0e0c08, #2c2318); }
.ph-zone       { background: linear-gradient(150deg, #1e1428, #3e2a56); }
.ph-qian       { background: linear-gradient(150deg, #2e1c08, #643e18); }
.ph-kim        { background: linear-gradient(150deg, #280a0c, #601a22); }
.ph-chaospace  { background: linear-gradient(150deg, #0e1a40, #1d348d); }
.ph-turbulence { background: linear-gradient(150deg, #081c24, #154058); }

/* Content */
.crs-txt { padding-top: 0.25rem; }

.crs-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(24, 30, 60, 0.48);
  margin-bottom: 0.8rem;
}

.crs-eyebrow::before {
  content: '';
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--color-gold);
  flex-shrink: 0;
}

.crs-name {
  font-family: var(--font-heading) !important;
  font-size: clamp(1.5rem, 2.5vw, 2rem) !important;
  font-weight: 400 !important;
  line-height: 1.15 !important;
  color: var(--color-text) !important;
  margin: 0 0 0.3rem !important;
}

.crs-collaborators {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(24, 30, 60, 0.5);
  margin-bottom: 0.5rem;
}

.crs-project {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1rem, 1.8vw, 1.175rem);
  color: rgba(24, 30, 60, 0.65);
  margin-bottom: 1.1rem;
}

.crs-desc {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: rgba(24, 30, 60, 0.72);
  margin-bottom: 1.35rem;
  max-width: 58ch;
}

.crs-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.crs-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-cobalt) !important;
  text-decoration: none !important;
  transition: gap 0.18s ease, color 0.18s ease;
}

.crs-link:hover { gap: 0.5rem; color: var(--color-text) !important; }

.crs-link .crs-arr { display: inline-block; transition: transform 0.18s ease; }
.crs-link:hover .crs-arr { transform: translateX(2px); }

/* Mobile */
@media (max-width: 680px) {
  .crs-row,
  .crs-row.flip {
    grid-template-columns: 1fr;
    grid-template-areas: "img" "txt";
    gap: 1.5rem;
  }
  .crs-desc { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .crs-img, .crs-link, .crs-link .crs-arr { transition: none; }
}

/* ── Ecosystem: override WP flex with grid for 1px divider effect ── */
.wp-block-columns.crsny-eco {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1px !important;
  background: var(--color-border) !important;
  border: 0.5px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 1.5rem;
}

.wp-block-columns.crsny-eco > .wp-block-column {
  background: #fff;
  margin: 0 !important;
  padding: 1.4rem !important;
}

/* ─── In-page navigation row ────────────────────────────────────────────────── */
.crsny-page-nav { padding: 0.25rem 0 1.5rem; }
.crsny-page-nav a {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0.45;
  text-decoration: none;
}
.crsny-page-nav a:hover { opacity: 1; }

/* ─── Exhibitions archive grid ──────────────────────────────────────────────── */
.crsny-exh-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.5rem;
  margin-top: 1.5rem;
}
.crsny-exh-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}
.crsny-exh-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--color-border);
}
.crsny-exh-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s;
}
.crsny-exh-card:hover .crsny-exh-img img { opacity: 0.82; }
.crsny-exh-info { padding: 0.65rem 0 0; }
.crsny-exh-info h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 400;
  margin: 0 0 0.2rem;
  line-height: 1.4;
}
.crsny-exh-date {
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.5;
  margin: 0;
}

/* Artists archive — flowing columns */
.crsny-artists-cols {
  columns: 3;
  column-gap: 2.5rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  font-size: 14px;
  line-height: 2;
}
.crsny-artists-cols a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}
.crsny-artists-cols a:hover { border-bottom-color: var(--color-text); }

@media (max-width: 782px) {
  .crsny-exh-grid { grid-template-columns: repeat(2, 1fr); }
  .crsny-artists-cols { columns: 2; }
}
@media (max-width: 480px) {
  .crsny-exh-grid { grid-template-columns: 1fr; }
  .crsny-artists-cols { columns: 1; }
}
