/*
Theme Name: Chilli Club
Theme URI: https://chilliclub.org
Author: Chilli Club
Description: A compact editorial block theme for the Singapore non-profit community Chilli Club.
Version: 0.2.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: chilli-club
*/

:root {
  --cc-ink: #101512;
  --cc-green: #164c37;
  --cc-coral: #ef583f;
  --cc-paper: #fcfcfa;
  --cc-muted: #5f6561;
  --cc-line: #ccd1cd;
  --cc-max: 1390px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cc-paper);
  color: var(--cc-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wp-site-blocks { overflow: clip; }

.cc-site-header {
  position: relative;
  z-index: 20;
  border-top: 1px solid #969c98;
  border-bottom: 1px solid var(--cc-line);
  background: rgba(252, 252, 250, .97);
}
.cc-header-inner {
  min-height: 68px;
  padding: 0 28px !important;
}
.cc-wordmark,
.cc-wordmark a {
  color: var(--cc-ink) !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  letter-spacing: .34em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.cc-main-nav { gap: 30px !important; }
.cc-main-nav .wp-block-navigation-item__content {
  color: var(--cc-ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
}
.cc-main-nav .cc-join-nav { margin-left: 6px; }
.cc-main-nav .cc-join-nav .wp-block-navigation-item__content {
  display: block;
  padding: 18px 28px;
  background: var(--cc-coral);
  color: #fff;
}

.cc-magazine {
  width: min(calc(100% - 48px), var(--cc-max));
  margin: 0 auto;
}
.cc-lead-grid {
  display: grid;
  grid-template-columns: 1.67fr 1fr;
  gap: 7px;
  padding-top: 0;
}
.cc-feature {
  position: relative;
  display: block;
  overflow: hidden;
  background: #d5d8d4;
  color: #fff;
}
.cc-feature--lead { min-height: 548px; }
.cc-feature-stack { display: grid; grid-template-rows: 1fr 1fr; gap: 7px; }
.cc-feature--side { min-height: 270px; }
.cc-feature img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}
.cc-feature:hover img { transform: scale(1.018); }
.cc-photo-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(4, 10, 7, .74) 100%);
}
.cc-feature-copy {
  position: absolute;
  right: 28px;
  bottom: 23px;
  left: 28px;
}
.cc-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 0 9px;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}
.cc-meta b {
  display: inline-block;
  padding: 6px 9px;
  background: var(--cc-green);
  color: #fff;
  font-size: 9px;
  letter-spacing: .1em;
}
.cc-feature-copy strong {
  display: block;
  max-width: 780px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 3.15vw, 49px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: .98;
}
.cc-feature-copy em {
  display: block;
  max-width: 670px;
  margin-top: 10px;
  font-size: 15px;
  font-style: normal;
  line-height: 1.4;
}
.cc-feature--side .cc-feature-copy { right: 20px; bottom: 17px; left: 20px; }
.cc-feature--side .cc-feature-copy strong { font-size: clamp(20px, 2vw, 28px); line-height: 1.05; }
.cc-feature--side .cc-meta { margin-bottom: 7px; }

