/*
Theme Name: Twentig One
Theme URI: https://twentig.com/twentig-one/
Update URI: https://github.com/twentig/twentig-one
Author: Twentig
Author URI: https://twentig.com
Description: Twentig One is a modern and powerful WordPress block theme designed for Full Site Editing. Featuring flexible templates, post formats, color presets, font pairings, and fluid typography & spacing, it’s the ideal foundation for any project. Pair it with the Twentig plugin for starter sites, patterns, and enhanced blocks to create a stunning website — no code needed.
Requires at least: 6.9
Tested up to: 7.0
Requires PHP: 8.0
Version: 1.0.0
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Domain Path: /languages
Text Domain: twentig-one

Twentig One, (C) 2026 Twentig
Twentig One is distributed under the terms of the GNU GPL.
*/

/*
 * IMPORTANT: This file is only served on the frontend when `SCRIPT_DEBUG` is enabled;
 * in most instances, the `style.min.css` file will be served. It is not recommended that you
 * modify this stylesheet. Instead, add the necessary style overrides via "Additional CSS" in the Site Editor.
 */

/* Base */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

html:has(.wp-block-navigation.scroll-smooth) {
	scroll-behavior: smooth;
	scroll-padding-top: var(--tw-header-height, 0px);
}

@media (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto;
	}
}

:root {
	--wp--style--columns-gap-default: var(--wp--preset--spacing--30);
	--tw-block-border-color: var(--wp--preset--color--tertiary);
}

@supports not (color: oklch(from red l c h)) {

	:root {
		--wp--preset--gradient--accent: var(--wp--preset--color--accent);
		--wp--preset--gradient--accent-diagonal: var(--wp--preset--color--accent);
		--wp--preset--gradient--accent-analogous: var(--wp--preset--color--accent);
	}
}

@supports (color: oklch(from red l c calc(h + 45deg))) {

	:root {
		--wp--custom--gradient-hue: 45deg;
	}
}

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

body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "liga", "lnum";
	--wp--preset--spacing--site-padding: var(--wp--style--root--padding-left);
}

/* Typography & content */
.wp-site-blocks a {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

ul,
ol {
	padding-inline-start: 1.175em;
}

sub,
sup {
	position: relative;
	font-size: 0.75em;
	line-height: 0;
	vertical-align: baseline;
}

sub {
	bottom: -0.25em;
}

sup {
	top: -0.5em;
}

b, strong {
	font-weight: 600;
}

*:not(.wp-block-code) > :where(code,kbd) {
	background-color: color-mix(in srgb, currentColor 7%, transparent);
	font-family: var(--wp--custom--font-mono);
	padding: 2px 4px;
	font-size: var(--wp--preset--font-size--small);
	border-radius: 6px;
}

/* Forms & buttons */
input,
textarea {
	font: inherit;
}

input[type="button"],
input[type="submit"],
input[type="reset"] {
	-webkit-appearance: none;
	appearance: none;
}

::placeholder {
	color: currentcolor;
}

:placeholder-shown {
	opacity: 0.65;
}

.post-password-form input[type="password"] {
	margin-block: 6px 12px;
	margin-inline-end: 8px;
}

.wp-element-button {
	transition: opacity 0.1s;
}

.wp-element-button:hover {
	opacity: 0.85;
}

/* Color & background helpers */
.has-secondary-color a:where(:not(.wp-element-button)) {
	--wp--preset--color--secondary: currentColor;
}

.has-background:is(p,.wp-block-heading) {
	padding: var(--wp--preset--spacing--20);
}

/* Media & embeds */
figcaption.wp-element-caption {
	max-width: var(--wp--style--global--content-size);
	margin-inline: auto;
}

.is-content-justification-left .wp-element-caption {
	margin-inline-start: 0;
}

.wp-block-gallery .wp-block-image .wp-element-caption {
	max-width: none;
}

.alignfull > .wp-element-caption {
	width: calc(100% - 2 * var(--wp--style--root--padding-left));
}

.wp-block-group.is-layout-flex .wp-block-image img {
	display: block;
}

.wp-block-embed iframe {
	width: 100%;
	vertical-align: bottom;
}

/* Site layout & spacing */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
	overflow-wrap: break-word;
}

.wp-site-blocks > .wp-block-template-part > .wp-block-group,
.wp-block-group.alignfull.is-layout-flow {
	padding-left: var(--wp--style--root--padding-left);
	padding-right: var(--wp--style--root--padding-right);
}

.wp-site-blocks > * {
	margin-top: 0;
}

header.wp-block-template-part {
	position: relative;
	z-index: 10;
}

header.wp-block-template-part:has(>.is-position-sticky) {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 10;
}

@media (min-width: 768px) {

	header.wp-block-template-part .wp-block-group-is-layout-flex:has(>.wp-block-site-title):has(.wp-block-navigation__responsive-container-open:not(.always-shown)) {
		align-items: baseline;
	}
}

.wp-site-blocks > footer {
	margin-top: auto;
}

footer.wp-block-template-part a[href="https://twentig.com"]:not(:hover,:focus) {
	text-decoration: none;
	color: inherit;
}

.wp-block-post-content > figure {
	margin-block: var(--wp--custom--spacing--media);
}

.alignfull + .alignfull {
	margin-top: 0;
}

.wp-block-post-content > :where(h1,h2,h3) {
	margin-top: var(--wp--custom--spacing--heading-margin);
}

.wp-block-media-text__content :where(h3,h4,h5,h6,p,.wp-block-list) + :where(p,.wp-block-list),
.wp-block-column :where(h3,h4,h5,h6,p,.wp-block-list) + :where(p,.wp-block-list) {
	margin-top: calc(0.6666667 * var(--wp--style--block-gap));
}

/* Left & right align */
.is-layout-constrained > :is(.alignright,.alignleft) {
	margin-bottom: var(--wp--style--block-gap);
	margin-inline-end: var(--wp--preset--spacing--30);
	max-width: min(calc(0.5 * var(--wp--style--global--content-size)), 340px);
}

.is-layout-constrained > * + :is(.alignright,.alignleft) {
	margin-top: var(--wp--preset--spacing--40);
}

.is-layout-constrained > .alignright {
	margin-inline: var(--wp--preset--spacing--30) 0;
}

.is-layout-constrained:where(.wp-block-post-content,.wp-block-group.alignfull) > .alignleft {
	margin-inline-start: max(0px, calc(0.5 * (var(--wp--custom--main-width) - var(--wp--style--global--content-size)) - var(--wp--style--root--padding-left)));
}

.is-layout-constrained:where(.wp-block-post-content,.wp-block-group.alignfull) > .alignright {
	margin-inline-end: max(0px, calc(0.5 * (var(--wp--custom--main-width) - var(--wp--style--global--content-size)) - var(--wp--style--root--padding-left)));
}

@media (max-width: 767px) {

	.is-layout-constrained > :is(.alignright,.alignleft) {
		float: none;
		max-width: 100%;
		display: block;
		margin-inline: auto;
		margin-bottom: var(--wp--preset--spacing--40);
	}
}

.related-section:not(:has(.wp-block-post-template)) {
	display: none;
}

/* Reset */
.wp-block-spacer,
.wp-block-spacer.wp-block-spacer + *,
.wp-block-post-content > *:first-child {
	margin-top: 0;
}

.wp-block-post-content > *:last-child {
	margin-bottom: 0;
}
