/* ==========================================================================
   SJF Property Developments. Colours taken from the logo:
   charcoal background (#2B2B2B) and pink roof (#E888B0).
   At Sam's request the whole site sits on the logo charcoal (no white
   sections). Cards use a slightly lifted charcoal (--card) with a fine border.
   Contrast on --bg in brackets. Fixed dark scheme: no automatic switching.
   ========================================================================== */
:root {
  --bg: #2B2B2B;          /* page background: logo charcoal */
  --surface: #2B2B2B;     /* "alt" sections: same charcoal, kept as a hook */
  --card: #343434;        /* cards, form, photo frames */
  --text: #FFFFFF;        /* body text (14.2:1; 12.4:1 on --card) */
  --muted: #C9C3C6;       /* secondary text (8.2:1; 7.2:1 on --card) */
  --line: #4F4B4D;        /* borders and dividers */
  --input-line: #8F898C;  /* form field borders (3.6:1 on --card) */
  --charcoal: #2B2B2B;    /* logo background: header, dark sections, buttons (14.2:1 with white) */
  --on-charcoal: #FFFFFF;
  --soft-on-charcoal: #C9C3C6; /* secondary text on charcoal (8.2:1) */
  --pink: #E888B0;        /* logo roof: fills, links and highlights (5.8:1; 5.1:1 on --card) */
  --on-pink: #2B2B2B;     /* text on pink (5.8:1) */
  --pink-ink: #E888B0;    /* links: same pink now everything is on charcoal */
  --whatsapp: #25D366;    /* WhatsApp fill, with --wa-text (8:1) */
  --wa-text: #1F2328;
  --focus: #FFFFFF;       /* keyboard focus ring */
  --error: #FF9C9C;       /* form error text (6.2:1 on --card) */
  --ok: #8FE0A8;          /* form success text (7.9:1 on --card) */
  --placeholder-bg: #FFF1B8; /* [CONFIRM ...] highlight, always with dark text */
  --placeholder-text: #222222;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 8px;
  --wrap: 1140px;
  --bar-h: 64px;          /* fixed Call / WhatsApp bar on mobile */
  color-scheme: dark;     /* native controls and scrollbars match the charcoal; fixed, not automatic */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.8vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: 65ch; }
a { color: var(--pink-ink); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.dark :focus-visible, .site-header :focus-visible, footer :focus-visible { outline-color: #FFFFFF; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--bg); padding: 8px 12px; }
.ph { background: var(--placeholder-bg); color: var(--placeholder-text); padding: 0 .2em; border-radius: 3px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Spaced capitals, as in "PROPERTY DEVELOPMENTS" under the logo */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.dark .eyebrow { color: var(--pink); }
/* Roof line from the logo, used as a small marker */
.roof { width: 28px; height: 14px; flex: none; fill: none; stroke: var(--pink); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: var(--radius); border: 2px solid var(--pink); background: var(--pink); color: var(--on-pink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-line { background: transparent; color: var(--on-charcoal); border-color: var(--on-charcoal); }
.btn-pink { background: var(--pink); border-color: var(--pink); color: var(--on-pink); }
.btn-wa { background: var(--whatsapp); border-color: var(--whatsapp); color: var(--wa-text); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--pink-ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* Header: charcoal like the logo. Sticky, so the menu stays in reach. The preview banner sits above it and scrolls away. */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--charcoal); color: var(--on-charcoal); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-charcoal); text-decoration: none; margin-right: auto; min-width: 0; }
.brand img { width: 48px; height: 48px; border-radius: 6px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; font-weight: 800; font-size: 1.05rem; }
.brand-name small { font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--pink); }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.primary-nav a { display: block; padding: 10px 12px; border-radius: 6px; text-decoration: none; color: var(--on-charcoal); font-weight: 700; font-size: .95rem; }
.primary-nav a:hover { background: rgba(255,255,255,.1); }
.primary-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--pink); }
.btn-call { padding: 8px 16px; min-height: 44px; }
.menu-toggle { display: none; min-width: 44px; min-height: 44px; border-radius: 6px; border: 1px solid rgba(255,255,255,.4); background: transparent; color: var(--on-charcoal); cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; }
@media (max-width: 980px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-header .btn-call { display: none; } /* the fixed bar at the bottom has Call and WhatsApp */
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--charcoal); border-top: 1px solid rgba(255,255,255,.2); padding: 8px 20px 16px; max-height: calc(100vh - 68px); overflow-y: auto; }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; }
  .primary-nav a { padding: 14px 8px; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.15); border-radius: 0; min-height: 52px; }
  .primary-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--pink); padding-left: 16px; }
}
@media (max-width: 360px) { .brand-name { font-size: .95rem; } .brand-name small { font-size: .62rem; letter-spacing: .1em; } }

/* Fixed Call / WhatsApp bar on mobile */
.quick-bar { display: none; }
@media (max-width: 980px) {
  .quick-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--charcoal); box-shadow: 0 -6px 18px rgba(0,0,0,.18); }
  .quick-bar .btn { min-height: 48px; padding: 8px 10px; }
  /* Tucked away while the page's own Call / WhatsApp buttons are on screen (see site.js) */
  .quick-bar { transition: transform .25s ease, visibility .25s; }
  .quick-bar.tucked { transform: translateY(100%); visibility: hidden; box-shadow: none; }
}

