/* style.css — Chettinad / Sandstone theme (Theme B) */

/* ---------------------------
   Variables & base typography
   --------------------------- */
:root{
  --bg: #f6f0e6;            /* sandstone */
  --panel: #fffaf6;
  --wood: #7a4a2e;          /* brown */
  --brass: #c9a75a;         /* accent */
  --text: #22221f;
  --muted: #6b6159;
  --muted-2: #8b7f73;
  --card-border: rgba(120,80,60,0.08);
  --glass: rgba(255,255,255,0.9);
  --maxw: 1100px;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(40,20,10,0.06);
  --nav-height: 72px;
}

/* Use a Tamil-friendly fallback; web fonts already linked in HTML */
body {
  margin: 0;
  font-family: "Mukta", "Noto Sans Tamil", "Noto Serif Tamil", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, #fbf8f5 100%);
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------------------------
   Layout containers
   --------------------------- */
.container{
  width: min(94%, var(--maxw));
  margin: 0 auto;
}

/* ---------------------------
   Header & Nav
   --------------------------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 120;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(250,246,241,0.92));
  border-bottom: 1px solid rgba(120,80,60,0.06);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  height:var(--nav-height);
  padding:12px 0;
}

/* Brand */
.brand{display:flex;gap:12px;align-items:center}
.logo-mark{width:48px;height:48px;flex:0 0 48px;border-radius:8px;display:flex;align-items:center;justify-content:center}
#site-title{font-family:"Playfair Display", serif;font-size:1.05rem;margin:0;color:var(--wood);letter-spacing:0.2px}
#site-sub{margin:0;font-size:.82rem;color:var(--muted)}

/* Nav */
.nav ul{list-style:none;margin:0;padding:0;display:flex;gap:10px;align-items:center}
.nav-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:8px;
  text-decoration:none;
  color:var(--wood);
  font-weight:600;
  font-size:.95rem;
  transition: color .22s ease, transform .18s ease, box-shadow .18s ease;
}

.nav-link.clicked { transform: translateY(-4px) scale(1.02); box-shadow:0 6px 18px rgba(0,0,0,0.08); }
.nav-link.active { transition: color .28s ease, box-shadow .28s ease; color: var(--brass); box-shadow: inset 0 -2px 0 var(--brass); }

.nav-link:hover{background:rgba(122,74,46,0.04);transform:translateY(-2px)}
.nav-link.active{
  color:var(--brass);
  box-shadow: inset 0 -2px 0 var(--brass);
}

/* mobile nav fallback — hide by default on small view */
@media (max-width:900px){
  .nav ul{display:none}
}

/* Header actions */
.header-actions{display:flex;gap:8px;align-items:center}
.btn{
  border:1px solid rgba(120,80,60,0.12);
  background:transparent;
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  font-weight:700;
  color:var(--wood);
}
.btn:focus{outline:3px solid rgba(201,167,90,0.16);outline-offset:3px}
.btn.primary{background:var(--wood);color:var(--panel);border:none}
.btn.ghost{background:transparent}

/* ---------------------------
   Hero
   --------------------------- */
.hero{padding:48px 0 36px}
.hero-grid{display:grid;grid-template-columns:1fr 420px;gap:24px;align-items:start}
.hero-title{
  font-family:"Playfair Display", serif;
  font-size:2.2rem;
  margin:0 0 10px;
  color:var(--wood);
  line-height:1.02;
}
.lead{font-size:1.03rem;color:var(--muted-2);margin:0 0 18px;max-width:70%}

/* hero card */
.hero-card .card{padding:18px;background:linear-gradient(180deg,#fff,#fff);border-left:6px solid var(--brass);box-shadow:var(--shadow)}

/* Responsive hero */
@media (max-width:980px){
  .hero-grid{grid-template-columns:1fr}
  .lead{max-width:100%}
}

/* ---------------------------
   Sections & Titles
   --------------------------- */
.section{padding:48px 0}
.section-title{
  font-size:1.6rem;
  font-family:"Playfair Display", serif;
  color:var(--wood);
  margin:0 0 12px;
  padding-left:12px;
  border-left:6px solid rgba(201,167,90,0.9);
}

/* muted paragraph */
.muted{color:var(--muted);font-size:.95rem}

/* small text */
.small{font-size:.88rem;color:var(--muted)}

/* ---------------------------
   Cards, grids & lists
   --------------------------- */
.card{
  background:var(--panel);
  border-radius:var(--radius);
  padding:18px;
  border:1px solid var(--card-border);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover{transform:translateY(-4px);box-shadow:0 10px 30px rgba(30,12,6,0.07)}
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}

/* list styles inside cards */
.card ul{margin:0;padding-left:1.05rem;color:var(--muted)}
.card li{margin-bottom:8px}

/* small link style */
.small-link a{color:var(--wood);font-weight:700}

/* details block */
.more-info{margin-top:14px}
.more-info summary{cursor:pointer;font-weight:700;color:var(--wood);margin-bottom:8px}
.more-info[open]{background:#fff8eb;border-left:4px solid var(--brass);padding:12px;border-radius:10px}

/* Responsive grids */
@media (max-width:780px){
  .grid-2,.grid-3{grid-template-columns:1fr}
}

/* ---------------------------
   Reveal utility (works with JS observer)
   --------------------------- */
.reveal{opacity:0;transform:translateY(18px);transition:opacity .55s ease, transform .55s ease}
.reveal.visible{opacity:1;transform:none}

/* ---------------------------
   Details/typography tweaks for Tamil display
   --------------------------- */
/* when Tamil is displayed, body font will fallback to Tamil-capable fonts set in HTML.
   Ensure adequate line-height for readable Tamil */
:lang(ta){line-height:1.8}
[data-ta] { /* provide slightly larger font for Tamil blocks if needed */
  /* no forced change; script toggles textContent only */
}

/* ---------------------------
   Footer
   --------------------------- */
.site-footer{
  margin-top:40px;
  padding:18px 14px;
  background: linear-gradient(180deg,var(--wood), #5f3e2a);
  color: #fff;
  text-align:center;
  border-top:4px solid var(--brass);
}
.site-footer .small{color:rgba(255,255,255,0.92)}

/* ---------------------------
   Accessibility & focus
   --------------------------- */
a:focus, button:focus, .nav-link:focus{
  outline:3px solid rgba(201,167,90,0.18);
  outline-offset:3px;
  border-radius:8px;
}

/* ---------------------------
   Utility helpers
   --------------------------- */
.container-tight{max-width:900px;margin:auto}
.compact-list{padding-left:1.05rem;margin:0}

/* ---------------------------
   Print friendly
   --------------------------- */
@media print{
  body{background:#fff;color:#000}
  .site-header, .site-footer{display:none}
}

/* Ensure consistent spacing between card groups */
.group, .container {
  gap: 22px;
}

/* Force card margin if placed outside grid */
.card {
  margin-bottom: 22px;
}
