/*
Theme Name: Magical Mishap
Theme URI: https://magicalmishap.com/
Author: Magical Mishap LLC
Author URI: https://magicalmishap.com/
Description: A single-page business site for Magical Mishap LLC. Presents the legal entity, what it publishes, how to reach it, and a full privacy policy and terms of service - everything Apple looks for when verifying a developer account and approving Sign in with Apple. Includes a built-in handler for serving Apple domain-association files.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: magical-mishap
Tags: one-column, custom-logo, custom-colors, accessibility-ready
*/

/* ---------------------------------------------------------------- tokens */
:root {
	--purple:      #8B3FBF;
	--purple-deep: #4A1B6B;
	--purple-ink:  #2A0E3D;
	--gold:        #F2C94C;
	--gold-deep:   #C79A1E;
	--sky:         #8FC4EE;
	--ink:         #1A1420;
	--body:        #3D3547;
	--muted:       #6B6377;
	--line:        #E6E1EC;
	--surface:     #FFFFFF;
	--surface-alt: #F7F4FB;
	--radius:      14px;
	--wrap:        1080px;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--surface);
	color: var(--body);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--purple); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--purple-deep); }

h1, h2, h3 {
	font-family: var(--serif);
	color: var(--ink);
	line-height: 1.2;
	margin: 0 0 .5em;
	font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.15rem); }
h3 { font-size: 1.18rem; font-family: var(--sans); font-weight: 700; letter-spacing: -.005em; }
p  { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 999;
	background: var(--purple); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 4px; }

/* ---------------------------------------------------------------- header */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255,255,255,.92);
	backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid var(--line);
}
.site-header .wrap {
	display: flex; align-items: center; justify-content: space-between;
	gap: 20px; min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 54px; width: auto; mix-blend-mode: multiply; }
.brand-name {
	font-family: var(--serif); font-weight: 700; font-size: 1.05rem;
	color: var(--ink); letter-spacing: -.01em; white-space: nowrap;
}
.site-nav { display: flex; gap: 26px; }
.site-nav a {
	color: var(--body); text-decoration: none; font-size: .93rem; font-weight: 600;
	padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--purple); border-bottom-color: var(--gold); }
@media (max-width: 720px) {
	.brand-name { display: none; }
	.site-nav { gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
	.site-nav a { font-size: .85rem; }
}

/* ------------------------------------------------------------------ hero */
.hero {
	position: relative; overflow: hidden;
	background:
		radial-gradient(900px 480px at 78% 12%, rgba(143,196,238,.35), transparent 62%),
		radial-gradient(760px 460px at 12% 78%, rgba(242,201,76,.30), transparent 60%),
		var(--surface-alt);
	border-bottom: 1px solid var(--line);
}
.hero .wrap {
	display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
	padding-top: 76px; padding-bottom: 76px;
}
.eyebrow {
	display: inline-block; margin-bottom: 18px;
	font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
	color: var(--purple-deep); background: rgba(139,63,191,.10);
	border: 1px solid rgba(139,63,191,.20);
	padding: 6px 12px; border-radius: 999px;
}
.hero p.lede { font-size: 1.18rem; color: var(--body); max-width: 46ch; }
.hero-art img {
	width: 100%; max-width: 420px; margin-inline: auto;
	/* The artwork ships on a white background; multiply drops it into the
	   tinted hero without a visible box around it. */
	mix-blend-mode: multiply;
}
@media (max-width: 860px) {
	.hero .wrap { grid-template-columns: 1fr; gap: 28px; padding-top: 52px; padding-bottom: 52px; }
	.hero-art { order: -1; }
	.hero-art img { max-width: 240px; }
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: .95rem;
	text-decoration: none; border: 2px solid transparent; transition: transform .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-deep); color: #fff; }
.btn-ghost { border-color: var(--purple); color: var(--purple); background: transparent; }
.btn-ghost:hover { background: rgba(139,63,191,.07); color: var(--purple-deep); }

/* -------------------------------------------------------------- sections */
.section { padding: 76px 0; border-bottom: 1px solid var(--line); }
.section-alt { background: var(--surface-alt); }
.section > .wrap > h2 { margin-bottom: .35em; }
.section-intro { max-width: 62ch; color: var(--muted); font-size: 1.05rem; margin-bottom: 40px; }
@media (max-width: 720px) { .section { padding: 52px 0; } }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
	background: var(--surface); border: 1px solid var(--line);
	border-radius: var(--radius); padding: 26px 24px;
	box-shadow: 0 1px 2px rgba(42,14,61,.04);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card .icon {
	width: 40px; height: 40px; border-radius: 10px; margin-bottom: 16px;
	display: grid; place-items: center; font-size: 20px;
	background: rgba(242,201,76,.28); border: 1px solid rgba(199,154,30,.35);
}
.card-meta {
	display: inline-block; margin-bottom: 12px;
	font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
	color: var(--purple-deep);
}
.card-link { font-weight: 700; text-decoration: none; font-size: .95rem; }
.card-link::after { content: " \2192"; }
.card-link:hover { text-decoration: underline; }

/* --------------------------------------------------------------- details */
.facts { list-style: none; margin: 0; padding: 0; }
.facts li {
	display: grid; grid-template-columns: 190px 1fr; gap: 16px;
	padding: 14px 0; border-bottom: 1px solid var(--line);
}
.facts li:last-child { border-bottom: 0; }
.facts .label {
	font-weight: 700; color: var(--ink); font-size: .9rem;
	letter-spacing: .02em; text-transform: uppercase;
}
@media (max-width: 620px) { .facts li { grid-template-columns: 1fr; gap: 2px; } }

/* ----------------------------------------------------------------- legal */
.legal { max-width: 74ch; }
.legal h3 { margin-top: 2em; font-size: 1.05rem; }
.legal h3:first-of-type { margin-top: 1em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .5em; }
.legal .updated {
	font-size: .85rem; color: var(--muted); text-transform: uppercase;
	letter-spacing: .08em; font-weight: 700;
}

/* ---------------------------------------------------------------- footer */
.site-footer {
	background: var(--purple-ink); color: #D9CFE6; padding: 52px 0 34px;
	font-size: .93rem;
}
.site-footer a { color: var(--gold); }
.site-footer a:hover { color: #fff; }
.footer-top {
	display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between;
	align-items: flex-start; padding-bottom: 28px;
	border-bottom: 1px solid rgba(255,255,255,.14);
}
.footer-mark { display: flex; flex-direction: column; gap: 6px; }
.footer-wordmark {
	font-family: var(--serif); font-size: 1.35rem; font-weight: 700;
	color: #FFFFFF; letter-spacing: -.01em;
}
.footer-tagline { color: #B7A9C7; font-size: .9rem; max-width: 34ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { text-decoration: none; font-weight: 600; }
.footer-links a:hover { text-decoration: underline; }
.legal-line { margin: 24px 0 0; color: #A99CBB; font-size: .85rem; }
.legal-line strong { color: #EDE6F4; }

/* -------------------------------------------------- interior WP pages */
.page-body { padding: 64px 0; }
.page-body .entry { max-width: 74ch; }
.page-body h1 { margin-bottom: .6em; }
.page-body img { border-radius: var(--radius); }

/* ------------------------------------------------------- print / a11y */
@media print {
	.site-header, .btn-row, .hero-art { display: none; }
	body { font-size: 12px; }
}
