/* ============================================================
   IndianArchitecture.org — design system
   Matches the DelhiCulture visual language:
   flat editorial "index card" register — white ground, ink text,
   hairline rules, sharp corners, no shadow, a single architectural
   redline accent (#C1401F) for eyebrows + focus, category hues as
   4px left stripes, Inter (display/body) + IBM Plex Mono (metadata).
   Auto dark mode.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #6b6b6b;
  --hairline: #e2e0da;
  --accent: #c1401f;
  --card-bg: #fefefd;
  --card-hover: #faf9f5;

  /* category hues — one family per discipline */
  --cat-heritage: #b0392a;
  --cat-archaeology: #b3612a;
  --cat-architecture: #2f5e96;
  --cat-urbanism: #2f7d8c;
  --cat-landscape: #3f8a4d;
  --cat-museum: #ab8420;
  --cat-photography: #6f56a0;
  --cat-modern: #b83e85;
  --cat-default: #6b6b6b;

  --stripe: 4px;
  --font-display: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  --gutter: 20px;
  --max-width: 1200px;
  --ease: cubic-bezier(0.25, 0.6, 0.3, 1);
  --t-fast: 140ms;
}

[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131211; --ink: #eceae5; --muted: #9a968e; --hairline: #2b2925;
    --accent: #e05a35; --card-bg: #181715; --card-hover: #1e1c19;
    --cat-heritage:#d0604f; --cat-archaeology:#d0824a; --cat-architecture:#6f95c8;
    --cat-urbanism:#5fa8b8; --cat-landscape:#6fb37d; --cat-museum:#cfa93f;
    --cat-photography:#9c85cc; --cat-modern:#d873ac; --cat-default:#9a968e;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-display); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; margin: 0; }
::selection { background: var(--accent); color: #fff; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent);
}
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- masthead / nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); border-bottom: 1px solid var(--hairline);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 400; font-size: 19px;
  letter-spacing: -0.01em; color: var(--accent);
}
.brand strong, .brand b { font-weight: 700; }
.brand__mark { color: var(--accent); font-size: 16px; }
.nav__links { display: flex; gap: 18px; margin-left: auto; }
.nav__links a {
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted);
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.nav__links a:hover, .nav__links a.active { color: var(--ink); border-bottom-color: var(--ink); }
@media (max-width: 720px){ .nav__links { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em;
  color: var(--ink); background: transparent;
  border: 1px solid var(--hairline); border-radius: 0; padding: 8px 13px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.btn:hover { color: var(--ink); border-color: var(--ink); }
.btn--primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.btn--primary:hover { color: #fff; filter: brightness(0.92); border-color: var(--accent); }
.btn--ghost { background: transparent; }
.btn--sm { padding: 6px 10px; font-size: 11px; }

/* ---------- home header ---------- */
.hero { padding: 64px 0 40px; }
.hero .eyebrow { display: block; margin-bottom: 14px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); letter-spacing: -0.02em; margin-bottom: 16px; }
.hero p.lede { font-size: clamp(15px, 1.8vw, 18px); color: var(--muted); max-width: 620px; margin: 0 0 26px; line-height: 1.55; }
.hero__quote {
  margin-top: 26px; font-family: var(--font-mono); font-size: 12.5px;
  color: var(--muted); border-left: var(--stripe) solid var(--accent); padding-left: 14px;
}

/* search — square, hairline, mono */
.search {
  max-width: 640px; display: flex; gap: 0; border: 1px solid var(--hairline); background: var(--card-bg);
}
.search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: var(--font-display); font-size: 16px; padding: 13px 14px; color: var(--ink);
}
.search input::placeholder { color: var(--muted); }
.search .btn--primary { border: 0; border-left: 1px solid var(--accent); }
.search__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }

.chip {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); background: transparent; border: 1px solid var(--hairline); border-radius: 0;
  padding: 5px 10px; cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- pills (reused as mono chips) ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); background: transparent; border: 1px solid var(--hairline); padding: 4px 9px;
}
.pill--accent { color: var(--accent); border-color: var(--accent); }

