/* Temple Address — design system
   Tokens taken from the TempleAddress Brand Guideline Board. */

:root {
  /* Primary */
  --orange: #C7441A;
  --orange-dark: #A93714;
  --maroon: #6E2F1E;
  --maroon-deep: #4A1E12;

  /* Supporting */
  --ivory: #F8F6F3;
  --parchment: #F0EDE2;
  --white: #FFFFFF;
  --brass: #B68A56;

  /* Text */
  --ink: #281D10;
  --ink-2: #6B6158;
  --muted: #9A9087;
  --inverse: #FFFFFF;

  /* Lines & shadow */
  --line: #E8E1D6;
  --line-soft: #F0EBE2;
  --shadow-sm: 0 1px 2px rgba(40, 29, 16, .05);
  --shadow-md: 0 4px 16px rgba(40, 29, 16, .07);
  --shadow-lg: 0 16px 48px rgba(40, 29, 16, .11);

  /* Radius */
  --r-4: 4px;
  --r-8: 8px;
  --r-12: 12px;
  --r-16: 16px;
  --r-24: 24px;
  --r-full: 999px;

  /* Type */
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --ui: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ml: "Noto Sans Malayalam", "DM Sans", sans-serif;

  --maxw: 1180px;
  --gutter: 20px;
  --header-h: 68px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; line-height: 1.18; color: var(--ink); }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: var(--r-4); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 56px; }
.section--tight { padding-block: 40px; }
@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .section { padding-block: 88px; }
  .section--tight { padding-block: 56px; }
}

