/* Yaazhl Academy - site stylesheet
   Palette taken from the academy logo: red wordmark, gold and saffron emblem, on deep navy. */

:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);

  --ink: #10142B;
  --ink-2: #1A2050;
  --red: #D81F2A;
  --red-deep: #B0141F;
  --red-bright: #EE3441;
  --gold: #FFC20E;
  --saffron: #F7941D;

  --paper: #F6F7FB;
  --surface: #FFFFFF;
  --tint: #FFF4D9;
  --text: #171B34;
  --muted: #555A79;
  --line: rgba(23, 27, 52, .13);
  --link: #C21A25;
  --header-bg: #FFFFFF;
  --shadow: 0 1px 2px rgba(16, 20, 43, .05), 0 14px 34px -16px rgba(16, 20, 43, .28);

  --display: "EB Garamond", "Noto Serif Tamil", Georgia, "Times New Roman", serif;
  --body: "Hind Madurai", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0B0E20;
    --surface: #141936;
    --tint: #2A2436;
    --text: #EEF0FA;
    --muted: #A3A8C8;
    --line: rgba(238, 240, 250, .15);
    --link: #FF9CA3;
    --header-bg: #10142B;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 34px -16px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  --paper: #0B0E20;
  --surface: #141936;
  --tint: #2A2436;
  --text: #EEF0FA;
  --muted: #A3A8C8;
  --line: rgba(238, 240, 250, .15);
  --link: #FF9CA3;
  --header-bg: #10142B;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 34px -16px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 96px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: 0; font-variant-numeric: lining-nums; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #10142B; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-deep); }