/* ---------- sections ---------- */
.section { padding: 48px 0 8px; }
.section .wrap > .section__head { margin-bottom: 20px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.section__head .eyebrow { display: block; margin-bottom: 10px; }
.section__head h2 { font-size: clamp(22px, 3vw, 30px); }
.section__head p { margin: 6px 0 0; color: var(--muted); max-width: 520px; font-size: 14px; }

/* ---------- card grid (hairline gaps) ---------- */
.grid { display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px){ .grid--3,.grid--4 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 620px){ .grid--3,.grid--4,.grid--2 { grid-template-columns: 1fr; } }

/* grids that are NOT card walls (kept as separated blocks) keep gap via override */
.grid.detached { gap: 16px; background: transparent; border: 0; }

.card {
  position: relative; background: var(--card-bg); color: var(--ink);
  display: flex; flex-direction: column; text-decoration: none; cursor: pointer;
  border-left: var(--stripe) solid var(--cat-color, var(--cat-architecture));
  transition: background-color var(--t-fast) var(--ease);
}
.card:hover { background: var(--card-hover); }
.card:hover .card__body h3 { text-decoration: underline; text-underline-offset: 3px; }

.card__img {
  position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center;
  background: var(--card-hover); border-bottom: 1px solid var(--hairline); color: var(--muted);
}
.card__img .tag {
  position: absolute; top: 10px; left: 12px; font-family: var(--font-mono);
  font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--cat-color, var(--cat-architecture)); background: var(--bg); padding: 3px 7px; border: 1px solid var(--hairline);
}
.card__img .ico { font-size: 30px; opacity: 0.5; }
.card__body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.card__body h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.005em; }
.card__body p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.card__meta { margin-top: 6px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--cat-color, var(--cat-architecture)); }

/* category assignment via image class (also tints the card stripe through the label) */
.ph1{ --cat-color: var(--cat-heritage); }
.ph2{ --cat-color: var(--cat-landscape); }
.ph3{ --cat-color: var(--cat-museum); }
.ph4{ --cat-color: var(--cat-urbanism); }
.ph5{ --cat-color: var(--cat-archaeology); }
.ph6{ --cat-color: var(--cat-photography); }
.ph-brick{ --cat-color: var(--cat-heritage); }

/* map teaser */
.mapteaser { border: 1px solid var(--hairline); background: var(--card-bg); display: block; }

/* ---------- rollout / phase blocks ---------- */
.phase { border: 1px solid var(--hairline); background: var(--card-bg); padding: 18px 18px 20px;
  border-left: var(--stripe) solid var(--cat-architecture); }
.phase h4 { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 12px; }
.phase ul { margin: 0; padding: 0; list-style: none; }
.phase li { padding: 7px 0; border-top: 1px solid var(--hairline); font-size: 14px; display: flex; justify-content: space-between; gap: 10px; }
.phase li:first-child { border-top: 0; }
.phase li .badge, .phase li span.badge { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- crosslink block ---------- */
.crosslink {
  border: 1px solid var(--hairline); border-left: var(--stripe) solid var(--cat-landscape);
  background: var(--card-bg); padding: 22px 24px; display: flex; align-items: center;
  justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--ink);
}
.crosslink h3 { font-size: 20px; }
.crosslink p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.crosslink em { color: var(--ink); font-style: italic; }

/* ---------- notice (AI examples) ---------- */
.notice {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink);
  background: var(--card-bg); border: 1px solid var(--hairline);
  border-left: var(--stripe) solid var(--accent); padding: 10px 14px;
}

/* ---------- detail hero (building/city/architect) ---------- */
.bhero { border-bottom: 1px solid var(--hairline); background: var(--bg); }
.bhero__content {
  padding: 40px 0 34px; border-top: var(--stripe) solid var(--cat-color, var(--cat-architecture)); margin-top: -1px;
}
.bhero .eyebrow, .bhero .sub { display: block; }
.bhero h1 { font-size: clamp(30px, 4.6vw, 48px); letter-spacing: -0.02em; margin: 12px 0 6px; }
.bhero .sub { font-size: 16px; color: var(--muted); font-family: var(--font-display); font-style: normal; margin-bottom: 4px; }
.bhero .facts { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 20px;
  font-family: var(--font-mono); font-size: 13px; color: var(--ink); }
.bhero .facts b { display: block; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); font-weight: 500; margin-bottom: 3px; }
.bactions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }

