/* Rabin-Interiors & Woods: shared tokens, resets, kicker and buttons.
   Theme the elements by setting these variables on .riw (or any ancestor, with a higher specificity than .riw).
   Everything inherits the site's own fonts unless --riw-font / --riw-font-display are set. */

.riw {
	--riw-bg: #f6f1e9;
	--riw-bg-2: #eee5d7;
	--riw-card: #fffaf3;
	--riw-text: #1c1712;
	--riw-muted: #6f6458;
	--riw-dim: #9a8e80;
	--riw-line: rgba(28,23,18,.1);
	--riw-line-strong: rgba(28,23,18,.18);
	--riw-tint: rgba(28,23,18,.04);
	--riw-accent: #b8883e;
	--riw-accent-soft: #d9b16a;
	--riw-accent-2: #c27050;
	--riw-ink: #1c1712;
	--riw-font: inherit;
	--riw-font-display: inherit;
	--riw-radius: 28px;
	--riw-ease: cubic-bezier(.2,.8,.2,1);
	--riw-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.11' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.7 0 0 0 -0.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
	--riw-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
	font-family: var(--riw-font);
	color: var(--riw-text);
	line-height: 1.6;
}

/* Dark theme, for elements placed on dark sections */
.riw--dark {
	--riw-bg: #14110e;
	--riw-bg-2: #1c1814;
	--riw-card: #211c17;
	--riw-text: #f4efe6;
	--riw-muted: #a39a8c;
	--riw-dim: #6d655b;
	--riw-line: rgba(255,255,255,.08);
	--riw-line-strong: rgba(255,255,255,.15);
	--riw-tint: rgba(255,255,255,.04);
	--riw-accent: #d4a85a;
	--riw-accent-soft: #f3d79b;
}

/* Resets. Headings and text blocks get a class-level specificity, so a theme's h3 { color } or p { margin }
   can't reach inside an element; element rules load later and still win. Buttons stay at zero specificity,
   so each element's own button colours win. */
:where(.riw), :where(.riw) *, :where(.riw) *::before, :where(.riw) *::after { box-sizing: border-box; }
.riw :is(h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote) { margin: 0; }
.riw :is(h1, h2, h3, h4, h5, h6) { color: inherit; font-weight: 700; text-transform: none; }
.riw :is(h1, h2, h3) { font-family: var(--riw-font-display); letter-spacing: -.03em; line-height: .98; }
:where(.riw) :where(button) { font: inherit; color: inherit; }
:where(.riw) :where(img) { max-width: 100%; }

/* Kicker: a small uppercase label with a dot */
.riw-kicker { display: inline-flex; align-items: center; gap: .7rem; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--riw-accent); font-weight: 600; font-family: var(--riw-font); line-height: 1.4; }
.riw-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

/* Buttons */
.riw-btn { position: relative; display: inline-flex; align-items: center; gap: .75rem; padding: 1rem 1.5rem; border-radius: 999px; border: 0; font-family: var(--riw-font); font-weight: 500; font-size: .92rem; line-height: 1.2; letter-spacing: 0; white-space: nowrap; text-decoration: none; cursor: pointer; transition: transform .4s var(--riw-ease), translate .25s ease-out, background .3s, color .3s, box-shadow .4s, border-color .3s; }
.riw-btn--ink { background: var(--riw-ink); color: #f6f1e9; }
.riw-btn--ink:hover { background: #3a2f26; color: #f6f1e9; }
.riw-btn--accent { background: linear-gradient(135deg, #f3d79b, #d4a85a); color: var(--riw-ink); box-shadow: 0 10px 30px -12px rgba(184,136,62,.7); }
.riw-btn--accent:hover { color: var(--riw-ink); }
.riw-btn--block { width: 100%; justify-content: center; }
.riw-btn .riw-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: .8rem; background: rgba(255,255,255,.14); transition: transform .4s var(--riw-ease); }
.riw-btn--accent .riw-ic { background: rgba(0,0,0,.07); }
.riw-btn:hover .riw-ic { transform: rotate(-45deg); }
.riw-btn:focus-visible, .riw button:focus-visible { outline: 2px solid var(--riw-accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
	.riw-btn, .riw-btn .riw-ic { transition: none; }
}
