:root {
  --ink: #0c0806;
  --ink-2: #160e0a;
  --ink-3: #21150e;
  --gold: #e9b45a;
  --gold-hi: #ffe2a3;
  --gold-lo: #9a6a2a;
  --ember: #c4541f;
  --jasmine: #f6eee0;
  --muted: #b8a58c;
  --line: rgba(233, 180, 90, 0.22);
  --serif: "Cormorant Garamond", "Anek Tamil", Georgia, serif;
  --display: "Cinzel", "Anek Tamil", serif;
  --tamil: "Anek Tamil", "Cormorant Garamond", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(196, 84, 31, 0.28), transparent 60%),
    radial-gradient(900px 600px at 85% 40%, rgba(233, 180, 90, 0.07), transparent 60%),
    radial-gradient(900px 600px at 10% 80%, rgba(196, 84, 31, 0.08), transparent 60%),
    var(--ink);
  color: var(--jasmine);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* film grain */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* drifting jasmine petals */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.petal {
  position: absolute; top: -20px;
  width: 10px; height: 14px;
  background: radial-gradient(ellipse at 30% 30%, #fffaf0, #eadcc4 70%);
  border-radius: 80% 0 80% 0;
  opacity: 0.55;
  animation: fall linear infinite;
}
@keyframes fall {
  0%   { transform: translate3d(0, -20px, 0) rotate(0deg); }
  50%  { transform: translate3d(40px, 50vh, 0) rotate(160deg); }
  100% { transform: translate3d(-20px, 105vh, 0) rotate(340deg); }
}

/* nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px clamp(16px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(12, 8, 6, 0.92), rgba(12, 8, 6, 0));
  backdrop-filter: blur(2px);
}
.nav-mark {
  font-family: var(--display); letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none; font-size: 15px; color: var(--gold);
}
.nav nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.nav nav a {
  font-family: var(--display); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); transition: color .3s;
}
.nav nav a:hover { color: var(--gold-hi); }

/* hero */
.hero {
  position: relative; z-index: 2;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 90px 16px 60px; text-align: center;
}
.hero-logo {
  width: min(720px, 92vw); height: auto;
  filter: drop-shadow(0 0 40px rgba(233, 140, 50, 0.35));
  animation: rise 1.6s cubic-bezier(.2,.7,.2,1) both, glow 6s ease-in-out 1.6s infinite;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 36px rgba(233, 140, 50, 0.3)); }
  50%      { filter: drop-shadow(0 0 64px rgba(255, 170, 70, 0.5)); }
}
.hero-tag {
  font-style: italic; font-size: clamp(20px, 2.6vw, 28px); color: var(--muted);
  margin: 8px 0 28px;
  animation: rise 1.4s .5s cubic-bezier(.2,.7,.2,1) both;
}
.hero-cta { display: flex; gap: 14px; animation: rise 1.4s .8s cubic-bezier(.2,.7,.2,1) both; }

.btn {
  font-family: var(--display); font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase;
  text-decoration: none; padding: 13px 30px; border-radius: 999px;
  transition: transform .25s, box-shadow .25s, background .25s, color .25s;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 0;
}
.btn-gold {
  color: #1a0f07;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold) 45%, var(--gold-lo));
  box-shadow: 0 6px 30px rgba(233, 180, 90, 0.25);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(233, 180, 90, 0.4); }
