/* =========================================================
   STAR TRUST — design tokens
   Signature idea: the kolam (rice-flour dot-grid threshold
   drawing made fresh each morning outside Tamil homes) as a
   living structural motif — dot grids, looped connecting
   lines, drawn borders — rather than generic dividers.
   ========================================================= */

:root{
  /* -- palette: pulled from turmeric, marigold, temple maroon,
     paddy green and peacock teal seen across the trust's own
     banners and sarees in its program photos -- */
  --cream:      #FBF3E4;   /* rice-flour base */
  --cream-2:    #F5E9D4;
  --ink:        #2B1B12;   /* charcoal-brown ink */
  --ink-soft:   #5A4636;
  --turmeric:   #F2A93B;
  --marigold:   #E2622B;
  --maroon:     #7E1F3D;
  --paddy:      #3F7D3B;
  --peacock:    #0F6E64;
  --white:      #FFFFFF;

  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 8px;

  --shadow-card: 0 14px 34px -18px rgba(43,27,18,0.35);
  --shadow-soft: 0 6px 18px -10px rgba(43,27,18,0.25);

  --font-display: 'Baloo 2', 'Noto Sans Tamil', sans-serif;
  --font-body: 'Work Sans', 'Noto Sans Tamil', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{ font-family: var(--font-display); margin:0; font-weight:700; }
p{ margin:0; }

.container{
  width:100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- kolam dot-grid texture (SVG data-uri background) ---------- */
.kolam-field{
  background-image: radial-gradient(var(--ink-soft) 1.4px, transparent 1.4px);
  background-size: 26px 26px;
  opacity: 0.14;
  position:absolute;
  inset:0;
  pointer-events:none;
}

.kolam-rule{
  height: 26px;
  width:100%;
  background-repeat: repeat-x;
  background-size: 52px 26px;
  background-position: center;
}
.kolam-rule.on-cream{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='26' viewBox='0 0 52 26'%3E%3Cg fill='none' stroke='%237E1F3D' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='6' cy='13' r='1.6' fill='%237E1F3D' stroke='none'/%3E%3Ccircle cx='26' cy='13' r='1.6' fill='%237E1F3D' stroke='none'/%3E%3Ccircle cx='46' cy='13' r='1.6' fill='%237E1F3D' stroke='none'/%3E%3Cpath d='M6 13 C 14 -2, 18 28, 26 13 C 34 -2, 38 28, 46 13'/%3E%3C/g%3E%3C/svg%3E");
}
.kolam-rule.on-maroon{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='26' viewBox='0 0 52 26'%3E%3Cg fill='none' stroke='%23F2A93B' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='6' cy='13' r='1.6' fill='%23F2A93B' stroke='none'/%3E%3Ccircle cx='26' cy='13' r='1.6' fill='%23F2A93B' stroke='none'/%3E%3Ccircle cx='46' cy='13' r='1.6' fill='%23F2A93B' stroke='none'/%3E%3Cpath d='M6 13 C 14 -2, 18 28, 26 13 C 34 -2, 38 28, 46 13'/%3E%3C/g%3E%3C/svg%3E");
}

.kolam-corner{
  width: 84px; height:84px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23E2622B' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='14' cy='14' r='2' fill='%23E2622B' stroke='none'/%3E%3Ccircle cx='42' cy='14' r='2' fill='%23E2622B' stroke='none'/%3E%3Ccircle cx='14' cy='42' r='2' fill='%23E2622B' stroke='none'/%3E%3Cpath d='M14 14 C 30 14 30 30 14 42 M14 14 C 14 30 30 30 42 14'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
}

/* ---------- topbar / nav ---------- */
.topbar{
  background: var(--maroon);
  color: var(--cream);
}
.topbar .container{
  display:flex; align-items:center; justify-content:space-between;
  padding-top:8px; padding-bottom:8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  flex-wrap:wrap;
  gap:6px;
}
.topbar span{ opacity:.85 }
.topbar strong{ color: var(--turmeric); font-weight:700; }

.nav{
  background: var(--cream);
  position: sticky; top:0; z-index:50;
  border-bottom: 3px solid var(--ink);
}
.nav .container{
  display:flex; align-items:center; justify-content:space-between;
  padding-top:14px; padding-bottom:14px;
}
.brand{
  display:flex; align-items:center; gap:12px;
}
.brand-mark{
  width:46px; height:46px; border-radius:50%;
  background: conic-gradient(from 45deg, var(--marigold), var(--turmeric), var(--paddy), var(--peacock), var(--maroon), var(--marigold));
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 0 0 3px var(--cream), 0 0 0 5px var(--ink);
}
.brand-mark span{
  width:30px; height:30px; border-radius:50%; background: var(--cream);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-weight:800; color:var(--maroon); font-size:13px;
}
.brand-text .name{ font-family: var(--font-display); font-weight:800; font-size:22px; letter-spacing: .01em; }
.brand-text .tag{ font-family: var(--font-mono); font-size:10.5px; text-transform:uppercase; letter-spacing:.12em; color: var(--ink-soft); }

.nav-links{ display:flex; gap:6px; align-items:center; }
.nav-links a{
  font-family: var(--font-body); font-weight:600; font-size:14.5px;
  padding:9px 14px; border-radius: 999px; color: var(--ink);
  transition: background .2s ease, color .2s ease;
}
.nav-links a:hover{ background: var(--ink); color: var(--cream); }
.nav-links a.active{ background: var(--marigold); color:#fff; }

.nav-toggle{ display:none; }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--font-body); font-weight:700; font-size:14.5px;
  padding:13px 24px; border-radius:999px; border:2.5px solid var(--ink);
  cursor:pointer; transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover{ transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--ink); }
.btn-primary{ background: var(--marigold); color:#fff; }
.btn-outline{ background: transparent; color: var(--ink); }
.btn-dark{ background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ---------- hero ---------- */
.hero{
  position:relative;
  padding: 76px 0 60px;
  overflow:hidden;
  background: var(--cream);
}
.hero .kolam-field{ opacity:.18; }
.hero-grid{
  position:relative; z-index:2;
  display:grid; grid-template-columns: 1.1fr .9fr; gap:48px; align-items:center;
}
.eyebrow{
  font-family: var(--font-mono); font-size:12.5px; letter-spacing:.14em; text-transform:uppercase;
  color: var(--maroon); display:flex; align-items:center; gap:10px; margin-bottom:18px;
}
.eyebrow::before{ content:''; width:22px; height:2px; background: var(--marigold); display:inline-block; }

.hero h1{
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.04;
  color: var(--ink);
}
.hero h1 em{
  font-style: normal; color: var(--marigold);
  position:relative;
}
.hero-sub{
  margin-top:22px; font-size:18px; color: var(--ink-soft); max-width: 46ch;
}
.hero-actions{ margin-top:32px; display:flex; gap:14px; flex-wrap:wrap; }

.hero-art{
  position:relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  overflow:hidden;
  border: 4px solid var(--ink);
  box-shadow: var(--shadow-card);
}
.hero-art img{ width:100%; height:100%; object-fit:cover; }
.hero-art::after{
  content:'';
  position:absolute; inset:0;
  background: linear-gradient(200deg, rgba(126,31,61,0) 40%, rgba(126,31,61,.55) 100%);
}
.hero-badge{
  position:absolute; bottom:18px; left:18px; z-index:3;
  background: var(--cream); border:3px solid var(--ink); border-radius: var(--radius-md);
  padding: 12px 16px; box-shadow: var(--shadow-soft);
}
.hero-badge .num{ font-family: var(--font-display); font-size:26px; color: var(--maroon); font-weight:800; }
.hero-badge .lbl{ font-family: var(--font-mono); font-size:10.5px; text-transform:uppercase; letter-spacing:.08em; color: var(--ink-soft); }

/* ---------- section shells ---------- */
.section{ padding: 64px 0; position:relative; }
.section.tight{ padding: 44px 0; }
.section-head{ max-width: 640px; margin-bottom:40px; }
.section-head .eyebrow{ margin-bottom:12px; }
.section-head h2{ font-size: clamp(28px,3.6vw,40px); }
.section-head p{ margin-top:14px; color: var(--ink-soft); font-size:16.5px; }

.band{
  background: var(--maroon); color: var(--cream);
}
.band .section-head p{ color: #EBD4C8; }
.band .eyebrow{ color: var(--turmeric); }

.band-alt{ background: var(--peacock); color:var(--cream); }
.band-alt .eyebrow{ color: var(--turmeric); }
.band-alt .section-head p{ color:#D8ECE8 }

/* ---------- stat strip ---------- */
.stat-strip{
  display:grid; grid-template-columns: repeat(4,1fr);
  gap:1px; background: var(--ink);
  border: 3px solid var(--ink); border-radius: var(--radius-md); overflow:hidden;
}
.stat-cell{ background: var(--cream); padding: 26px 20px; text-align:center; }
.stat-cell .num{ font-family: var(--font-display); font-size:38px; font-weight:800; color: var(--marigold); }
.stat-cell .lbl{ margin-top:6px; font-family: var(--font-mono); font-size:11px; text-transform:uppercase; letter-spacing:.06em; color: var(--ink-soft); }

/* ---------- cards ---------- */
.grid{ display:grid; gap:26px; }
.grid-3{ grid-template-columns: repeat(3,1fr); }
.grid-2{ grid-template-columns: repeat(2,1fr); }

.card{
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 28px;
  position:relative;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card .dot{
  width:14px; height:14px; border-radius:50%; margin-bottom:16px;
}
.card h3{ font-size:20px; margin-bottom:10px; }
.card p{ color: var(--ink-soft); font-size:15px; }

.card.c-marigold .dot{ background: var(--marigold); }
.card.c-peacock .dot{ background: var(--peacock); }
.card.c-paddy .dot{ background: var(--paddy); }
.card.c-maroon .dot{ background: var(--maroon); }
.card.c-turmeric .dot{ background: var(--turmeric); }

/* program category header pill */
.pill{
  display:inline-block; font-family: var(--font-mono); font-size:11px;
  text-transform:uppercase; letter-spacing:.08em; padding:6px 14px;
  border-radius:999px; border:2px solid var(--ink); background:var(--cream);
}

/* ---------- journey / timeline (kolam thread) ---------- */
.thread{ position:relative; padding-left: 34px; }
.thread::before{
  content:''; position:absolute; left:9px; top:6px; bottom:6px; width:3px;
  background-image: repeating-linear-gradient(180deg, var(--marigold) 0 8px, transparent 8px 16px);
}
.thread-item{ position:relative; padding-bottom:36px; }
.thread-item:last-child{ padding-bottom:0; }
.thread-item::before{
  content:''; position:absolute; left:-34px; top:2px; width:19px; height:19px;
  border-radius:50%; background: var(--cream); border:3px solid var(--maroon);
}
.thread-item h4{ font-size:18px; margin-bottom:6px; color: var(--maroon); }
.thread-item p{ color: var(--ink-soft); font-size:15px; }

/* ---------- objectives list ---------- */
.obj-list{ display:grid; grid-template-columns: 1fr 1fr; gap: 14px 34px; }
.obj-item{ display:flex; gap:12px; align-items:flex-start; padding: 6px 0; }
.obj-item .mark{
  flex:none; width:26px; height:26px; border-radius:50%;
  border:2px solid var(--ink); display:flex; align-items:center; justify-content:center;
  font-family: var(--font-mono); font-size:11px; font-weight:700; margin-top:2px;
  background: var(--turmeric);
}
.obj-item p{ font-size:14.8px; color: var(--ink-soft); }

/* ---------- gallery ---------- */
.gallery-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap:20px;
}
.gallery-item{
  border-radius: var(--radius-md); overflow:hidden; border:3px solid var(--ink);
  position:relative; aspect-ratio: 4/5;
  box-shadow: var(--shadow-soft);
}
.gallery-item img{ width:100%; height:100%; object-fit:cover; transition: transform .5s ease; }
.gallery-item:hover img{ transform: scale(1.08); }
.gallery-cap{
  position:absolute; left:0; right:0; bottom:0; padding: 14px 16px 12px;
  background: linear-gradient(0deg, rgba(43,27,18,.92), rgba(43,27,18,0));
  color:#fff;
}
.gallery-cap .t{ font-family: var(--font-display); font-size:15px; font-weight:700; }
.gallery-cap .s{ font-family: var(--font-mono); font-size:10.5px; opacity:.85; margin-top:2px; }
.gallery-item.tall{ grid-row: span 2; aspect-ratio: auto; }

/* ---------- table (transparency) ---------- */
.doc-table{ width:100%; border-collapse: collapse; border:2.5px solid var(--ink); border-radius: var(--radius-md); overflow:hidden; }
.doc-table th,.doc-table td{ text-align:left; padding:14px 18px; border-bottom:1.5px solid #E4D6C2; font-size:14.5px; }
.doc-table th{ background: var(--ink); color: var(--cream); font-family: var(--font-mono); font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; font-weight:600; }
.doc-table tr:last-child td{ border-bottom:none; }
.doc-table td.mono{ font-family: var(--font-mono); font-size:13.5px; color: var(--maroon); font-weight:600; }
.doc-table tr:nth-child(even) td{ background: #FBF3E4; }

/* ---------- contact ---------- */
.contact-grid{ display:grid; grid-template-columns: .9fr 1.1fr; gap:44px; }
.info-row{ display:flex; gap:16px; padding:18px 0; border-bottom:1.5px dashed #D8C6AA; }
.info-row:last-child{ border-bottom:none; }
.info-row .ico{
  flex:none; width:44px; height:44px; border-radius:12px; background: var(--turmeric);
  border:2px solid var(--ink); display:flex; align-items:center; justify-content:center; font-size:19px;
}
.info-row h4{ font-size:15px; margin-bottom:3px; }
.info-row p{ font-size:14.5px; color: var(--ink-soft); }

.form-box{
  background: var(--white); border:2.5px solid var(--ink); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-card);
}
.form-row{ margin-bottom:18px; }
.form-row label{ display:block; font-family: var(--font-mono); font-size:11px; text-transform:uppercase; letter-spacing:.06em; margin-bottom:8px; color: var(--ink-soft); }
.form-row input, .form-row textarea{
  width:100%; padding:12px 14px; border-radius: var(--radius-sm); border:2px solid var(--ink);
  font-family: var(--font-body); font-size:14.5px; background: var(--cream); color: var(--ink);
}
.form-row textarea{ min-height:110px; resize:vertical; }
.form-row input:focus, .form-row textarea:focus{ outline:3px solid var(--turmeric); outline-offset:1px; }

/* ---------- footer ---------- */
footer{ background: var(--ink); color: var(--cream); padding: 52px 0 26px; }
.foot-grid{ display:grid; grid-template-columns: 1.3fr 1fr 1fr; gap:40px; }
footer h4{ font-family: var(--font-mono); font-size:12px; text-transform:uppercase; letter-spacing:.1em; color: var(--turmeric); margin-bottom:16px; }
footer .brand-text .name{ color: var(--cream); }
footer p{ color:#CBB9A6; font-size:14.5px; }
.foot-links li{ margin-bottom:10px; }
.foot-links a{ color:#E7D9C7; font-size:14.5px; }
.foot-links a:hover{ color: var(--turmeric); }
.foot-bottom{ margin-top:40px; padding-top:22px; border-top:1px solid #4A3A2C; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; font-family: var(--font-mono); font-size:11.5px; color:#8C7A67; }

/* ---------- misc ---------- */
.split{ display:grid; grid-template-columns: 1fr 1fr; gap:52px; align-items:center; }
.photo-frame{ border:4px solid var(--ink); border-radius: var(--radius-lg); overflow:hidden; box-shadow: var(--shadow-card); }
.quote-block{
  border-left: 5px solid var(--marigold); padding-left:22px; font-family: var(--font-display);
  font-size:22px; line-height:1.4; color: var(--maroon);
}
.tag-row{ display:flex; gap:10px; flex-wrap:wrap; margin-top:18px; }

/* page hero (inner pages) */
.page-hero{ padding: 52px 0 44px; background: var(--cream); position:relative; }
.page-hero h1{ font-size: clamp(32px,4.4vw,50px); }
.page-hero .breadcrumb{ font-family: var(--font-mono); font-size:12px; color: var(--ink-soft); margin-bottom:16px; }
.page-hero .breadcrumb a{ color: var(--maroon); font-weight:700; }

/* -------- responsive -------- */
@media (max-width: 900px){
  .hero-grid{ grid-template-columns: 1fr; }
  .split{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
  .stat-strip{ grid-template-columns: repeat(2,1fr); }
  .grid-3{ grid-template-columns: repeat(2,1fr); }
  .foot-grid{ grid-template-columns: 1fr 1fr; }
  .gallery-grid{ grid-template-columns: repeat(2,1fr); }
  .obj-list{ grid-template-columns: 1fr; }
}
@media (max-width: 640px){
  .nav-links{
    position:fixed; top:76px; left:0; right:0; bottom:0;
    background: var(--cream); flex-direction:column; align-items:stretch;
    padding: 20px 24px; transform: translateY(-120%); transition: transform .3s ease;
    z-index:49; gap:10px; overflow-y:auto;
  }
  .nav-links.open{ transform: translateY(0); }
  .nav-links a{ text-align:center; padding:14px; font-size:16px; }
  .nav-toggle{
    display:flex; align-items:center; justify-content:center;
    width:42px; height:42px; border-radius:10px; border:2.5px solid var(--ink);
    background: var(--turmeric); cursor:pointer; font-size:18px;
  }
  .grid-3, .grid-2{ grid-template-columns: 1fr; }
  .stat-strip{ grid-template-columns: repeat(2,1fr); }
  .foot-grid{ grid-template-columns: 1fr; }
  .gallery-grid{ grid-template-columns: 1fr; }
  .gallery-item.tall{ grid-row: auto; }
}

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

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 3px solid var(--marigold); outline-offset:2px;
}
