/* 
Theme Name:   Smudge Child
Theme URI:    https://www.smudge.co.za
Description:  Child theme of Genesis Framework
Author:       Bomi
Author URI:   https://www.smudge.co.za
Template:     genesis
Version:      1.1.398
License:      GNU General Public License v2.0
License URI:  http://www.opensource.org/licenses/gpl-license.php
*/

/* ==========================================================================
   smudgechild — base layer
   Design tokens, resets, and generic typography. Every other stylesheet
   depends on the variables defined here. No component-specific rules
   belong here; the typography gives WordPress-generated content
   (post/page bodies) sensible defaults.
   ========================================================================== */

:root {
  --bg: #fbfaf8;
  --ink: #0c0c0d;
  --ink-soft: #55534f; /* Lumart, 12 Nov: darker for readability (was #6c6a66) */
  --ink-faint: #7c7a75; /* was #9a9893 */
  --accent: #ef6c23;
  --accent-hover: #e2611c;
  --line: rgba(12, 12, 13, 0.12);
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --copy-max: 700px;
}

/* ── reset ────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

::selection {
  background: var(--accent);
  color: #fff;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── base typography ─────────────────────────────────────────────────────
   Applied broadly so any unstyled content (including the entry-content
   block below) inherits sane defaults without needing its own rules. ─── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(32px, 4vw, 48px); }
h2 { font-size: clamp(26px, 3vw, 36px); }
h3 { font-size: clamp(21px, 2.2vw, 27px); }
h4 { font-size: 19px; font-weight: 600; }
h5 { font-size: 17px; font-weight: 600; }
h6 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

p {
  margin: 0 0 1.2em;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--accent-hover);
}

strong, b { font-weight: 600; }
em, i { font-style: italic; }

small {
  font-size: 13.5px;
  color: var(--ink-soft);
}

ul, ol {
  margin: 0 0 1.2em;
  padding-left: 1.25em;
  color: var(--ink);
}

li {
  line-height: 1.55;
}

blockquote {
  margin: 1.5em 0;
  padding: 0 0 0 1.25em;
  border-left: 2px solid var(--accent);
  color: var(--ink-soft);
  font-style: italic;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2em 0;
}

code, pre {
  font-family: var(--mono);
  font-size: 14px;
}

code {
  background: rgba(12, 12, 13, 0.06);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre {
  background: var(--ink);
  color: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5em;
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

th {
  font-weight: 600;
  color: var(--ink);
}

/* ── WordPress editor content (post/page bodies) ─────────────────────────
   Scopes the generic rules above specifically to where editors actually
   type content, with a comfortable reading width and spacing — every
   other part of the site uses its own component classes and shouldn't
   be affected by changes made here. ──────────────────────────────────── */

