/* PHP Rescue: Version Shift look, Calm Check enquiry flow. Source design: docs/design/PHP Rescue.me Homepage v2.dc.html */

@font-face { font-family: 'Archivo'; src: url('/fonts/Archivo-latin.woff2') format('woff2'); font-weight: 400 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/JetBrainsMono-latin.woff2') format('woff2'); font-weight: 400 600; font-display: swap; }

:root {
  --ink: #111; --orange: #e8572a; --paper: #f3f2ee; --grey: #a8a59c;
  --muted: #5d5b55; --body: #3d3b36; --line: #e4e2db; --input: #c9c7bf;
  --rust: #b8401a; --rust-dark: #8a2f12; --peach: #fde6dc; --error: #a8361d;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --pad: clamp(18px, 2.4vw, 28px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Archivo', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--rust); }
input, textarea, select, button { font-family: inherit; }
::selection { background: var(--orange); color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
[hidden] { display: none !important; }
@keyframes prspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation-duration: 2s !important; } }

.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 { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 20; }
.skip:focus { top: 8px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: clamp(16px, 4vw, 40px); padding-right: clamp(16px, 4vw, 40px); }
.section { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(48px, 7vw, 96px); display: flex; flex-direction: column; gap: 32px; }
.anchor { scroll-margin-top: 70px; }
.mono-label { font-family: var(--mono); font-size: 12px; color: #6d6a62; }
.accent-dark { color: var(--rust); font-weight: 600; }
.err-label { color: var(--error); font-weight: 600; }
.muted { color: var(--muted); }
.ink { color: var(--ink); }
.small { font-size: 13px; line-height: 1.45; margin: 0; }
.big-h { margin: 0; font-weight: 900; font-stretch: 80%; font-size: clamp(36px, 5vw, 64px); line-height: .95; text-transform: uppercase; letter-spacing: -0.02em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(243,242,238,.94); backdrop-filter: blur(8px); border-bottom: 1px solid #dddbd3; }
.header-inner { padding-top: 14px; padding-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
/* Wordmark per docs/design/PHP Rescue.me Logo.dc.html: square dot 0.19 of the type size, on the baseline */
.wordmark { text-decoration: none; display: flex; align-items: baseline; font-weight: 900; font-stretch: 112%; font-size: 21px; letter-spacing: -0.025em; line-height: 1; color: var(--ink); white-space: nowrap; }
.wordmark .dot { display: inline-block; width: .19em; height: .19em; background: var(--orange); margin: 0 .05em 0 .07em; }
.wordmark .me { font-weight: 500; color: var(--orange); }
.wordmark-light { color: var(--paper); font-size: 22px; }
.main-nav { display: flex; gap: 26px; font-size: 14px; font-weight: 600; flex-wrap: wrap; }
.main-nav a { text-decoration: none; }
@media (max-width: 860px) { .main-nav { display: none; } }
.btn-dark { border: 0; background: var(--ink); color: var(--paper); font-weight: 800; font-size: 14px; padding: 11px 16px; cursor: pointer; text-decoration: none; white-space: nowrap; display: inline-block; }
.btn-dark:hover { background: var(--orange); color: var(--ink); }
.btn-lg { font-size: 18px; padding: 18px 24px; }
/* The header button shows only while the form is at least partly out of view (enquiry.js) */
.header-cta { transition: opacity .2s, visibility .2s; }
.header-cta.is-hidden { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .header-cta { transition: none; } }
/* Under 400px the header button can't fit beside the wordmark; the form is right below the hero anyway */
@media (max-width: 399px) { .header-cta { display: none; } }

/* Hero */
.hero { padding-top: clamp(28px, 5vw, 64px); padding-bottom: clamp(40px, 6vw, 80px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: clamp(28px, 4vw, 56px); align-items: start; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.versions { display: flex; gap: clamp(10px, 2vw, 18px); align-items: baseline; flex-wrap: wrap; font-family: var(--mono); font-size: clamp(20px, 2.6vw, 30px); color: #8d8a80; }
.versions s { text-decoration-thickness: 3px; }
.versions .arrow { color: var(--ink); }
.versions .new { color: var(--orange); font-weight: 600; }
.hero-h { margin: 0; font-weight: 900; font-stretch: 76%; font-size: clamp(60px, 9.6vw, 128px); line-height: .86; letter-spacing: -0.025em; text-transform: uppercase; }
.accent { color: var(--orange); }
.lede { margin: 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; max-width: 520px; text-wrap: pretty; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 600; }
.ticks li { display: flex; gap: 8px; align-items: center; }
.ticks li::before { content: ''; width: 8px; height: 8px; background: var(--orange); }
@media (max-width: 719px) { .ticks { display: none; } }

/* Enquiry panel */
.panel { scroll-margin-top: 90px; background: #fff; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); min-width: 0; outline: none; }
.pad { padding: 18px var(--pad) var(--pad); display: flex; flex-direction: column; gap: 18px; }
.pad-lg { padding: clamp(22px, 3vw, 34px); display: flex; flex-direction: column; gap: 14px; }
.panel-h { order: -3; margin: 0; font-weight: 800; font-size: 24px; line-height: 1.15; letter-spacing: -0.01em; }
.step-head { display: flex; flex-direction: column; gap: 6px; }
.step-head p { margin: 0; font-size: 14px; line-height: 1.45; }
.progress { padding: 18px var(--pad) 0; display: flex; flex-direction: column; gap: 8px; }
.progress-text { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.bars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.bars i { height: 4px; background: var(--line); }
.bars i.on { background: var(--orange); }

/* Steps: without JS everything shows as one long form; with JS one step at a time */
.js .step:not(.is-active) { display: none; }
.js .panel.is-done #enquiry .step { display: none; }
html:not(.js) .js-only { display: none !important; }
html:not(.js) .panel.is-done form { display: none; }
html:not(.js) .msg { display: none; }
html:not(.js) .panel:has(#message:target) #enquiry,
html:not(.js) .panel.show-msg #enquiry { display: none; }
html:not(.js) .panel:has(#message:target) .msg,
html:not(.js) .panel.show-msg .msg { display: block; }
html:not(.js) #enquiry .step + .step { border-top: 1px solid var(--line); }

.routes { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; order: -2; }
.route { cursor: pointer; display: flex; }
.route input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.route-box { flex: 1; text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; min-height: 64px; border: 1.5px solid var(--input); background: #fff; color: var(--ink); }
.route-box b { font-weight: 800; font-size: 15px; line-height: 1.2; }
.route-box span { font-size: 12px; line-height: 1.3; color: var(--muted); }
.route input:checked + .route-box { border: 2px solid var(--ink); background: #fff1ea; box-shadow: inset 4px 0 0 var(--orange); }
.route input:focus-visible + .route-box { outline: 3px solid var(--orange); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label { font-weight: 700; font-size: 14px; }
.opt-label { font-weight: 400; color: var(--muted); }
.field input:not([type=checkbox]), .field textarea, .q input[type=text], .q input:not([type]) { border: 1.5px solid var(--input); padding: 12px; font-size: 16px; line-height: 1.5; width: 100%; min-height: 48px; resize: vertical; background: #fff; color: var(--ink); border-radius: 0; }
.field textarea.mono { font-family: var(--mono); font-size: 14px; }
.field [aria-invalid=true], .q [aria-invalid=true] { border-color: var(--error) !important; background: #fff8f5 !important; }
.hint { font-size: 13px; line-height: 1.45; color: var(--muted); }
.err { font-size: 13px; font-weight: 600; color: var(--error); }
.err:empty { display: none; }

/* Website address field: first on the "website" path, after the text box (and optional) on the others */
.js #enquiry[data-route=website] .f-url { order: -1; }
.js #enquiry:not([data-route=website]) #f-url-hint { display: none; }
.js #enquiry[data-route=website] .f-url .opt-label { display: none; }
html:not(.js) .f-url .opt-label::after { content: ' unless you start with a web address'; }

.extracted { background: var(--paper); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.extracted .mono-label { font-size: 11px; color: var(--rust-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { background: var(--peach); color: var(--rust-dark); font-weight: 600; font-size: 13px; padding: 5px 9px; }
.use-domain { align-self: flex-start; border: 1.5px dashed var(--ink); background: #fff; padding: 10px 12px; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; min-height: 44px; color: var(--ink); }
.use-domain code { font-family: var(--mono); }

.btn-go { border: 0; background: var(--orange); color: var(--ink); font-weight: 800; font-size: 17px; padding: 16px 20px; min-height: 54px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; text-align: left; flex: 1; }
.btn-go:hover, .btn-go-sm:hover { background: var(--ink); color: var(--paper); }
.btn-go-sm { border: 0; background: var(--orange); color: var(--ink); font-weight: 800; font-size: 16px; padding: 0 20px; min-height: 52px; cursor: pointer; }
.btn-back { border: 2px solid var(--ink); background: #fff; font-weight: 700; font-size: 15px; padding: 0 18px; min-height: 54px; cursor: pointer; color: var(--ink); }
.btn-outline { align-self: flex-start; border: 2px solid var(--ink); background: none; font-weight: 700; font-size: 14px; padding: 0 14px; min-height: 44px; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.nav-row { display: flex; gap: 10px; align-items: stretch; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.panel-foot { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.link-btn { border: 0; background: none; padding: 8px 0; font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; align-self: flex-start; }

.q { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.q legend { font-weight: 700; font-size: 15px; padding: 0; margin-bottom: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { cursor: pointer; display: flex; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span { padding: 10px 14px; min-height: 44px; font-size: 14px; font-weight: 600; border: 1.5px solid var(--input); background: #fff; color: var(--ink); display: flex; align-items: center; }
.opt input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.opt input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }

.category { background: var(--ink); color: var(--paper); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.category .mono-label { font-size: 11px; color: #f0835e; }
.category-name { font-weight: 800; font-size: 21px; font-stretch: 90%; }
.category-why { font-size: 13px; line-height: 1.45; color: #c9c6bd; }
.review { margin: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.review > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.review dt { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.review dd { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.review button { grid-row: span 2; border: 0; background: none; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink); padding: 10px 0 10px 8px; }
.tag { font-family: var(--mono); font-size: 10px; font-weight: 600; padding: 2px 6px; text-transform: uppercase; letter-spacing: .02em; }
.tag-told { background: #eeede8; color: var(--body); }
.tag-message { background: var(--peach); color: var(--rust-dark); }
.tag-unknown { border: 1px dashed #8d8a80; color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; font-weight: 400 !important; }
.consent input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--orange); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg .step { padding-top: var(--pad); }

.sending { padding: clamp(40px, 6vw, 72px) 28px; flex-direction: column; gap: 16px; align-items: center; text-align: center; }
.sending.is-active { display: flex; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: prspin .8s linear infinite; }
.sending-text { font-weight: 700; font-size: 17px; }
.error-h { margin: 0; font-weight: 800; font-size: 26px; line-height: 1.1; }
.error-p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--body); }
.pad-lg .err-label { font-size: 11px; }

.done-pad { padding: clamp(22px, 3vw, 34px); gap: 18px; }
.ref { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ref i { width: 14px; height: 14px; background: var(--orange); }
.done-h { margin: 0; font-weight: 900; font-stretch: 80%; font-size: 44px; line-height: .92; text-transform: uppercase; letter-spacing: -0.02em; }
.done-thanks { margin: 0; font-size: 16px; line-height: 1.5; }
.done-thanks b { overflow-wrap: anywhere; }
.next { margin: 0; padding: 16px 0 0; list-style: none; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); }
.next li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; font-size: 15px; line-height: 1.45; }
.next li span:first-child { font-family: var(--mono); color: var(--rust); font-weight: 600; }

/* Problem */
.dark { background: #161616; color: var(--paper); }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 2px; background: #333; border: 2px solid #333; }
.quotes > div { background: #161616; padding: 24px; display: flex; flex-direction: column; gap: 14px; justify-content: space-between; }
.quotes p { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 600; }
.quotes span { font-family: var(--mono); font-size: 12px; color: #f0835e; }
.dark-p { margin: 0; font-size: 18px; line-height: 1.5; color: #c9c6bd; max-width: 640px; }

/* Services */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.service { background: #fff; border: 2px solid var(--ink); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.service-top { display: flex; justify-content: space-between; align-items: baseline; }
.service h3 { margin: 0; font-weight: 800; font-size: 26px; font-stretch: 90%; line-height: 1.05; }
.service p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--body); flex: 1; }
.service-cta { align-self: flex-start; font-weight: 800; font-size: 15px; text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* How */
.how { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: #fff; }
.how .section { gap: 36px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 28px; }
.steps li { display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--ink); padding-top: 16px; }
.steps li.last { border-top-color: var(--orange); }
.steps span { font-family: var(--mono); font-size: 14px; color: var(--rust); font-weight: 600; }
.steps h3 { margin: 0; font-weight: 800; font-size: 21px; }
.steps p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--body); }

/* Why */
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(28px, 5vw, 64px); align-items: start; }
.why-copy { display: flex; flex-direction: column; gap: 18px; }
.why-copy p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--body); max-width: 460px; }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); border-top: 2px solid var(--ink); }
.why-list li { padding: 16px 16px 16px 0; border-bottom: 1px solid #d6d4cc; display: flex; gap: 12px; font-size: 16px; font-weight: 600; }
.why-list li::before { content: ''; width: 10px; height: 10px; background: var(--orange); flex: none; margin-top: 6px; }

/* Trust */
.trust { background: #e9e7e0; }
.trust-inner { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 28px; }
.trust h2 { margin: 0; font-weight: 800; font-size: 26px; line-height: 1.1; font-stretch: 90%; }
.trust-inner > div { display: flex; flex-direction: column; gap: 6px; }
.trust h3 { margin: 0; font-weight: 800; font-size: 16px; }
.trust p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--body); }

/* Agencies */
.agencies { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); }
.agencies-box { border: 2px solid var(--ink); padding: clamp(20px, 3vw, 32px); display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.agencies-box > div { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.agencies h2 { margin: 0; font-weight: 800; font-size: 24px; line-height: 1.15; }
.strong-link { font-weight: 800; font-size: 15px; text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* Final CTA */
.final { background: var(--orange); color: var(--ink); }
.final-inner { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(56px, 8vw, 112px); display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.final h2 { margin: 0; font-weight: 900; font-stretch: 76%; font-size: clamp(48px, 8vw, 112px); line-height: .88; text-transform: uppercase; letter-spacing: -0.025em; max-width: 1000px; }
.final p { margin: 0; font-size: clamp(18px, 1.8vw, 22px); font-weight: 600; }
.final .btn-dark:hover { background: #fff; color: var(--ink); }

/* Footer */
.site-footer { scroll-margin-top: 70px; background: var(--ink); color: #c9c6bd; }
.footer-inner { padding-top: clamp(40px, 6vw, 72px); padding-bottom: 28px; display: flex; flex-direction: column; gap: 40px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 32px; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand p { margin: 0; font-size: 14px; line-height: 1.5; }
.footer-list { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--paper); }
.footer-list .mono-label { font-size: 11px; color: #8d8a80; }
.footer-list a { color: var(--paper); text-decoration: none; }
.footer-list a:hover { color: #f0835e; }
.legal { border-top: 1px solid #333; padding-top: 20px; font-size: 12px; line-height: 1.6; color: #8d8a80; }

/* Privacy and other text pages */
.prose { max-width: 760px; font-size: 17px; line-height: 1.6; }
.prose p { margin: 0; }
