/* Layout: split hero (Malayalam mark + photo), then a training-path ladder, lineage, reels, contact.
   Three colours: red primary, black and white. The hero stays dark and lamp-lit. */
:root {
  --ground: #ffffff;
  --ground-2: #f5f5f5;
  --line: #e3e3e3;
  --ink: #111111;
  --ink-dim: #555555;
  --red: #b81e1b;
  --red-deep: #96160f;
  --on-red: #ffffff;
  --display: "Anek Malayalam", "Arial Narrow", sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: clip; margin: 0; background: var(--ground); color: var(--ink); font: 1.0625rem/1.65 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--red); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.wrap { max-width: 72rem; margin: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; font: 700 1.05rem/1.1 var(--display); letter-spacing: .02em; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
nav { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .95rem; }
nav a { color: var(--ink-dim); text-decoration: none; }
nav a:hover { color: var(--ink); }
nav .lang { color: var(--red); font-weight: 600; letter-spacing: .08em; }

.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(3rem, 8vw, 6rem); }
.hero .mal { font: 800 clamp(2.6rem, 6vw, 4.6rem)/1.05 var(--display); color: var(--red); margin: 0 0 .3em; max-width: none; text-wrap: balance; }
.hero .mal span[lang] { display: block; font-size: .5em; font-weight: 700; color: var(--ink); margin-bottom: .3em; }
.hero .wordmark { display: block; width: min(100%, 32rem); aspect-ratio: 1598 / 280; background: var(--red); -webkit-mask: url(/img/wordmark.svg) left center / contain no-repeat; mask: url(/img/wordmark.svg) left center / contain no-repeat; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero h1 { font: 700 clamp(1.8rem, 4vw, 2.8rem)/1.15 var(--display); margin: 0 0 1rem; text-wrap: balance; }
.hero p { color: var(--ink-dim); max-width: 34rem; margin: 0 0 2rem; }
.hero figure { margin: 0; position: relative; justify-self: end; }
.hero figure img { aspect-ratio: 4/5; max-height: min(78vh, 680px); object-fit: cover; object-position: center 70%; width: auto; margin-left: auto; }
.hero figure::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--red); z-index: -1; }
.actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--red); color: var(--on-red); padding: .85rem 1.6rem; border: 0; font: 600 1rem var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--red-deep); }
.btn.ghost { background: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-dim); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--red); }

section { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--line); scroll-margin-top: 3rem; }
.eyebrow { font: 600 .78rem var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--red); margin: 0 0 .8rem; }
h2 { font: 700 clamp(1.7rem, 3.5vw, 2.4rem)/1.15 var(--display); margin: 0 0 1.2rem; text-wrap: balance; }
.lede { color: var(--ink-dim); max-width: 40rem; margin: 0 0 2.5rem; }

.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); position: relative; isolation: isolate; }
.path::before { content: ""; position: absolute; right: -6rem; top: 50%; width: 24rem; aspect-ratio: 1; translate: 0 -50%; z-index: -1; background: url(/img/logo-mark.svg) center / contain no-repeat; opacity: .07; pointer-events: none; }
.path li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.6rem 1.4rem; display: grid; gap: .4rem; align-content: start; }
.path .n { font: 800 2rem/1 var(--display); color: var(--red); }
.path h3 { font: 700 1.25rem/1.2 var(--display); margin: 0; }
.path .ml { font: 500 1rem var(--display); color: var(--ink-dim); }
.path p { margin: 0; color: var(--ink-dim); font-size: .95rem; }

.lineage { display: grid; grid-template-columns: auto 1fr; gap: 2.5rem; align-items: start; }
.lineage img { width: 140px; border-radius: 50%; }
.lineage p { max-width: 40rem; margin: 0 0 1rem; color: var(--ink-dim); }
.lineage strong { color: var(--ink); }

.reels { display: grid; grid-template-columns: repeat(2, minmax(0, 22rem)); gap: 1.5rem; }
.reels iframe { width: 100%; aspect-ratio: 9/14; border: 1px solid var(--line); background: var(--ground-2); }
.more { margin-top: 1.5rem; }


footer { border-top: 1px solid var(--line); color: var(--ink-dim); font-size: .85rem; }
footer .wrap { padding-block: 2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

@media (max-width: 800px) {
  .hero .wrap, .lineage { grid-template-columns: 1fr; }
  .path { grid-template-columns: 1fr 1fr; }
  .hero figure { max-width: 26rem; }
}
@media (max-width: 480px) {
  .path, .reels { grid-template-columns: 1fr; }
  nav a:not(.lang, [href="#contact"]) { display: none; }
  .brand { white-space: normal; }
  .reels iframe + iframe { display: none; }
}

/* Puttara: blurred lamp-lit kalari shrine behind the hero; always dark so the flames read in both themes. */
.hero { position: relative; isolation: isolate; overflow: hidden; background: #0a0a0a; color-scheme: dark;
  --ground: #0a0a0a; --ink: #ffffff; --ink-dim: #e8e8e8; --line: #3a3a3a; --red: #f0473c; --red-deep: #b01f1c; color: var(--ink); }
.hero::before { content: ""; position: absolute; inset: -24px; z-index: -2; background: url(/img/puttara.jpg) 62% 50% / cover; filter: blur(8px) saturate(1.05) brightness(1.05) sepia(.15); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(10 10 10 / .82) 0%, rgb(10 10 10 / .6) 38%, rgb(10 10 10 / .2) 62%, rgb(10 10 10 / 0) 100%); }
.hero .btn:not(.ghost) { background: #c8261f; }
.hero .mal, .hero h1, .hero p { text-shadow: 0 0 14px rgb(10 10 10 / .75); }
@media (max-width: 800px) { .hero::after { background: linear-gradient(180deg, rgb(10 10 10 / .8) 0%, rgb(10 10 10 / .7) 55%, rgb(10 10 10 / .3) 100%); } }
.lamps { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; filter: blur(3px); mix-blend-mode: screen; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