/* ---------- two-column detail layout ---------- */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 48px; padding: 44px 0; }
@media (max-width: 900px){ .layout { grid-template-columns: 1fr; gap: 32px; } }
.prose h2 {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin: 34px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--hairline);
}
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink); margin: 0 0 15px; font-size: 15px; line-height: 1.62; }
.prose .lead { font-size: 18px; line-height: 1.5; color: var(--ink); font-family: var(--font-display); font-weight: 400; }

.side { position: sticky; top: 76px; align-self: start; display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.panel { background: var(--card-bg); padding: 18px 18px 20px; }
.panel h4 { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 12px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--hairline); font-size: 13.5px; }
.kv:first-of-type { border-top: 0; }
.kv span:first-child { color: var(--muted); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.kv span:last-child { text-align: right; font-weight: 500; }

/* why-visit boxes */
.whyvisit { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); margin: 8px 0; }
@media (max-width:620px){ .whyvisit{ grid-template-columns:1fr; } }
.whyvisit .item { background: var(--card-bg); padding: 14px 16px; font-size: 13.5px; color: var(--muted); border-left: var(--stripe) solid var(--cat-architecture); }
.whyvisit .item b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); margin-bottom: 3px; }

/* highlights */
.highlights { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
@media (max-width:760px){ .highlights{ grid-template-columns:repeat(2,1fr);} }
@media (max-width:480px){ .highlights{ grid-template-columns:1fr;} }
.hl { background: var(--card-bg); border-left: var(--stripe) solid var(--cat-color, var(--cat-heritage)); }
.hl__img { position:relative; overflow:hidden; aspect-ratio: 16/10; background: var(--card-hover); border-bottom: 1px solid var(--hairline); }
.hl__t { padding: 10px 12px; font-size: 13px; font-weight: 600; }

/* timeline */
.tl { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--hairline); }
.tl li { position: relative; padding: 4px 0 18px 20px; }
.tl li::before { content:""; position:absolute; left:-4px; top:9px; width:7px; height:7px; background: var(--accent); }
.tl .yr { font-family: var(--font-mono); font-weight: 500; color: var(--accent); font-size: 13px; }
.tl .ev { font-size: 14px; color: var(--ink); }

/* ---------- map page ---------- */
.maproot { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 56px); }
@media (max-width: 780px){ .maproot { grid-template-columns: 1fr; height: auto; } }
#map { width: 100%; height: 100%; min-height: 440px; }
.mapside { border-right: 1px solid var(--hairline); background: var(--bg); overflow-y: auto; }
.mapside__head { padding: 16px 18px 12px; border-bottom: 1px solid var(--hairline); position: sticky; top: 0; background: var(--bg); z-index: 2; }
.mapside__head .eyebrow { display: block; margin-bottom: 4px; }
.filterrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.fbtn {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 4px 9px; border: 1px solid var(--hairline); background: transparent; cursor: pointer; color: var(--muted);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.fbtn:hover { color: var(--ink); border-color: var(--ink); }
.fbtn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mitem { display: flex; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--hairline); cursor: pointer; border-left: var(--stripe) solid transparent; }
.mitem:hover { background: var(--card-hover); }
.mitem .dot { width: 4px; align-self: stretch; flex: none; }
.mitem h5 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.mitem p { margin: 2px 0 0; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* ---------- footer (light) ---------- */
.foot { border-top: 1px solid var(--hairline); padding: 32px 0 60px; margin-top: 48px; color: var(--muted); }
.foot a { color: var(--ink); }
.foot__grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width:760px){ .foot__grid{ grid-template-columns:1fr 1fr;} }
.foot h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; font-weight: 500; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { padding: 4px 0; font-size: 13px; }
.foot li a { border-bottom: 1px solid var(--hairline); padding-bottom: 1px; }
.foot li a:hover { border-bottom-color: var(--ink); }
.foot__brand { font-family: var(--font-display); font-size: 18px; color: var(--accent); margin-bottom: 10px; }
.foot__brand + p { font-size: 13px; max-width: 320px; }
.foot__note { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* --- card photos (hotlinked, graceful fallback to placeholder) --- */
.card__img { position: relative; overflow: hidden; }
.card__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.card__img .tag { z-index: 2; }
.card__img .ico { position: relative; z-index: 0; }
.brand .wordmark { white-space: nowrap; }

/* --- brand logo mark (SVG) --- */
.brand__mark { width: 34px; height: 34px; display: inline-block; flex: none; }
