/* herefordshire-software.co.uk: a light, plain business page with a countryside hero (layout from Ryan's mockup). */

@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }

:root {
  --ink: #1c2420;
  --text: #2b332e;
  --muted: #56615a;
  --rule: #dfe3de;
  --green: #234a31;
  --green-dark: #173322;
  --tint: #e6f0e3;
  --card: #f2f3ee;
  --focus: #0a7bd6;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --wrap: 58rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--text); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.55; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.5rem; }

h1, h2, h3 { color: var(--ink); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 3.6rem); font-weight: 800; margin-bottom: 1rem; color: var(--green-dark); }
h2 { font-size: clamp(1.55rem, 1.3rem + 1vw, 2rem); font-weight: 750; margin-bottom: 0.6rem; }
h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.2rem; }
p { margin: 0 0 0.75rem; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--green-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgb(255 255 255 / 0.96); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; min-height: 3.2rem; }
.brand { font-weight: 800; font-size: 1.35rem; color: var(--green); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand-sub { font-weight: 500; font-size: 0.85rem; letter-spacing: 0; color: var(--muted); margin-left: 0.35rem; }
.site-header nav { display: flex; gap: 1.8rem; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; padding-block: 0.3rem; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { border-bottom-color: var(--green); }

/* Hero: text on the left, the landscape fading in from the right. */
.hero { position: relative; overflow: hidden; background: #f7f8f4; }
.hero-image {
  position: absolute; inset: 0 0 0 auto; width: 62%; height: 100%; object-fit: cover; object-position: 30% 55%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgb(0 0 0 / 0.35) 22%, #000 48%);
          mask-image: linear-gradient(to right, transparent 0%, rgb(0 0 0 / 0.35) 22%, #000 48%);
}
.hero-inner { position: relative; padding-block: 2rem 2.2rem; }
.hero-inner > * { max-width: 27rem; }
.hero p { color: var(--ink); }
.cta { margin-top: 1.4rem; }

.button {
  display: inline-block; padding: 0.75rem 1.5rem;
  background: var(--green); color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem;
  text-decoration: none; border: 0; border-radius: 6px; cursor: pointer;
}
.button:hover { background: var(--green-dark); color: #fff; }
.button:disabled { opacity: 0.6; cursor: not-allowed; }
.button-wide { display: block; width: 100%; margin-top: 0.4rem; }

/* Sections */
.section { padding-block: 2rem; }
.ruled { border-top: 1px solid var(--rule); }
.lead { max-width: 52rem; font-size: 1.1rem; }

.needs { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 2rem 2.5rem; }
.needs li { display: flex; gap: 1.4rem; align-items: flex-start; }
.needs p { margin: 0; font-size: 0.98rem; }
.icon { flex: none; display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 8px; background: var(--tint); }
.icon svg { width: 2rem; height: 2rem; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Enquiry form */
#contact { scroll-margin-top: 4rem; }
#contact:focus { outline: none; }
.form-card { background: var(--card); border-radius: 10px; padding: 1.6rem 1.6rem 1.2rem; }
.chat-form { position: relative; }
.chat-form label { display: block; margin: 1rem 0 0.35rem; font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.chat-form input, .chat-form textarea {
  display: block; width: 100%; padding: 0.6rem 0.7rem;
  font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1px solid #b8c0bb; border-radius: 6px;
}
.chat-form textarea { resize: vertical; min-height: 5rem; }
.chat-form input:focus-visible, .chat-form textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Turnstile only shows when it needs a tick ('interaction-only'), so reserve no space for it. */
.turnstile { margin-top: 0.6rem; }
.turnstile:empty { display: none; }
.chat-status { min-height: 1.4em; margin: 0.5rem 0; font-size: 0.95rem; }
/* A problem with one field, shown right under it. */
.field-error { color: #9a2a1f; font-size: 0.92rem; margin: 0.35rem 0 0; }
.chat-form [aria-invalid="true"] { border-color: #9a2a1f; box-shadow: 0 0 0 1px #9a2a1f; }
.chat-status.sent { color: var(--green); font-weight: 700; }
.chat-status.check, .chat-status.retry, .chat-status.failed { color: #9a2a1f; }
.or-email { text-align: center; margin: 1rem 0 0.4rem; }
/* After a successful send: only the heading and the thank-you remain. */
.form-card.is-sent > :not(h2):not(.chat-sent) { display: none; }
.chat-sent { font-size: 1.2rem; font-weight: 700; color: var(--green); margin: 0.4rem 0 0.6rem; }
.chat-sent:focus { outline: none; }
.hint { color: var(--muted); font-size: 0.88rem; margin: 0.4rem 0 0; }
.privacy-note { text-align: center; }

.strong-link { font-weight: 700; }

.colophon { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.88rem; padding-block: 1rem 2.5rem; margin-top: 1rem; }

/* Inner pages (privacy): a light title band like the hero, then a reading column. */
.page-intro { background: #f7f8f4; border-bottom: 1px solid var(--rule); }
.page-intro .wrap { padding-block: 2.2rem 1.8rem; }
.page-intro p { max-width: 40rem; color: var(--ink); }
.prose { max-width: var(--wrap); }
.prose > * { max-width: 44rem; }
.prose ul { padding-left: 1.2rem; margin: 0.4rem 0 1.4rem; }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--green); }

/* Phones: the image moves above the text so the words stay readable. */
@media (max-width: 44rem) {
  .brand-sub { display: none; }
  .header-inner { flex-wrap: nowrap; }
  .brand { font-size: 1.2rem; }
  .site-header nav { gap: 1rem; }
  .site-header nav a { font-size: 0.9rem; }
  .hero-image { position: relative; inset: auto; width: 100%; height: 12rem; -webkit-mask-image: none; mask-image: none; display: block; }
  .hero-inner > * { max-width: none; }
  .icon { width: 3rem; height: 3rem; }
  .icon svg { width: 1.6rem; height: 1.6rem; }
  .form-card { padding: 1.2rem 1rem 1rem; }
}



/* Shown only while the page still holds placeholder copy. */
.placeholder-badge { display: none; }
body:has([data-placeholder]) .placeholder-badge {
  display: block; position: fixed; bottom: 0.6rem; right: 0.6rem; z-index: 10; margin: 0;
  padding: 0.2rem 0.55rem; background: #b3261e; color: #fff;
  font: 700 0.7rem/1.4 var(--sans); letter-spacing: 0.08em; border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
