/*
Theme Name: Mobile Repair
Description: Clean, fast theme for a phone & tablet repair shop. Pairs with the Mobile Repair Toolkit plugin (price checker, bookings, enquiries).
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: mobile-repair
*/

:root {
	--mr-ink: #0f1c2b;
	--mr-muted: #566374;
	--mr-line: #dbe2ea;
	--mr-bg: #ffffff;
	--mr-soft: #f2f6fa;
	--mr-accent: #1464d8;
	--mr-accent-dark: #0c4aa6;
	--mr-mint: #1bb57a;
	--mr-radius: 14px;
	--mr-max: 1140px;
	--mr-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	/* Plugin (forms / price checker) picks these up. */
	--mrt-accent: var(--mr-accent);
	--mrt-ink: var(--mr-ink);
	--mrt-muted: var(--mr-muted);
	--mrt-line: var(--mr-line);
	--mrt-soft: var(--mr-soft);
	--mrt-radius: var(--mr-radius);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--mr-font); font-size: 17px; line-height: 1.6; color: var(--mr-ink); background: var(--mr-bg); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--mr-accent); text-underline-offset: 3px; }
a:hover { color: var(--mr-accent-dark); }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--mr-accent) 55%, transparent); outline-offset: 2px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.mr-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--mr-ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.mr-skip:focus { left: 8px; }
.mr-container { width: 100%; max-width: var(--mr-max); margin: 0 auto; padding: 0 20px; }
.mr-icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

/* Buttons */
.mr-btn, .wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 13px 24px; border-radius: 999px; border: 2px solid var(--mr-accent);
	background: var(--mr-accent); color: #fff; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none;
	transition: background .15s, border-color .15s, transform .15s;
}
.mr-btn:hover, .wp-block-button__link:hover { background: var(--mr-accent-dark); border-color: var(--mr-accent-dark); color: #fff; }
.mr-btn:active { transform: translateY(1px); }
.mr-btn--sm { padding: 9px 18px; font-size: .95rem; }
.mr-btn--light { background: #fff; border-color: #fff; color: var(--mr-ink); }
.mr-btn--light:hover { background: var(--mr-soft); border-color: var(--mr-soft); color: var(--mr-ink); }
.mr-btn--ghost { background: transparent; color: var(--mr-accent); }
.mr-btn--ghost:hover { background: var(--mr-soft); color: var(--mr-accent-dark); }

/* Header */
.mr-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--mr-line); }
.admin-bar .mr-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .mr-header { top: 0; } }
.mr-header__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.mr-brand { margin-right: auto; }
.mr-brand__name { display: inline-flex; white-space: nowrap; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; color: var(--mr-ink); text-decoration: none; }
.mr-brand__mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--mr-accent); }
.mr-brand__mark svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.custom-logo { max-height: 52px; width: auto; display: block; }

.mr-nav { display: flex; align-items: center; gap: 20px; }
.mr-nav .mr-btn { white-space: nowrap; }
.mr-menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.mr-menu a { display: block; white-space: nowrap; padding: 8px 12px; border-radius: 8px; color: var(--mr-ink); font-weight: 600; text-decoration: none; }
.mr-menu a:hover { background: var(--mr-soft); }
.mr-menu .current-menu-item > a, .mr-menu .current_page_item > a { color: var(--mr-accent); }
.mr-nav__cta { display: flex; align-items: center; gap: 16px; }
.mr-phone { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--mr-ink); text-decoration: none; white-space: nowrap; }

.mr-nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; position: relative; }
.mr-nav-toggle__bars, .mr-nav-toggle__bars::before, .mr-nav-toggle__bars::after { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--mr-ink); border-radius: 2px; transition: transform .2s, opacity .2s; content: ""; }
.mr-nav-toggle__bars { top: 21px; }
.mr-nav-toggle__bars::before { left: 0; top: 0; transform: translateY(-7px); }
.mr-nav-toggle__bars::after { left: 0; top: 0; transform: translateY(7px); }
.mr-nav-open .mr-nav-toggle__bars { background: transparent; }
.mr-nav-open .mr-nav-toggle__bars::before { transform: rotate(45deg); }
.mr-nav-open .mr-nav-toggle__bars::after { transform: rotate(-45deg); }

