/* Kattanam Art Lovers Association */

:root {
  --white: #FFFFFF;
  --paper: #F6F2EE;
  --ink: #1C1414;
  --muted: #5E5552;
  --red: #C4161C;
  --red-dark: #96100F;
  --gold: #C9A35A;
  --charcoal: #1A1213;
  --line: rgba(28, 20, 20, .12);

  --serif: 'Bodoni Moda', 'Bodoni 72', Didot, Georgia, serif;
  --sans: 'Red Hat Text', system-ui, sans-serif;
  --ml: 'Gayathri', 'Noto Sans Malayalam', sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:lang(ml) { font-family: var(--ml); line-height: 1.9; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.8rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.55rem); }
h1 i, h2 i { font-weight: 400; }
h2 i { color: var(--red); }
p { margin: 0 0 1em; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--red); color: #fff; padding: 10px 16px; z-index: 60; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.paper { background: var(--paper); }
.night { background: var(--charcoal); color: #F3E6D3; }
.night h1 i { color: var(--gold); }
.lead { font-size: 1.2rem; max-width: 50ch; }
.muted { color: var(--muted); }
.intro { max-width: 60ch; color: var(--muted); margin-bottom: 2.4em; }

/* buttons & links */
.btn { display: inline-block; padding: 15px 30px; font: 500 .95rem/1 var(--sans); letter-spacing: .02em; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-white { background: #fff; color: var(--red); }
.btn-white:hover { background: var(--paper); }
.btn-ghost { border-color: rgba(255, 255, 255, .75); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-gold { background: var(--gold); color: var(--charcoal); }
.link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: var(--red); transition: text-underline-offset .2s; }
.link:hover { text-underline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }

/* header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(6px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 52px; height: 49px; flex: none; }
.brand span { font-family: var(--serif); font-size: 1.2rem; line-height: 1.15; max-width: 15em; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 32px; }
.nav a { text-decoration: none; font-size: .98rem; font-weight: 500; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--red); }
.nav .btn { padding: 13px 24px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); font: 500 .95rem var(--sans); padding: 10px 16px; cursor: pointer; }

@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .brand span { font-size: 1rem; max-width: 11em; }
  .brand img { width: 44px; height: 42px; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 4px var(--gutter) 24px; }
  .nav li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav li:last-child a { border: 0; text-align: center; margin-top: 18px; padding: 15px; }
}

/* banner slider */
.banner { position: relative; height: clamp(540px, 86vh, 780px); overflow: hidden; background: var(--charcoal); color: #fff; }
.banner .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.banner .slide.on { opacity: 1; }
.banner .slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 7s ease-out; }
.banner .slide.on img { transform: scale(1); }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18, 6, 6, .82) 0%, rgba(18, 6, 6, .45) 55%, rgba(18, 6, 6, .12) 100%), linear-gradient(0deg, rgba(18, 6, 6, .55) 0%, rgba(18, 6, 6, 0) 35%); pointer-events: none; }
.banner .content { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; }
.banner .content .wrap { width: 100%; }
.banner h1 { max-width: 12ch; margin-bottom: .2em; }
.banner h1 i { color: var(--gold); }
.banner .ml-name { font-size: clamp(1.1rem, 2vw, 1.4rem); color: #F1DDBA; margin: 0 0 1.2em; }
.banner p { max-width: 46ch; color: rgba(255, 255, 255, .86); font-size: 1.12rem; margin-bottom: 2em; }
.banner .controls { position: absolute; z-index: 3; left: 0; right: 0; bottom: 32px; }
.banner .controls .wrap { display: flex; justify-content: space-between; align-items: center; }
.bars { display: flex; gap: 10px; }
.bars button { width: 34px; height: 3px; padding: 0; border: 0; background: rgba(255, 255, 255, .4); cursor: pointer; }
.bars button[aria-current="true"] { background: #fff; }
.arrows { display: flex; gap: 10px; }
.arrows button, .row-arrows button { width: 48px; height: 48px; background: transparent; border: 1px solid rgba(255, 255, 255, .6); color: #fff; font: 400 1.4rem var(--serif); cursor: pointer; }
.arrows button:hover { background: #fff; color: var(--ink); }

/* welcome */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
.collage { position: relative; padding: 0 0 56px 56px; }
.collage::before { content: ""; position: absolute; left: 0; bottom: 0; width: 62%; height: 70%; background: var(--red); }
.collage .main { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.collage .small { position: absolute; left: 0; bottom: 18px; width: 46%; aspect-ratio: 4 / 3; object-fit: cover; border: 8px solid #fff; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .4); }
.ml-text p { color: var(--ink); font-size: 1.12rem; }
.facts { margin: 2em 0 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 10rem 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--serif); font-style: italic; font-size: 1.08rem; color: var(--red); }
.facts dd { margin: 0; color: var(--muted); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card { background: #fff; display: flex; flex-direction: column; border-bottom: 3px solid transparent; transition: border-color .25s, box-shadow .25s, transform .25s; }
.card:hover { border-bottom-color: var(--red); box-shadow: 0 22px 40px -26px rgba(28, 20, 20, .45); transform: translateY(-4px); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card .body { padding: 22px 22px 26px; }
.card h3 { margin-bottom: .35em; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }

/* events */
.events { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.event { position: relative; display: block; overflow: hidden; color: #fff; text-decoration: none; aspect-ratio: 16 / 10; }
.event img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.event:hover img { transform: scale(1.05); }
.event::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(18, 6, 6, .85) 0%, rgba(18, 6, 6, 0) 60%); }
.event .txt { position: absolute; z-index: 1; left: 28px; right: 28px; bottom: 24px; }
.event h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: .2em; }
.event span { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* red statement band */
.statement { background: var(--red); color: #fff; text-align: center; }
.statement p { font-family: var(--serif); font-style: italic; font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.25; max-width: 26ch; margin: 0 auto; }
.statement .ml { display: block; font-family: var(--ml); font-style: normal; font-size: clamp(1.05rem, 1.8vw, 1.3rem); opacity: .9; margin-top: 1.2em; }

/* photo row */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 32px; margin-bottom: 2.2em; }
.section-head h2, .section-head p { margin: 0; }
.row-arrows { display: flex; gap: 10px; }
.row-arrows button { border-color: var(--line); color: var(--ink); }
.row-arrows button:hover { background: var(--red); border-color: var(--red); color: #fff; }
.photo-row { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(260px, 32%, 400px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.photo-row::-webkit-scrollbar { display: none; }
.photo-row figure { margin: 0; scroll-snap-align: start; }
.photo-row img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
figcaption { font-family: var(--serif); font-style: italic; font-size: 1rem; margin-top: 10px; color: var(--muted); }

/* gallery */
.filters { display: flex; gap: 28px; flex-wrap: wrap; }
.filters button { background: none; border: 0; padding: 4px 0; font: 500 1rem var(--sans); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.filters button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--red); }
.grid-gallery { columns: 3 260px; column-gap: 14px; }
.grid-gallery a { display: block; margin: 0 0 14px; break-inside: avoid; overflow: hidden; }
.grid-gallery img { width: 100%; transition: transform .5s ease; }
.grid-gallery a:hover img { transform: scale(1.03); }
.grid-gallery a[hidden] { display: none; }
.preview { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(140px, 17vw, 220px); gap: 14px; }
.preview a { overflow: hidden; }
.preview a:first-child { grid-column: span 2; grid-row: span 2; }
.preview img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.preview a:hover img { transform: scale(1.04); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(18, 8, 8, .94); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 72px 32px; }
.lightbox img { max-height: calc(100vh - 140px); width: auto; max-width: 100%; }
.lightbox figcaption { color: rgba(255, 255, 255, .75); }
.lightbox button { position: absolute; background: none; border: 1px solid rgba(255, 255, 255, .35); color: #fff; font: 400 1.4rem var(--serif); width: 48px; height: 48px; cursor: pointer; }
.lightbox button:hover { border-color: var(--red); background: var(--red); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }

/* inner page banner */
.page-head { position: relative; min-height: 380px; display: flex; align-items: flex-end; color: #fff; background: var(--charcoal); overflow: hidden; }
.page-head > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18, 6, 6, .8), rgba(18, 6, 6, .3)); }
.page-head .wrap { position: relative; z-index: 1; width: 100%; padding-top: 72px; padding-bottom: 56px; }
.page-head h1 { margin-bottom: .2em; }
.page-head h1 i { color: var(--gold); }
.page-head p { font-size: 1.15rem; max-width: 52ch; margin: 0; color: rgba(255, 255, 255, .86); }

/* ruled list (objectives) */
.ruled { list-style: none; margin: 2em 0 0; padding: 0; border-top: 1px solid var(--line); counter-reset: r; }
.ruled li { counter-increment: r; display: grid; grid-template-columns: 4rem 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.ruled li::before { content: counter(r, lower-roman) "."; font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--red); }
.ruled p { margin: 0; font-size: 1.08rem; }

/* join band */
.join-band { background: var(--red); color: #fff; text-align: center; }
.join-band h2 { max-width: 18ch; margin: 0 auto .5em; }
.join-band h2 i { color: #fff; }
.join-band p { color: rgba(255, 255, 255, .88); max-width: 50ch; margin: 0 auto 2em; }
.social { margin-top: 3em; padding-top: 2.2em; border-top: 1px solid rgba(255, 255, 255, .3); }
.social h3 { font-size: 1.3rem; margin-bottom: .9em; }
.social ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 34px; }
.social a { text-underline-offset: 6px; text-decoration-thickness: 1px; }

/* forms */
.form-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.field { margin-bottom: 22px; }
.field label { display: block; font-weight: 500; font-size: .95rem; margin-bottom: 8px; }
.field label span { color: var(--red); }
.field input, .field textarea, .field select { width: 100%; font: 400 1rem var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-bottom: 1px solid var(--ink); border-radius: 0; padding: 14px; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: inset 0 -1px 0 var(--red); }
.hp { position: absolute; left: -9999px; }
.captcha { margin: 4px 0 24px; min-height: 78px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px 28px; border: 0; padding: 0; margin: 0 0 22px; }
.choices legend { font-weight: 500; font-size: .95rem; margin-bottom: 10px; padding: 0; }
.choices label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.choices input { accent-color: var(--red); width: 18px; height: 18px; }
.contact-list { margin: 0; }
.contact-list div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-list div:first-child { border-top: 1px solid var(--line); }
.contact-list dt { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--red); margin-bottom: 4px; }
.contact-list dd { margin: 0; }
.contact-list a { text-underline-offset: 5px; text-decoration-thickness: 1px; }
.map { margin-top: clamp(48px, 7vw, 88px); border: 1px solid var(--line); line-height: 0; }
.map iframe { width: 100%; height: 380px; border: 0; }
.aside-note { background: var(--paper); border-left: 3px solid var(--red); padding: 26px 28px; }
.aside-note h3 { margin-bottom: .4em; }
.aside-note p:last-child { margin: 0; }

/* footer */
.site-footer { background: var(--charcoal); color: rgba(243, 230, 211, .74); padding: 72px 0 32px; font-size: .97rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 40px; }
.site-footer h2 { font-size: 1.15rem; color: #F3E6D3; margin-bottom: 1em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.foot-brand img { width: 64px; height: 61px; margin-bottom: 16px; }
.foot-brand p { margin: 0 0 6px; }
.foot-brand .name { font-family: var(--serif); color: #F3E6D3; font-size: 1.3rem; line-height: 1.25; }
.copy { border-top: 1px solid rgba(243, 230, 211, .12); margin-top: 48px; padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .9rem; }

/* responsive */
@media (max-width: 1000px) {
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .split, .form-grid, .events { grid-template-columns: 1fr; }
  .collage { max-width: 460px; }
  .preview { grid-template-columns: 1fr 1fr; }
  .photo-row { grid-auto-columns: 72%; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .banner .arrows { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  form .row, .cards { grid-template-columns: 1fr; }
  .ruled li { grid-template-columns: 2.6rem 1fr; gap: 12px; }
  .lightbox figure { padding: 64px 12px 24px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; translate: none; }
  .page-head { min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, .banner .slide img { transition: none !important; transform: none !important; }
}
.statement h2 { color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: 1em; }
.statement h2 i { color: #fff; }