/* ---------- eyebrow / section head ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brass); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--brass); opacity: .7; }

.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(26px, 4.2vw, 34px); }
.section-head p { margin-top: 10px; color: var(--ink-2); max-width: 56ch; }
.section-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--r-full); border: 1px solid transparent;
  font-size: 15px; font-weight: 500; letter-spacing: .01em;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-dark); }
.btn--ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--outline { border-color: var(--line); color: var(--ink); background: var(--white); }
.btn--outline:hover { border-color: var(--brass); color: var(--maroon); }
.btn--text { padding: 0; border-radius: 0; color: var(--orange); font-weight: 500; }
.btn--text:hover { color: var(--orange-dark); }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(248,246,243,.88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; }
.brand img { height: 34px; width: auto; }
.nav { display: none; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 14px; border-radius: var(--r-full); font-size: 15px; color: var(--ink-2);
  transition: color .16s ease, background-color .16s ease;
}
.nav a:hover { color: var(--maroon); background: var(--parchment); }
.nav a[aria-current="page"] { color: var(--maroon); font-weight: 500; }
.header-cta { display: none; }
.burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 10px; background: none; border: 1px solid var(--line); border-radius: var(--r-full);
}
.burger span { display: block; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform .22s ease, opacity .18s ease; }
.burger span:nth-child(2) { width: 70%; }
body.nav-open .burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0; z-index: 55;
  background: var(--ivory); padding: 28px var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 4px;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  overflow-y: auto;
}
body.nav-open .mobile-nav { opacity: 1; transform: none; pointer-events: auto; }
body.nav-open { overflow: hidden; }
.mobile-nav a {
  font-family: var(--display); font-size: 26px; padding: 14px 0;
  border-bottom: 1px solid var(--line-soft); color: var(--ink);
}
.mobile-nav .btn { margin-top: 24px; align-self: flex-start; }

@media (min-width: 900px) {
  .nav, .header-cta { display: flex; }
  .burger, .mobile-nav { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(199,68,26,.55) 0%, rgba(199,68,26,0) 55%),
    linear-gradient(160deg, var(--maroon) 0%, var(--maroon-deep) 100%);
  color: #fff;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 -2px 0; height: 120px;
  background: linear-gradient(to top, rgba(248,246,243,1), rgba(248,246,243,0));
  pointer-events: none; opacity: .14;
}
.hero__motif {
  position: absolute; right: -90px; bottom: -140px; width: 520px; height: 520px;
  opacity: .16; pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; padding-block: 68px 76px; max-width: 760px; }
.hero h1 {
  color: #fff; font-size: clamp(38px, 8vw, 62px); line-height: 1.07; letter-spacing: -0.025em;
}
.hero h1 em { font-style: italic; color: var(--brass); }
.hero__kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--brass);
}
.hero__kicker::before { content: ""; width: 28px; height: 1px; background: var(--brass); }
.hero p.hero__lede {
  margin-top: 20px; font-size: clamp(16px, 2.4vw, 19px); line-height: 1.65;
  color: rgba(255,255,255,.80); max-width: 54ch;
}
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__meta {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(182,138,86,.3);
  display: flex; flex-wrap: wrap; gap: 28px;
}
.hero__meta div { min-width: 92px; }
.hero__meta dt { font-family: var(--display); font-size: 26px; color: #fff; }
.hero__meta dd { margin: 2px 0 0; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); }
@media (min-width: 900px) { .hero__inner { padding-block: 104px 112px; } }

/* ---------- category chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--white);
  font-size: 14px; color: var(--ink-2); white-space: nowrap;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.chip:hover { border-color: var(--brass); color: var(--maroon); }
.chip[aria-pressed="true"], .chip--active { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.chip__count { font-size: 12px; color: var(--muted); }
.chip[aria-pressed="true"] .chip__count, .chip--active .chip__count { color: rgba(255,255,255,.6); }

/* ---------- cards ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--r-16);
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line); }
.card__cover { position: relative; aspect-ratio: 16 / 10; background: var(--parchment); overflow: hidden; }
.card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__cover img { transform: scale(1.035); }

/* cover-less posts get an intentional brand panel, not a broken image */
.card__cover--empty {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cg fill='none' stroke='%23B68A56' stroke-width='1.4'%3E%3Ccircle cx='75' cy='152' r='30'/%3E%3Ccircle cx='75' cy='152' r='48'/%3E%3Ccircle cx='75' cy='152' r='66'/%3E%3Ccircle cx='75' cy='152' r='84'/%3E%3Ccircle cx='75' cy='152' r='102'/%3E%3C/g%3E%3C/svg%3E") center bottom / 150px auto repeat-x,
    linear-gradient(150deg, var(--maroon) 0%, var(--maroon-deep) 100%);
  display: flex; align-items: flex-end; padding: 18px;
}
.card__cover--empty span {
  font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--brass);
}
.card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__cat { font-size: 11.5px; letter-spacing: .15em; text-transform: uppercase; color: var(--orange); font-weight: 500; }
.card__title { font-size: 20px; line-height: 1.26; }
.card:hover .card__title { color: var(--maroon); }
.card__excerpt { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line-soft); }
.card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
.card__avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.card__flag { position: absolute; top: 12px; left: 12px; padding: 5px 11px; border-radius: var(--r-full); background: rgba(40,29,16,.72); color: #fff; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; backdrop-filter: blur(6px); }

/* featured (lead) card */
.card--lead { grid-column: 1 / -1; }
@media (min-width: 820px) {
  .card--lead { flex-direction: row; align-items: stretch; }
  .card--lead .card__cover { flex: 1 1 54%; aspect-ratio: auto; min-height: 340px; }
  .card--lead .card__body { flex: 1 1 46%; padding: 34px; justify-content: center; gap: 14px; }
  .card--lead .card__title { font-size: 31px; }
  .card--lead .card__excerpt { font-size: 16px; -webkit-line-clamp: 4; }
}

/* ---------- skeletons & states ---------- */
.skeleton { background: linear-gradient(90deg, #EFEAE1 25%, #F6F2EC 37%, #EFEAE1 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: var(--r-8); }
@keyframes sk { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }
.sk-card { height: 330px; border-radius: var(--r-16); }
.state { padding: 48px 20px; text-align: center; color: var(--ink-2); }
.state h3 { font-size: 22px; margin-bottom: 8px; }
.state--error { color: #9A3412; }
.center { text-align: center; }
.mt-32 { margin-top: 32px; }

/* ---------- band / mission ---------- */
.band { background: var(--parchment); border-block: 1px solid var(--line); }
.band__grid { display: grid; gap: 32px; }
@media (min-width: 860px) { .band__grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; } }
.pillars { display: grid; gap: 18px; margin: 0; padding: 0; }
.pillar { display: flex; gap: 14px; }
.pillar__n { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--brass); color: var(--brass); display: grid; place-items: center; font-size: 13px; font-family: var(--display); }
.pillar h4 { font-size: 17px; margin-bottom: 3px; }
.pillar p { font-size: 14.5px; color: var(--ink-2); }

/* ---------- post page ---------- */
.post-hero { padding-top: 36px; }
.post-hero__cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.post-hero h1 { font-size: clamp(30px, 5.6vw, 48px); line-height: 1.12; max-width: 20ch; }
.post-hero__meta { margin-top: 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 14px; color: var(--muted); }
.post-hero__meta .author { display: flex; align-items: center; gap: 9px; color: var(--ink-2); }
.post-cover { margin-top: 32px; border-radius: var(--r-24); overflow: hidden; background: var(--parchment); max-height: 520px; }
.post-cover img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; }

.post-layout { display: grid; gap: 48px; align-items: start; }
@media (min-width: 1000px) { .post-layout { grid-template-columns: minmax(0,1fr) 280px; gap: 64px; } }

.prose { font-size: 17.5px; line-height: 1.78; color: #3B3127; max-width: 68ch; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: clamp(23px, 3.6vw, 29px); margin-top: 1.9em; line-height: 1.24; }
.prose h3 { font-size: 21px; margin-top: 1.6em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose blockquote {
  margin: 1.9em 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--brass);
  font-family: var(--display); font-size: clamp(19px, 3vw, 23px); font-style: italic; line-height: 1.45; color: var(--maroon);
}
.prose blockquote p { margin: 0; }
.prose img { border-radius: var(--r-12); margin-block: 1.6em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { background: var(--parchment); padding: .12em .4em; border-radius: var(--r-4); font-size: .9em; }
.prose :lang(ml), .prose .ml { font-family: var(--ml); }

.post-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 26px; }
.aside-box { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--r-16); padding: 20px; }
.aside-box h4 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); font-family: var(--ui); font-weight: 500; margin-bottom: 14px; }

