/* Fara Armãneascã – theme styles (front end and editor). Colours and type come from theme.json. */

:root {
	--fara-focus: var(--wp--preset--color--wine, #5A1530);
	--fara-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='%23fff'%3E%3Cpath d='M32 4 60 32 32 60 4 32Z' fill='none' stroke='%23fff' stroke-width='2'/%3E%3Cpath d='M32 18 46 32 32 46 18 32Z'/%3E%3Cpath d='M0 0h8L0 8zM64 0h-8l8 8zM0 64h8l-8-8zM64 64h-8l8-8z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Accessibility basics ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--fara-focus);
	outline-offset: 2px;
	border-radius: 2px;
}
.is-style-fara-wine, .is-style-fara-crimson, .fara-utility, .fara-footer { --fara-focus: #FFFFFF; }
.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--wine);
	font-weight: 700;
	outline: 3px solid var(--wp--preset--color--wine);
	z-index: 100001;
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
:where(.wp-site-blocks) :where(p, li) a:not(.wp-element-button) { text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
h1, h2, h3, h4 { text-wrap: balance; }
.wp-block-post-content :where(p, li) { max-width: 72ch; }
img { height: auto; }

/* ---------- Header ---------- */
.fara-utility { font-size: 0.85rem; }
.fara-utility a { color: var(--wp--preset--color--gold-soft); }
.fara-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.fara-header .wp-block-site-logo img { max-width: 100%; }
.fara-header .wp-block-navigation .wp-block-navigation-item__content { padding: 0.55rem 0.7rem; border-radius: 8px; }
.fara-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.fara-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.fara-header .wp-block-navigation .current-menu-ancestor > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--crimson-ink);
}
.fara-header .wp-block-navigation .wp-block-navigation__submenu-container {
	min-width: 17rem;
	padding: 0.5rem;
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: 14px;
	box-shadow: 0 18px 40px rgba(40, 8, 20, 0.16);
	font-weight: 500;
}
.fara-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.5rem 0.75rem; }
.wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { padding: 0.5rem 0; font-size: 1.05rem; }
.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close {
	min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Bands (block style variations for Group) ---------- */
.is-style-fara-wine { background: var(--wp--preset--color--wine); color: var(--wp--preset--color--white); }
.is-style-fara-wine :where(h1, h2, h3, h4, .wp-block-post-title) { color: var(--wp--preset--color--white); }
.is-style-fara-wine a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--gold-soft); }
.is-style-fara-wine .is-style-fara-kicker { color: var(--wp--preset--color--gold-soft); }

.is-style-fara-crimson {
	position: relative;
	background-color: var(--wp--preset--color--crimson);
	color: var(--wp--preset--color--white);
	isolation: isolate;
}
.is-style-fara-crimson::before {
	content: "";
	position: absolute;
	inset: 0 0 0 55%;
	background-image: var(--fara-motif);
	opacity: 0.13;
	z-index: -1;
	pointer-events: none;
}
.is-style-fara-crimson::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 12px;
	background: linear-gradient(var(--wp--preset--color--wine) 0 5px, var(--wp--preset--color--gold) 5px);
}
.is-style-fara-crimson :where(h1, h2, h3, h4) { color: var(--wp--preset--color--white); }
.is-style-fara-crimson a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--white); }
.is-style-fara-crimson .is-style-fara-kicker { color: #F2D9A6; }
.is-style-fara-crimson .is-style-fara-card { color: var(--wp--preset--color--ink); --fara-focus: var(--wp--preset--color--wine); }
.is-style-fara-crimson .is-style-fara-card :where(h2, h3, h4) { color: var(--wp--preset--color--ink); }
.is-style-fara-crimson .is-style-fara-card a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--crimson-ink); }
.is-style-fara-crimson .is-style-fara-card .is-style-fara-kicker { color: var(--wp--preset--color--crimson-ink); }

.is-style-fara-sand { background: var(--wp--preset--color--sand); }
.is-style-fara-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 16px;
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
}
.is-style-fara-wine .is-style-fara-card { color: var(--wp--preset--color--ink); --fara-focus: var(--wp--preset--color--wine); }
.is-style-fara-wine .is-style-fara-card :where(h2, h3, h4) { color: var(--wp--preset--color--ink); }
.is-style-fara-wine .is-style-fara-card a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--crimson-ink); }
.is-style-fara-note {
	background: #FFF4E0;
	border: 1px solid var(--wp--preset--color--gold-soft);
	border-radius: 14px;
	padding: 1rem 1.25rem;
}

/* Cards whose heading link makes the whole card clickable */
.fara-linkcard { position: relative; transition: border-color 0.15s, transform 0.15s; }
.fara-linkcard:hover { border-color: var(--wp--preset--color--crimson); }
.fara-linkcard :where(h2, h3, h4) a { color: var(--wp--preset--color--ink); text-decoration: none; }
.fara-linkcard :where(h2, h3, h4) a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.fara-linkcard :where(h2, h3, h4) a:hover { text-decoration: underline; }
.fara-linkcard:focus-within { outline: 3px solid var(--fara-focus); outline-offset: 2px; }
.fara-linkcard :where(h2, h3, h4) a:focus-visible { outline: none; }
.fara-linkcard.is-style-fara-wine :where(h2, h3, h4) a, .is-style-fara-wine.fara-linkcard :where(h2, h3, h4) a { color: var(--wp--preset--color--white); }