.cc-news-grid {
  display: grid;
  grid-template-columns: 2.05fr 1fr;
  border-top: 1px solid #919893;
  border-bottom: 1px solid #919893;
  margin-top: 12px;
}
.cc-journal { padding-right: 18px; }
.cc-upcoming { border-left: 1px solid var(--cc-line); padding-left: 17px; }
.cc-journal > h2,
.cc-upcoming > h2 {
  margin: 0;
  padding: 14px 13px 11px;
  color: var(--cc-green);
  font-family: inherit;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .11em;
  line-height: 1;
  text-transform: uppercase;
}
.cc-story-row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 94px;
  padding: 10px 13px;
  border-top: 1px solid var(--cc-line);
  gap: 28px;
}
.cc-story-thumb { height: 73px; overflow: hidden; }
.cc-story-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cc-story-body { min-width: 0; }
.cc-meta--ink { margin-bottom: 7px; color: #4b514d; font-size: 9px; }
.cc-meta--ink b { padding: 0; background: transparent; color: var(--cc-coral); }
.cc-story-body h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.14;
}
.cc-story-body p:last-child { margin: 4px 0 0; color: #303632; font-size: 13px; }
.cc-read {
  color: var(--cc-coral);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.cc-read span { padding-left: 7px; font-size: 18px; }

.cc-upcoming-list { border: 1px solid var(--cc-line); }
.cc-upcoming-row {
  display: grid;
  grid-template-columns: 62px 1fr 18px;
  align-items: center;
  min-height: 89px;
  border-top: 1px solid var(--cc-line);
}
.cc-upcoming-row:first-child { border-top: 0; }
.cc-event-date {
  display: flex;
  height: 62px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--cc-line);
  color: var(--cc-green);
  line-height: 1;
  text-transform: uppercase;
}
.cc-event-date small { font-size: 9px; font-weight: 800; }
.cc-event-date strong { margin: 3px 0; color: var(--cc-ink); font-family: Georgia, serif; font-size: 23px; }
.cc-event-info { display: flex; min-width: 0; flex-direction: column; padding: 0 17px; }
.cc-event-info small { margin-bottom: 7px; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.cc-event-info strong { overflow: hidden; font-size: 14px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.cc-event-info em { margin-top: 5px; overflow: hidden; color: var(--cc-muted); font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.cc-arrow { font-family: Georgia, serif; font-size: 24px; }

.cc-footer {
  background: var(--cc-paper);
  color: var(--cc-ink);
}
.cc-footer-inner {
  min-height: 82px;
  padding: 0 14px !important;
}
.cc-footer-inner p { margin: 0; }
.cc-footer-mark {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .28em;
}
.cc-footer-mark span { padding-left: 12px; color: var(--cc-coral); font-size: 10px; letter-spacing: .04em; }
.cc-footer-line { color: var(--cc-green); font-size: 11px; }
.cc-footer-copy { color: #444a46; font-size: 10px; }

.cc-content-shell { min-height: 65vh; padding-top: 70px !important; padding-bottom: 90px !important; }
.cc-content-shell .wp-block-post-title { max-width: 16ch; font-family: Georgia, serif; font-size: clamp(42px, 7vw, 84px); line-height: .98; }
.cc-event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cc-event-card { padding: 22px; border: 1px solid var(--cc-line); }
.cc-event-card__date { color: var(--cc-green); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 980px) {
  .cc-magazine { width: min(calc(100% - 28px), var(--cc-max)); }
  .cc-lead-grid { grid-template-columns: 1.35fr 1fr; }
  .cc-feature--lead { min-height: 500px; }
  .cc-news-grid { grid-template-columns: 1fr; }
  .cc-upcoming { border-top: 1px solid var(--cc-line); border-left: 0; padding: 0 0 18px; }
  .cc-story-row { grid-template-columns: 180px minmax(0, 1fr); gap: 18px; }
  .cc-read { display: none; }
}

@media (max-width: 760px) {
  .cc-header-inner { min-height: 61px; padding: 0 16px !important; }
  .cc-wordmark, .cc-wordmark a { font-size: 16px !important; letter-spacing: .25em; }
  .cc-main-nav { gap: 0 !important; }
  .cc-main-nav .cc-join-nav { margin-left: 0; }
  .cc-main-nav .cc-join-nav .wp-block-navigation-item__content { padding: 12px 18px; }
  .cc-lead-grid { grid-template-columns: 1fr; }
  .cc-feature--lead { min-height: 490px; }
  .cc-feature-stack { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .cc-feature--side { min-height: 230px; }
  .cc-feature-copy { right: 18px; bottom: 18px; left: 18px; }
  .cc-feature-copy strong { font-size: 37px; }
  .cc-feature-copy em { font-size: 13px; }
  .cc-story-row { grid-template-columns: 125px minmax(0, 1fr); padding: 10px 5px; gap: 13px; }
  .cc-story-thumb { height: 83px; }
  .cc-story-body h3 { font-size: 16px; }
  .cc-story-body p:last-child { display: none; }
  .cc-meta--ink { gap: 8px; }
  .cc-journal { padding-right: 0; }
  .cc-footer-inner { display: grid !important; grid-template-columns: 1fr; align-items: start !important; justify-items: start; padding: 24px 5px !important; gap: 14px; }
  .cc-footer-line { width: 100%; }
  .cc-footer-copy { justify-self: start; }
  .cc-footer-mark span { display: block; padding: 5px 0 0; }
}

@media (max-width: 520px) {
  .cc-magazine { width: calc(100% - 18px); }
  .cc-feature--lead { min-height: 440px; }
  .cc-feature-stack { grid-template-columns: 1fr; }
  .cc-feature--side { min-height: 245px; }
  .cc-feature-copy strong { font-size: 31px; }
  .cc-feature--side .cc-feature-copy strong { font-size: 23px; }
  .cc-story-row { grid-template-columns: 100px minmax(0, 1fr); }
  .cc-upcoming { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
