/* ==========================================================================
   Automora - base styles
   Tokens (--am-*) are printed inline from inc/tokens.php.
   ========================================================================== */

/* 1. Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
	margin: 0;
	background: var(--am-bg);
	color: var(--am-text);
	font-family: var(--am-font-heading);
	font-size: var(--am-fs-body);
	line-height: var(--am-lh-body);
	font-weight: 500;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .3s var(--am-ease); }
a:hover { color: var(--am-primary); }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--am-primary); color: #fff; }
:focus-visible { outline: 2px solid var(--am-primary); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: 110px; }

/* 2. Typography (Figma scale) -------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .5em;
	font-family: var(--am-font-heading);
	font-weight: 500;
	color: var(--am-heading);
	font-variation-settings: "wdth" 100;
	text-wrap: balance;
}
h1 { font-size: var(--am-fs-h1); line-height: var(--am-lh-h1); letter-spacing: var(--am-ls-h1); }
h2 { font-size: var(--am-fs-h2); line-height: var(--am-lh-h2); letter-spacing: var(--am-ls-h2); }
h3 { font-size: var(--am-fs-h3); line-height: var(--am-lh-h3); letter-spacing: var(--am-ls-h3); }
h4 { font-size: var(--am-fs-h4); line-height: var(--am-lh-h4); letter-spacing: var(--am-ls-h4); }
h5 { font-size: var(--am-fs-h5); line-height: var(--am-lh-h5); letter-spacing: var(--am-ls-h5); }
h6 { font-size: var(--am-fs-h6); line-height: var(--am-lh-h6); font-weight: 600; text-transform: uppercase; }
p { margin: 0 0 1em; }
.am-eyebrow {
	display: inline-flex; align-items: center; gap: .5rem;
	font-size: var(--am-fs-eyebrow); font-weight: 600; letter-spacing: var(--am-ls-eyebrow);
	text-transform: uppercase;
}
.am-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--am-primary); }
.am-page-title { font-size: var(--am-fs-h2); line-height: var(--am-lh-h2); letter-spacing: var(--am-ls-h2); }
.am-meta { color: var(--am-muted); font-size: var(--am-fs-small); margin: 0 0 .5rem; }

/* 3. Layout --------------------------------------------------------------- */
.am-container { width: 100%; max-width: calc(var(--am-container) + 2 * var(--am-gutter)); margin-inline: auto; padding-inline: var(--am-gutter); }
.am-section { padding-block: var(--am-section); }
.am-main { position: relative; }
.am-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; }
@media (min-width: 1025px) {
	body:not(.no-sidebar) .am-layout { grid-template-columns: minmax(0, 1fr) 20rem; }
}
.am-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: var(--am-gap); margin-bottom: 3rem; }

