/*
Theme Name: Margin Studio
Author: Ben
Description: Margin Studio is a calm, editorial block theme for studios, portfolios, small businesses, and blogs. It comes with colorful and minimal starter pages, four header and two footer layouts, sidebar and full-width templates, a numbered services index, pricing, FAQ, and testimonial sections, six color schemes, and bundled Inter and Lora fonts. Everything can be changed in the Site Editor.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: margin-studio
Tags: blog, portfolio, one-column, two-columns, left-sidebar, right-sidebar, grid-layout, custom-logo, editor-style, featured-images, full-site-editing, full-width-template, block-patterns, block-styles, rtl-language-support, style-variations, threaded-comments, translation-ready, wide-blocks

Margin Studio WordPress Theme, (C) 2026 Ben.
Margin Studio is distributed under the terms of the GNU GPL v2 or later.
*/

/*
 * Most styling lives in theme.json. This file holds only the few rules
 * that theme.json cannot express yet.
 */

/* Keep long words and URLs from breaking the layout. */
.wp-block-post-content,
.wp-block-comment-content {
	overflow-wrap: break-word;
}

/* Visible keyboard focus for links and buttons. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.wp-element-button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Keep the underline offset consistent across link styles. */
a {
	text-underline-offset: 0.2em;
}

/* Thin, quiet table borders that match the palette. */
.wp-block-table td,
.wp-block-table th {
	border-color: var(--wp--preset--color--line);
}

/* Avoid a gap under images inside figures. */
.wp-block-image img {
	vertical-align: bottom;
}

/* ------------------------------------------------------------------
 * Block styles
 * ------------------------------------------------------------------ */

/* Card: groups and columns. */
.is-style-margin-studio-card {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	box-shadow: var(--wp--preset--shadow--soft);
	padding: var(--wp--preset--spacing--40);
}

/* Highlighted pricing plan. */
.margin-studio-featured-plan {
	border-color: var(--wp--preset--color--contrast);
	box-shadow: var(--wp--preset--shadow--lifted);
}

/* Checklist. */
.is-style-margin-studio-checklist {
	list-style: none;
	padding-left: 0;
}

.is-style-margin-studio-checklist li {
	position: relative;
	padding-left: 1.75em;
	margin-bottom: 0.4em;
}

.is-style-margin-studio-checklist li::before {
	content: "";
	position: absolute;
	left: 0.2em;
	top: 0.45em;
	width: 0.45em;
	height: 0.8em;
	border: solid var(--wp--preset--color--accent);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

[dir="rtl"] .is-style-margin-studio-checklist li {
	padding-left: 0;
	padding-right: 1.75em;
}

[dir="rtl"] .is-style-margin-studio-checklist li::before {
	left: auto;
	right: 0.2em;
}

/* Soft corners on images. */
.is-style-margin-studio-rounded img {
	border-radius: 10px;
}

/* Eyebrow: small label above a heading. */
.is-style-margin-studio-eyebrow {
	color: var(--wp--preset--color--accent);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* FAQ rows. */
.margin-studio-faq {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 1rem 0;
}

.margin-studio-faq summary {
	cursor: pointer;
	font-weight: 600;
}

.margin-studio-faq > :not(summary) {
	margin-top: 0.75rem;
}

/* ------------------------------------------------------------------
 * Sticky header part
 * ------------------------------------------------------------------ */

.wp-site-blocks > header:has(> .margin-studio-sticky-header) {
	position: sticky;
	top: 0;
	z-index: 100;
}

/* Keep the sticky header below the admin toolbar for logged-in users. */
.admin-bar .wp-site-blocks > header:has(> .margin-studio-sticky-header) {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .wp-site-blocks > header:has(> .margin-studio-sticky-header) {
		top: 46px;
	}
}

/* Below 600px the toolbar scrolls away with the page. */
@media (max-width: 600px) {
	.admin-bar .wp-site-blocks > header:has(> .margin-studio-sticky-header) {
		top: 0;
	}
}

/* ------------------------------------------------------------------
 * Scroll to top button
 * ------------------------------------------------------------------ */

.margin-studio-to-top {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 99;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 50%;
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	box-shadow: var(--wp--preset--shadow--soft);
	font-size: 1.125rem;
	line-height: 1;
	cursor: pointer;
}

.margin-studio-to-top:hover {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.margin-studio-to-top[hidden] {
	display: none;
}

[dir="rtl"] .margin-studio-to-top {
	right: auto;
	left: 1.25rem;
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* ------------------------------------------------------------------
 * Pill buttons and landing hero
 * ------------------------------------------------------------------ */

.wp-block-button.is-style-margin-studio-pill .wp-block-button__link {
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wp-block-button.is-style-margin-studio-pill .wp-block-button__link:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button.is-style-margin-studio-pill .wp-block-button__link {
		transition: none;
	}
}

/* Keep the hero flush with the top of the page on the landing template. */
.wp-site-blocks > main > .wp-block-post-content > .margin-studio-hero-editorial:first-child,
.wp-site-blocks > .margin-studio-home > .margin-studio-hero-editorial:first-child {
	margin-top: 0;
}

/* "Staggered" columns style: every other column sits lower on wide screens. */
@media (min-width: 782px) {
	.wp-block-columns.is-style-margin-studio-stagger > .wp-block-column:nth-child(even) {
		margin-top: var(--wp--preset--spacing--50);
	}
}

/* Numbered index: close the list with a final line. */
.margin-studio-index-row:last-child {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.margin-studio-index-row .has-small-font-size {
	font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------
 * Colorful home page
 * ------------------------------------------------------------------ */

/* Highlighted word in the hero headline. */
.margin-studio-hero-colorful mark {
	color: #1a1a1a;
	padding: 0 0.12em;
	border-radius: 0.12em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* Small green dot in the "now booking" badge. */
.margin-studio-dot::before {
	content: "";
	display: inline-block;
	width: 0.5em;
	height: 0.5em;
	margin-right: 0.5em;
	border-radius: 50%;
	background-color: #2f9e5b;
	vertical-align: 0.08em;
}

[dir="rtl"] .margin-studio-dot::before {
	margin-right: 0;
	margin-left: 0.5em;
}

/* Star separators between the words in the services band. */
.margin-studio-band .wp-block-group > p:not(:last-child)::after {
	content: "✦" / "";
	margin-left: var(--wp--preset--spacing--30);
	font-size: 0.6em;
	vertical-align: 0.25em;
}

[dir="rtl"] .margin-studio-band .wp-block-group > p:not(:last-child)::after {
	margin-left: 0;
	margin-right: var(--wp--preset--spacing--30);
}

/* Badge hugs its text. */
.margin-studio-badge {
	width: fit-content;
}

/* The page wrapper only receives focus briefly from the scroll to top button. */
.wp-site-blocks:focus {
	outline: none;
}
