/*
Theme Name: KKB — Air Pack
Theme URI: https://knockknockbang.com
Author: Knock Knock Bang
Description: Custom classic theme for the Air Pack marketing sites (Air Widgets). Design tokens live in theme.json; this stylesheet leans on the generated --wp--preset--* custom properties. Do not hardcode brand colors, spacing, or type sizes here.
Version: 0.2.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: kkb
*/

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

/* Smooth in-page anchor scrolling (ios.css forces auto under reduced-motion). */
html { scroll-behavior: smooth; scroll-padding-block-start: var(--wp--preset--spacing--50, 1.5rem); }

/* Kill the WebKit gray tap-highlight flash on EVERY tappable element on iOS — form fields,
   the FAQ <summary> toggles, labels, links, buttons. Set on the universal selector (not just
   html) because the property doesn't reliably inherit onto form controls on iOS Safari.
   :focus-visible (ios.css) keeps keyboard focus visible. */
* { -webkit-tap-highlight-color: transparent; }

/* Kill default (iOS/browser) control chrome globally — the blue, the border,
   the outline, the tap-highlight. Keyboard focus is restored via :focus-visible
   in ios.css. */
button, input, select, textarea { font: inherit; color: inherit; }
button {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a { -webkit-tap-highlight-color: transparent; }

/* Skip link — visually hidden until keyboard focus. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
  background: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--paper);
  text-decoration: none;
}
.skip-link:focus { left: 0; }

body {
  margin: 0;
  overflow-x: clip; /* guard: never let a stray wide element zoom the page out on iOS */
  background: var(--wp--preset--color--paper);
  color: var(--wp--preset--color--ink);
  font-family: var(--wp--preset--font-family--nunito);
  font-size: var(--wp--preset--font-size--base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Tiered optical heading set — density grows with size (Apple-grade display type).
   Sizes come only from the --wp--preset--font-size--* tokens. */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
  margin: 0 0 var(--wp--preset--spacing--30);
}
h1 { font-size: var(--wp--preset--font-size--4xl); line-height: 1.06; letter-spacing: -0.03em; }
h2 { font-size: var(--wp--preset--font-size--3xl); line-height: 1.08; letter-spacing: -0.018em; }
h3 { font-size: var(--wp--preset--font-size--2xl); }

p { margin: 0 0 var(--wp--preset--spacing--30); }

a { color: var(--wp--preset--color--gold-deep); text-decoration-thickness: 0.08em; text-underline-offset: 0.15em; }
a:hover { color: var(--wp--preset--color--gold-deep); }

/* --- Layout helpers --- */
.container { max-width: var(--wp--style--global--wide-size, 1200px); margin-inline: auto; padding-inline: max(var(--wp--preset--spacing--40), var(--ios-safe-left)) max(var(--wp--preset--spacing--40), var(--ios-safe-right)); }
.content  { max-width: var(--wp--style--global--content-size, 760px); margin-inline: auto; }

/* Dark section object (hero / feature bands). Band padding uses the responsive
   --section-pad alias (defined in components.css); buttons + link colors live
   in the components layer. */
.section--dark { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); padding-block: var(--section-pad, var(--wp--preset--spacing--60)); }
