/*
Theme Name: AC Tec
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ac-tec
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts a margin-block-start equal to the block gap (24px unless
   theme.json sets styles.spacing.blockGap) between the template's top-level
   sections (header part, main, footer part) — a gap that exists even when no
   markup asks for it. Zero it so sections butt edge-to-edge and own their
   vertical rhythm via padding; this does not affect block gaps inside nested
   layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main carries its own vertical padding so templates this
   theme does not author (WooCommerce shop, product, cart…) still clear the
   header and footer. A descendant selector, not a child one: WooCommerce wraps
   the single-product main in an extra group. Templates built from full-bleed
   sections opt out with is-flush and let the sections own the rhythm. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}

/* Layout and accessible interaction. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
.wp-site-blocks main { padding-block: 72px 88px; }
.wp-site-blocks main.is-flush { padding-block: 0; }
:where(a,button,input,textarea,select):focus-visible { outline: 3px solid var(--wp--preset--color--primary); outline-offset: 5px; }
.ac-footer :where(a,button):focus-visible,.ac-cta :where(a,button):focus-visible { outline-color: var(--wp--preset--color--amber); }
img { height: auto; }
a { text-underline-offset: .22em; }
.wp-element-button { transition: background-color .18s ease, color .18s ease; }
.ac-section { padding-block: clamp(56px, 7vw, 100px); }
.entry-content > .alignfull { margin-block-start: 0; }
.ac-section > .wp-block-columns { margin-bottom: 0; }
.ac-section .wp-block-columns + .wp-block-columns { margin-top: 48px; }
.ac-section > .alignwide + .wp-block-columns { margin-top: 40px; }
.ac-story { align-items: center !important; gap: clamp(32px,6vw,88px); }
.ac-story-image img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.ac-eyebrow { color: var(--wp--preset--color--primary); font-size: 12px; font-weight: 600; letter-spacing: .14em; line-height: 1.5; text-transform: uppercase; }
.ac-lead { font-size: clamp(18px,1.5vw,21px); line-height: 1.65; }
.ac-small { font-size: 14px; line-height: 1.65; }
.ac-number { color: var(--wp--preset--color--primary); font-size: 15px; letter-spacing: .1em; border-top: 2px solid var(--wp--preset--color--cyan); padding-top: 22px; }
.ac-placeholder { font-size: 14px; color: var(--wp--preset--color--primary); border-left: 2px solid var(--wp--preset--color--amber); padding-left: 12px; }
.ac-preview-note { padding: 16px 20px; border-left: 3px solid var(--wp--preset--color--amber); background: var(--wp--preset--color--off-white); font-size: 14px; }

/* Header. */
.ac-header { padding-block: 18px; border-bottom: 1px solid var(--wp--preset--color--mist); }
.ac-header-row { justify-content: space-between; flex-wrap: nowrap; gap: 30px; }
.ac-logo { flex-shrink: 0; }
.ac-logo img { width: 128px; height: auto; }
.ac-navigation { gap: 28px; }
.ac-navigation .wp-block-navigation-item__content { padding-block: 12px; }
.ac-navigation .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--primary); text-decoration: underline; }
.wp-block-navigation__responsive-container.is-menu-open { padding: 32px; }

