/* ============================================================
   Know Your Course — Gandhinagar University
   Palette drawn from the University crest:
   gold #C6A24E on oxford-midnight #10192B, ivory paper #FAF8F1
   Type: Marcellus (engraved display) + Figtree (body)
   ============================================================ */

:root {
  --gold:       #C6A24E;
  --gold-deep:  #9A7A32;
  --gold-soft:  #E9DCB8;
  --gold-faint: rgba(198, 162, 78, .16);
  --ink:        #10192B;
  --ink-2:      #182741;
  --paper:      #FFFFFF;
  --ivory:      #FAF8F1;
  --text:       #232B3A;
  --muted:      #5D6675;
  --line:       #E7E1D2;
  --radius:     18px;
  --shadow-sm:  0 1px 2px rgba(16,25,43,.05), 0 4px 14px rgba(16,25,43,.06);
  --shadow-md:  0 6px 18px rgba(16,25,43,.10), 0 20px 44px rgba(16,25,43,.10);
  --ff-display: 'Marcellus', Georgia, serif;
  --ff-body:    'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-body);
  color: var(--text);
  background: var(--ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

h1, h2, h3 { font-family: var(--ff-display); font-weight: 400; line-height: 1.15; }

/* ---------------- Header ---------------- */
.site-header {
  background: var(--ink);
  border-bottom: 1px solid rgba(198,162,78,.28);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .8rem 0; }
.brand { display: flex; align-items: center; gap: .85rem; }
.brand-logo { height: 46px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong {
  font-family: var(--ff-display);
  font-size: 1.02rem; letter-spacing: .04em; color: #FDFBF5; font-weight: 400;
}
.brand-text em {
  font-style: normal; font-size: .68rem; font-weight: 600;
  letter-spacing: .32em; text-transform: uppercase; color: var(--gold);
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 420px at 85% -10%, rgba(198,162,78,.14), transparent 60%),
    linear-gradient(165deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #F4F1E7;
  padding: 4.6rem 0 4.2rem;
}
.hero-compact { padding: 3rem 0 2.7rem; }
.hero-arc {
  position: absolute; color: var(--gold);
  width: 560px; height: 560px;
  right: -140px; top: 50%; transform: translateY(-50%);
  opacity: .5; pointer-events: none;
}
.hero-inner { position: relative; max-width: 640px; }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.4rem); color: #FDFBF5; }
.h1-sm { font-size: clamp(1.7rem, 4.4vw, 2.6rem); }
.hero-sub { margin-top: 1rem; font-size: 1.05rem; color: rgba(244,241,231,.82); max-width: 46ch; }

.eyebrow {
  font-size: .7rem; font-weight: 700; letter-spacing: .34em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 1rem;
}
.eyebrow-dark { color: var(--gold-deep); }

.hero-cta {
  display: inline-flex; align-items: center; gap: .55rem;
  margin-top: 1.9rem; padding: .78rem 1.5rem;
  border: 1px solid var(--gold); border-radius: 999px;
  color: var(--gold); font-weight: 600; font-size: .92rem; letter-spacing: .05em;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.hero-cta:hover { background: var(--gold); color: var(--ink); transform: translateY(2px); }
.cta-dark { border-color: var(--gold-deep); color: var(--gold-deep); margin-top: 1.4rem; }
.cta-dark:hover { background: var(--gold-deep); color: #fff; }

.crumbs { display: flex; gap: .6rem; align-items: center; font-size: .82rem; margin-bottom: 1.1rem; color: rgba(244,241,231,.7); }
.crumbs a { color: var(--gold); font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }

/* ---------------- Sections ---------------- */
.section { padding: 3.6rem 0 4.4rem; }
.section-tall { padding: 6rem 0; }
.center { text-align: center; }
.section-head { margin-bottom: 2.2rem; }
.section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); color: var(--ink); }
.empty-note { color: var(--muted); padding: 1.6rem 0; }

/* ---------------- Card grids ---------------- */
.card-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* ---------------- Institute cards ---------------- */
.inst-card {
  position: relative;
  display: flex; align-items: center; gap: 1.05rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.inst-card::after {                    /* gold keyline that draws on hover */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 1.5px solid transparent; pointer-events: none;
  transition: border-color .28s ease;
}
.inst-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.inst-card:hover::after { border-color: var(--gold); }

.inst-mono {
  position: relative; flex: 0 0 auto;
  width: 64px; height: 64px; display: grid; place-items: center;
  font-family: var(--ff-display); font-size: 1.05rem; letter-spacing: .04em;
  color: var(--gold-deep); background: var(--gold-faint); border-radius: 50%;
}
.mono-arc {
  position: absolute; inset: -4px; color: var(--gold);
  transform: rotate(0deg); transition: transform .55s cubic-bezier(.22,.9,.3,1);
}
.inst-card:hover .mono-arc { transform: rotate(140deg); }

.inst-body { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }
.inst-name { font-family: var(--ff-display); font-size: 1.08rem; color: var(--ink); line-height: 1.3; }
.inst-tag { font-size: .82rem; color: var(--muted); }
.inst-meta {
  margin-top: .3rem; font-size: .68rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep);
}
.inst-go {
  margin-left: auto; flex: 0 0 auto; color: var(--gold-deep);
  transition: transform .28s ease;
}
.inst-card:hover .inst-go { transform: translateX(4px); }

/* ---------------- Tabs ---------------- */
.tabs {
  display: flex; gap: .4rem; margin-bottom: 1.9rem;
  border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  appearance: none; background: none; border: none; cursor: pointer;
  font-family: var(--ff-body); font-size: .95rem; font-weight: 600;
  color: var(--muted); padding: .75rem 1.05rem .85rem;
  display: inline-flex; align-items: center; gap: .5rem;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px;
  white-space: nowrap; transition: color .2s ease, border-color .2s ease;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-color: var(--gold); }
.tab-count {
  font-size: .7rem; font-weight: 700; color: var(--gold-deep);
  background: var(--gold-faint); border-radius: 999px;
  padding: .1rem .5rem; line-height: 1.4;
}
.tab.is-active .tab-count { background: var(--gold); color: var(--ink); }
.tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: panelIn .3s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- Department cards ---------------- */
.dept-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.dept-card {
  position: relative;
  display: flex; flex-direction: column; gap: .9rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: transform .28s ease, box-shadow .28s ease;
}
.dept-card::before {                   /* gold top rule, widens on hover */
  content: ""; position: absolute; top: 0; left: 1.25rem;
  width: 34px; height: 2.5px; background: var(--gold);
  border-radius: 0 0 3px 3px; transition: width .35s ease;
}
a.dept-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
a.dept-card:hover::before { width: calc(100% - 2.5rem); }

.dept-icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  color: var(--gold-deep); background: var(--gold-faint); border-radius: 12px;
}
.dept-icon svg { width: 22px; height: 22px; }
.dept-level {
  display: block; font-size: .66rem; font-weight: 700;
  letter-spacing: .24em; text-transform: uppercase; color: var(--gold-deep);
  margin-bottom: .25rem;
}
.dept-name { font-family: var(--ff-display); font-size: 1.12rem; color: var(--ink); line-height: 1.3; }
.dept-action {
  margin-top: auto; padding-top: .85rem; border-top: 1px dashed var(--line);
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .82rem; font-weight: 700; color: var(--gold-deep);
}
a.dept-card:hover .dept-action { color: var(--ink); }
.dept-card--soon { opacity: .62; }
.dept-card--soon .dept-action { color: var(--muted); }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--ink); color: rgba(244,241,231,.72); }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem;
  align-items: center; justify-content: space-between;
  padding: 1.4rem 0; font-size: .85rem;
}
.footer-inner a { color: var(--gold); font-weight: 600; }
.footer-inner a:hover { text-decoration: underline; }

/* ---------------- Reveal animation ---------------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .55s ease var(--d, 0ms), transform .55s ease var(--d, 0ms); }

/* ---------------- Mobile ---------------- */
@media (max-width: 640px) {
  .container { width: min(1120px, 100% - 1.8rem); }
  .hero { padding: 3.2rem 0 3rem; }
  .hero-arc { width: 380px; height: 380px; right: -180px; opacity: .35; }
  .brand-logo { height: 38px; }
  .brand-text strong { font-size: .9rem; }
  .card-grid, .dept-grid { grid-template-columns: 1fr; }
  .inst-mono { width: 56px; height: 56px; font-size: .95rem; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