.post-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line); }
.like-btn { display: inline-flex; align-items: center; gap: 9px; padding: 10px 18px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--white); font-size: 14.5px; color: var(--ink-2); transition: all .18s ease; }
.like-btn:hover { border-color: var(--orange); color: var(--orange); }
.like-btn[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: #fff; }
.like-btn svg { width: 17px; height: 17px; }
.stat { font-size: 13.5px; color: var(--muted); }

/* ---------- comments ---------- */
.comments { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.comments h2 { font-size: 24px; margin-bottom: 22px; }
.c-form { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--r-16); padding: 16px; }
.c-form textarea {
  width: 100%; min-height: 92px; resize: vertical; border: 1px solid var(--line); border-radius: var(--r-12);
  padding: 12px 14px; font: inherit; font-size: 15px; color: var(--ink); background: var(--ivory);
}
.c-form textarea:focus { outline: none; border-color: var(--orange); background: #fff; }
.c-form__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.c-list { margin-top: 28px; display: grid; gap: 22px; }
.c-item { display: flex; gap: 13px; }
.c-item__av { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--parchment); object-fit: cover; display: grid; place-items: center; font-size: 14px; color: var(--brass); font-family: var(--display); }
.c-item__name { font-weight: 500; font-size: 15px; }
.c-item__time { font-size: 12.5px; color: var(--muted); }
.c-item__text { margin-top: 5px; font-size: 15px; color: #3B3127; line-height: 1.6; white-space: pre-wrap; }
.c-item__tools { margin-top: 8px; display: flex; gap: 14px; font-size: 13px; }
.c-item__tools button { background: none; border: 0; padding: 0; color: var(--muted); }
.c-item__tools button:hover { color: var(--orange); }
.c-replies { margin-top: 16px; margin-left: 49px; display: grid; gap: 18px; }
.c-pending { font-size: 12px; color: var(--brass); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- related ---------- */
.related { margin-top: 64px; padding-top: 44px; border-top: 1px solid var(--line); }

/* ---------- footer ---------- */
.site-footer { background: var(--maroon-deep); color: rgba(255,255,255,.72); margin-top: 24px; }
.site-footer__grid { display: grid; gap: 36px; padding-block: 56px 32px; }
@media (min-width: 820px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 56px; } }
.site-footer h4 { color: #fff; font-family: var(--ui); font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; margin-bottom: 14px; }
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: var(--brass); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14.5px; }
.footer-brand img { height: 36px; filter: brightness(0) invert(1); opacity: .92; }
.footer-brand p { margin-top: 16px; font-size: 14.5px; line-height: 1.65; max-width: 42ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 20px 28px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,.5); }

/* ---------- misc ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.breadcrumb { font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--orange); }
.page-head { padding-block: 44px 8px; }
.page-head h1 { font-size: clamp(32px, 6vw, 46px); }
.page-head p { margin-top: 12px; color: var(--ink-2); max-width: 58ch; font-size: 17px; }