/* Photographic cover with an inset copy panel. */
.ac-hero { position: relative; min-height: 650px; padding-block: 56px; isolation: isolate; }
.ac-hero > .ac-responsive-hero { position: absolute; inset: 0; max-width: none !important; margin: 0 !important; z-index: -1; }
.ac-responsive-hero figure,.ac-responsive-hero picture { height: 100%; margin: 0; }
.ac-responsive-hero picture { display: block; }
.ac-responsive-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.ac-hero-copy { max-width: 570px; padding: clamp(28px,3.5vw,48px); background: var(--wp--preset--color--background); border-top: 3px solid var(--wp--preset--color--blue); box-shadow: 0 16px 50px #33344512; }
.ac-hero-copy h1 { font-size: clamp(2.15rem,3.5vw,3.3rem); line-height: 1.07; }
.ac-hero-copy .wp-block-buttons { gap: 12px; margin-top: 28px; }
.ac-hero-copy .ac-lead { font-size: 17px; }
.ac-page-intro { padding-block: 64px 72px; }
.ac-page-intro h1 { max-width: 920px; }
.ac-page-intro .ac-lead { max-width: 740px; }

/* Editable cards, callouts and enquiry band. */
.is-style-service-card { background: var(--wp--preset--color--background); height: 100%; border-radius: 6px; overflow: hidden; }
.ac-card-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.ac-card-copy { padding: 26px 28px 30px; margin-top: 0 !important; }
.ac-card-copy p { font-size: 16px; }
.is-style-inset-panel { padding: clamp(24px,4vw,48px); border-radius: 8px; }
.ac-cta { color: var(--wp--preset--color--background); }
.ac-cta .ac-eyebrow { color: var(--wp--preset--color--background); }
.ac-cta h2 { font-size: clamp(2rem,3vw,2.7rem); }
.ac-cta .wp-block-columns { align-items: center !important; gap: 64px; }
.ac-cta .wp-element-button:hover { background: var(--wp--preset--color--mist) !important; color: var(--wp--preset--color--text) !important; }

/* Contact Form 7. */
.ac-contact-columns { gap: 64px; }
.ac-contact-columns > .wp-block-column:first-child { flex-basis: 38%; }
.ac-contact-columns > .wp-block-column:last-child { flex-basis: 62%; }
.wpcf7 { font-size: 15px; }
.wpcf7 form p { margin: 0 0 22px; }
.ac-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.wpcf7 label { font-weight: 500; }
.wpcf7 input:not([type=checkbox]):not([type=submit]),.wpcf7 select,.wpcf7 textarea { display: block; width: 100%; min-width: 0; margin-top: 8px; padding: 12px 14px; border: 1px solid #8c9aa3; border-radius: 4px; background: white; color: var(--wp--preset--color--text); font: inherit; }
.wpcf7 textarea { height: 150px; resize: vertical; }
.wpcf7 input[type=checkbox] { width: 18px; height: 18px; margin: 3px 8px 0 0; accent-color: var(--wp--preset--color--primary); }
.wpcf7-list-item { margin: 0; }
.wpcf7-acceptance label { display: flex; align-items: flex-start; font-size: 13px; font-weight: 400; line-height: 1.6; }
.wpcf7-acceptance input { flex-shrink: 0; }
.wpcf7 input[type=submit] { border: 0; border-radius: 4px; padding: 16px 26px; background: var(--wp--preset--color--primary); color: white; font: 600 15px 'Work Sans',sans-serif; cursor: pointer; min-height: 48px; }
.wpcf7 input[type=submit]:hover { background: var(--wp--preset--color--text); }
.wpcf7-not-valid-tip { font-size: 13px; color: #a32121; margin-top: 6px; }
.wpcf7 form .wpcf7-response-output { margin: 20px 0 0; padding: 16px; }

/* Footer. */
.ac-footer { padding-block: 64px 28px; color: var(--wp--preset--color--off-white); }
.ac-footer a { color: var(--wp--preset--color--off-white); }
.ac-footer a:hover { color: var(--wp--preset--color--cyan); }
.ac-footer-logo img { width: 160px; }
.ac-footer-columns { gap: 64px; }
.ac-footer-columns > .wp-block-column:first-child { flex: 1.4 1 0; }
.ac-footer-columns > .wp-block-column:not(:first-child) { flex: 1 1 0; }
.ac-footer h3 { font-size: 18px; }
.ac-footer p { font-size: 15px; }
.ac-footer .ac-placeholder { color: var(--wp--preset--color--off-white); font-size: 13px; }
.ac-footer-bottom { border-top: 1px solid #ffffff30; padding-top: 22px; margin-top: 44px !important; }
.ac-footer-bottom p { font-size: 12px; margin-top: 8px; }
.wp-block-button.is-style-outline .wp-element-button { padding: 14px 22px; }

/* Editor shows both art-directed source images for direct replacement. */
.editor-styles-wrapper .ac-hero { min-height: 0; }
.editor-styles-wrapper .ac-hero > .ac-responsive-hero { position: relative; z-index: auto; }
.editor-styles-wrapper .ac-responsive-hero img { max-height: 300px; object-fit: contain; }
.editor-styles-wrapper .ac-hero-copy { max-width: none; }

@media (max-width: 1000px) {
 .ac-hero { min-height: 600px; }
 .ac-hero-copy { max-width: 470px; }
 .ac-header-row { gap: 20px; }
 .ac-navigation { gap: 16px; }
 .ac-contact-columns,.ac-story,.ac-footer-columns { gap: 32px; }
 .ac-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 781px) {
 .ac-section .wp-block-columns { gap: 36px; }
 .ac-card-copy { padding: 24px; }
 .ac-footer-columns { gap: 32px; }
}
@media (max-width: 767px) {
 .ac-header { padding-block: 12px; }
 .ac-logo img { width: 102px; }
 .ac-hero { padding: 0; min-height: 0; display: flex; flex-direction: column; }
 .ac-hero > .ac-responsive-hero { position: relative; order: 2; z-index: auto; }
 .ac-responsive-hero img { height: 460px; object-fit: cover; object-position: center 42%; }
 .ac-hero > .alignwide { margin-inline: 0 !important; }
 .ac-hero-copy { padding: 36px var(--wp--style--root--padding-left) 40px; max-width: none; box-shadow: none; border-top: 0; }
 .ac-hero-copy h1 { font-size: clamp(2.1rem,7.4vw,3rem); }
 .ac-page-intro { padding-block: 44px 48px; }
 .ac-section { padding-block: 52px; }
 .ac-cta .wp-block-columns { gap: 24px; }
 .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
 .wp-block-navigation__responsive-container-open { display: flex !important; }
 .ac-footer { padding-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; }
 *,*::before,*::after { transition: none !important; animation: none !important; }
}

/* Editable call banner above the site navigation. */
.ac-call-banner { padding-block: 4px; color: var(--wp--preset--color--background); }
.ac-call-banner p { margin-block: 0; font-size: 13px; font-weight: 600; letter-spacing: .04em; line-height: 1.5; }
.ac-call-banner a { display: inline-flex; align-items: center; min-height: 36px; color: inherit; white-space: nowrap; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ac-call-banner + .ac-header { margin-block-start: 0; }
@media (max-width: 767px) {
 .ac-call-banner p { text-align: center; font-size: 12px; }
}