/* ---------- Typography helpers ---------- */
.is-style-fara-kicker {
	font-size: 0.8rem !important;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--crimson-ink);
}
.is-style-fara-lead { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--ink-2); line-height: 1.55; }
.is-style-fara-facts .wp-block-column > p:first-child {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(2rem, 3.5vw, 2.6rem);
	font-weight: 700;
	line-height: 1.1;
	color: var(--wp--preset--color--crimson);
	margin-bottom: 0.3rem;
}
.is-style-fara-facts .wp-block-column > p:last-child { color: var(--wp--preset--color--ink-2); font-size: 0.95rem; margin-top: 0; }

/* ---------- Page layout ---------- */
.fara-page-hero .fara-breadcrumbs { color: #E9CBD3; }
.fara-page-hero .fara-breadcrumbs a { color: var(--wp--preset--color--gold-soft); }
.fara-page-columns { gap: clamp(2rem, 5vw, 3.5rem) !important; }
@media (min-width: 782px) {
	.fara-page-columns { flex-direction: row-reverse; }
	.fara-page-columns > .fara-sidebar { position: sticky; top: 1.5rem; align-self: flex-start; max-height: calc(100vh - 3rem); overflow: auto; }
}
.wp-block-post-content > :first-child { margin-top: 0; }
.wp-block-post-content h2 { font-size: var(--wp--preset--font-size--x-large); margin-top: 2.25rem; }
.wp-block-post-content h3 { font-size: var(--wp--preset--font-size--large); margin-top: 1.75rem; }

/* Tables: scroll inside their own box on small screens */
.wp-block-table { overflow-x: auto; }
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table.is-style-fara-table { background: var(--wp--preset--color--white); border: 1px solid var(--wp--preset--color--line); border-radius: 12px; }
.wp-block-table.is-style-fara-table :where(th, td) { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: 0.55rem 0.75rem; text-align: left; vertical-align: top; }
.wp-block-table.is-style-fara-table thead th { background: var(--wp--preset--color--sand); font-weight: 700; }
.wp-block-table.is-style-fara-table td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }

.is-style-fara-links { list-style: none; padding-left: 0; }
.is-style-fara-links li { padding: 0.45rem 0; border-bottom: 1px solid var(--wp--preset--color--line); }

/* Buttons: outline variation keeps a visible border and contrast */
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--wp--preset--color--crimson-ink); border-color: var(--wp--preset--color--crimson); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--crimson); color: var(--wp--preset--color--white); }
.is-style-fara-crimson .wp-block-button.is-style-outline > .wp-block-button__link,
.is-style-fara-wine .wp-block-button.is-style-outline > .wp-block-button__link { color: var(--wp--preset--color--white); border-color: var(--wp--preset--color--white); }
.is-style-fara-crimson .wp-block-button:not(.is-style-outline) > .wp-block-button__link { background: var(--wp--preset--color--white); color: var(--wp--preset--color--crimson-ink); border-color: var(--wp--preset--color--white); }
.is-style-fara-crimson .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover { background: var(--wp--preset--color--sand); }
.wp-element-button, .wp-block-button__link { min-height: 44px; }

/* Post meta on single posts */
.fara-post-cats a { color: var(--wp--preset--color--gold-soft); }

/* Query loop cards (archives, search) */
.fara-query .wp-block-post { background: var(--wp--preset--color--white); border: 1px solid var(--wp--preset--color--line); border-radius: 16px; padding: 1.4rem; position: relative; }
.fara-query .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.fara-query .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.fara-query .wp-block-post:focus-within { outline: 3px solid var(--fara-focus); outline-offset: 2px; }
.fara-query .wp-block-post-title a:focus-visible { outline: none; }

/* ---------- Footer ---------- */
.fara-footer a { color: #E9DCE0; text-decoration: none; }
.fara-footer a:hover { color: var(--wp--preset--color--white); text-decoration: underline; }
.fara-footer .wp-block-navigation .wp-block-navigation-item__content { padding: 0.2rem 0; }
.fara-footer .fara-linklike { color: #E9DCE0; text-decoration: underline; }
.fara-footer h2 { color: var(--wp--preset--color--white); font-family: var(--wp--preset--font-family--body); font-size: 1rem; font-weight: 700; }

/* ---------- Refinements ---------- */
.fara-header .wp-block-navigation-item__label, .fara-header .wp-block-button__link { white-space: nowrap; }
.fara-header .wp-block-navigation__container { gap: 0.1rem; }
@media (max-width: 600px) {
	.fara-header .wp-block-buttons { display: none; }
}
.fara-event + .fara-post-date { display: none; }
.fara-footer-links { list-style: none; padding-left: 0; margin: 0; }
.fara-footer-links li { padding: 0.2rem 0; }
.fara-footer .fara-cookie-settings { font-size: var(--wp--preset--font-size--small); margin: 0; }
.fara-sources { margin-top: var(--wp--preset--spacing--60); padding-top: var(--wp--preset--spacing--40); border-top: 1px solid var(--wp--preset--color--line); font-size: var(--wp--preset--font-size--small); }
.fara-post-cats { font-weight: 600; }
