/*
  Silent Disco Hire Brighton: one small stylesheet.
  Palette and feel borrowed from the EcoMarts template (white, navy headings, coral accent),
  with the accent darkened to pass WCAG AA (5.5:1 on white; the template's #FF4035 is 3.5:1).
*/

:root {
  --accent: #c9281d;
  --accent-dark: #a51f16;
  --ink: #0a111e;
  --text: #555555;
  --bg: #ffffff;
  --bg-soft: #fff5f4;
  --border: #e5e5e5;
  --radius: 6px;
  --shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 68rem;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(1.9rem, 6vw, 2.9rem);
}

h2 {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-dark);
}

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

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding-block: 3rem;
}

.section--soft {
  background: var(--bg-soft);
}

.small {
  font-size: 0.875rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

.env-banner {
  background: var(--ink);
  color: #fff;
  text-align: center;
  font-size: 0.875rem;
  padding: 0.4rem 1rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-block: 0.9rem;
}

.wordmark {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  padding-block: 0.5rem;
  display: inline-block;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}

/* Buttons: 44px minimum target height */
.button,
.sticky-cta {
  display: inline-block;
  min-height: 2.75rem;
  padding: 0.65rem 1.4rem;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  text-align: center;
}

.button:hover,
.sticky-cta:hover {
  background: var(--accent-dark);
  color: #fff;
}

/* Sticky mobile CTA. Fixed position, so it cannot shift layout. */
.sticky-cta {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  box-shadow: var(--shadow);
  z-index: 50;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #cbcbcb;
  padding-block: 2.5rem 6rem;
  margin-top: 3rem;
}

.site-footer a {
  color: #fff;
}

.site-footer strong {
  color: #fff;
}

@media (min-width: 48rem) {
  .sticky-cta {
    display: none;
  }

  .site-footer {
    padding-bottom: 2.5rem;
  }
}

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

/* Content pages */
.prose {
  max-width: 44rem;
}

.prose h2,
.page h2 {
  margin-top: 2rem;
}

.prose ul,
.prose ol,
.page ul,
.page ol {
  padding-left: 1.25rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--ink);
}

.price-line {
  font-size: 1.1rem;
}

.hero {
  background: var(--bg-soft);
  padding-block: 3.5rem;
}

.ticks {
  list-style: none;
  padding-left: 0 !important;
}

.ticks li {
  padding-left: 1.6rem;
  position: relative;
  margin-block: 0.35rem;
}

.ticks li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.steps li {
  margin-block: 0.6rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.25rem;
  color: var(--text);
}

/* Price table */
.price-table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1rem;
}

.price-table caption {
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 0.5rem;
}

.price-table th,
.price-table td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.price-table thead th {
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--border);
  padding-block: 0.25rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  padding-block: 0.75rem;
  min-height: 2.75rem;
}

.faq details p {
  margin-top: 0;
}

/* Footer layout */
.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  display: inline-block;
  padding-block: 0.3rem;
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 2fr;
  }
}

/* Page layout: text keeps a readable width, the quote form can use the full container */
.page > *:not(.quote-section) {
  max-width: 44rem;
}

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

/* Quote form */
.quote-section {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-block: 2rem;
  scroll-margin-top: 1rem;
}

.quote-section h2 {
  margin-top: 0;
}

.quote-intro {
  margin-top: 0;
}

.quote-layout {
  display: grid;
  gap: 1.5rem;
}

