/* TownCall – one stylesheet, mobile first. Fonts are self-hosted: the page makes no third-party requests. */

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f6f1e7;
  --paper-deep: #ece4d5;
  --surface: #fffdf8;
  --line: #d9cfbd;
  --ink: #1c2422;
  --ink-soft: #48524e;
  --teal: #0e5c52;
  --teal-deep: #0a413a;
  --teal-tint: #d6e6e0;
  --on-teal: #f6f1e7;
  --on-teal-soft: #c3d8d1;
  --marigold: #efae3e;
  --marigold-deep: #e39a1f;
  --error: #b3261e;
  --placeholder-bg: #ffd6e4;
  --placeholder-edge: #b0003a;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  color-scheme: light;
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.1875rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

p,
ol,
ul {
  margin: 0;
}

p {
  text-wrap: pretty;
}

svg {
  flex: none;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* Links and focus */

a {
  color: var(--teal);
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* Header */

.site-header {
  padding-block: 1.125rem;
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.header-link {
  padding: 0.625rem 1.125rem;
  border: 2px solid var(--teal);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.header-link:hover {
  background: var(--teal);
  color: var(--on-teal);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--teal-deep);
}

.wordmark-mark {
  width: 2rem;
  height: 2rem;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  padding-block: 1.5rem 3rem;
}

.hero-text {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

h1 {
  font-size: 2.375rem;
  letter-spacing: -0.015em;
  line-height: 1.08;
  color: var(--teal-deep);
}

.summary {
  font-size: 1.25rem;
  color: var(--ink-soft);
  max-width: 34em;
}

.demo {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
  margin-top: 0.75rem;
}

.demo-label {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.call-button {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  max-width: 100%;
  padding: 0.875rem 1.5rem 0.875rem 0.875rem;
  background: var(--teal);
  color: var(--on-teal);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--teal-deep);
  transition: background-color 150ms ease;
}

.call-button:hover {
  background: var(--teal-deep);
}

.call-button:focus-visible {
  outline-offset: 4px;
}

.call-button-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--marigold);
  color: var(--ink);
}

.call-button-icon svg {
  width: 1.625rem;
  height: 1.625rem;
  fill: currentColor;
}

.call-button-text {
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.2;
}

.call-button-number {
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.demo-note {
  color: var(--ink-soft);
}

/* The call card */

.call {
  margin: 0;
  padding: 1.25rem;
  background: var(--teal-deep);
  color: var(--on-teal);
  border-radius: 1.25rem;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.04), 0 18px 40px -24px rgb(10 65 58 / 0.55);
}

.call-caption {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--marigold);
  border-radius: 0.375rem;
  color: var(--marigold);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.call-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgb(246 241 231 / 0.18);
}

.call-status-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgb(246 241 231 / 0.12);
}

.call-status-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: var(--on-teal);
}

.call-status-text {
  font-weight: 600;
}

.call-wave {
  width: 5.5rem;
  height: 1.25rem;
  margin-left: auto;
  fill: var(--marigold);
}

.transcript {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.4;
}

.transcript li {
  color: var(--on-teal-soft);
}

.transcript .transcript-now {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--on-teal);
  font-weight: 600;
}

/* A phone keypad key */

.key {
  display: inline-grid;
  place-items: center;
  align-content: center;
  width: 3.25rem;
  height: 3.25rem;
  flex: none;
  border-radius: 0.75rem;
  background: var(--marigold);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1;
  box-shadow: inset 0 -3px 0 var(--marigold-deep);
}

.key-digit {
  font-size: 1.5rem;
  font-weight: 700;
}

.key-letters {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* Trust strip */

.trust {
  background: var(--teal-tint);
  border-block: 1px solid #bcd3cb;
}

.trust-list {
  display: grid;
  gap: 0.875rem;
  padding-block: 1.25rem;
  list-style: none;
}

.trust-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--teal-deep);
}

.trust-list svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Who it's for */

.audience {
  display: grid;
  gap: 1rem;
  padding-block: 3.5rem 1rem;
}

.audience-statement {
  max-width: 24em;
  font-family: var(--serif);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--teal-deep);
  text-wrap: balance;
}

.audience-aside {
  color: var(--ink-soft);
}

/* Section headings */

.how h2,
.questions h2 {
  font-size: 1.875rem;
  color: var(--teal-deep);
  margin-bottom: 1.5rem;
}

/* How it works */

.how {
  padding-block: 3rem 3.5rem;
}

.steps {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-num {
  font-family: var(--serif);
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 0.9;
  color: var(--teal);
  font-variant-numeric: lining-nums;
}

.step-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--teal-tint);
}

.step-icon svg {
  width: 1.625rem;
  height: 1.625rem;
  fill: none;
  stroke: var(--teal-deep);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Questions */

.questions {
  padding-block: 3.5rem;
  background: var(--paper-deep);
}

.question-grid {
  display: grid;
  gap: 1rem;
}

.question {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.question h3 {
  font-size: 1.375rem;
  color: var(--teal-deep);
  margin-bottom: 0.625rem;
}

/* Where it's running */

.where {
  padding-block: 3.5rem;
}

.where-card {
  display: grid;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--teal-deep);
  background: var(--surface);
}

.where-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--teal-deep);
  color: var(--on-teal);
}

.where-label h2 {
  font-size: 1.5rem;
}

.where-label svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: var(--marigold);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.where-text {
  padding: 1.5rem;
  font-family: var(--serif);
  font-size: 1.3125rem;
  line-height: 1.45;
}

