/**
 * Kent Cleaning Solutions: base styles and design tokens.
 * Brand colours (--kcs-primary, --kcs-accent) come from theme settings.
 */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --kcs-primary: #0f3b5f;
  --kcs-accent: #14a37f;

  /* Derived tones. */
  --kcs-ink: color-mix(in srgb, var(--kcs-primary) 70%, #000);
  --kcs-primary-soft: color-mix(in srgb, var(--kcs-primary) 8%, #fff);
  --kcs-accent-soft: color-mix(in srgb, var(--kcs-accent) 12%, #fff);
  --kcs-accent-strong: color-mix(in srgb, var(--kcs-accent) 78%, #000);

  --kcs-text: #1b2733;
  --kcs-muted: #5b6b7a;
  --kcs-line: #e3e9ef;
  --kcs-surface: #f5f8fa;
  --kcs-white: #fff;

  --kcs-font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --kcs-radius: 14px;
  --kcs-radius-sm: 8px;
  --kcs-shadow: 0 1px 2px rgb(16 32 48 / 6%), 0 8px 24px rgb(16 32 48 / 8%);
  --kcs-shadow-lg: 0 2px 4px rgb(16 32 48 / 6%), 0 20px 48px rgb(16 32 48 / 14%);

  --kcs-container: 1200px;
  --kcs-gutter: clamp(16px, 4vw, 32px);
  --kcs-section: clamp(56px, 8vw, 104px);
  --kcs-header-h: 76px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--kcs-header-h) + 16px);
}

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

body {
  margin: 0;
  font-family: var(--kcs-font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--kcs-text);
  background: var(--kcs-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
  display: block;
}

a {
  color: var(--kcs-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

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

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--kcs-ink);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem); }
h4 { font-size: 1.125rem; }

p,
ul,
ol,
dl,
blockquote,
table {
  margin: 0 0 1.1em;
}

hr {
  border: 0;
  border-top: 1px solid var(--kcs-line);
  margin: 2.5em 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  padding: 0.7em 0.9em;
  border-bottom: 1px solid var(--kcs-line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--kcs-surface);
  font-weight: 700;
  color: var(--kcs-ink);
}

/* Forms. */
label,
.form-item__label {
  display: block;
  margin-bottom: 0.35em;
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--kcs-ink);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="password"],
input[type="date"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.8em 0.95em;
  font: inherit;
  font-size: 1rem;
  color: var(--kcs-text);
  background: var(--kcs-white);
  border: 1px solid #cfd9e2;
  border-radius: var(--kcs-radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--kcs-accent);
  box-shadow: 0 0 0 4px var(--kcs-accent-soft);
}

.form-item,
.js-form-item,
.form-actions,
.webform-actions {
  margin: 0 0 1.25rem;
}

.form-item .description,
.form-item__description {
  margin-top: 0.35em;
  font-size: 0.875rem;
  color: var(--kcs-muted);
}

.form-required::after {
  content: " *";
  color: #c0392b;
}

.form-checkboxes .form-item,
.form-radios .form-item,
.form-type-checkbox,
.form-type-radio {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.5rem;
}

.form-type-checkbox label,
.form-type-radio label {
  margin: 0;
  font-weight: 500;
}

fieldset {
  margin: 0 0 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--kcs-line);
  border-radius: var(--kcs-radius-sm);
}

legend {
  padding: 0 0.4em;
  font-weight: 700;
}

.error,
input.error,
textarea.error,
select.error {
  border-color: #c0392b;
}

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

.visually-hidden.focusable:focus {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
}

.hidden {
  display: none;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 0.6em 1em;
  background: var(--kcs-ink);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

.align-left { float: left; margin: 0.3em 1.5em 1em 0; }
.align-right { float: right; margin: 0.3em 0 1em 1.5em; }
.align-center { margin-left: auto; margin-right: auto; }
.text-align-center { text-align: center; }
.text-align-right { text-align: right; }

@media (max-width: 640px) {
  .align-left,
  .align-right { float: none; margin: 0 0 1em; }
}