/* Sections. Every section sets its background explicitly. */
section { padding: 56px 0; background: var(--bg); }
section.alt { background: var(--surface); }
/* Everything is one colour, so a fine rule marks where one section ends and the next starts */
main > * + * { border-top: 1px solid var(--line); }
section.dark, .dark { background: var(--charcoal); color: var(--on-charcoal); }
.dark a:not(.btn) { color: var(--pink); }
.dark .lede, .dark .muted { color: var(--soft-on-charcoal); }
.lede { font-size: 1.15rem; color: var(--muted); }
.muted { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.section-head p { margin: 0; }

/* Hero */
/* Background: Sam's finished sage kitchen under an 85% charcoal tint. Worst case (a pure white
   pixel under the tint) gives #4B4B4B: white 8.7:1, --soft-on-charcoal 5.0:1. Pink only reaches
   3.6:1 there, so the hero's small pink text switches to white. Lighter towards the right on
   desktop, where the job card covers the photo anyway. */
.hero { padding: 40px 0 48px; background-color: var(--charcoal); background-image: linear-gradient(rgba(43,43,43,.85), rgba(43,43,43,.85)), url("/images/work/kitchen-sage-finished-600.webp"); background-size: cover; background-position: center 55%; }
@media (min-width: 900px) { .hero { background-image: linear-gradient(90deg, rgba(43,43,43,.88) 0%, rgba(43,43,43,.85) 55%, rgba(43,43,43,.7) 100%), url("/images/work/kitchen-sage-finished-960.webp"); } }
.hero .eyebrow, .hero .area a { color: var(--on-charcoal); }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 48px; } .hero { padding: 64px 0; } }
.hero h1 { margin-bottom: .4em; }
.hero .area { display: flex; align-items: center; gap: 8px; margin-top: 20px; font-size: .95rem; color: var(--soft-on-charcoal); }
.page-head { padding: 40px 0 36px; }
.page-head h1 { margin-bottom: .3em; }
.page-head p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Job files: the site's distinctive element. Each job shows its stages
   (before, strip-out, fitting, finished) on one photo frame; tap a stage,
   or tap the photo to step through. Frames have a capped height so they
   don't balloon on wide single-column layouts.
   ========================================================================== */
.jobs { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .jobs { grid-template-columns: 1fr 1fr; } }
.job { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.job-head { padding: 16px 18px 12px; }
.job-head h3 { margin: 0 0 2px; }
.job-head p { margin: 0; font-size: .95rem; color: var(--muted); }
.job-frame { position: relative; aspect-ratio: 3 / 4; max-height: 560px; width: 100%; background: var(--bg); overflow: hidden; cursor: pointer; }
.job-frame.wide { aspect-ratio: 4 / 3; }
.job-frame.mid { aspect-ratio: 4 / 5; }
.job-frame img { width: 100%; height: 100%; object-fit: cover; }
.job-frame img[hidden] { display: none; }
.job-frame .tag { position: absolute; left: 12px; top: 12px; background: var(--charcoal); color: var(--on-charcoal); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 6px 10px; border-radius: 6px; }
.job-frame .tag::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); margin-right: 8px; vertical-align: 1px; }
.job-frame .count { position: absolute; right: 12px; bottom: 12px; background: rgba(43,43,43,.85); color: #FFFFFF; font-size: .8rem; padding: 4px 10px; border-radius: 99px; }
/* Left and right arrows on the photo (added by site.js). White ring keeps them visible on dark photos. */
.frame-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 2px solid #FFFFFF; background: rgba(43,43,43,.85); color: #FFFFFF; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.frame-arrow.prev { left: 10px; }
.frame-arrow.next { right: 10px; }
.frame-arrow svg { width: 22px; height: 22px; }
.frame-arrow:hover { background: var(--charcoal); }
.frame-arrow:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; }
/* Stage track: numbered steps joined by a line, filled pink up to the current stage */
.stages { list-style: none; margin: 0; padding: 14px 10px 6px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative; }
.stages li { position: relative; display: flex; justify-content: center; }
.stages li + li::before { content: ""; position: absolute; top: 25px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.stages li.done::before, .stages li.current::before { background: var(--pink); }
.stage-btn { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 44px; width: 100%; padding: 4px 2px; background: none; border: 0; font: inherit; color: var(--muted); font-size: .85rem; font-weight: 700; cursor: pointer; line-height: 1.2; }
/* Jobs with 6+ stages: smaller labels on phones so neighbouring labels don't touch */
@media (max-width: 480px) { .stages li:first-child:nth-last-child(n+6) .stage-btn, .stages li:first-child:nth-last-child(n+6) ~ li .stage-btn { font-size: .74rem; } }
.stage-btn .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; background: var(--card); border: 3px solid var(--line); color: var(--muted); }
.stage-btn[aria-pressed="true"] { color: var(--text); }
.stage-btn[aria-pressed="true"] .dot, .done .stage-btn .dot { background: var(--pink); border-color: var(--pink); color: var(--on-pink); }
.stage-btn[aria-pressed="true"] .dot { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--text); }
.stage-note { margin: 0; padding: 4px 18px 18px; font-size: .95rem; color: var(--muted); min-height: 3.2em; max-width: none; }