/* Enquiry form */

.enquiry {
  background: var(--teal);
  color: var(--on-teal);
}

.enquiry-inner {
  display: grid;
  gap: 2rem;
  padding-block: 3.5rem;
}

.enquiry-intro {
  display: grid;
  gap: 1rem;
  align-content: start;
  max-width: 34em;
}

/* An h2 on the home page; the Worker makes it the h1 when it sends the form back with errors. */
#enquiry-heading {
  font-size: 2.25rem;
  color: inherit;
}

.enquiry-intro a {
  color: var(--on-teal);
}

.enquiry-intro a:focus-visible {
  outline-color: var(--on-teal);
}

.enquiry-privacy {
  color: var(--on-teal-soft);
}

.enquiry-card {
  padding: 1.5rem 1.25rem;
  background: var(--surface);
  color: var(--ink);
  border-radius: 0.75rem;
  box-shadow: 0 18px 40px -24px rgb(0 0 0 / 0.45);
}

.enquiry-form {
  display: grid;
  gap: 1.5rem;
}

.field {
  display: grid;
  gap: 0.375rem;
}

.field label {
  font-weight: 700;
}

.hint {
  font-size: 1rem;
  color: var(--ink-soft);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 2px solid var(--ink-soft);
  border-radius: 0.25rem;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 3px solid var(--teal);
  outline-offset: 0;
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.submit-button {
  justify-self: start;
  padding: 0.875rem 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: var(--on-teal);
  box-shadow: 0 2px 0 var(--teal-deep);
  font: inherit;
  font-size: 1.1875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.submit-button:hover {
  background: var(--teal-deep);
}

.submit-button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.submit-button:disabled {
  background: var(--line);
  color: var(--ink-soft);
  box-shadow: none;
  cursor: not-allowed;
}

/* Shown by the Worker on hostnames that don't accept enquiries, such as Previews */
.preview-notice {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border: 3px solid var(--marigold-deep);
  border-radius: 0.25rem;
  background: #fff4dc;
  color: var(--ink);
}

.preview-notice:focus {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.preview-notice-title {
  font-weight: 700;
}

.enquiry-fallback {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

/* The spam trap. Hidden from everyone, including screen readers. */
.trap {
  display: none;
}

/* Errors, added by the Worker when a submission needs fixing */

.error-summary {
  padding: 1.25rem;
  border: 4px solid var(--error);
  border-radius: 0.25rem;
}

.error-summary:focus {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.error-summary-title {
  margin-bottom: 0.75rem;
  font-size: 1.375rem;
  color: var(--ink);
}

.error-summary ul {
  display: grid;
  gap: 0.375rem;
  padding: 0;
  list-style: none;
}

.error-summary a {
  color: var(--error);
  font-weight: 700;
}

.field--error {
  padding-left: 0.875rem;
  border-left: 4px solid var(--error);
}

.field--error input,
.field--error textarea {
  border-color: var(--error);
}

.field-error {
  color: var(--error);
  font-weight: 700;
}

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

/* Privacy notice and thank-you pages */

main {
  flex: 1 0 auto;
}

.done-mark {
  width: 3.5rem;
  height: 3.5rem;
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a.wordmark {
  text-decoration: none;
  width: fit-content;
}

.page {
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding-block: 2rem 4rem;
}

.page h1 {
  margin-bottom: 0.5rem;
}

.page h2 {
  margin-top: 1.25rem;
  font-size: 1.5rem;
  color: var(--teal-deep);
}

.page p {
  max-width: 38em;
}

.updated {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

/* Footer */

.site-footer {
  padding-block: 2.5rem 2rem;
  background: var(--paper-deep);
}

.about {
  max-width: 40em;
  font-size: 1.125rem;
}

.legal {
  display: grid;
  gap: 0.375rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  color: var(--ink-soft);
}

/* Pre-launch placeholders. Delete each span once its text is final. */

.placeholder {
  background: var(--placeholder-bg);
  color: var(--ink);
  outline: 2px dashed var(--placeholder-edge);
  outline-offset: 1px;
  padding: 0 0.15em;
}

/* Wider screens */

@media (min-width: 24em) {
  .call-button-text {
    font-size: 1.625rem;
  }

}

@media (min-width: 40em) {
  .container {
    padding-inline: 2rem;
  }

  h1 {
    font-size: 3rem;
  }

  .call {
    padding: 1.75rem;
  }

  .audience-statement {
    font-size: 2rem;
  }

  .how h2,
  .questions h2 {
    font-size: 2.25rem;
  }

  #enquiry-heading {
    font-size: 2.75rem;
  }

  .enquiry-card {
    padding: 2rem;
  }
}

@media (min-width: 48em) {
  .trust-list {
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
  }

  .steps,
  .question-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 56em) {
  .where-card {
    grid-template-columns: minmax(14rem, 1fr) 2.2fr;
  }

  .where-label {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
  }

  .where-label h2 {
    font-size: 1.875rem;
  }

  .where-text {
    align-self: center;
    padding: 2rem 2.5rem;
    font-size: 1.5rem;
  }

  .enquiry-inner {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    column-gap: 4rem;
    padding-block: 4.5rem;
  }
}

@media (min-width: 64em) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    column-gap: 4.5rem;
    padding-block: 3rem 5rem;
  }

  h1 {
    font-size: 3.75rem;
  }

  .summary {
    font-size: 1.375rem;
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }

  .call-button-text {
    font-size: 1.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
