/*
Theme Name: Rangoli Ki Design
Theme URI: https://rangolikidesign.com/
Author: TheWebReach
Description: Fast, gallery-first theme for rangolikidesign.com. Gerua-floor frame with a kolam dot grid, dot-count difficulty scale, lightbox with Pinterest and WhatsApp sharing, ImageGallery and FAQ schema, image sitemap, ad slots.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: rkd
*/

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */
@font-face { font-family: "Mukta"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/mukta-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mukta"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/mukta-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mukta"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/mukta-devanagari-400-normal.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Yatra One"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/yatra-one-latin-400-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
/* Layout: gallery-first; the header is a gerua-washed floor with a faint kolam dot grid. */
:root {
  --floor: #7c2617;         /* gerua: red-ochre washed floor */
  --floor-deep: #561709;
  --haldi: #f4b61a;         /* turmeric yellow, focus and highlights */
  --kumkum: #c8174f;        /* kumkum pink-red, links on hover and difficulty dots */
  --paper: #fdfaf5;         /* rice-flour white */
  --ink: #26150f;
  --muted: #6c5a50;
  --line: #ecdfd2;
  --tint: #f7ede4;
  --radius: 10px;
  --wrap: 1180px;
  --read: 68ch;
  --f-display: "Yatra One", Georgia, serif;
  --f-body: "Mukta", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--f-body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--floor); text-underline-offset: 3px; }
a:hover { color: var(--kumkum); }
:focus-visible { outline: 3px solid var(--haldi); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--haldi); color: var(--ink); padding: 8px 14px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---------- Type scale (1.25 ratio, 17px base) ---------- */
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.3rem); }
h2 { font-size: clamp(1.55rem, 1.25rem + 1.4vw, 2.15rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

/* ---------- Header ---------- */
.site-head { background-color: var(--floor); background-image: radial-gradient(rgba(255,255,255,.16) 1.1px, transparent 1.6px); background-size: 16px 16px; color: #fff; position: sticky; top: 0; z-index: 40; }
.site-head .bar { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--f-display); font-size: 1.45rem; line-height: 1; }
.chips { background: var(--floor-deep); }
.chips ul { list-style: none; margin: 0; padding: 8px 16px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: var(--wrap); margin-inline: auto; }
.chips ul::-webkit-scrollbar { display: none; }
.chips a { display: block; white-space: nowrap; padding: 5px 14px; border-radius: 999px; color: #fff; text-decoration: none; font-size: .95rem; border: 1px solid rgba(255,255,255,.28); }
.chips a:hover, .chips a[aria-current="page"] { background: var(--haldi); border-color: var(--haldi); color: var(--ink); }

/* ---------- Page header ---------- */
.crumbs { font-size: .9rem; color: var(--muted); margin: 18px 0 10px; }
.crumbs a { color: var(--muted); }
.page-head { max-width: 900px; padding-bottom: 6px; }
.page-head .facts { color: var(--muted); font-size: .95rem; margin-top: -.2em; }
.page-head .facts strong { color: var(--ink); font-weight: 600; }

/* ---------- Readable text ---------- */
.rkd-intro, .rkd-guide, .rkd-sec > p, .rkd-faq { max-width: var(--read); }
.rkd-intro { font-size: 1.07rem; }
.entry table { border-collapse: collapse; width: 100%; margin: 0 0 1.2em; font-size: .97rem; }
.entry th, .entry td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.entry th { font-weight: 600; background: var(--tint); }
.table-scroll { overflow-x: auto; }
.entry ul, .entry ol { padding-left: 1.3em; margin: 0 0 1em; }
.entry li { margin-bottom: .3em; }

/* ---------- Jump links ---------- */
.rkd-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 26px; }
.rkd-jump a { font-size: .93rem; padding: 4px 12px; border-radius: 999px; background: var(--tint); color: var(--floor); text-decoration: none; border: 1px solid var(--line); }
.rkd-jump a:hover { background: var(--floor); color: #fff; }

.more-styles { margin-top: 22px; }

/* ---------- Gallery ---------- */
.rkd-sec { margin: 38px 0 10px; }
.rkd-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 14px; }
@media (min-width: 720px) { .rkd-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; } }
@media (min-width: 1080px) { .rkd-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.rkd-fig { margin: 0; position: relative; }
.rkd-fig > a.rkd-lb { display: block; border-radius: var(--radius); overflow: hidden; background: var(--tint); aspect-ratio: 1 / 1; }
.rkd-fig img { width: 100%; height: 100%; object-fit: cover; }
.rkd-fig figcaption { font-size: .9rem; line-height: 1.45; color: #4a3d34; padding: 8px 2px 0; }
.rkd-fig .rkd-dt { font-family: var(--f-body); font-weight: 600; font-size: .98rem; line-height: 1.3; color: var(--ink); margin: 0 0 4px; }
.rkd-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; color: var(--muted); font-size: .84rem; }
.rkd-pin { position: absolute; top: 8px; right: 8px; line-height: 1.5; display: inline-block; background: rgba(255,255,255,.94); color: var(--ink); border-radius: 999px; padding: 3px 10px 2px; font-size: .8rem; font-weight: 600; text-decoration: none; }
.rkd-pin:hover { background: var(--haldi); color: var(--ink); }

/* Kolam-dot difficulty scale: one dot Easy, two Medium, three Hard */
.rkd-lvl { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.rkd-lvl::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--kumkum); margin-right: 1px; }
.rkd-lvl-medium::before { box-shadow: 10px 0 0 var(--kumkum); margin-right: 11px; }
.rkd-lvl-hard::before { box-shadow: 10px 0 0 var(--kumkum), 20px 0 0 var(--kumkum); margin-right: 21px; }
.stain-key { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }

/* ---------- Guide, FAQ ---------- */
.rkd-guide { margin: 44px 0 0; }
.rkd-faq { margin: 44px 0 0; }
.rkd-faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.rkd-faq summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 1.05rem; padding: 10px 28px 10px 0; position: relative; }
.rkd-faq summary::-webkit-details-marker { display: none; }
.rkd-faq summary::after { content: "+"; position: absolute; right: 4px; top: 6px; font-size: 1.4rem; color: var(--kumkum); }
.rkd-faq details[open] summary::after { content: "\2212"; }
.rkd-faq details > div { padding: 0 0 12px; }