/* Photos from site, no stages */
.onsite { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .onsite { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .onsite { grid-template-columns: repeat(4, 1fr); } }
.onsite figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.onsite img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.onsite figcaption { padding: 8px 10px; font-size: .88rem; color: var(--muted); }

/* Service tiles and service blocks */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 0; padding: 0; list-style: none; }
.tile { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; color: var(--text); text-decoration: none; }
.tile img { width: 72px; height: 72px; border-radius: 6px; object-fit: cover; flex: none; }
.tile strong { display: block; }
.tile span { font-size: .9rem; }
.service { display: grid; gap: 20px; padding: 28px 0; border-top: 1px solid var(--line); }
.service:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 760px) { .service { grid-template-columns: 260px 1fr; gap: 32px; align-items: start; } }
.service img { width: 100%; height: 220px; object-fit: cover; border-radius: var(--radius); }
@media (min-width: 760px) { .service img { height: 300px; } }
/* Keep the lock in view when a landscape photo is cropped narrower */
.service img.crop-left { object-position: 20% 50%; }
/* A line from a real review, next to a service */
.service-quote { margin: 0 0 1em; max-width: 65ch; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--pink); border-radius: var(--radius); padding: 20px; }
.service-quote blockquote { margin: 0 0 10px; font-size: 1.1rem; font-weight: 700; line-height: 1.4; }
.service-quote p { margin: 0; }
.service-quote figcaption { font-size: .9rem; color: var(--muted); }
.service h2 { font-size: 1.5rem; }
.service ul { margin: 0 0 1em; padding-left: 1.2em; }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: s; }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--pink); color: var(--on-pink); font-weight: 800; margin-bottom: 10px; }
.steps h3 { margin-bottom: .3em; }
.steps p { margin: 0; color: var(--muted); }

/* Reviews: copied word for word from Facebook. No stars, as Facebook recommendations don't have them. */
.reviews { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
.review { margin: 0; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--pink); border-radius: 12px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.review-job { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--pink); }
.review blockquote { margin: 0; }
.review blockquote p { margin: 0 0 .7em; }
.review blockquote p:last-child { margin-bottom: 0; }
.review-rest { margin-top: .7em; }
.review-toggle { align-self: flex-start; font-weight: 700; min-height: 44px; margin: -10px 0 -6px; }
.review figcaption { display: flex; flex-direction: column; font-size: .95rem; border-top: 1px solid var(--line); padding-top: 12px; }
.review figcaption span { color: var(--muted); font-size: .88rem; }
.reviews-source { margin: 24px 0 0; }

/* Contact */
.contact-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.contact-card h2 { font-size: 1.3rem; margin: 0; }
.contact-card p { margin: 0; }
.facts { display: grid; gap: 4px 16px; grid-template-columns: max-content 1fr; margin: 0; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
@media (max-width: 420px) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: 8px; } }
.two-col { display: grid; gap: 32px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1.2fr; align-items: start; } }

/* Form */
form { display: grid; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.field { display: grid; gap: 6px; }
label, legend { font-weight: 700; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .95rem; }
input, textarea { font: inherit; color: var(--text); background: var(--bg); width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--input-line); border-radius: 6px; }
textarea { min-height: 140px; resize: vertical; }
fieldset { border: 0; margin: 0; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 6px; }
.choice, .consent { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.choice input, .consent input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--pink); }
.form-status { display: none; font-weight: 700; color: var(--ok); }
.form-status.show { display: block; }
.form-status.err { color: var(--error); }

/* Prose pages (privacy) */
.prose h2 { font-size: 1.3rem; margin-top: 1.6em; }
.draft-flag { background: var(--placeholder-bg); color: var(--placeholder-text); padding: 10px 14px; border-radius: 6px; font-weight: 700; }

/* Footer */
footer { background: var(--charcoal); color: var(--on-charcoal); padding: 40px 0 24px; font-size: .95rem; border-top: 4px solid var(--pink); }
/* Room for the mobile Call / WhatsApp bar below the footer, in the footer's own colour so there's no gap when the bar is hidden */
@media (max-width: 980px) { footer { padding-bottom: calc(24px + var(--bar-h) + env(safe-area-inset-bottom, 0px)); } }
footer a { color: var(--on-charcoal); }
footer h2 { font-size: 1.05rem; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin: 6px 0; }
.foot-social { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
.foot-social svg { width: 20px; height: 20px; flex: none; }
.foot-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.foot-brand img { width: 56px; height: 56px; border-radius: 6px; }
.foot-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.legal { border-top: 1px solid rgba(255,255,255,.25); margin-top: 28px; padding-top: 16px; color: var(--soft-on-charcoal); }
.legal p { max-width: none; }
@media (max-width: 1140px) { .call-label { display: none; } }
