/* ===========================================================================
   Mandurah Handyman Services — static theme
   Migrated off WordPress/Elementor. Colour and type tokens were lifted from the
   original Elementor global styles so the rebuild reads as the same site.
   Edit freely: this file is the source of truth now, not any page builder.
   =========================================================================== */

:root {
  --ink: #0E0E0E;
  --ink-soft: #2B2B2B;
  --muted: #0E0E0E99;
  --accent: #FF7A35;
  --accent-dark: #E8621C;
  --yellow: #F1AD11;
  --yellow-soft: #FEC400;
  --cream: #FFF8E8;
  --cream-soft: #FFFCF6;
  --grey: #F0F0F0;
  --line: #00000014;
  --white: #fff;

  --font-heading: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1200px;
  --gutter: 20px;
  --radius: 10px;
  --shadow: 0 10px 40px #0000000f;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
  background: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: clamp(2.25rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.85rem, 3.9vw, 2.9rem); }
h3 { font-size: clamp(1.35rem, 2.3vw, 1.75rem); }
h4 { font-size: 1.2rem; line-height: 1.3; }
h5 { font-size: 1.05rem; }
h6 { font-size: 0.95rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 20px;
}
.skip-link:focus { left: 0; }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ── buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none;
  padding: 16px 30px; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--accent); color: #fff;
  transition: background 0.16s ease, transform 0.16s ease;
  min-height: 48px;
}
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn--dark { background: var(--ink); }
.btn--dark:hover { background: #000; }
.btn--ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--block { width: 100%; }

/* ── top bar ─────────────────────────────────────────────────────────────── */

.topbar {
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.85rem;
}
.topbar .wrap {
  display: flex; flex-wrap: wrap; gap: 10px 34px;
  align-items: center; justify-content: center;
  padding-block: 10px;
}
.topbar-item { display: flex; align-items: center; gap: 10px; }
.topbar-item svg { flex: none; }
.topbar-icon {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
}
.topbar-label { display: block; font-size: 0.68rem; line-height: 1.2; opacity: 0.72; }
.topbar-value { display: block; font-weight: 600; color: var(--ink); line-height: 1.3; }
a.topbar-value:hover { color: #000; }

/* ── header ──────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 24px;
  padding-block: 14px;
}
.site-logo { flex: none; }
.site-logo img { height: 46px; width: auto; }

.nav-toggle {
  margin-left: auto; display: none;
  width: 46px; height: 46px; border: 0; border-radius: 4px;
  background: var(--ink); color: #fff; cursor: pointer;
  align-items: center; justify-content: center;
}

.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.site-nav li { position: relative; }
.site-nav a {
  display: block; padding: 10px 14px;
  font-family: var(--font-heading); font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.02em; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); text-decoration: none; }
.site-nav .has-children > a::after { content: ' ▾'; font-size: 0.7em; opacity: 0.6; }

.site-nav .submenu {
  position: absolute; top: 100%; left: 0; min-width: 210px;
  flex-direction: column; align-items: stretch; gap: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
}
.site-nav li:hover > .submenu,
.site-nav li:focus-within > .submenu { opacity: 1; visibility: visible; transform: none; }
.site-nav .submenu a { padding: 9px 12px; border-radius: 6px; font-weight: 500; }
.site-nav .submenu a:hover { background: var(--cream); }

.header-cta { flex: none; }

/* ── hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  background: var(--ink) center/cover no-repeat;
  color: #fff;
  padding-block: clamp(56px, 8vw, 104px);
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, #ffffffe6 0%, #ffffffcc 42%, #ffffff40 72%, #ffffff12 100%);
}
.hero > .wrap { position: relative; z-index: 1; }
.hero-grid {
  display: grid; gap: clamp(32px, 5vw, 64px);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
}
.hero-copy h1 { margin-bottom: 0.35em; }
.hero-copy p { color: var(--ink-soft); font-size: 1.02rem; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero--plain { background: var(--cream); color: var(--ink); }
.hero--plain::after { display: none; }

/* ── lead form ───────────────────────────────────────────────────────────── */

.lead-form {
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 18px 60px #0000001f;
  padding: clamp(22px, 3vw, 34px);
  /* The hero sets color:#fff on its subtree — the card must not inherit it. */
  color: var(--muted);
}
.lead-form h2, .lead-form h3, .lead-form .lead-form-title {
  font-family: var(--font-heading); font-weight: 700; color: var(--ink);
  font-size: 1.28rem; text-align: center; margin: 0 0 1em; line-height: 1.2;
}
/* A 2-column grid; each field spans 1 or 2 tracks from its original col width. */
.lead-form .field-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.lead-form .field { grid-column: span 2; }
.lead-form .field[style*="--span:50"] { grid-column: span 1; }
.lead-form label:not(.sr-only) {
  display: block; font-size: 0.78rem; font-weight: 600; color: var(--ink); margin-bottom: 5px;
}
.lead-form input, .lead-form select, .lead-form textarea {
  width: 100%; font-family: inherit; font-size: 0.95rem; color: var(--ink);
  padding: 14px 15px; border: 1px solid #0000001f; border-radius: 3px;
  background: #fff; min-height: 50px;
}
.lead-form select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230E0E0E' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; padding-right: 40px;
}
.lead-form textarea { min-height: 110px; resize: vertical; }
.lead-form button[type="submit"] { margin-top: 14px; }
.lead-form input::placeholder, .lead-form textarea::placeholder { color: #0e0e0e66; }
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #ff7a3526;
}
.lead-form .hp { position: absolute; left: -9999px; }
.form-status { margin-top: 12px; font-size: 0.88rem; min-height: 1.2em; }
.form-status[data-state="error"] { color: #b3261e; }
.form-status[data-state="sending"] { color: var(--ink-soft); }

/* ── sections ────────────────────────────────────────────────────────────── */

.section { padding-block: clamp(48px, 6.5vw, 88px); }
.section--cream { background: var(--cream-soft); }
.section--grey { background: var(--grey); }
.section--yellow { background: var(--yellow); }
.section--dark { background: var(--ink); }
.section--dark, .section--dark p { color: #ffffffb8; }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }

/* Big heading left, body right — the rhythm the original site used. */
.section-head {
  display: grid; gap: clamp(20px, 4vw, 56px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.section-head h2 { margin-bottom: 0; }
.section-head--solo { grid-template-columns: 1fr; max-width: 62ch; }

.prose > * + * { margin-top: 1.1em; }
.prose h3, .prose h4 { margin-top: 1.7em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 0.4em; }

/* ── cards ───────────────────────────────────────────────────────────────── */

.card-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.card h3, .card h4 { font-size: 1.15rem; margin-bottom: 0.5em; }
.card p { font-size: 0.94rem; margin: 0; }
.card-icon {
  width: 46px; height: 46px; border-radius: 6px; margin-bottom: 18px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.section--yellow .card, .section--dark .card { box-shadow: none; }
.section--dark .card { background: #1b1b1b; border-color: #ffffff17; }

/* ── tick list ───────────────────────────────────────────────────────────── */

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before {
  content: '✓'; position: absolute; left: 0; top: 0.1em;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 0.7rem; display: grid; place-items: center;
}

/* ── media ───────────────────────────────────────────────────────────────── */

figure { margin: 0; }
.media img { border-radius: var(--radius); width: 100%; }
/* A lone photo in a text section should read as an illustration, not a banner. */
.prose > .media { max-width: 720px; margin-inline: auto; }
.media-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.split {
  display: grid; gap: clamp(24px, 4vw, 56px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}

/* ── vertical tabs ───────────────────────────────────────────────────────── */

.tabs {
  display: grid; gap: clamp(20px, 3vw, 40px);
  grid-template-columns: minmax(180px, 230px) minmax(0, 1fr);
  align-items: start;
}
.tab-list {
  display: flex; flex-direction: column;
  border-left: 2px solid var(--line);
}
.tab-label {
  font-family: var(--font-heading); font-size: 1rem; font-weight: 600;
  text-align: left; color: var(--ink);
  background: none; border: 0; border-left: 3px solid transparent;
  margin-left: -2px; padding: 16px 18px; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
  min-height: 48px;
}
.tab-label:hover { color: var(--accent); }
.tab-label[aria-selected="true"] { color: var(--accent); border-left-color: var(--accent); }

.tab-panels {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(20px, 2.6vw, 32px);
}
.tab-panel {
  display: grid; gap: clamp(20px, 3vw, 36px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}
.tab-panel[hidden] { display: none; }
.tab-media img { border-radius: var(--radius); width: 100%; }
.tab-body h3 { margin-bottom: 0.6em; }
.tab-body .ticks { margin-block: 18px; }

@media (max-width: 860px) {
  .tabs { grid-template-columns: 1fr; }
  .tab-list { flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 2px solid var(--line); }
  .tab-label { border-left: 0; border-bottom: 3px solid transparent; margin: 0 0 -2px; white-space: nowrap; }
  .tab-label[aria-selected="true"] { border-left-color: transparent; border-bottom-color: var(--accent); }
  .tab-panel { grid-template-columns: 1fr; }
}

/* ── FAQ ─────────────────────────────────────────────────────────────────── */

.faq { display: grid; gap: 12px; }
.faq details {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 52px 18px 22px; position: relative;
  font-family: var(--font-heading); font-weight: 600; color: var(--ink); font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 1rem; line-height: 1;
}
.faq details[open] summary::after { content: '–'; }
.faq .faq-body { padding: 0 22px 20px; font-size: 0.95rem; }

/* ── CTA band ────────────────────────────────────────────────────────────── */

.cta-band { background: var(--yellow); }
.cta-band .wrap {
  display: grid; gap: 24px; align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-block: clamp(36px, 5vw, 60px);
}
.cta-band h2 { margin-bottom: 0.3em; }
.cta-band p { color: var(--ink-soft); margin: 0; max-width: 62ch; }

/* ── article ─────────────────────────────────────────────────────────────── */

.article { padding-block: clamp(40px, 6vw, 72px); }
.article-inner { max-width: 760px; margin-inline: auto; }
.article-inner h1 { margin-bottom: 0.6em; }
.article-inner img { border-radius: var(--radius); margin-block: 1.6em; }
.article-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 2em; }

.post-list { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
.post-list a {
  display: block; padding: 22px 24px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); font-family: var(--font-heading); font-weight: 600;
}
.post-list a:hover { border-color: var(--accent); text-decoration: none; }
.post-list h2 { font-size: 1.2rem; margin: 0; letter-spacing: -0.01em; }
.post-excerpt {
  display: block; margin-top: 8px;
  font-family: var(--font-body); font-weight: 400; font-size: 0.93rem;
  line-height: 1.65; color: var(--muted);
}

/* ── footer ──────────────────────────────────────────────────────────────── */

.site-footer { background: var(--ink); color: #ffffffa8; padding-top: clamp(48px, 6vw, 76px); }
.footer-grid {
  display: grid; gap: 34px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  padding-bottom: 44px;
}
.footer-grid h3 {
  color: #fff; font-size: 1rem; margin-bottom: 1.1em;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid a { color: #ffffffa8; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--yellow); text-decoration: none; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.footer-contact .dot { color: var(--accent); flex: none; }

.footer-bottom {
  border-top: 1px solid #ffffff1f;
  display: flex; flex-wrap: wrap; gap: 14px 24px;
  align-items: center; justify-content: space-between;
  padding-block: 22px; font-size: 0.82rem;
}
.footer-bottom img { height: 34px; width: auto; }

/* ── responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .hero-grid, .section-head, .split, .cta-band .wrap { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 28px; }
  .hero-copy p { max-width: none; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
  /* The open menu is a full-width row under the logo, so the header must wrap. */
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav {
    display: none; order: 3; flex-basis: 100%; width: 100%; margin: 0;
    border-top: 1px solid var(--line); padding-top: 10px;
  }
  .site-nav.is-open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-left: 2px solid var(--line);
    border-radius: 0; margin-left: 14px; padding: 0 0 6px;
    display: none;
  }
  .site-nav li.is-open > .submenu { display: block; }
  .site-nav .has-children > a::after { float: right; }
}

@media (max-width: 560px) {
  .topbar .wrap { justify-content: flex-start; gap: 8px 22px; }
  /* [style] matches the span rule's specificity so the stack actually wins. */
  .lead-form .field[style] { grid-column: span 2; }
  .btn { width: 100%; }
  .hero-actions .btn { width: auto; flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
