/* Steady Sterling Builds. Colours match the shop palette. */

:root {
  --page-bg: #F3EDE3;
  --page-bg-alt: #ebe4d8;
  --card-bg: #FFFBF5;
  --text: #2B4538;
  --text-muted: #3d5548;
  --brand: #2B4538;
  --on-brand: #F3EDE3;
  --highlight: #C98474;
  --tint: #efe6d8;
  --border: #c9c0b3;
  --error: #8a2f24;
  --focus: #2B4538;
  --footer-bg: #2B4538;
  --footer-text: #F3EDE3;
  --sage: #7A8D7C;
  --font-headings: "Source Serif Pro", "Source Serif 4", Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-body: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(43 69 56 / 8%), 0 6px 20px rgb(43 69 56 / 6%);
}

* { box-sizing: border-box; }

html { scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font: 1.0625rem/1.6 var(--font-body);
}

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

h1, h2, h3 {
  font-family: var(--font-headings);
  line-height: 1.15;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.2rem); }
h2 { font-size: clamp(1.55rem, 1.25rem + 1.3vw, 2.15rem); }
h3 { font-size: 1.25rem; }

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

a { color: var(--brand); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus { outline: none; }

.wrap {
  width: min(100% - 2.5rem, 70rem);
  margin-inline: auto;
}

.visually-hidden,
.honeypot {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--brand);
  color: var(--on-brand);
  border-radius: 0 0 8px 8px;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

.button {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border: 2px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { filter: brightness(1.12); }
.button-quiet { background: transparent; color: var(--brand); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--page-bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 0.55rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
}
.brand img { width: auto; height: 2.35rem; }
.brand-text { display: flex; flex-direction: column; gap: 0.05rem; }
.brand-name { font: 700 0.7rem/1.1 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; }
.brand-offer { font: 600 0.95rem/1.2 var(--font-headings); }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-list a {
  display: block;
  padding: 0.45rem 0.6rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
}
.nav-list a:hover { color: var(--brand); text-decoration: underline; }

@media (max-width: 40rem) {
  .site-header { position: static; }
  html { scroll-padding-top: 1rem; }
  .header-inner { justify-content: center; }
  .nav-list { justify-content: center; }
}

.hero { padding-block: 3rem 3.25rem; }
.lede { font-size: 1.2rem; color: var(--text-muted); max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }

.section { padding-block: 3.5rem; }
.section-alt { background: var(--page-bg-alt); }
.section-intro { color: var(--text-muted); max-width: 42rem; margin-bottom: 2rem; }

.split {
  display: grid;
  gap: 2.25rem;
}
@media (min-width: 50rem) {
  .split { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 3rem; }
}

.stack { margin: 0; padding: 0; list-style: none; }
.stack li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.45rem;
}
.stack li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--highlight);
}

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.5rem 3.25rem;
  border-left: 2px solid var(--border);
  margin-left: 0.7rem;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -0.85rem;
  top: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font: 700 0.9rem/1.7rem var(--font-body);
  text-align: center;
}
.steps strong { display: block; font-family: var(--font-headings); font-size: 1.15rem; margin-bottom: 0.2rem; }

.price-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 44rem) {
  .price-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.price-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.35rem 1.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.price-card h3 { margin: 0; }
.price { font: 700 1.85rem/1.1 var(--font-headings); color: var(--text); }
.price-card p { color: var(--text-muted); }

.note {
  background: var(--tint);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-top: 1.5rem;
  max-width: 50rem;
}

.portfolio-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 52rem) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
}
.portfolio-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.portfolio-shots {
  display: grid;
  gap: 0;
  background: var(--tint);
}
.portfolio-shots img { width: 100%; height: auto; }
.portfolio-card .caption { padding: 1.15rem 1.25rem 1.3rem; }
.portfolio-card h3 { margin-bottom: 0.35rem; }

.brief-form,
.legal-prose {
  max-width: 42rem;
}

.field { margin-bottom: 1.15rem; }
.field label, .check label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--error); }
.hint { margin: 0.35rem 0 0; color: var(--text-muted); font-size: 0.95rem; }
.error { margin: 0.35rem 0 0; color: var(--error); font-weight: 600; font-size: 0.95rem; }

.check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.check input { margin-top: 0.3rem; flex: none; width: 1.15rem; height: 1.15rem; accent-color: var(--brand); }
.check label { font-weight: 500; margin: 0; }
.check[aria-invalid="true"] label { color: var(--error); }

.form-status:empty { display: none; }
.form-status {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--brand);
  background: var(--tint);
  border-radius: 0 8px 8px 0;
}
.form-status.is-error { border-left-color: var(--error); }

.legal-prose h2 { margin-top: 1.75rem; }
.legal-prose h1 + p, .legal-prose h2 + p { /* first paras under headings */ }
.page-hero { padding-block: 2.5rem 0.5rem; }

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding-block: 2.25rem;
  margin-top: 0;
}
.site-footer address { font-style: normal; }
.site-footer a { color: inherit; }
.footer-inner { display: grid; gap: 1rem; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.footer-note { color: color-mix(in srgb, var(--footer-text) 80%, transparent); font-size: 0.95rem; }
@media (min-width: 50rem) {
  .footer-inner { grid-template-columns: 1.4fr 1fr; }
  .footer-note { grid-column: 1 / -1; }
}

.not-found { padding-block: 4rem; max-width: 36rem; }

.eyebrow {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.follow-on { margin: 2rem 0 0; max-width: 42rem; }
.not-official { font-size: 0.9375rem; font-weight: 600; }
.service-faq h4 { margin: 1.5rem 0 0.25rem; font-size: 1.05rem; }
.price-group { margin-top: 2.25rem; }
#questions { margin-top: 2.75rem; }

/* Templates page */
.template-list { padding-top: 1.5rem; }
.template-card h2 { font-size: 1.25rem; margin: 0; }
.template-card .price { margin: 0; font-size: 1.5rem; }
.template-card .check { margin: auto 0 0.25rem; padding-top: 0.5rem; }
.template-card .check label { font-size: 0.95rem; }
.template-card .buy-button { align-self: flex-start; }
.template-card .buy-form {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.template-card .buy-form .check { margin: 0 0 0.25rem; }
/* Buy stays greyed out until the consent box is ticked, with or without JavaScript. */
.buy-button[disabled],
.buy-button[aria-disabled="true"],
.buy-form:has(.consent:not(:checked)) .buy-button {
  background: transparent;
  color: var(--text-muted);
  border-style: dashed;
  border-color: var(--text-muted);
  cursor: not-allowed;
  filter: none;
}

.template-card .template-compat,
.template-card .template-files {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}
.spacer-footer { height: 3rem; }

/* Spreadsheet add-on page */
.addon-hero { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.addon-hero > div { flex: 1 1 22rem; }
.addon-icon { width: 96px; height: 96px; flex: none; }
.addon-tiers .split { margin-bottom: 0.5rem; }
.addon-tiers .price-card h3, .addon-buy .price { margin: 0; }
.addon-buy { max-width: 42rem; }
.addon-buy .buy-button { align-self: flex-start; }
.addon-buy .buy-form { display: flex; flex-direction: column; gap: 0.5rem; }
.addon-buy .buy-form .check, .addon-buy > .check { margin: 0.5rem 0 0.25rem; }
.licence-key code { display: block; padding: 0.75rem 1rem; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; overflow-wrap: anywhere; }
