/*
Theme Name: Mehandi Ki Design
Theme URI: https://mehandikidesign.com/
Author: TheWebReach
Description: Fast, gallery-first theme for mehandikidesign.com. Mehandi-ceremony green and marigold frame, henna-stain difficulty scale, lightbox with Pinterest and WhatsApp sharing, ImageGallery and FAQ schema, image sitemap, ad slots.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: mkd
*/

/* ---------- Fonts (self-hosted, SIL OFL: Indian Type Foundry) ---------- */
@font-face { font-family: "Hind"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/hind-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: "Hind"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/hind-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: "Hind"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/hind-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: "Rozha One"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/rozha-one-latin-400-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --leaf: #1d4a2c;          /* mehandi-ceremony green */
  --leaf-deep: #133220;
  --marigold: #f2b705;      /* haldi / marigold */
  --paper: #fffdf8;         /* page */
  --ink: #241a14;           /* body text, henna-paste brown-black */
  --muted: #6d5e53;
  --line: #eadfce;
  /* henna stain scale: fresh orange -> overnight maroon. Used ONLY for difficulty. */
  --stain-1: #e48a3c;
  --stain-2: #b4521b;
  --stain-3: #6e1d10;
  --radius: 12px;
  --wrap: 1180px;
  --read: 68ch;
  --f-display: "Rozha One", Georgia, serif;
  --f-body: "Hind", 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(--leaf); text-underline-offset: 3px; }
a:hover { color: var(--stain-2); }
:focus-visible { outline: 3px solid var(--marigold); 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(--marigold); 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: var(--leaf); 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(--leaf-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(--marigold); border-color: var(--marigold); 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 ---------- */
.mkd-intro, .mkd-guide, .mkd-sec > p, .mkd-faq { max-width: var(--read); }
.mkd-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: #f6f0e4; }
.table-scroll { overflow-x: auto; }
.entry ul, .entry ol { padding-left: 1.3em; margin: 0 0 1em; }
.entry li { margin-bottom: .3em; }

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

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

/* ---------- Gallery ---------- */
.mkd-sec { margin: 38px 0 10px; }
.mkd-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 14px; }
@media (min-width: 720px) { .mkd-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; } }
@media (min-width: 1080px) { .mkd-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.mkd-fig { margin: 0; position: relative; }
.mkd-fig > a { display: block; border-radius: var(--radius); overflow: hidden; background: #f3ece0; aspect-ratio: 1 / 1; }
.mkd-fig img { width: 100%; height: 100%; object-fit: cover; }
.mkd-fig figcaption { font-size: .9rem; line-height: 1.45; color: #4a3d34; padding: 8px 2px 0; }
.mkd-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; color: var(--muted); font-size: .84rem; }
.mkd-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; }
.mkd-pin:hover { background: var(--marigold); color: var(--ink); }

/* Henna-stain difficulty scale: the one signature device */
.mkd-lvl { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.mkd-lvl::before { content: ""; width: 12px; height: 12px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--stain-1); }
.mkd-lvl-medium::before { background: var(--stain-2); }
.mkd-lvl-hard::before { background: var(--stain-3); }
.stain-key { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }

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

.mkd-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(--stain-2); background: #f6f0e4; 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 ---------- */
.mkd-ad { margin: 26px auto; text-align: center; min-height: 100px; }
.mkd-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: #f3ece0; }
.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(--stain-2); }

/* ---------- 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: #f3ece0; }
.mosaic a:first-child { grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Footer ---------- */
.site-foot { background: var(--leaf-deep); color: #e9efe9; margin-top: 70px; padding: 40px 0 26px; font-size: .95rem; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { color: var(--marigold); }
.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: #b9c8bd; }

/* ---------- 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(--marigold); }

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