.btn-gold { background: var(--gold); color: #10142B; }
.btn-gold:hover { background: #FFD24A; }
.btn-ghost { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }
.btn-outline { border-color: var(--line); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--red); color: var(--link); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 10px 18px; font-size: .95rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60;
  background: var(--header-bg); border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(16, 20, 43, .5); }
.site-header::before { /* thin brand ribbon */
  content: ""; display: block; height: 4px;
  background: linear-gradient(90deg, var(--red) 0%, var(--saffron) 55%, var(--gold) 100%);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 70px; }
.brand { display: block; flex: none; background: #fff; border-radius: 12px; padding: 5px 9px; }
.brand img { height: 36px; width: auto; }
.nav { display: flex; align-items: center; gap: 0; }
.nav a.link { color: var(--text); text-decoration: none; padding: 9px 9px; border-radius: 999px; font-weight: 600; font-size: .94rem; white-space: nowrap; }
.nav a.link:hover { background: rgba(216, 31, 42, .08); color: var(--link); }
.nav a.link[aria-current="page"] { color: var(--red); background: rgba(216, 31, 42, .09); }
:root[data-theme="dark"] .nav a.link[aria-current="page"] { color: var(--gold); }
.nav .btn { margin-left: 8px; padding: 9px 15px; font-size: .92rem; white-space: nowrap; }
.nav .btn-outline { border-color: var(--line); }

/* Compact icon-only button in the desktop nav (becomes a labelled pill in the stacked mobile menu) */
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 38px; height: 38px; border-radius: 50%; margin-left: 6px;
  border: 1.5px solid var(--line); color: var(--text); background: transparent; text-decoration: none;
  transition: border-color .18s ease, color .18s ease;
}
.btn-icon:hover { border-color: var(--red); color: var(--link); }
.btn-icon svg { width: 18px; height: 18px; }
.btn-icon-label { display: none; }
.menu-btn {
  display: none; background: transparent; border: 2px solid var(--line); color: var(--text);
  border-radius: 12px; width: 46px; height: 46px; cursor: pointer; align-items: center; justify-content: center;
}
.menu-btn svg { width: 22px; height: 22px; }
@media (max-width: 1070px) {
  .menu-btn { display: inline-flex; }
  .brand img { height: 36px; }
  .bar { min-height: 64px; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--header-bg); padding: 12px 20px 22px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 22px 30px -18px rgba(16, 20, 43, .5);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a.link { padding: 14px 16px; font-size: 1rem; }
  .nav .btn { margin: 10px 0 0; padding: 14px 20px; font-size: 1rem; }
  /* the compact icon button becomes a full labelled pill in the stacked mobile menu */
  .nav .btn-icon {
    width: auto; height: auto; border-radius: 999px; justify-content: flex-start; gap: 10px;
    padding: 14px 20px; margin: 10px 0 0; font: 600 1rem/1.2 var(--body);
  }
  .nav .btn-icon-label { display: inline; }
}
@media (max-width: 400px) { .brand img { height: 30px; } .brand { padding: 5px 8px; } }

/* ---------- Home hero ---------- */
.hero {
  color: #fff; overflow: hidden;
  background:
    radial-gradient(760px 420px at 92% 6%, rgba(255, 194, 14, .20), transparent 62%),
    radial-gradient(620px 420px at 0% 100%, rgba(216, 31, 42, .28), transparent 65%),
    linear-gradient(160deg, #161B45 0%, var(--ink) 62%, #0C0F26 100%);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding-block: clamp(44px, 7vw, 92px); }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .18); color: #FBE9B0; font-size: .96rem; font-weight: 500;
}
.pill img { width: 26px; height: 26px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); margin-top: 22px; max-width: 17ch; }
.hero .ta { font-family: "Noto Serif Tamil", var(--display); color: var(--gold); font-size: 1.2rem; margin-top: 18px; font-weight: 600; }
.hero .lede { margin-top: 16px; max-width: 48ch; color: #D6DAF0; font-size: 1.16rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .btn-red { background: var(--red-bright); }
.hero .btn-red:hover { background: var(--red); }
.hero-facts { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 10px; color: #C9CEEA; font-size: 1rem; }
.hero-facts li { display: flex; align-items: center; gap: 12px; }
.hero-facts svg { width: 20px; height: 20px; flex: none; color: var(--gold); }

.stack { position: relative; width: min(100%, 560px); aspect-ratio: 1 / .88; justify-self: center; }
.stack a { position: absolute; display: block; width: 49%; border-radius: 12px; overflow: hidden; box-shadow: 0 34px 60px -20px rgba(0, 0, 0, .7); transition: transform .35s ease; }
.stack a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); pointer-events: none; }
.stack img { width: 100%; height: auto; }
.stack .p1 { left: 0; top: 9%; transform: rotate(-8deg); z-index: 1; }
.stack .p2 { right: 0; top: 9%; transform: rotate(8deg); z-index: 1; }
.stack .p3 { left: 25.5%; top: 0; z-index: 3; }
.stack .p1:hover { transform: translateY(-10px) rotate(-4deg); z-index: 4; }
.stack .p2:hover { transform: translateY(-10px) rotate(4deg); z-index: 4; }
.stack .p3:hover { transform: translateY(-10px) scale(1.02); }
@keyframes rise { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
.stack a { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.stack .p1 { animation-delay: .25s; }
.stack .p2 { animation-delay: .4s; }
.stack .p3 { animation-delay: .1s; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .stack { width: min(92%, 400px); }
}

/* App promo banner (home page, after batches) */
.app-promo {
  margin-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(120deg, #161B45 0%, var(--ink) 60%); color: #fff;
  border: 1px solid rgba(255, 194, 14, .35); border-radius: 26px; padding: 30px 34px; position: relative; overflow: hidden;
}
.app-promo::before {
  content: ""; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 194, 14, .22), transparent 70%);
}
.app-promo-kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 194, 14, .15); border: 1px solid rgba(255, 194, 14, .4); color: var(--gold); font-size: .88rem; font-weight: 700;
}
.app-promo-kicker svg { width: 16px; height: 16px; }
.app-promo h3 { font-size: 1.5rem; margin-top: 12px; max-width: 26ch; }
.app-promo p { margin-top: 8px; color: #C9CEEA; max-width: 42ch; }
.app-promo .btn { position: relative; z-index: 1; flex: none; }
@media (max-width: 720px) { .app-promo { padding: 26px; } }

/* ---------- Sections ---------- */
section { padding-block: clamp(50px, 7vw, 92px); }
.sec-head { max-width: 660px; margin-bottom: 38px; }
.sec-head h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
.sec-head p { margin-top: 12px; color: var(--muted); }
.sec-head.center { margin-inline: auto; text-align: center; }
.alt { background: var(--surface); border-block: 1px solid var(--line); }

/* Quick action cards */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.qcard {
  display: flex; flex-direction: column; gap: 6px; padding: 28px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  text-decoration: none; color: var(--text); transition: transform .2s ease, border-color .2s ease;
}
.qcard:hover { transform: translateY(-4px); border-color: var(--red); }
.qcard img { width: 64px; height: 64px; object-fit: contain; margin-bottom: 10px; }
.qcard h3 { font-size: 1.55rem; }
.qcard p { color: var(--muted); }
.qcard .more { margin-top: auto; padding-top: 16px; font-weight: 600; color: var(--link); display: inline-flex; align-items: center; gap: 8px; }
.qcard .more svg { width: 18px; height: 18px; transition: transform .18s ease; }
.qcard:hover .more svg { transform: translateX(4px); }
.qcard.hot { background: linear-gradient(150deg, var(--red) 0%, #A4111C 100%); border-color: transparent; color: #fff; }
.qcard.hot p, .qcard.hot .more { color: #FFE3E5; }
.qcard.hot:hover { border-color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--text); text-decoration: none; font-weight: 600; font-size: .94rem;
  transition: border-color .18s ease, color .18s ease;
}
.chip:hover { border-color: var(--red); color: var(--link); }
.chip svg { width: 17px; height: 17px; }
.qcard .chips { position: relative; z-index: 2; }
@media (max-width: 900px) { .quick { grid-template-columns: 1fr; } }

/* Poster cards */
.pgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.pgrid > li { display: flex; }
.pgrid .pcard { width: 100%; }
.pcard {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  overflow: hidden; text-decoration: none; color: var(--text); box-shadow: var(--shadow);
  transition: transform .22s ease, border-color .22s ease;
}
.pcard:hover { transform: translateY(-6px); border-color: var(--saffron); }
.pcard .shot { background: #EEF0F8; padding: 12px 12px 0; }
.pcard .shot img { width: 100%; border-radius: 10px 10px 0 0; }
.pcard .body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard h3 { font-size: 1.25rem; }
.pcard .price { font: 700 1.3rem/1.2 var(--display); color: var(--link); }
.pcard .go { margin-top: auto; padding-top: 10px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.pcard .go svg { width: 18px; height: 18px; transition: transform .18s ease; color: var(--red); }
.pcard:hover .go svg { transform: translateX(4px); }
.badge { display: inline-block; align-self: flex-start; margin-bottom: 4px; padding: 3px 12px; border-radius: 999px; background: var(--gold); color: #10142B; font: 700 .8rem/1.5 var(--body); }
@media (max-width: 1100px) { .pgrid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) {
  .pgrid { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -20px !important; padding: 6px 20px 18px !important; scroll-padding-inline: 20px; -webkit-overflow-scrolling: touch; }
  .pgrid > li { flex: 0 0 66%; max-width: 280px; scroll-snap-align: start; }
}

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.steps li { position: relative; padding: 26px 22px 24px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); counter-increment: s; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--red); color: #fff; font: 700 1.3rem/1 var(--display); margin-bottom: 14px;
}
.steps h3 { font-size: 1.25rem; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 1rem; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Study material band */
.band { background: linear-gradient(160deg, #161B45, var(--ink)); color: #fff; }
.band .sec-head p { color: #C9CEEA; }
.mgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mtile {
  display: flex; flex-direction: column; gap: 8px; padding: 26px; border-radius: 22px; text-decoration: none; color: #fff;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.mtile:hover { transform: translateY(-4px); border-color: var(--gold); background: rgba(255, 255, 255, .11); }
.mtile .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--gold); color: #10142B; margin-bottom: 8px; }
.mtile .ico svg { width: 26px; height: 26px; }
.mtile h3 { font-size: 1.35rem; }
.mtile p { color: #C9CEEA; font-size: 1rem; }
@media (max-width: 1000px) { .mgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mgrid { grid-template-columns: 1fr; } }

/* Cards + contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 30px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.45rem; margin-bottom: 14px; }
.card address { font-style: normal; color: var(--muted); }
.card .btn { margin-top: 20px; }
.card-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.card-list a { font-weight: 600; text-decoration: none; word-break: break-word; }
.card-list a:hover { text-decoration: underline; }
.card-list small { display: block; color: var(--muted); font-weight: 400; font-size: .9rem; }
.card .chips { margin-top: 4px; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Inner page head ---------- */
.page-head {
  color: #fff;
  background:
    radial-gradient(640px 300px at 94% 0%, rgba(255, 194, 14, .2), transparent 62%),
    radial-gradient(520px 300px at 0% 100%, rgba(216, 31, 42, .28), transparent 65%),
    linear-gradient(160deg, #161B45 0%, var(--ink) 70%);
  padding-block: clamp(34px, 5.5vw, 64px);
}
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .95rem; color: #B9BFE0; margin-bottom: 14px; }
.crumbs a { color: var(--gold); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: .55; }
.page-head h1 { font-size: clamp(2rem, 4.8vw, 3.4rem); max-width: 22ch; }
.page-head p { margin-top: 12px; color: #D6DAF0; max-width: 58ch; font-size: 1.1rem; }
.page-head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 18px; }
.price-tag { display: inline-block; background: var(--gold); color: #10142B; font: 700 1.35rem/1 var(--display); padding: 9px 20px; border-radius: 999px; }
.status { color: var(--gold); font-weight: 600; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.page-head .btn-red { background: var(--red-bright); }
.page-head .btn-red:hover { background: var(--red); }

/* ---------- Course rows ---------- */
.rows { display: grid; gap: 22px; }
.row {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 30px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 20px 28px 20px 20px; box-shadow: var(--shadow);
}
.row .shot { border-radius: 14px; overflow: hidden; background: #EEF0F8; }
.row .shot img { width: 100%; }
.row h2 { font-size: 1.85rem; }
.row .desc { color: var(--muted); margin-top: 6px; max-width: 54ch; }
.row .mini { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; list-style: none; padding: 0; }
.row .mini li { padding: 5px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: .93rem; font-weight: 500; }
.row .cta { display: flex; flex-direction: column; align-items: stretch; gap: 10px; text-align: center; min-width: 190px; }
.row .cost { font: 700 2.2rem/1 var(--display); color: var(--link); }
@media (max-width: 960px) {
  .row { grid-template-columns: 150px 1fr; padding: 16px; gap: 20px; }
  .row .cta { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
}
@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  .row .shot { max-width: 220px; }
  .row .cta { flex-direction: column; align-items: stretch; text-align: left; }
}

/* ---------- Batch detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 34px; align-items: start; }
.detail h2 { font-size: 1.85rem; margin-bottom: 14px; }
.block { margin-bottom: 44px; }
.block > p { color: var(--muted); max-width: 64ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; border-top: 4px solid var(--saffron); }
.fact b { display: block; font: 700 1.9rem/1.1 var(--display); color: var(--text); }
.fact span { color: var(--muted); font-size: .95rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 34px; max-width: 66ch; }
.checks li::before {
  content: ""; position: absolute; left: 6px; top: .36em; width: 8px; height: 14px;
  border: solid var(--red); border-width: 0 3px 3px 0; transform: rotate(42deg);
}
.syllabus { columns: 2; column-gap: 34px; padding-left: 1.4em; margin: 0; }
.syllabus li { margin-bottom: 6px; break-inside: avoid; padding-left: 4px; }
@media (max-width: 640px) { .syllabus { columns: 1; } }
.doc-links { display: flex; flex-wrap: wrap; gap: 10px; }
.aside-card {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 100px);
  background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--red);
  border-radius: 26px; padding: 28px; box-shadow: var(--shadow);
}
.aside-card h2 { font-size: 1.6rem; margin-bottom: 4px; }
.aside-card .sub { color: var(--muted); font-size: .98rem; margin-bottom: 18px; }
.pay { display: grid; gap: 8px; margin: 0 0 18px; }
.pay div {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l b" "v b"; align-items: center; column-gap: 12px;
  padding: 10px 14px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line);
}
.pay dt { grid-area: l; color: var(--muted); font-size: .86rem; line-height: 1.3; }
.pay dd { grid-area: v; margin: 0; font-weight: 600; word-break: break-word; }
.pay .copy { grid-area: b; }
.copy { white-space: nowrap; font: 600 .82rem/1 var(--body); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--link); cursor: pointer; }
.copy:hover { border-color: var(--red); }
.aside-card h3 { font-family: var(--body); font-size: 1.02rem; font-weight: 700; margin: 18px 0 8px; }
.aside-card .steps-mini { margin: 0 0 18px; padding-left: 1.2em; color: var(--muted); font-size: .98rem; }
.aside-card .steps-mini li { margin-bottom: 6px; }
.aside-actions { display: grid; gap: 10px; }
.aside-note { margin-top: 14px; font-size: .92rem; color: var(--muted); }
@media (max-width: 980px) { .detail { grid-template-columns: 1fr; } .aside-card { position: static; } }

/* ---------- Downloads + book lists ---------- */
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.link-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px;
  text-decoration: none; color: var(--text); font-weight: 500; transition: border-color .18s ease, transform .18s ease;
}
.link-list a:hover { border-color: var(--red); transform: translateX(3px); }
.link-list svg { width: 20px; height: 20px; flex: none; color: var(--red); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.two-col h2 { font-size: 1.7rem; margin-bottom: 16px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.feature {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; margin-bottom: 44px;
  background: linear-gradient(150deg, var(--red), #A4111C); color: #fff; border-radius: 26px; padding: 30px 34px;
}
.feature .num { width: 64px; height: 64px; border-radius: 18px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; }
.feature .num svg { width: 34px; height: 34px; }
.feature h2 { font-size: 1.9rem; }
.feature p { color: #FFE3E5; margin-top: 4px; }
@media (max-width: 720px) { .feature { grid-template-columns: 1fr; text-align: left; } }

.seg { display: inline-flex; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); gap: 4px; margin-bottom: 30px; }
.seg button { font: 600 1rem/1 var(--body); padding: 12px 24px; border-radius: 999px; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--red); color: #fff; }
.book-set[hidden] { display: none; }
.term { margin-bottom: 38px; }
.term h3 { font-size: 1.6rem; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.term h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.book {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--saffron); border-radius: 14px; padding: 14px 16px;
  text-decoration: none; color: var(--text); font-weight: 500; line-height: 1.35; transition: border-color .18s ease, transform .18s ease;
}
.book:hover { border-color: var(--red); border-left-color: var(--red); transform: translateY(-2px); }
.book svg { width: 20px; height: 20px; flex: none; color: var(--red); }
.class-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; margin-bottom: 46px; }
@media (max-width: 1000px) { .class-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .class-grid { grid-template-columns: repeat(2, 1fr); } .class-grid a:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.class-tile {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 26px 14px 22px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--text);
  transition: border-color .18s ease, transform .18s ease;
}
.class-tile:hover { border-color: var(--red); transform: translateY(-4px); }
.class-tile .n {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 32% 28%, #FF5A63, var(--red) 55%, #9A0F1B); font: 700 1.8rem/1 var(--display);
  box-shadow: 0 10px 20px -8px rgba(216, 31, 42, .6);
}
.class-tile b { font: 700 1.2rem/1.2 var(--display); }
.class-tile small { color: var(--muted); font-size: .9rem; line-height: 1.35; }
.class-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.class-pills a {
  padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--text); font-weight: 600; font-size: .96rem;
}
.class-pills a:hover { border-color: var(--red); }
.class-pills a[aria-current="page"] { background: var(--red); border-color: var(--red); color: #fff; }
.switch-edition { margin-bottom: 26px; color: var(--muted); }
.notice { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--gold); border-radius: 18px; padding: 26px 28px; max-width: 660px; }

/* ---------- Footer ---------- */
footer { background: linear-gradient(170deg, #12173A, #0A0D22); color: #C6CBE6; padding-block: 60px 34px; position: relative; }
footer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--red), var(--saffron) 55%, var(--gold)); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
footer h3 { font: 700 1.05rem/1.3 var(--body); color: #fff; margin-bottom: 14px; letter-spacing: 0; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer a { color: #C6CBE6; text-decoration: none; }
footer a:hover { color: var(--gold); text-decoration: underline; }
.foot-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.foot-brand img { height: 64px; width: auto; }
.foot-brand b { display: block; font: 700 1.6rem/1 var(--display); color: #fff; }
.foot-brand span { display: block; margin-top: 6px; color: var(--gold); font-size: .95rem; }
footer .about { max-width: 36ch; }
.socials { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.socials a { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); display: grid; place-items: center; }
.socials a:hover { border-color: var(--gold); background: rgba(255, 255, 255, .07); }
.socials svg { width: 20px; height: 20px; }
.copy-line { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 40px; padding-top: 22px; font-size: .94rem; }
@media (max-width: 960px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; gap: 30px; } }

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

/* utilities */
.seg[hidden] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.only-narrow { display: none !important; }
@media (max-width: 980px) { .only-narrow { display: flex !important; } }
@media (max-width: 560px) {
  .doc-links { flex-direction: column; }
  .doc-links .btn { width: 100%; }
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1; padding: 12px 8px; white-space: nowrap; }
}

/* =========================================================
   Tamil Material product page + home promo
   Accent palette blended with the site: teal/violet glow on
   the navy base, gold/red CTAs to match the rest of the site.
   ========================================================= */
:root {
  --mat-teal: #16C2B4;
  --mat-violet: #8B5CF6;
  --mat-pink: #EC4899;
}

/* ---- Home page promo band ---- */
#material-promo { padding-block: 0 clamp(40px, 6vw, 72px); }
.matpromo {
  display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: center;
  background:
    radial-gradient(520px 320px at 100% 0%, rgba(22, 194, 180, .20), transparent 60%),
    radial-gradient(420px 300px at 0% 100%, rgba(139, 92, 246, .22), transparent 60%),
    linear-gradient(135deg, #161B45 0%, var(--ink) 70%);
  border: 1px solid rgba(22, 194, 180, .35); border-radius: 28px; padding: clamp(24px, 3.5vw, 40px);
  color: #fff; position: relative; overflow: hidden;
}
.matpromo-art { display: flex; justify-self: start; }
.matpromo-book { width: 148px; border-radius: 8px; overflow: hidden; box-shadow: 0 22px 44px -14px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .12); transform: rotate(-4deg); transition: transform .3s ease; flex: none; }
.matpromo:hover .matpromo-book { transform: rotate(-1deg) scale(1.02); }
.matpromo-book img { width: 100%; display: block; }
.matpromo-kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(22, 194, 180, .16); border: 1px solid rgba(22, 194, 180, .45); color: #5EEAD4; font-size: .85rem; font-weight: 700;
}
.matpromo-kicker svg { width: 16px; height: 16px; }
.matpromo h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin-top: 14px; max-width: 22ch; }
.matpromo-ta { margin-top: 10px; color: #D6DAF0; max-width: 54ch; font-size: 1.02rem; }
.matpromo-stats { list-style: none; display: flex; gap: 22px; margin: 18px 0 0; padding: 0; }
.matpromo-stats li { display: flex; flex-direction: column; }
.matpromo-stats b { font: 700 1.6rem/1 var(--display); color: var(--gold); }
.matpromo-stats span { font-size: .82rem; color: #B9BFE0; margin-top: 2px; }
.matpromo .actions { margin-top: 22px; }
@media (max-width: 720px) {
  .matpromo { grid-template-columns: 1fr; text-align: left; }
  .matpromo-art { justify-content: flex-start; }
  .matpromo-book { width: 112px; }
}

/* ---- Material page hero ---- */
.mat-hero {
  color: #fff; overflow: hidden;
  background:
    radial-gradient(700px 440px at 90% 0%, rgba(139, 92, 246, .28), transparent 60%),
    radial-gradient(640px 420px at 6% 100%, rgba(22, 194, 180, .26), transparent 62%),
    linear-gradient(160deg, #161B45 0%, var(--ink) 62%, #0C0F26 100%);
}
.mat-hero-grid { display: grid; grid-template-columns: 340px 1fr; gap: 52px; align-items: center; padding-block: clamp(44px, 7vw, 92px); }
.mat-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .2); color: #FBE9B0; font-size: .92rem; font-weight: 600;
}
.mat-badge svg { width: 16px; height: 16px; }
.mat-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-top: 18px; max-width: 18ch; }
.mat-ta { margin-top: 14px; max-width: 50ch; color: #D6DAF0; font-size: 1.1rem; }
.mat-price-row { display: flex; align-items: baseline; gap: 14px; margin-top: 24px; }
.mat-price { font: 700 3rem/1 var(--display); color: var(--gold); }
.mat-price-note { color: #B9BFE0; font-size: .95rem; }
.mat-hero .actions { margin-top: 22px; }
.mat-buy { box-shadow: 0 16px 34px -12px rgba(255, 194, 14, .55); }

/* 3D tilted book mockup */
.mat-book { perspective: 1400px; justify-self: center; }
.mat-book-inner {
  width: 100%; max-width: 320px; border-radius: 5px 11px 11px 5px; overflow: hidden; position: relative;
  transform: rotateY(-26deg) rotateX(3deg) rotateZ(1deg); transform-style: preserve-3d;
  box-shadow: -18px 30px 50px -14px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .08);
  transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.mat-book:hover .mat-book-inner { transform: rotateY(-14deg) rotateX(2deg) rotateZ(0deg); }
.mat-book-inner img { width: 100%; display: block; }
.mat-book-inner::before { /* spine shadow */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 16px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .55), transparent); z-index: 2;
}
.mat-book-inner::after { /* page-edge stripes on the right */
  content: ""; position: absolute; right: -7px; top: 3%; bottom: 3%; width: 7px;
  background: repeating-linear-gradient(180deg, #e9e9e9 0 2px, #cfcfcf 2px 3px);
  box-shadow: 1px 0 2px rgba(0, 0, 0, .3); border-radius: 0 3px 3px 0;
}
@media (max-width: 860px) {
  .mat-hero-grid { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .mat-book-inner { max-width: 220px; margin-inline: auto; }
  .mat-price-row, .mat-hero .actions, .hero-facts { justify-content: center; }
  .mat-hero .hero-facts { text-align: left; max-width: 360px; margin-inline: auto; }
}

/* ---- Why cards ---- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.why-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); }
.why-n {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--mat-teal), var(--mat-violet)); color: #fff;
}
.why-n svg { width: 22px; height: 22px; }
.why-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.why-card p { color: var(--muted); font-size: .97rem; }
@media (max-width: 980px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .why-grid { grid-template-columns: 1fr; } }

/* ---- What's inside cards ---- */
.inside-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.inside-card { border-radius: 24px; padding: 28px; position: relative; overflow: hidden; color: #fff; }
.inside-card h3 { font-size: 1.3rem; margin-bottom: 14px; position: relative; z-index: 1; }
.inside-card p { color: rgba(255, 255, 255, .85); max-width: 46ch; position: relative; z-index: 1; }
.inside-a { background: linear-gradient(140deg, #0F766E, #134E4A); }
.inside-b { background: linear-gradient(140deg, var(--mat-violet), #5B21B6); display: flex; flex-direction: column; justify-content: space-between; min-height: 220px; }
.inside-c { background: linear-gradient(140deg, var(--mat-pink), #9D174D); }
.inside-d { background: linear-gradient(140deg, #D97706, #92400E); }
.inside-num { font: 700 2.6rem/1 var(--display); position: relative; z-index: 1; }
.inside-num small { display: block; font: 500 .85rem/1.4 var(--body); opacity: .85; }
.tag-wrap { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.tag-chip { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); color: #fff; padding: 6px 13px; border-radius: 999px; font-size: .86rem; font-weight: 500; }
@media (max-width: 860px) { .inside-grid { grid-template-columns: 1fr; } }

/* ---- Preview gallery + lightbox ---- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gthumb {
  display: block; position: relative; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow); cursor: zoom-in; font: inherit;
}
.gthumb img { width: 100%; display: block; transition: transform .3s ease; }
.gthumb:hover img { transform: scale(1.04); }
.gzoom {
  position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(16, 20, 43, .75); color: #fff; display: grid; place-items: center;
}
.gzoom svg { width: 17px; height: 17px; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery { grid-template-columns: 1fr 1fr; gap: 10px; } }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(8, 10, 24, .92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(92vw, 640px); max-height: 78vh; border-radius: 10px; box-shadow: 0 30px 60px rgba(0, 0, 0, .6); }
.lightbox p { color: #D6DAF0; font-size: .95rem; text-align: center; max-width: 60ch; }
.lightbox-close {
  position: absolute; top: 18px; right: 20px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
}

/* ---- Final CTA + sticky buy bar ---- */
.mat-cta {
  text-align: center; background: linear-gradient(135deg, var(--mat-violet), var(--mat-pink));
  border-radius: 28px; padding: clamp(32px, 5vw, 56px); color: #fff;
}
.mat-cta h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); max-width: 30ch; margin-inline: auto; }
.mat-cta p { margin-top: 10px; color: rgba(255, 255, 255, .9); }
.mat-cta .btn { margin-top: 22px; }

.mat-sticky-spacer { display: none; }
.mat-sticky-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  align-items: center; justify-content: space-between; gap: 14px;
  background: var(--header-bg); border-top: 1px solid var(--line); box-shadow: 0 -10px 24px -16px rgba(16, 20, 43, .4);
  padding: 12px max(16px, env(safe-area-inset-left, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) 16px;
}
.mat-sticky-price { font: 700 1.2rem/1.1 var(--display); color: var(--text); }
.mat-sticky-price small { display: block; font: 500 .75rem/1.3 var(--body); color: var(--muted); }
@media (max-width: 768px) {
  .mat-sticky-spacer { display: block; height: 78px; }
  .mat-sticky-bar { display: flex; }
}
