/*
Theme Name: Garib
Description: The "cartoon room" look from the Garib Ki Car reels: orange striped wall, wooden floor, chunky outlined headlines, white sticker cards and the green progress bar.
Author: Ankush Garib
Version: 3.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: garib
*/

:root {
  /* shared tokens (also used by the plugin's payment and giveaway parts) */
  --bg: #FFE4BC;
  --surface: #FFFFFF;
  --surface-2: #FFF3DF;
  --line: #EBCFA3;
  --text: #2A2420;
  --muted: #6E5B49;
  --accent: #FFC93C;
  --accent-2: #FFD866;
  --accent-ink: #2A2420;
  --red: #E63946;
  --radius: 18px;
  --font-head: "Lilita One", "Arial Black", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* theme-only */
  --ink: #2A2420;
  --green: #3DBE4E;
  --green-2: #7FE08C;
  --blue: #3B82D6;
  --wall-a: #FFE6C2;
  --wall-b: #FFD9A6;
  --wood: #B9793F;
  --wood-dark: #9A6232;
  --pop: 0 5px 0 var(--ink);
  --wrap: 1160px;
  --read: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 400 17px/1.7 var(--font-body);
  background-color: var(--wall-a);
  background-image: repeating-linear-gradient(90deg, var(--wall-a) 0 64px, var(--wall-b) 64px 128px);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: #B5381F; text-underline-offset: 3px; font-weight: 600; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 400; line-height: 1.08; letter-spacing: .01em; margin: 1.5em 0 .45em; color: var(--ink); }
h1 { font-size: clamp(40px, 8vw, 74px); margin-top: 0; }
h2 { font-size: clamp(30px, 5vw, 44px); }
h3 { font-size: 26px; }
p, ul, ol { margin: 0 0 1em; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* Outlined cartoon lettering like the reels ("BONUS", "COMPLETE!") */
.toon { color: var(--accent); -webkit-text-stroke: .14em var(--ink); paint-order: stroke fill; text-shadow: 0 .07em 0 var(--ink); letter-spacing: .02em; }
.toon--green { color: var(--green-2); }
.toon--white { color: #fff; }
.toon--red { color: #FF5A5F; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip-link:focus { left: 8px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.read { width: min(var(--read), 100% - 32px); margin-inline: auto; }

.eyebrow, .tag { display: inline-block; font: 700 14px/1 var(--font-body); letter-spacing: .02em; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 99px; padding: 7px 14px; margin: 0 0 16px; box-shadow: 0 3px 0 var(--ink); }

/* ---------- Buttons: chunky, pressable ---------- */
.btn, .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 30px;
  background: var(--red); color: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: var(--pop);
  font: 400 21px/1.1 var(--font-head); letter-spacing: .02em; text-decoration: none; cursor: pointer;
  transition: transform .1s ease, box-shadow .1s ease, background .15s ease;
}
.btn:hover, .wp-block-button__link:hover { color: #fff; background: #F04452; transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.btn:active, .wp-block-button__link:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn-yellow { background: var(--accent); color: var(--ink); }
.btn-yellow:hover { background: var(--accent-2); color: var(--ink); }
.btn-ghost, .is-style-outline .wp-block-button__link { background: #fff; color: var(--ink); }
.btn-ghost:hover, .is-style-outline .wp-block-button__link:hover { background: var(--surface-2); color: var(--ink); }
.btn-small { min-height: 44px; padding: 8px 18px; font-size: 18px; box-shadow: 0 4px 0 var(--ink); white-space: nowrap; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 16px 14px; margin: 1.6em 0 1.2em; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 3px solid var(--ink); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; white-space: nowrap; }
.brand img { width: 46px; height: 46px; }
.brand span { font: 400 25px/1 var(--font-head); color: var(--accent); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; letter-spacing: .03em; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav a { display: block; padding: 9px 13px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav .current-menu-item > a, .nav .current-menu-parent > a { background: var(--accent); }

.menu-toggle { display: none; }
@media (max-width: 980px) {
  .site-header .wrap { min-height: 64px; gap: 10px; }
  .brand img { width: 40px; height: 40px; }
  .brand span { font-size: 21px; -webkit-text-stroke-width: 3.5px; }
  .nav-desktop { display: none; }
  .menu-toggle { display: block; position: relative; }
  .menu-toggle summary { list-style: none; cursor: pointer; border: 3px solid var(--ink); border-radius: 12px; padding: 6px 12px; font-weight: 700; background: #fff; box-shadow: 0 3px 0 var(--ink); }
  .menu-toggle summary::-webkit-details-marker { display: none; }
  .menu-toggle[open] summary { background: var(--accent); }
  .menu-toggle .nav { position: absolute; right: 0; top: calc(100% + 14px); width: min(270px, calc(100vw - 32px)); background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink); padding: 8px; }
  .menu-toggle .nav ul { flex-direction: column; }
  .menu-toggle .nav a { padding: 12px 14px; font-size: 16px; }
}
@media (max-width: 520px) {
  .brand { min-width: 0; }
  .brand span { white-space: normal; width: min-content; font-size: 19px; line-height: .95; }
}
@media (max-width: 400px) { .site-header .btn-small { padding: 6px 12px; font-size: 16px; } }

/* ---------- Page shell ---------- */
.site-main { padding: clamp(28px, 6vw, 56px) 0 72px; }
.page-head { margin-bottom: 1.4em; }
.page-head h1 { font-size: clamp(42px, 7vw, 64px); }
.page-head p { color: var(--muted); max-width: 60ch; }

/* Content sits on white "paper" over the wall, so long text stays readable */
.paper { background: #fff; border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 var(--ink); padding: clamp(22px, 5vw, 48px); }
.entry > *:first-child { margin-top: 0; }
.entry h2 + p, .entry h3 + p { margin-top: 0; }
.entry blockquote { border-left: 6px solid var(--accent); margin: 1.5em 0; padding: .3em 0 .3em 1em; font-size: 19px; }
.entry table { width: 100%; border-collapse: collapse; }
.entry th, .entry td { border-bottom: 2px solid var(--line); padding: 10px 8px; text-align: left; }
.entry hr { border: 0; border-top: 3px dashed var(--line); margin: 2.5em 0; }
.entry figure { margin: 1.8em 0; }
.entry figure img { border-radius: 16px; border: 3px solid var(--ink); }
.entry code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.entry ul li, .entry ol li { margin-bottom: .35em; }

.wp-block-columns { display: flex; flex-wrap: wrap; gap: 20px; margin: 1em 0; }
.wp-block-column { flex: 1 1 300px; min-width: 0; }

/* ---------- Sticker cards ---------- */
.card, .g-panel { background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); padding: clamp(20px, 4vw, 30px); }
.g-panel h2, .g-panel h3, .card h2, .card h3 { margin-top: 0; }
.g-price { font: 400 54px/1 var(--font-head); margin: .1em 0 .3em; }
.g-note { font-size: 14px; color: var(--muted); }

/* ---------- Home ---------- */
.g-hero { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(20px, 4vw, 48px); align-items: end; }
.g-hero h1 { font-size: clamp(46px, 9vw, 96px); line-height: 1; margin-bottom: .3em; }
.g-hero h1 .toon { display: block; }
.g-hero p.lead { font-size: clamp(17px, 2.3vw, 21px); font-weight: 600; max-width: 30ch; }
.g-hero__art { position: relative; display: grid; justify-items: center; align-self: stretch; align-content: end; }
.g-hero__art img { width: min(320px, 70%); height: auto; position: relative; z-index: 1; margin-bottom: -6px; }
.g-hero__art .g-meter { width: 100%; max-width: 420px; margin-bottom: 18px; }
.g-window { position: absolute; top: 6px; right: 6%; width: 74px; height: 74px; border: 4px solid var(--ink); border-radius: 6px; background: linear-gradient(90deg, transparent 47%, var(--ink) 47% 53%, transparent 53%), linear-gradient(transparent 47%, var(--ink) 47% 53%, transparent 53%), #9FD3F5; }
@media (max-width: 860px) {
  .g-hero { grid-template-columns: 1fr; }
  .g-hero__art img { width: min(240px, 64%); }
  .g-window { width: 56px; height: 56px; }
}

/* Wooden floor strip, like the reels */
.g-floor { height: 26px; margin: 0 calc(50% - 50vw); background: repeating-linear-gradient(90deg, var(--wood) 0 150px, var(--wood-dark) 150px 153px); border-top: 4px solid var(--wood-dark); }

.g-band { padding-top: clamp(40px, 7vw, 72px); }
.g-band > h2:first-child, .g-band > .eyebrow + h2 { margin-top: 0; }
.g-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.g-two > * { min-width: 0; }
.g-link-card { display: block; text-decoration: none; color: inherit; }
.g-link-card:hover .g-meter { transform: translateY(-3px); box-shadow: 0 9px 0 var(--ink); }

.g-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.g-steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); padding: 12px 16px; }
.g-steps li::before { content: counter(s); width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink); display: grid; place-items: center; font: 400 20px var(--font-head); color: #fff; background: var(--red); }
.g-steps li:nth-child(2)::before { background: var(--blue); }
.g-steps li:nth-child(3)::before { background: var(--green); }
.g-steps strong { display: block; font-size: 17px; }
.g-steps span { color: var(--muted); font-size: 15px; }

.g-promo { display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; align-items: center; background: var(--accent); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 0 7px 0 var(--ink); padding: clamp(24px, 5vw, 44px); }
.g-promo h2 { margin: 0 0 .2em; }
.g-promo p { margin: 0; max-width: 46ch; font-weight: 500; }
@media (max-width: 720px) { .g-promo { grid-template-columns: 1fr; } }

/* ---------- Posts ---------- */
.post-meta { color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 1.2em; }
.chip { display: inline-block; background: var(--accent); color: var(--ink); border: 2px solid var(--ink); border-radius: 99px; padding: 3px 12px; font-weight: 700; font-size: 13px; text-decoration: none; }
.chip:hover { color: var(--ink); background: var(--accent-2); }
.post-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 2.5em; padding-top: 1.4em; border-top: 3px dashed var(--line); }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2em; }
.pagination .page-numbers { display: inline-block; min-width: 46px; text-align: center; padding: 9px 12px; border: 3px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 700; box-shadow: 0 3px 0 var(--ink); }
.pagination .current { background: var(--accent); }

.notfound { text-align: center; padding: 30px 0; }
.notfound .wp-block-buttons { justify-content: center; }

/* ---------- Footer: the wooden floor ---------- */
.site-footer { margin-top: 0; border-top: 6px solid var(--wood-dark); color: #FFF1DC; padding: 44px 0 30px; background: var(--wood); background-image: repeating-linear-gradient(180deg, var(--wood) 0 54px, var(--wood-dark) 54px 57px); }
.site-footer a { color: #fff; text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--accent); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand img { width: 52px; height: 52px; flex: none; }
.footer-brand b { display: block; font: 400 28px/1 var(--font-head); color: var(--accent); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.footer-brand p { margin: 8px 0 0; font-size: 15px; max-width: 36ch; }
.footer-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-bottom { margin-top: 28px; padding-top: 16px; border-top: 2px dashed rgba(255, 241, 220, .35); font-size: 14px; }
