/* strangefolk — base */

/* Tokens. The six brand colors come from theme.json; everything below the
   first group is a derived UI shade — rules, dims — that exists only to build
   panels out of the six. Never introduce a seventh hue. */
:root {
	--ground:    var(--wp--preset--color--deep-field, #0A0D0A);
	--surface:   var(--wp--preset--color--undergrowth, #12160F);
	--bone:      var(--wp--preset--color--bone, #DDD7C7);
	--fog:       var(--wp--preset--color--fog, #8C9388);
	--amber:     var(--wp--preset--color--signal-flare, #C8763A);
	--lichen:    var(--wp--preset--color--lichen, #7E8F6B);

	--surface2:  #171C14;
	--raised:    #1C2119;
	--rule:      #272D23;
	--rule-hi:   #3A4234;
	/* Final whole-branch review: the original #666C61 measured 3.20:1 on
	   --surface2 and 3.61:1 on --ground — both fail WCAG AA's 4.5:1 for
	   normal text, and --dim carries the smallest text in the system (10px
	   uppercase mono: the shipping ticker, footer column headings,
	   data-panel <dt> labels, card designations, .sf-registry__fine,
	   .sf-assur, .sf-empty). Not one of the six locked brand hexes — a
	   derived shade, the theme's to manage, same as --amber-hi/--amber-alpha
	   below. #7F8579 is computed (WCAG relative-luminance formula, not
	   eyeballed) to clear 4.5:1 against BOTH backgrounds this token is used
	   on: 4.56:1 on --surface2, 5.15:1 on --ground. Same hue family as Fog
	   (#8C9388, G channel highest, R/B close behind) and stays clearly
	   dimmer than it (4.56:1 vs Fog's 5.48:1 on --surface2) — a shade below
	   Fog, not a second Fog. */
	--dim:       #7F8579;
	--amber-dim: #8A5228;
	/* Task 11: promoted from three hand-typed #DD8845 hex literals
	   (components.css, woocommerce.css) — the amber hover shade — and one
	   hand-decomposed rgba(200, 118, 58, .06) (woocommerce.css's .sf-made
	   panel), same derivation pattern as --amber-dim above. Neither is a new
	   hue: --amber-hi is Signal Flare lightened for a :hover state,
	   --amber-alpha is Signal Flare's own R/G/B (200, 118, 58 = #C8763A) at
	   6% opacity for a tint fill. */
	--amber-hi:    #DD8845;
	--amber-alpha: rgba(200, 118, 58, .06);

	/* Final whole-branch review: promoted from two hand-typed
	   linear-gradient(#1A211A, #090C09) literals (pages.css's
	   .sf-spec__art and .sf-file__art no-photo fallback panels). The two
	   call sites use different angles — 170deg and 168deg — which looks
	   like drift but is not: each is a faithful, unmodified port of its own
	   source mockup (homepage-mockup.html:98 .spec .art is 170deg;
	   page-layouts.html:38 .sp-art is 168deg). Only the colour pair is
	   promoted here; each call site keeps its own angle literal. */
	--art-fallback-1: #1A211A;
	--art-fallback-2: #090C09;

	--mono:  var(--wp--preset--font-family--mono, ui-monospace, monospace);
	--serif: var(--wp--preset--font-family--serif, ui-serif, Georgia, serif);
}

* { box-sizing: border-box }

body {
	margin: 0;
	background: var(--ground);
	color: var(--bone);
	font-family: var(--serif);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 200;
	opacity: .04;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.u { max-width: 1200px; margin: 0 auto; padding: 0 26px }
.lbl { font-family: var(--mono); font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--fog) }

/* Skip link and focus states — required by the brief, not present in the
   mockups. */
.sf-skip {
	position: absolute;
	left: -9999px;
}
.sf-skip:focus {
	left: 26px;
	top: 10px;
	z-index: 300;
	background: var(--amber);
	color: var(--ground);
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: .2em;
	text-transform: uppercase;
	padding: 10px 16px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--amber);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; }
}

/* Mobile nav toggle (Task 11). Unstyled since Task 2 — rendered as a bare
   browser <button>, visible at every width including desktop, where the
   approved mockup has no toggle at all. site.js (this task) wires the
   click/Escape behaviour and flips aria-expanded; this is the CSS half:
   hidden at desktop widths, shown and styled to the mono/uppercase button
   language already used by .sf-cart and .sf-filter (woocommerce.css) at
   mobile widths. Only .screen-reader-text from the brief's Step 4 block is
   not repeated here — components.css already defines it (Task 5, for the
   registry form's email label), and a second definition would just be dead
   CSS the later-loaded file overrides; keyboard focus visibility and the
   skip link above are already covered by .sf-skip and the :focus-visible
   rule, also pre-existing. */
.sf-nav__toggle {
	display: none;
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: .19em;
	text-transform: uppercase;
	color: var(--fog);
	background: transparent;
	border: 1px solid var(--rule-hi);
	padding: 8px 14px;
	margin-left: auto;
	cursor: pointer;
	transition: color .15s, border-color .15s;
}
.sf-nav__toggle:hover,
.sf-nav__toggle[aria-expanded="true"] {
	color: var(--bone);
	border-color: var(--amber-dim);
}
@media (max-width: 860px) {
	.sf-nav__toggle { display: inline-block; }
	.sf-nav .u { flex-wrap: wrap; }
	.sf-nav__links { display: none; width: 100%; }
	.sf-nav__links.is-open { display: block; }
	.sf-nav__list { flex-direction: column; gap: 2px; padding: 20px 0 6px; }
	.sf-nav__list a { display: block; padding: 12px 2px; }
}