@media (max-width: 1080px) {
	.mr-nav-toggle { display: block; }
	.mr-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 20px 24px; background: #fff; border-bottom: 1px solid var(--mr-line); box-shadow: 0 20px 30px -20px rgba(15, 28, 43, .3); }
	.mr-nav-open .mr-nav { display: flex; }
	.mr-menu { flex-direction: column; }
	.mr-menu a { padding: 12px; font-size: 1.05rem; }
	.mr-nav__cta { flex-direction: column; align-items: stretch; }
	.mr-nav__cta .mr-phone { justify-content: center; padding: 8px; }
}

/* Hero */
.mr-hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(1200px 500px at 85% -10%, #2f86ff 0%, transparent 60%), linear-gradient(135deg, #0b1f3a 0%, #0f2f5c 55%, #134894 100%); }
.mr-hero__inner { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: center; padding-top: clamp(56px, 9vw, 110px); padding-bottom: clamp(56px, 9vw, 110px); }
.mr-hero h1 { color: #fff; max-width: 14em; }
.mr-hero__lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: #c8d7ec; max-width: 34em; }
.mr-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.mr-hero__actions .mr-btn:not(.mr-btn--light) { background: var(--mr-mint); border-color: var(--mr-mint); }
.mr-hero__actions .mr-btn:not(.mr-btn--light):hover { background: #149a67; border-color: #149a67; }
.mr-hero__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; color: #c8d7ec; font-size: .95rem; }
.mr-hero__facts li { display: inline-flex; align-items: center; gap: 8px; }
.mr-hero__facts a { color: #fff; font-weight: 700; text-decoration: none; }
.mr-hero__art { display: flex; justify-content: center; }
.mr-phone-art { width: 220px; aspect-ratio: 9 / 18.5; border-radius: 36px; padding: 12px; background: linear-gradient(160deg, #3b4a60, #111a27); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6), inset 0 0 0 2px rgba(255, 255, 255, .08); transform: rotate(6deg); }
.mr-phone-art__screen { position: relative; height: 100%; border-radius: 26px; overflow: hidden; background: linear-gradient(180deg, #5fa3ff, #1464d8 60%, #0f3f8f); }
.mr-phone-art__crack { position: absolute; inset: 0; background:
	linear-gradient(115deg, transparent 47%, rgba(255, 255, 255, .7) 48%, transparent 49%) 0 0 / 100% 60% no-repeat,
	linear-gradient(35deg, transparent 49%, rgba(255, 255, 255, .55) 50%, transparent 51%) 0 20% / 70% 50% no-repeat,
	linear-gradient(160deg, transparent 49%, rgba(255, 255, 255, .5) 50%, transparent 51%) 100% 10% / 60% 45% no-repeat;
	clip-path: inset(0 0 0 0); animation: mr-heal 4s ease-in-out infinite; }
.mr-phone-art__tick { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; display: grid; place-items: center; background: var(--mr-mint); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: mr-pop 4s ease-in-out infinite; }
.mr-phone-art__tick .mr-icon { width: 42px; height: 42px; fill: #fff; }
@keyframes mr-heal { 0%, 30% { clip-path: inset(0 0 0 0); } 55%, 100% { clip-path: inset(0 0 100% 0); } }
@keyframes mr-pop { 0%, 45% { transform: scale(0); opacity: 0; } 60%, 90% { transform: scale(1); opacity: 1; } 100% { transform: scale(0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mr-phone-art__crack { animation: none; clip-path: inset(0 0 100% 0); } .mr-phone-art__tick { animation: none; } }
@media (max-width: 820px) { .mr-hero__inner { grid-template-columns: 1fr; } .mr-hero__art { display: none; } }

/* Page header */
.mr-page-header { background: var(--mr-soft); border-bottom: 1px solid var(--mr-line); padding: clamp(36px, 6vw, 64px) 0 clamp(28px, 4vw, 44px); }
.mr-page-header h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 2.8rem); }

/* Content area — block editor output */
.mr-content { max-width: calc(820px + 40px); margin: 0 auto; padding: clamp(32px, 5vw, 56px) 20px clamp(48px, 7vw, 80px); }
.mr-content > .alignwide, .mr-content > .wp-block-columns { max-width: var(--mr-max); margin-left: auto; margin-right: auto; }
.mr-content--home { max-width: none; padding: 0; }
.mr-content--home > *:not(.mr-section) { max-width: 820px; margin-left: auto; margin-right: auto; padding: 0 20px; }
.mr-content .wp-block-columns { gap: 24px; }

.mr-section { padding: clamp(48px, 7vw, 88px) 20px; }
/* Classic themes wrap group content in __inner-container; support both markups. */
.mr-section > .wp-block-group__inner-container { max-width: none; }
:is(.mr-section, .mr-section > .wp-block-group__inner-container) > *:not(.wp-block-group__inner-container) { max-width: var(--mr-max); margin-left: auto !important; margin-right: auto !important; }
:is(.mr-section, .mr-section > .wp-block-group__inner-container) > .wp-block-heading { text-align: center; }
:is(.mr-section, .mr-section > .wp-block-group__inner-container) > .wp-block-heading + p { text-align: center; color: var(--mr-muted); max-width: 40em; margin-bottom: 36px; }
.mr-section--alt { background: var(--mr-soft); }
.mr-section .mrt-pc { max-width: 820px; margin-top: 28px; }

.wp-block-columns.mr-cards { gap: 20px; margin-bottom: 20px; }
.mr-cards > .wp-block-column { background: #fff; border: 1px solid var(--mr-line); border-radius: var(--mr-radius); padding: 26px 26px 10px; transition: transform .2s, box-shadow .2s; }
.mr-cards > .wp-block-column:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -22px rgba(15, 28, 43, .45); }
.mr-cards h3 { display: flex; align-items: center; gap: 10px; }
.mr-cards h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--mr-accent); flex: none; }
.mr-cards p { color: var(--mr-muted); }

.wp-block-columns.mr-steps { gap: 20px; margin-top: 12px; }
.mr-steps > .wp-block-column { background: #fff; border-radius: var(--mr-radius); padding: 28px 26px 12px; border-top: 4px solid var(--mr-mint); box-shadow: 0 12px 30px -24px rgba(15, 28, 43, .5); }
.mr-steps p { color: var(--mr-muted); }

/* CTA band */
.mr-cta { background: var(--mr-accent); color: #fff; }
.mr-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 44px; padding-bottom: 44px; }
.mr-cta h2 { color: #fff; margin-bottom: 6px; }
.mr-cta p { margin: 0; color: #dbe8ff; }

/* Posts */
.mr-excerpt { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--mr-line); }
.mr-meta { color: var(--mr-muted); font-size: .9rem; }

/* Footer */
.mr-footer { background: #0b1626; color: #b7c3d3; font-size: .95rem; }
.mr-footer a { color: #fff; text-decoration: none; }
.mr-footer a:hover { text-decoration: underline; }
.mr-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; padding-top: 56px; padding-bottom: 36px; }
@media (max-width: 760px) { .mr-footer__grid { grid-template-columns: 1fr; } }
.mr-footer__name { color: #fff; font-weight: 800; font-size: 1.2rem; }
.mr-footer__title { color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.mr-footer__line { display: flex; gap: 10px; align-items: flex-start; margin-bottom: .6em; }
.mr-footer__line .mr-icon { margin-top: .25em; color: #6f86a3; }
.mr-footer__menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mr-footer__base { border-top: 1px solid #1c2a3e; padding-top: 18px; padding-bottom: 18px; font-size: .85rem; color: #7d8ca0; }
.mr-footer__base p { margin: 0; }
[id], .mrt-pc__enquiry { scroll-margin-top: 96px; }