.rkd-faq summary h3 { display: inline; font: inherit; margin: 0; }
.byline { display: flex; gap: 14px; align-items: flex-start; max-width: var(--read); margin: 44px 0 0; padding: 18px 20px; border-left: 4px solid var(--kumkum); background: var(--tint); border-radius: 0 var(--radius) var(--radius) 0; font-size: .95rem; }
.byline svg { width: 28px; height: 28px; flex: none; margin-top: 2px; }
.byline p { margin: 0; }

/* ---------- Ads ---------- */
.rkd-ad { margin: 26px auto; text-align: center; min-height: 100px; }
.rkd-ad:empty { display: none; }

/* ---------- Related / category tiles ---------- */
.tiles-sec { margin: 54px 0 20px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; } }
.tile { display: block; text-decoration: none; color: var(--ink); }
.tile .ph { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--tint); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .nm { font-family: var(--f-display); font-size: 1.18rem; line-height: 1.2; margin-top: 8px; }
.tile .ct { font-size: .88rem; color: var(--muted); }
.tile:hover .nm { color: var(--kumkum); }

/* ---------- Home hero ---------- */
.hero { padding: 26px 0 8px; display: grid; gap: 22px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.05fr 1fr; gap: 40px; padding-top: 40px; } }
.hero h1 { font-size: clamp(2.3rem, 1.5rem + 4vw, 4.1rem); line-height: 1.04; }
.hero .lede { font-size: 1.12rem; max-width: 46ch; color: #4a3d34; }
.mosaic { display: grid; grid-template-columns: 1.3fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; aspect-ratio: 16 / 11; }
.mosaic a { border-radius: var(--radius); overflow: hidden; display: block; background: var(--tint); }
.mosaic a:first-child { grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Footer ---------- */
.site-foot { background: var(--floor-deep); color: #f3e6dc; margin-top: 70px; padding: 40px 0 26px; font-size: .95rem; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { color: var(--haldi); }
.foot-cats { columns: 2 160px; column-gap: 24px; list-style: none; padding: 0; margin: 14px 0 26px; }
.foot-cats li { margin: 0 0 7px; break-inside: avoid; }
.foot-title { font-family: var(--f-display); font-size: 1.3rem; color: #fff; }
.foot-legal { border-top: 1px solid rgba(255,255,255,.15); padding-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: #d9bfb0; }

/* ---------- Lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 90; background: rgba(20,14,10,.97); display: none; flex-direction: column; color: #fff; }
.lb.open { display: flex; }
.lb-top { display: flex; justify-content: flex-end; padding: 8px; }
.lb-btn { background: none; border: 0; color: #fff; font: inherit; font-size: 1rem; padding: 10px 14px; cursor: pointer; border-radius: 8px; }
.lb-btn:hover { background: rgba(255,255,255,.12); }
.lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 8px; position: relative; }
.lb-stage img { max-height: 100%; max-width: min(100%, 900px); object-fit: contain; border-radius: 8px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); font-size: 2rem; line-height: 1; }
.lb-prev { left: 4px; } .lb-next { right: 4px; }
.lb-info { padding: 12px 16px 18px; max-width: 900px; margin: 0 auto; width: 100%; }
.lb-info p { margin: 0 0 10px; font-size: .97rem; color: #eee5dc; }
.lb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lb-actions a { color: var(--ink); background: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; padding: 7px 14px; border-radius: 999px; }
.lb-actions a.wa { background: #25d366; }
.lb-actions a.pin { background: var(--haldi); }

/* ---------- Simple pages / posts ---------- */
.entry { padding-bottom: 10px; }
.page-simple .entry { max-width: var(--read); }
.notfound { padding: 40px 0; }