.form-step {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.form-step:first-of-type {
  margin-top: 0;
}

.field {
  margin-bottom: 1rem;
}

.field[hidden] {
  display: none;
}

.field label:not(.choice),
.field legend {
  display: block;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.25rem;
  padding: 0;
}

.field fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.optional {
  font-weight: 400;
  color: var(--text);
}

.hint,
.field-message {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.field-message:empty {
  display: none;
}

.field-message.is-problem,
.field-error {
  color: #a51f16;
  font-weight: 700;
}

.field-error {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.field-error:empty {
  display: none;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="time"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #767676;
  border-radius: var(--radius);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #a51f16;
  border-width: 2px;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding-block: 0.4rem;
  font-weight: 400;
  color: var(--text);
}

.choice input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  flex: none;
}

/* Honeypot: off screen, not display:none, so simple bots still fill it in */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.quote-submit .button[disabled],
.quote-bar .button[disabled] {
  background: #767676;
  cursor: not-allowed;
}

.link-button {
  background: none;
  border: 0;
  padding: 0.25rem 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  min-height: 2.75rem;
}

/* Price panel */
.quote-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  align-self: start;
}

.quote-panel h3 {
  margin-top: 0;
}

.quote-lines {
  margin: 0 0 0.75rem;
}

.quote-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.quote-row dt,
.quote-row dd {
  margin: 0;
}

.quote-row dd {
  text-align: right;
  font-weight: 700;
  color: var(--ink);
}

.quote-row--minor {
  font-size: 0.9rem;
}

.quote-row--total {
  border-bottom: 0;
  border-top: 2px solid var(--ink);
  font-size: 1.15rem;
  color: var(--ink);
}

.quote-note {
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
}

.quote-deposit {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.quote-footnote {
  margin-bottom: 0;
}

/* Mobile bar: fixed, so it cannot move the page. Shown by script while the form is on screen. */
.quote-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.1);
}

.quote-bar[hidden] {
  display: none;
}

.quote-bar__total {
  margin: 0;
  color: var(--ink);
}

.quote-bar__label {
  display: block;
  font-size: 0.8rem;
  color: var(--text);
}

.quote-in-view .sticky-cta {
  display: none;
}

@media (min-width: 48rem) {
  .quote-section {
    padding: 2rem;
  }

  .quote-layout {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 2rem;
  }

  .quote-panel {
    position: sticky;
    top: 1rem;
  }

  .quote-bar {
    display: none !important;
  }
}

.form-status:empty {
  display: none;
}

.form-status {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid #a51f16;
  background: #fff;
  color: #a51f16;
  font-weight: 700;
}

/* Hero with the headset photo, and photos on service pages */
.hero__grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.hero__image img,
.page-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

.hero__image {
  max-width: 17.5rem;
  justify-self: center;
}

.page-figure {
  margin: 1.25rem 0;
  max-width: 17.5rem;
}

@media (min-width: 48rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    gap: 3rem;
  }

  .hero__image {
    justify-self: end;
  }

  .page-figure {
    float: right;
    margin: 0 0 1rem 2rem;
  }
}

/* Keep the text column left-aligned with the header and hero, not centred in a narrower box */
.container.prose {
  max-width: none;
}

.container.prose > * {
  max-width: 44rem;
}

/* The product photo has a white background: let the page colour show through it */
.hero__image img,
.page-figure img {
  mix-blend-mode: multiply;
}

/* Photos on text pages stay small. Placed after the general .page rule so they win. */
.page > .page-figure {
  max-width: 17.5rem;
}

/* Phones: the pinned "Get a quote" button at the bottom already does this job, so keep the header short */
@media (max-width: 47.99rem) {
  .site-header .button {
    display: none;
  }

  .site-header__inner {
    gap: 0.25rem 1.5rem;
    padding-block: 0.6rem;
  }

  .nav {
    gap: 0 1rem;
  }

  .nav a {
    padding-block: 0.4rem;
  }
}

/* Accessibility fixes from the audit */

/* A fixed bar (pinned quote button, mobile price bar) must never hide the field being tabbed to */
html {
  scroll-padding-bottom: 6rem;
}

/* The footer is dark, so a dark focus ring vanishes there */
.site-footer :focus-visible {
  outline-color: #fff;
}

/* Browsers highlight one segment of a date or time box, not the box itself, so ring the whole box too */
.field input[type="date"]:focus-within,
.field input[type="time"]:focus-within {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* Long words (the email address) wrap instead of forcing sideways scrolling, even with extra text spacing */
body {
  overflow-wrap: break-word;
}

/* Links that stand on their own in a list get a comfortable target, not just a text-height one */
.ticks a,
.footer-nav a {
  display: inline-block;
  padding-block: 0.25rem;
}

.breadcrumb a {
  display: inline-block;
  padding-block: 0.25rem;
}

/* The owner's own photo (not a cut-out), so show it as a photo: no blend trick, a soft corner and shadow */
.hero__image img,
.page-figure img {
  mix-blend-mode: normal;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero__image {
  max-width: 26rem;
}

.page > .page-figure {
  max-width: 22rem;
}

@media (min-width: 48rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  }
}