/* 4. Buttons (base - the Automora Button widget extends these) ----------- */
.am-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .625rem;
	min-height: 3.75rem; padding: 0 2.1875rem;
	border: 0; border-radius: var(--am-radius-pill);
	background: var(--am-text); color: var(--am-ink);
	font-family: var(--am-font-heading); font-size: 1rem; font-weight: 600; line-height: 1.4;
	cursor: pointer; transition: background .35s var(--am-ease), color .35s var(--am-ease), box-shadow .35s var(--am-ease);
}
.am-btn:hover { background: var(--am-primary); color: #fff; box-shadow: 0 0 2rem var(--am-glow); }
.am-btn--primary { background: var(--am-primary); color: #fff; }
.am-btn--primary:hover { background: var(--am-text); color: var(--am-ink); }
.am-btn--ghost { background: var(--am-glass); color: var(--am-text); backdrop-filter: blur(22px); }

/* 5. Fallback header (Figma glass bar) ------------------------------------ */
.am-header { position: fixed; inset: 1.25rem 1.25rem auto; z-index: 100; transition: transform .45s var(--am-ease); }
.admin-bar .am-header { top: calc(1.25rem + 32px); }
.am-header.is-hidden { transform: translateY(calc(-100% - 2rem)); }
.am-header__bar {
	position: relative; display: flex; align-items: center; justify-content: space-between;
	height: 4.375rem; padding: 0 2.125rem;
	background: var(--am-glass); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
	border-radius: var(--am-radius-sm);
}
.am-menu, .am-header__nav > div > ul { display: flex; gap: 2.25rem; margin: 0; padding: 0; list-style: none; }
.am-header__nav { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.am-header__nav a { font-size: 1rem; line-height: 1.26; text-transform: capitalize; }
.am-header__nav .current-menu-item > a { color: var(--am-primary); }
.am-header__nav .sub-menu { display: none; }
.am-header__toggle,
.am-header button.am-header__toggle:is(:hover, :focus) { display: none; padding: .5rem; margin-right: -.5rem; background: none; border: 0; border-radius: 8px; box-shadow: none; cursor: pointer; }
@media (max-width: 1024px) {
	.am-header__toggle { display: inline-flex; }
	.am-header__nav {
		position: absolute; left: 0; right: 0; top: calc(100% + .5rem); transform: none;
		padding: 1.5rem 2rem; border-radius: var(--am-radius-sm);
		background: var(--am-surface); border: 1px solid var(--am-line);
		opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
	}
	.am-header.is-open .am-header__nav { opacity: 1; visibility: visible; }
	.am-menu, .am-header__nav > div > ul { flex-direction: column; gap: 1rem; }
	.am-header__nav a { font-size: 1.25rem; }
}
@media (max-width: 782px) { .admin-bar .am-header { top: calc(1.25rem + 46px); } }

/* 6. Fallback footer ------------------------------------------------------ */
.am-footer { border-top: 1px solid var(--am-line); padding-block: 3rem; }
.am-footer__inner { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.am-footer__menu { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.am-footer__copy { margin: 0; color: var(--am-dim); }

/* 7. Blog ------------------------------------------------------------------ */
body:not(.elementor-page) .am-main { padding-top: 7rem; }
.am-card { display: flex; flex-direction: column; background: var(--am-surface); border: 1px solid var(--am-line); border-radius: var(--am-radius-md); overflow: hidden; }
.am-card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s var(--am-ease); }
.am-card:hover .am-card__media img { transform: scale(1.04); }
.am-card__body { padding: 1.5rem; }
.am-card__title { font-size: var(--am-fs-h5); line-height: 1.25; letter-spacing: var(--am-ls-h5); }
.am-card__excerpt { color: var(--am-muted); }
.am-entry { max-width: 52rem; }
.am-entry__media img { width: 100%; border-radius: var(--am-radius-md); margin-bottom: 2.5rem; }
.am-entry__content { font-family: var(--am-font-body); font-weight: 400; color: var(--am-muted); line-height: 1.7; }
.am-entry__content h2, .am-entry__content h3 { color: var(--am-heading); margin-top: 1.5em; }
.am-entry__content a { color: var(--am-primary); text-decoration: underline; text-underline-offset: 3px; }
.am-tags a { display: inline-block; padding: .25rem .75rem; margin: 0 .25rem .5rem 0; border-radius: var(--am-radius-pill); background: var(--am-glass); }
.nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; }
.page-numbers { display: inline-flex; min-width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; padding: 0 .75rem; border-radius: var(--am-radius-pill); background: var(--am-glass); }
.page-numbers.current { background: var(--am-primary); color: #fff; }
.widget { margin-bottom: 2rem; padding: 1.5rem; background: var(--am-surface); border-radius: var(--am-radius-md); }
.widget ul { margin: 0; padding-left: 1rem; }
.widget-title { font-size: var(--am-fs-h6); }

/* 7b. Single post (Figma Blog Details 152:634) --------------------------- */
.am-crumb {
	display: inline-flex; align-items: center; gap: .5rem; margin: 0; padding: 12px 20px; border-radius: 60px;
	background: var(--am-glass); font-size: 1rem; font-weight: 600; line-height: 1; letter-spacing: -0.04em; text-transform: uppercase;
}
.am-crumb::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--am-primary); }
.am-crumb span { color: #584A4A; }
.am-single__head { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-top: 190px; padding-bottom: 56px; text-align: center; }
.am-single__title { max-width: 56rem; margin: 0; font-size: var(--am-fs-h1); line-height: var(--am-lh-h1); letter-spacing: var(--am-ls-h1); text-transform: capitalize; }
.am-single__lede { max-width: 41rem; margin: 0; color: rgba(249, 249, 249, .78); }
.am-single__hero { margin: 0 0 32px; overflow: hidden; border-radius: 30px; background: var(--am-surface); }
.am-single__hero img { width: 100%; height: clamp(260px, 45vw, 652px); object-fit: cover; }
.am-single__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; padding-bottom: 32px; margin-bottom: 72px; border-bottom: 1px solid var(--am-line); }
.am-single__meta-item { display: flex; align-items: center; gap: clamp(24px, 10vw, 140px); }
.am-single__meta-label { color: rgba(255, 255, 255, .6); text-transform: capitalize; }
.am-single__author { display: inline-flex; align-items: center; gap: 16px; color: #fff; }
.am-single__author img { width: 50px; height: 50px; border-radius: 50%; }
.am-single__date { font-weight: 700; letter-spacing: -0.02em; text-transform: uppercase; color: #fff; }
.am-single__row { display: grid; grid-template-columns: 157px minmax(0, 882px); justify-content: space-between; gap: 40px; padding-bottom: var(--am-section); }
.am-share { position: sticky; top: 120px; align-self: start; }
.am-share__label { margin: 0 0 23px; color: rgba(255, 255, 255, .6); }
.am-share__list { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; }
.am-share__list a, .am-share__list button { display: inline-flex; width: 29px; height: 29px; align-items: center; justify-content: center; border-radius: 50%; transition: transform .3s var(--am-ease); }
.am-share__list a:hover, .am-share__list button:hover { transform: translateY(-3px); }
.am-share button.am-share__copy, .am-share button.am-share__copy:hover, .am-share button.am-share__copy:focus { padding: 0; border: 1px solid rgba(255, 255, 255, .6); background: transparent; color: #fff; box-shadow: none; }
.am-share__copy.is-copied { border-color: var(--am-primary) !important; color: var(--am-primary) !important; }

.am-article { display: flex; flex-direction: column; gap: 28px; font-family: var(--am-font-heading); font-size: 18px; font-weight: 400; line-height: 28px; color: rgba(255, 255, 255, .6); }
.am-article--center { max-width: 882px; margin: 0 auto var(--am-section); }
/* Same article styles on an Elementor Text Editor widget (class "am-article"). */
.elementor-widget.am-article { display: block !important; }
.elementor-widget.am-article > * + * { margin-top: 28px; }
.am-article > * { margin: 0; }
.am-article > p:first-child { font-size: 24px; font-weight: 500; line-height: 1.3; letter-spacing: -0.02em; color: #FFFDFD; }
.am-article h2, .am-article h3 { margin-top: 32px; font-size: 30px; font-weight: 400; line-height: 1.3; letter-spacing: 0; color: #FFFDFD; }
.am-article h4 { margin-top: 16px; font-size: 24px; font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; color: #FFFDFD; }
.am-article a { color: var(--am-primary); text-decoration: underline; text-underline-offset: 3px; }
.am-article img { border-radius: 15px; }
.am-article figure { margin: 0; }
.am-article ul { display: flex; flex-direction: column; gap: 12px; padding: 0; list-style: none; font-size: 16px; font-weight: 500; line-height: 1.55; color: rgba(255, 255, 255, .64); }
.am-article ul li { position: relative; padding-left: 26px; }
.am-article ul li::before { content: ""; position: absolute; left: 1px; top: 8px; width: 8px; height: 8px; border-radius: 1px; background: var(--am-primary); transform: rotate(45deg); }
.am-article ol { padding-left: 1.2em; }
.am-article blockquote {
	margin: 12px 0; padding: 28px 36px; border: 0; border-radius: 20px;
	background: var(--am-primary); box-shadow: inset 0 14px 34px 0 #FF774E; color: #fff;
}
.am-article blockquote p { margin: 0; font-size: 24px; font-weight: 600; line-height: 32px; letter-spacing: -0.02em; }
.am-article blockquote cite { display: block; margin-top: 16px; font-family: var(--am-font-accent); font-size: 16px; font-style: normal; text-transform: uppercase; }
.am-related { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-bottom: var(--am-section); text-align: center; }
.am-crumb--plain::before { display: inline-block; }
.am-related__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; width: 100%; margin-top: 36px; text-align: left; }
@media (max-width: 1024px) {
	.am-single__row { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.am-share { position: static; display: flex; align-items: center; gap: 16px; }
	.am-share__label { margin: 0; }
}
@media (max-width: 767px) {
	.am-single__head { padding-top: 140px; }
	.am-single__meta { margin-bottom: 40px; }
	.am-single__meta-item { gap: 16px; }
	.am-article > p:first-child { font-size: 20px; }
	.am-article h2, .am-article h3 { font-size: 24px; }
	.am-article blockquote { padding: 24px; }
	.am-related__grid { grid-template-columns: minmax(0, 1fr); }
}

/* 8. Forms ---------------------------------------------------------------- */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="password"], textarea, select {
	width: 100%; padding: .875rem 1.125rem; font-size: 1rem;
	background: var(--am-surface); border: 1px solid var(--am-line-2); border-radius: var(--am-radius-sm);
}
input:focus, textarea:focus, select:focus { border-color: var(--am-primary); outline: none; }
.search-form { display: flex; gap: .5rem; margin-block: 1.5rem; }
input[type="submit"], button[type="submit"] { padding: .875rem 1.5rem; border: 0; border-radius: var(--am-radius-pill); background: var(--am-primary); color: #fff; font-weight: 600; cursor: pointer; }

/* 9. WordPress core classes ---------------------------------------------- */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; top: 1rem; left: 1rem; z-index: 1000; width: auto; height: auto; padding: .75rem 1rem; clip: auto; background: var(--am-text); color: var(--am-ink); border-radius: var(--am-radius-sm); }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption, .gallery-caption { max-width: 100%; color: var(--am-muted); font-size: var(--am-fs-small); }
.wp-caption-text { margin-top: .5rem; }
.sticky .am-card__title::after { content: " \2605"; color: var(--am-primary); }
.bypostauthor > .comment-body .fn::after { content: " \00b7 author"; color: var(--am-primary); font-size: .8em; }
.am-comments { max-width: 52rem; padding-bottom: var(--am-section); }
.am-comments__list { list-style: none; padding: 0; }

/* 10. Elementor ----------------------------------------------------------- */
.elementor-page .am-main { padding-top: 0; }
.elementor-widget-heading .elementor-heading-title { font-variation-settings: "wdth" 100; }
/* Editor preview: never leave animated elements hidden. */
.elementor-editor-active [data-am-anim] { opacity: 1 !important; transform: none !important; visibility: visible !important; }

/* 11. Block styles ---------------------------------------------------------- */
.wp-block-button.is-style-automora-pill .wp-block-button__link {
	display: inline-flex; align-items: center; min-height: 60px; padding: 0 35px; border-radius: 90px;
	background: var(--am-text); color: var(--am-ink); font-weight: 600; text-decoration: none;
	transition: background .35s var(--am-ease), color .35s var(--am-ease);
}
.wp-block-button.is-style-automora-pill .wp-block-button__link:hover { background: var(--am-primary); color: #fff; }
