/*
Theme Name: Bagshot Tattoos
Theme URI: https://www.bagshottattoos.co.uk/
Author: Bagshot Tattoos & Piercing
Description: Block theme for Bagshot Tattoos & Piercing. Black and Bagshot orange, Gill Sans type, editable pages, Tally booking forms and local SEO built in. On activation it creates every page, the menu, logo and images.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bagshot-tattoos
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--wp--preset--color--orange); color: #000; }
:where(a, button, input, summary):focus-visible { outline: 2px solid var(--wp--preset--color--orange); outline-offset: 3px; }
.wp-site-blocks > main { margin-block-start: 0; }

/* Text on orange sections: keep links/headings black for contrast */
.has-orange-background-color, .has-orange-bright-background-color { color: #000; }
.has-orange-background-color :where(h1,h2,h3,h4,h5,h6),
.has-orange-bright-background-color :where(h1,h2,h3,h4,h5,h6) { color: #000; }
.has-orange-background-color a:where(:not(.wp-element-button)),
.has-orange-bright-background-color a:where(:not(.wp-element-button)) { color: #000; }
.has-bone-background-color, .has-white-background-color { color: #111; }
.has-bone-background-color :where(h1,h2,h3,h4,h5,h6), .has-white-background-color :where(h1,h2,h3,h4,h5,h6) { color: #000; }
.has-bone-background-color a:where(:not(.wp-element-button)) { color: #9a4d00; }

/* ---------- Header ---------- */
.bt-header { position: sticky; top: 0; z-index: 50; border-bottom: 3px solid var(--wp--preset--color--orange); }
.admin-bar .bt-header { top: var(--wp-admin--admin-bar--height, 32px); }
.bt-header .wp-block-site-logo img { height: auto; }
.bt-header .wp-block-navigation a:where(:not(.wp-element-button)) { text-decoration: none; color: var(--wp--preset--color--white); }
.bt-header .wp-block-navigation a:hover, .bt-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--orange); }
.bt-header .wp-block-navigation__responsive-container.is-menu-open { background: #000 !important; padding: 2rem; }
.bt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.25rem; font-size: 1.5rem; }
.bt-header .wp-block-navigation__responsive-container-open svg, .bt-header .wp-block-navigation__responsive-container-close svg { width: 32px; height: 32px; }
@media (max-width: 600px) {
	.bt-header .wp-block-site-logo img { width: 138px !important; }
	.bt-header .bt-header-book .wp-block-button__link { padding: .6em .85em !important; font-size: .75rem; }
	.bt-header .wp-block-group.alignwide > .wp-block-group { gap: .9rem !important; }
}
.bt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.bt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: flex-start !important; }
.bt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.75rem; padding-block: .2rem; }
.bt-header .wp-block-navigation__responsive-container.is-menu-open { border-top: 4px solid var(--wp--preset--color--orange); }

/* ---------- Block style: eyebrow paragraph ---------- */
.is-style-eyebrow {
	font-size: 0.8125rem !important;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--wp--preset--color--orange);
}
.has-orange-background-color .is-style-eyebrow, .has-orange-bright-background-color .is-style-eyebrow { color: #000; }
.is-style-eyebrow::before { content: ""; display: inline-block; width: 0.7em; height: 0.85em; margin-right: 0.6em; vertical-align: -0.08em; background: currentColor; clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%); }

/* ---------- Block style: dark button ---------- */
.wp-block-button.is-style-dark .wp-block-button__link { background: #000; color: var(--wp--preset--color--white); }
.wp-block-button.is-style-dark .wp-block-button__link:hover { background: #222; color: var(--wp--preset--color--orange); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; border: 2px solid currentColor; padding: calc(1em - 2px) calc(1.6em - 2px); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: rgba(255,255,255,.08); }
.has-orange-background-color .wp-block-button.is-style-outline .wp-block-button__link { color: #000; }
.has-orange-background-color .wp-block-button.is-style-outline .wp-block-button__link:hover { background: #000; color: var(--wp--preset--color--orange); border-color: #000; }
.has-black-background-color .wp-block-button.is-style-outline .wp-block-button__link,
.has-ink-background-color .wp-block-button.is-style-outline .wp-block-button__link { color: var(--wp--preset--color--orange); }
.has-black-background-color .wp-block-button.is-style-outline .wp-block-button__link:hover,
.has-ink-background-color .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--orange); color: #000; border-color: var(--wp--preset--color--orange); }

/* ---------- Block style: card group ---------- */
.wp-block-group.is-style-card {
	background: var(--wp--preset--color--charcoal);
	border-top: 4px solid var(--wp--preset--color--orange);
	border-radius: 4px 4px 10px 10px;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	align-self: flex-start;
}
.wp-block-group.is-style-card > * { margin-block: 0; }
.wp-block-group.is-style-card > * + * { margin-block-start: 1rem; }
.has-orange-background-color .wp-block-group.is-style-card { background: #000; color: var(--wp--preset--color--bone); }
.has-orange-background-color .wp-block-group.is-style-card :where(h2,h3,h4) { color: var(--wp--preset--color--white); }
.has-orange-background-color .wp-block-group.is-style-card a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--orange); }
.has-smoke-background-color .wp-block-group.is-style-card { background: #000; }
.has-bone-background-color .wp-block-group.is-style-card { background: var(--wp--preset--color--white); color: #111; border-top-color: #000; }
.wp-block-columns.bt-equal > .wp-block-column { display: flex; flex-direction: column; }
.wp-block-columns.bt-equal > .wp-block-column > .wp-block-group.is-style-card { flex: 1; align-self: stretch; }

/* ---------- Block style: ticker band ---------- */
.wp-block-group.is-style-ticker { border-block: 1px solid rgba(235,132,35,.45); row-gap: .5rem !important; column-gap: 1.4rem !important; }
.wp-block-group.is-style-ticker p { margin: 0; white-space: nowrap; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; }
.wp-block-group.is-style-ticker p + p::before { content: ""; display: inline-block; width: 0.6em; height: 0.72em; margin-right: 1.4rem; background: currentColor; clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%); }

/* ---------- Block style: shield image (shape of the Bagshot mark) ---------- */
.wp-block-image.is-style-shield img { clip-path: polygon(0 0, 100% 0, 100% 74%, 50% 100%, 0 74%); border-radius: 0 !important; aspect-ratio: 5 / 6; object-fit: cover; width: 100%; }
.wp-block-image.is-style-shield { margin-bottom: 0; }

/* ---------- Block style: framed image (offset orange frame) ---------- */
.wp-block-image.is-style-framed { position: relative; }
.wp-block-image.is-style-framed img { box-shadow: 14px 14px 0 0 var(--wp--preset--color--orange); }
.has-orange-background-color .wp-block-image.is-style-framed img { box-shadow: 14px 14px 0 0 #000; }

/* ---------- Block style: tick list ---------- */
ul.is-style-shield-list { list-style: none; padding-left: 0; }
ul.is-style-shield-list > li { position: relative; padding-left: 1.75em; margin-block: 0.45em; }
ul.is-style-shield-list > li::before { content: ""; position: absolute; left: 0.1em; top: 0.38em; width: 0.75em; height: 0.9em; background: var(--wp--preset--color--orange); clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%); }
.has-orange-background-color ul.is-style-shield-list > li::before, .has-bone-background-color ul.is-style-shield-list > li::before { background: #000; }

/* ---------- Gallery ---------- */
.bt-gallery .wp-block-image img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform .35s ease, filter .35s ease; }
.bt-gallery .wp-block-image { overflow: hidden; border-radius: 10px; }
.bt-gallery .wp-block-image:hover img { transform: scale(1.04); }
.bt-gallery figcaption { margin-top: .6rem; opacity: .85; }

/* ---------- Hero ---------- */
.bt-hero h1 { max-width: 12ch; }
.bt-hero .bt-hero-logo { max-width: 440px; margin-inline: auto; }
.bt-hero .bt-hero-logo img { width: 100%; height: auto; border-radius: 0; }
@keyframes bt-spin { to { transform: rotate(360deg); } }

.bt-page-hero h1 { max-width: 16ch; }

/* ---------- Steps ---------- */
.bt-steps { counter-reset: bt-step; }
.bt-steps .bt-step { counter-increment: bt-step; }
.bt-steps .bt-step h3::before { content: counter(bt-step, decimal-leading-zero); display: block; font-size: .875rem; letter-spacing: .2em; color: var(--wp--preset--color--orange); margin-bottom: .5rem; }

/* ---------- Details / FAQ ---------- */
.wp-block-details { border-bottom: 1px solid rgba(255,255,255,.15); padding-block: 1rem; }
.wp-block-details summary { font-weight: 700; font-size: 1.15rem; cursor: pointer; }
.wp-block-details[open] summary { color: var(--wp--preset--color--orange); }

/* ---------- Tally form block ---------- */
.bt-tally { background: var(--wp--preset--color--bone); color: #111; border-radius: 10px; padding: clamp(1rem, 3vw, 2rem); }
.bt-tally iframe { display: block; width: 100%; min-height: 420px; border: 0; }
.bt-tally noscript a { color: #000; }

/* ---------- Map ---------- */
.bt-map iframe { display: block; width: 100%; height: 380px; border: 0; border-radius: 10px; filter: grayscale(1) contrast(1.05); }

/* ---------- Footer ---------- */
.bt-footer { border-top: 3px solid var(--wp--preset--color--orange); }
.bt-footer a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--bone); text-decoration: none; }
.bt-footer a:where(:not(.wp-element-button)):hover { color: var(--wp--preset--color--orange); text-decoration: underline; }
.bt-footer h2 { font-size: .8125rem !important; letter-spacing: .22em; color: var(--wp--preset--color--orange); text-transform: uppercase; }
.bt-footer ul { list-style: none; padding: 0; margin: 0; }
.bt-footer ul li { margin-block: .35em; }
.bt-footer .wp-block-social-links .wp-social-link { background: var(--wp--preset--color--orange) !important; color: #000 !important; }

/* ---------- Utilities ---------- */
.bt-max-ch { max-width: 62ch; }
.bt-big-quote { font-size: var(--wp--preset--font-size--xx-large); font-weight: 700; line-height: 1.05; text-transform: uppercase; letter-spacing: .02em; }
.bt-stack-tight > * + * { margin-block-start: .5rem !important; }
@media (max-width: 781px) {
	.bt-reverse-mobile { flex-direction: column-reverse; }
}
:where(main) [id] { scroll-margin-top: 120px; }
.bt-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--wp--preset--spacing--50) !important; opacity: .75; }
.bt-footer .wp-block-image img { border-radius: 0; }

/* Full-width sections sit flush against each other */
.wp-block-post-content > .alignfull, .wp-block-post-content > .alignfull + * { margin-block-start: 0 !important; }
.wp-site-blocks > footer, .wp-site-blocks > main + footer { margin-block-start: 0 !important; }
.wp-site-blocks > footer > .alignfull:first-child { margin-block-start: 0; }
.wp-block-image.is-style-framed { margin-right: 14px; margin-bottom: 14px; }
.wp-block-group.is-style-ticker p { font-size: .9375rem; letter-spacing: .12em; }
.bt-footer h2 + * { margin-top: .9rem !important; }
.bt-footer p { margin-block: 0 .9rem; }
@media (max-width: 781px) {
	.bt-hero .bt-hero-logo { max-width: 220px; }
	.wp-block-columns.bt-artists-row { flex-direction: row !important; flex-wrap: wrap !important; gap: 1.25rem !important; }
	.wp-block-columns.bt-artists-row > .wp-block-column { flex-basis: calc(50% - .625rem) !important; }
	.wp-block-columns.bt-artists-row h3 { font-size: 1.25rem; margin-top: .5rem; }
}
.bt-aka { display: block; font-size: .5em; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--orange); margin-top: .35em; }
.bt-laser-mark { max-width: 220px; margin-inline: auto !important; }
.bt-laser-mark img { border-radius: 0 !important; }

/* Opening hours table */
.wp-block-table.bt-hours { margin: 0; }
.wp-block-table.bt-hours table { border-collapse: collapse; width: 100%; }
.wp-block-table.bt-hours td { border: 0; border-bottom: 1px dashed rgba(255,255,255,.18); padding: .55rem 0; font-size: 1.0625rem; }
.wp-block-table.bt-hours td:last-child { text-align: right; font-weight: 700; }
.has-orange-background-color .wp-block-table.bt-hours td, .has-bone-background-color .wp-block-table.bt-hours td { border-bottom-color: rgba(0,0,0,.25); }
.bt-footer .wp-block-table.bt-hours td { font-size: .95rem; padding: .3rem 0; }

/* Portfolio gallery */
.wp-block-gallery.bt-portfolio { gap: 12px !important; }
.wp-block-gallery.bt-portfolio .wp-block-image img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.bt-artist-name a { color: inherit; text-decoration: none; }
.bt-artist-name a:hover { color: var(--wp--preset--color--orange); }
.has-orange-background-color .bt-aka { color: #000; opacity: .7; }
.wp-block-image.is-style-shield a { display: block; }
.bt-footer .wp-block-image { margin-bottom: 1rem; }
.bt-footer a[href^="mailto"] { white-space: nowrap; font-size: .875rem; }