.btn-ghost { color: var(--gold); background: transparent; border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn-sm { font-size: 11px; padding: 9px 18px; }

/* sections */
.section { position: relative; z-index: 2; max-width: 1140px; margin: 0 auto; padding: 90px 16px; }
.section-head { text-align: center; margin-bottom: 48px; }
.ornament { color: var(--gold); font-size: 14px; display: inline-block; letter-spacing: 1em; }
.ornament::before, .ornament::after {
  content: ""; display: inline-block; width: 60px; height: 1px; vertical-align: middle;
  background: linear-gradient(to right, transparent, var(--gold));
  margin: 0 14px;
}
.ornament::after { background: linear-gradient(to left, transparent, var(--gold)); margin-left: 0; }
.section-head h2 {
  font-family: var(--display); font-weight: 400; letter-spacing: 0.12em;
  font-size: clamp(30px, 5vw, 48px); margin: 14px 0 4px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head p { margin: 0; font-style: italic; color: var(--muted); }

/* songs */
.songs { display: grid; gap: 36px; }
.song {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center;
  padding: 22px; border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(160deg, rgba(33, 21, 14, 0.85), rgba(12, 8, 6, 0.6));
  box-shadow: 0 30px 80px -40px rgba(196, 84, 31, 0.5);
}
.song:nth-child(even) .video { order: 2; }
.video {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  background: var(--ink-3); border: 1px solid var(--line);
}
.video iframe, .video img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video button {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: none;
}
.video button::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(12,8,6,.55), rgba(12,8,6,.75));
  border: 1px solid var(--gold);
  box-shadow: 0 0 30px rgba(233, 180, 90, .35);
  transition: transform .3s;
}
.video button::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: 1; margin: -12px 0 0 -7px;
  border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent var(--gold-hi);
}
.video button:hover::after { transform: scale(1.08); }
.video-empty {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px;
  color: var(--muted); font-style: italic;
}
.song-info .meta { font-family: var(--display); font-size: 12px; letter-spacing: .2em; color: var(--gold); text-transform: uppercase; }
.song-info h3 { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3vw, 32px); margin: 8px 0 10px; letter-spacing: .04em; }
.song-info p { color: var(--muted); margin: 0 0 20px; }
.song-links { display: flex; flex-wrap: wrap; gap: 10px; }
.platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.platforms span { font-family: var(--display); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.plat {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--c, var(--gold-hi));
  transition: border-color .2s, background .2s, transform .2s;
}
.plat svg { width: 20px; height: 20px; fill: currentColor; }
.plat:hover, .plat:focus-visible { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); transform: translateY(-2px); }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.tabs { display: flex; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; }
.tab {
  font-family: var(--display); font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  background: none; border: 0; color: var(--muted); padding: 9px 18px; border-radius: 999px; cursor: pointer;
  transition: background .25s, color .25s;
}
.tab:hover { color: var(--gold-hi); }
.tab.is-on { background: linear-gradient(135deg, var(--gold-hi), var(--gold)); color: #1a0f07; }
.search {
  flex: 1 1 240px; max-width: 360px;
  font-family: var(--serif); font-size: 18px; font-style: italic;
  color: var(--jasmine); background: transparent;
  border: 0; border-bottom: 1px solid var(--line); padding: 8px 2px; outline: none;
}
.search:focus { border-bottom-color: var(--gold); }
.search::placeholder { color: rgba(184, 165, 140, .6); }

/* writing cards — manuscript leaves */
.leaves { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.leaf {
  position: relative; text-align: left; cursor: pointer;
  font: inherit; color: inherit;
  padding: 28px 26px 24px; border-radius: 4px 18px 4px 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(246, 238, 224, 0.035), rgba(246, 238, 224, 0)),
    var(--ink-2);
  transition: transform .4s cubic-bezier(.2,.7,.2,1), border-color .3s, box-shadow .4s;
  opacity: 0; transform: translateY(18px);
}
.leaf.in { opacity: 1; transform: none; }
.leaf:hover { transform: translateY(-4px); border-color: rgba(233, 180, 90, .55); box-shadow: 0 20px 50px -25px rgba(233, 140, 50, .45); }
.leaf::before {
  content: ""; position: absolute; left: 26px; right: 26px; top: 0; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent); opacity: .6;
}
.leaf-meta { display: flex; gap: 10px; align-items: center; font-family: var(--display); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.badge { color: var(--gold); }
.badge.lyrics { color: #f3a46b; }
.leaf h3 { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: .03em; margin: 12px 0 10px; line-height: 1.3; }
.leaf .excerpt {
  margin: 0; color: var(--muted); font-style: italic; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.leaf .read { display: inline-block; margin-top: 16px; font-family: var(--display); font-size: 11px; letter-spacing: .24em; color: var(--gold); text-transform: uppercase; }
.empty { text-align: center; color: var(--muted); font-style: italic; }

/* about */
.about { text-align: center; max-width: 760px; }
.about-text { white-space: pre-line; font-size: 22px; line-height: 1.7; margin: 0 auto 32px; }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.btn svg { width: 16px; height: 16px; fill: currentColor; }

.foot { position: relative; z-index: 2; text-align: center; padding: 40px 16px 50px; color: var(--muted); font-size: 15px; border-top: 1px solid var(--line); }

/* reader */
.reader { position: fixed; inset: 0; z-index: 40; display: grid; place-items: start center; overflow-y: auto; padding: 60px 16px; }
.reader[hidden] { display: none; }
.reader-backdrop { position: fixed; inset: 0; background: rgba(8, 5, 3, 0.86); backdrop-filter: blur(6px); animation: fade .35s both; }
.reader-page {
  position: relative; width: min(680px, 100%);
  padding: clamp(36px, 6vw, 64px) clamp(22px, 6vw, 64px);
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(233, 180, 90, .09), transparent 70%),
    var(--ink-2);
  border: 1px solid var(--line); border-radius: 6px 28px 6px 28px;
  box-shadow: 0 40px 120px -30px rgba(196, 84, 31, .45);
  text-align: center;
  animation: rise .5s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes fade { from { opacity: 0; } }
.reader-close {
  position: absolute; top: 12px; right: 16px; background: none; border: 0; color: var(--muted);
  font-size: 34px; line-height: 1; cursor: pointer;
}
.reader-close:hover { color: var(--gold-hi); }
.reader-meta { margin: 0; font-family: var(--display); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.reader-page h3 {
  font-family: var(--display); font-weight: 400; font-size: clamp(28px, 5vw, 40px); margin: 12px 0 0; line-height: 1.25;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.reader-rule { color: var(--gold-lo); margin: 18px 0 26px; letter-spacing: 1em; }
.reader-text { white-space: pre-line; font-size: 21px; line-height: 1.85; }
.reader-text .tag { display: block; font-family: var(--display); font-size: 12px; letter-spacing: .26em; color: var(--gold); text-transform: uppercase; margin-top: 18px; }
.reader-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
/* Tamil: its own font, no fake italics, and no wide letter-spacing (it splits vowel signs from letters) */
:lang(ta), .ta { font-family: var(--tamil); font-size: .92em; line-height: 1.9; }
.song-info h3.ta, .leaf h3.ta, .reader-page h3.ta, .leaf .excerpt.ta, .reader-text.ta, .about-text.ta {
  font-family: var(--tamil); letter-spacing: normal; font-style: normal;
}
.reader-text.ta .tag { font-family: var(--tamil); letter-spacing: .04em; font-size: 14px; text-transform: none; }

@media (max-width: 760px) {
  body { font-size: 18px; }
  .nav-mark { display: none; }
  .nav { justify-content: center; }
  .song { grid-template-columns: 1fr; padding: 14px; gap: 18px; }
  .song:nth-child(even) .video { order: 0; }
  .filters { flex-direction: column; align-items: stretch; }
  .tabs { justify-content: center; }
  .search { max-width: none; }
  .ornament::before, .ornament::after { width: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .leaf { opacity: 1; transform: none; }
  .petals { display: none; }
}
