:root {
  color-scheme: light;
  --cream: #f6f3eb;
  --paper: #fffdf7;
  --forest: #1c3025;
  --ink: #213429;
  --muted: #556357;
  --line: #dddccf;
  --rust: #8b432b;
  --sans: 'Manrope', 'Noto Sans Sinhala', 'Iskoola Pota', system-ui, sans-serif;
  --sinhala: 'Noto Sans Sinhala', 'Iskoola Pota', sans-serif;
  --serif: 'Fraunces', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); line-height: 1.65; -webkit-font-smoothing: antialiased; }
:lang(si) { font-family: var(--sinhala); }
[lang='en'] { font-family: var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid #ad5a32; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1200px, calc(100% - 100px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 2; top: .5rem; left: .5rem; background: white; padding: .5rem 1rem; }

.header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.25rem; min-height: 80px; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .72rem; justify-self: start; font: 650 1.04rem/1.13 var(--serif); flex: none; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%; background: var(--forest); color: #f8edcf; font: 500 1.55rem/1 var(--serif); }
nav, .socials { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.35rem); font-size: .94rem; font-weight: 700; }
nav a:hover, .socials a:hover { text-decoration: underline; text-underline-offset: .35em; text-decoration-thickness: 1px; }
.facebook { display: inline-flex; min-height: 43px; align-items: center; border: 1px solid #c6c9bc; padding-inline: 1rem; border-radius: 999px; font-size: .9rem; font-weight: 750; }
.facebook:hover { background: #e7e9d9; }
.header-actions, .language { display: flex; align-items: center; gap: .65rem; }
.header-actions { justify-self: end; }
.language { gap: .12rem; border: 1px solid var(--line); border-radius: 999px; padding: .18rem; background: var(--cream); }
.language button { min-height: 35px; border: 0; border-radius: 999px; padding: .25rem .68rem; background: transparent; color: var(--ink); cursor: pointer; font-size: .84rem; font-weight: 750; white-space: nowrap; }
.language button[aria-pressed='true'] { background: var(--forest); color: var(--paper); }

.hero { background-color: #263528; background-image: linear-gradient(90deg, #111c16f7 0%, #18261ddb 26%, #18261d61 55%, #18261d09 82%), url('assets/village-kitchen.webp'); background-position: center, center 40%; background-size: cover; color: #fff9ea; }
.hero-inner { display: flex; align-items: center; min-height: clamp(480px, 44vw, 630px); padding-block: 4rem; }
.hero-copy { max-width: 560px; }
.eyebrow { display: flex; align-items: center; gap: .68rem; color: #f1cb88; font: 800 .78rem var(--sans); letter-spacing: .16em; }
.eyebrow::before { content: ''; width: 25px; height: 1px; background: currentColor; }
.hero h1 { margin: .9rem 0 1rem; font-size: clamp(3.2rem, 7vw, 6.1rem); line-height: 1.2; }
.hero h1:lang(en) { font: 590 clamp(3.25rem, 6.4vw, 6.3rem)/1.02 var(--serif); letter-spacing: -.038em; max-width: 10ch; text-wrap: balance; }
.hero-subtitle { color: #fff6e2; font-size: clamp(1.04rem, 1.5vw, 1.2rem); max-width: 28rem; text-wrap: pretty; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 50px; border-radius: 9px; padding: .75rem 1.22rem; gap: .65rem; background: #f5d69b; color: #233328; font-weight: 800; font-size: .94rem; transition: background-color .2s; }
.hero .button { margin-top: 1.75rem; }
.button:hover { background: #ffebc1; }
.triangle { display: block; width: 0; height: 0; margin-left: .12em; border-top: .32em solid transparent; border-bottom: .32em solid transparent; border-left: .53em solid currentColor; }

.collection { padding-block: clamp(3.75rem, 6.5vw, 6.5rem); scroll-margin-top: 1.3rem; }
.collection-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.4rem; margin-bottom: 1.65rem; border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; }
.collection h2 { font-size: clamp(1.9rem, 4vw, 3.35rem); line-height: 1.33; }
.collection h2:lang(en) { font: 600 clamp(2.4rem, 5vw, 4rem)/1.07 var(--serif); letter-spacing: -.046em; }
.collection-heading p { color: var(--muted); margin-top: .6rem; text-wrap: pretty; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.filters button { min-height: 44px; padding: .46rem .95rem; background: var(--paper); color: var(--ink); border: 1px solid #c8cabe; border-radius: 999px; font-size: .89rem; font-weight: 750; cursor: pointer; }
.filters button:hover { background: #e7e9d9; }
.filters button[aria-pressed='true'] { background: var(--forest); border-color: var(--forest); color: #fff9ea; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.85rem, 2vw, 1.55rem); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; transition: box-shadow .24s ease, border-color .24s ease; }
.card:focus-within, .card:hover { border-color: #a7ac9b; box-shadow: 0 8px 22px #1d2c2010; }
.card-link { height: 100%; display: block; overflow: hidden; border-radius: inherit; }
.thumbnail { position: relative; aspect-ratio: 1.57; overflow: hidden; isolation: isolate; display: grid; place-items: center; background: #384d35; }
.thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.thumbnail .reel-cover { object-position: center 42%; }
.thumbnail::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(transparent 52%, #19150c50); }
.card-link:hover img { transform: scale(1.045); }
.play { z-index: 1; display: grid; place-items: center; width: 47px; height: 47px; border: 1px solid #fff9; border-radius: 50%; background: #19231cb0; color: white; font-size: 1.53rem; backdrop-filter: blur(5px); }
.card-link:hover .play { background: var(--forest); }
.duration { position: absolute; z-index: 1; right: .7rem; bottom: .7rem; padding: .23rem .48rem; border-radius: 5px; background: #171c16e6; color: white; font: 800 .78rem var(--sans); font-variant-numeric: tabular-nums; }
.card-copy { padding: .87rem 1.05rem 1.13rem; }
.card-copy p { color: var(--rust); font-size: .85rem; font-weight: 750; }
.card-copy h3 { font-size: clamp(1.04rem, 1.6vw, 1.31rem); font-weight: 800; line-height: 1.42; margin-top: .17rem; text-wrap: pretty; }
.card-copy h3:lang(en) { letter-spacing: -.024em; }
.gallery-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .65rem; margin-top: 1.6rem; }
.gallery-actions button { background: var(--forest); color: var(--paper); cursor: pointer; }
.gallery-actions button:hover { background: #33493a; }
.gallery-actions button:disabled { opacity: .6; cursor: wait; }

.about { background: var(--forest); color: #fff9ea; }
.about-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: clamp(2.5rem, 6vw, 4.6rem); }
.about h2 { font: 560 clamp(2.2rem, 4.5vw, 3.7rem)/1.08 var(--serif); letter-spacing: -.04em; }
.about p { margin-top: .75rem; max-width: 37rem; color: #ece6d4; }
.about .button { text-align: center; flex-shrink: 0; }
.footer { min-height: 112px; }
.socials { font-family: var(--sans); }

.video-dialog { width: min(420px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 13px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 70px #0007; }
.video-dialog::backdrop { background: #101a15c9; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem .95rem; }
.dialog-header h2 { font-size: 1.1rem; line-height: 1.4; }
.dialog-header button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: currentColor; cursor: pointer; font-size: 1.55rem; }
.video-frame { display: block; width: 100%; height: min(62dvh, 540px); border: 0; background: var(--forest); }
.dialog-footer { display: flex; justify-content: center; padding: .65rem; }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 56px); }
  .collection-heading { flex-direction: column; align-items: start; }
}

@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 68px; gap: .6rem; }
  .brand { font-size: .95rem; gap: .55rem; }
  .brand-mark { width: 35px; height: 35px; font-size: 1.3rem; }
  nav { gap: .7rem; font-size: .86rem; }
  .facebook { min-height: 41px; padding-inline: .83rem; font-size: .86rem; }
  .header-facebook { display: none; }
  .language button { min-height: 35px; padding-inline: .51rem; font-size: .78rem; }
  .hero { background-image: linear-gradient(0deg, #111c16f2 1%, #18261d9c 40%, #18261d13 85%), url('assets/village-kitchen.webp'); background-position: center, 66% center; }
  .hero-inner { min-height: 500px; align-items: end; padding-block: 2rem 2.3rem; }
  .collection-heading { gap: 1rem; }
  .filters { gap: .37rem; }
  .filters button { padding-inline: .68rem; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-copy { padding: .7rem .72rem .9rem; }
  .play { height: 38px; width: 38px; font-size: 1.2rem; }
  .about-inner { flex-direction: column; align-items: start; gap: 1.25rem; }
  .footer { min-height: 100px; flex-wrap: wrap; gap: .9rem; padding-block: 1.15rem; }
  .socials { gap: .85rem; font-size: .84rem; }
}

@media (max-width: 430px) {
  .header-inner { grid-template-columns: 1fr auto; gap: 0 .6rem; padding-top: .65rem; }
  .header-inner nav { grid-row: 2; grid-column: 1 / -1; min-height: 38px; gap: 1.15rem; }
  nav a { white-space: nowrap; }
}

@media (max-width: 355px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
}

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