.entry-content {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.65;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content figure {
  margin: 1.5em 0;
}

.entry-content figcaption {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 0.5em;
}
/* Lumart, 12 Nov: "a lot of section headings are too small and inconsistent
   across the mobile view". One scale on phones: page titles 36px, section
   headings 32px, same weight and tracking everywhere. Small sub-headings
   (filters, FAQ groups, category names, step titles) keep their own sizes. */
@media (max-width: 860px) {
  .site-container section h1:not(.screen-reader-text) {
    font-size: 36px; font-weight: 500; line-height: 1.08; letter-spacing: -0.025em;
  }
  .site-container section h2.prog__h2 { font-size: 32px; }
  .site-container section h2:not(.filter-group__title):not(.faq-group__title):not(.cat-sec__name):not(.afford__title):not(.bio__title):not(.panel-main-title):not(.stack-tabs__h):not(.screen-reader-text) {
    font-size: 32px; font-weight: 500; line-height: 1.12; letter-spacing: -0.02em;
  }
}

/* ── 404 page (Shehwar's audit, 12 Nov) ─────────────────────────────── */
.error404 .content { max-width: none; }
.nf { min-height: 72vh; display: flex; align-items: center; justify-content: center; padding: 140px 22px 96px; text-align: center; }
.nf__inner { max-width: 560px; }
.nf__code { display: block; font-family: var(--mono); font-size: 13px; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 18px; }
.nf__title { font-family: var(--sans); font-weight: 500; font-size: clamp(32px, 5vw, 52px); line-height: 1.06; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 16px; text-wrap: balance; }
.nf__lead { font-size: 17px; line-height: 1.55; color: var(--ink-soft, #55524c); margin: 0 auto 30px; max-width: 44ch; }
.nf__ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.nf__btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 13px 26px; border-radius: 999px; text-decoration: none; font-weight: 500; }
.nf__btn:not(.nf__btn--ghost) { background: var(--accent); color: #fff; }
.nf__btn--ghost { background: transparent; color: var(--ink); border: 1px solid rgba(12, 12, 13, 0.18); }

/* ── My account (Shehwar's audit, 12 Nov): clear of the fixed nav, site styling ── */
.woocommerce-account .site-inner { padding-top: 140px; padding-bottom: 96px; }
/* These pages use Genesis's plain .site-inner, which is 1320px wide; the footer
   sits behind the page (sticky reveal) and showed through either side and below
   short content. Full width and at least a screen tall, content kept centred. */
.error404 .site-inner, .woocommerce-account .site-inner, .woocommerce-cart .site-inner { max-width: none; min-height: 100vh; min-height: 100svh; }
.woocommerce-account .site-inner > .content-sidebar-wrap { max-width: 1240px; margin: 0 auto; }
.woocommerce-account .entry-title { font-family: var(--sans); font-weight: 500; font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.02em; margin: 0 0 24px; }
.woocommerce-account .woocommerce { max-width: 560px; }
.woocommerce-account .woocommerce h2 { font-family: var(--sans); font-weight: 500; font-size: 22px; margin: 0 0 16px; }
.woocommerce-account .woocommerce a { color: var(--accent); }
.woocommerce-account .woocommerce input.input-text { width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(12, 12, 13, 0.16); background: #fff; font: inherit; }
.woocommerce-account .woocommerce button.button { min-height: 48px; padding: 12px 26px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-weight: 500; cursor: pointer; }
@media (max-width: 860px) { .woocommerce-account .site-inner { padding-top: 104px; padding-left: 22px; padding-right: 22px; } }

/* ── Footer signup consent line ── */
.signup__consent { font-size: 12.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.6); margin: 10px 0 0; max-width: 430px; }
.signup__consent a { color: rgba(255, 255, 255, 0.85); text-decoration: underline; }

/* ── Tap targets on phones (Shehwar's audit, 12 Nov) ──────────────────
   Footer links, carousel dots and the logo were 9–26px tall. An invisible
   ::after widens the hit area to about 44px without moving anything; the
   FAQ category pills and the bestseller buttons grow to 44px. */
@media (max-width: 860px) {
  .footer__col a, .footer__bottom-list a, .bsell__dot, .site-header .custom-logo-link { position: relative; }
  .footer__col a::after, .footer__bottom-list a::after { content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 44px; transform: translateY(-50%); }
  .bsell__dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 32px; height: 44px; transform: translate(-50%, -50%); }
  .site-header .custom-logo-link::after { content: ""; position: absolute; left: -8px; right: -8px; top: 50%; height: 44px; transform: translateY(-50%); }
  .cat-nav__item { min-height: 44px; }
  .bsell-card__cta.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .site-header .menu-toggle, .site-header [data-cart-open] { min-width: 44px; min-height: 44px; }
}

/* Lumart, 12 Nov (iPhone/Android): full-bleed pinned sections.
   --barpad is the height the browser's toolbars take right now: the gap
   between the large viewport (bars hidden) and the dynamic one (bars as they
   are). Pinned sections are 100lvh tall so their picture always runs to the
   bottom edge, behind the bar, and pad their content by --barpad so nothing
   sits under a showing bar; when the bar shrinks while scrolling, the content
   gets that room back. html gets the page colour so Safari never falls back
   to black behind its bars. */
html { background: var(--bg); }
@media (max-width: 960px) {
  /* Lumart, 15 Nov (Safari): buttons and text in pinned sections sat under
     Safari's bottom bar. --barpad is now the bar's full height, 100lvh -
     100svh: both are constants, so nothing moves while the bar shows or hides
     (1.1.16's 100dvh moved). Pictures still run to the bottom edge; only the
     text and buttons keep clear of where the bar can be. On a browser with no
     bottom bar the two are equal (Chrome on Android: its bar is at the top,
     and the pin's lower edge is off screen by the same amount). */
  :root { --barpad: calc(100lvh - 100svh); }
}

/* pin-guard.js (Lumart, 13 Nov): a full-screen pin that isn't pinned right now
   sits as position: relative, offset to where sticky would put it, so iOS 26
   Safari keeps drawing the page behind its toolbar. */
.pg-off { position: relative !important; top: var(--pg-top, 0px) !important; }
