/* ==========================================================================
   Kipbrooks — design system
   Tokens lifted from design.md. Edit here, not in the pages.
   ========================================================================== */

:root {
  /* color */
  --primary:      #070707;
  --secondary:    #292929;
  --accent:       #0583B1;
  --accent-soft:  #0583B152;
  --accent-light: #6EC1E4;
  --muted-text:   #7A7A7A;
  --surface:      #FFFFFF;
  --muted:        #EFEFEF;

  /* type */
  --font-heading: "Lato", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Heebo", "Helvetica Neue", Arial, sans-serif;

  /* layout */
  --container: 1140px;
  --gutter: 20px;

  /* radius */
  --r-sm: 4px;
  --r-md: 5px;
  --r-lg: 10px;
  --r-xl: 20px;

  /* section rhythm */
  --section-y: clamp(64px, 9vw, 120px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--secondary);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(16px, 1.1vw, 17px);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--primary);
  margin: 0;
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --------------------------------------------------------------- layout */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

@media (min-width: 768px) {
  .container { padding-inline: 40px; }
}

.section { padding-block: var(--section-y); }
.section--muted { background: var(--muted); }
.section--dark  { background: var(--primary); }

/* A photographic band always carries a scrim so text stays legible. */
.section--photo {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.split {
  display: flex;
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}

.split > .split__media { flex-shrink: 0; }
.split > .split__body  { flex-grow: 1; min-width: 0; }

@media (max-width: 900px) {
  .split { flex-direction: column; align-items: stretch; }
  .split--reverse { flex-direction: column-reverse; }
  .split > .split__media { width: 100%; }
  .split__media img { width: 100%; height: clamp(240px, 45vw, 360px); object-fit: cover; }
}

/* ------------------------------------------------------------- typography */

.eyebrow {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(13px, 1.1vw, 15px);
  letter-spacing: 1.4px;
  line-height: 1;
  color: var(--accent);
}
.eyebrow--on-dark { color: var(--accent-light); }

.h-display {
  font-weight: 800;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
}

.h-section {
  font-weight: 800;
  font-size: clamp(32px, 3.8vw, 52px);
  line-height: 1.05;
}

.h-card {
  font-weight: 600;
  font-size: clamp(19px, 1.6vw, 21px);
  line-height: 1.3;
}

.lead {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.6;
}

.on-dark  { color: #FFFFFF; }
.on-dark-muted { color: rgba(255, 255, 255, 0.82); }

.stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.stack--center { align-items: center; text-align: center; }
.stack p { margin: 0; }

/* ---------------------------------------------------------------- button */

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(14px, 1.1vw, 16px);
  letter-spacing: 0.5px;
  line-height: 1;
  color: #FFFFFF;
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 20px 40px;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.btn:hover {
  background: #FFFFFF;
  color: var(--accent);
  border-color: var(--accent-light);
}
.btn--sm { padding: 16px 32px; }
.btn--on-dark:hover { background: var(--primary); color: #FFFFFF; border-color: var(--accent-light); }

@media (max-width: 640px) {
  .btn { display: block; width: 100%; text-align: center; }
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--muted);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  min-height: 88px;
}

.site-header__logo img { height: 42px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--secondary);
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--accent); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--primary);
}

@media (max-width: 860px) {
  .site-header__inner { min-height: 64px; }
  .site-header__logo img { height: 30px; }
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-top: 1px solid var(--muted);
    padding: 8px var(--gutter) 20px;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: 16px 0; font-size: 17px; }
  .nav .btn { margin-top: 12px; }
}

/* ------------------------------------------------------------------ hero */

.hero {
  display: flex;
  align-items: center;
  min-height: clamp(520px, 62vw, 720px);
  background-size: cover;
  background-position: center center;
}

.hero__inner { max-width: 820px; }
.hero .lead { max-width: 640px; }

/* -------------------------------------------------------------- features */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
}

@media (max-width: 640px) {
  .feature-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.35;
  color: var(--primary);
  padding-top: 8px;
}

/* Benefits sit on a dark photographic band. */
.feature--boxed {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--r-xl);
  padding: 24px 26px;
}
.feature--boxed .feature__title { color: #FFFFFF; padding-top: 0; }

@media (max-width: 640px) {
  .feature { flex-direction: column; }
  .feature__title { padding-top: 0; }
  .feature--boxed { flex-direction: row; align-items: flex-start; }
  .feature--boxed .feature__title { padding-top: 7px; }
}

/* ----------------------------------------------------------- testimonials */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 980px) { .testimonial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .testimonial-grid { grid-template-columns: minmax(0, 1fr); } }

.testimonial {
  background: var(--muted);
  border-radius: var(--r-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.testimonial__quote {
  margin: 0;
  font-size: clamp(15px, 1.2vw, 15.5px);
  line-height: 1.75;
  flex-grow: 1;
}

.testimonial__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  color: var(--primary);
}

.testimonial__role {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  color: var(--muted-text);
}

.testimonial--cta {
  background: var(--primary);
  justify-content: center;
  gap: 16px;
}

/* ------------------------------------------------------------- card grid */

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .card-grid { grid-template-columns: minmax(0, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: var(--r-xl);
}

.card--boxed {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 20px;
}
.card--boxed img { height: 180px; border-radius: var(--r-lg); }

/* ------------------------------------------------------------------ form */

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  .form__row { grid-template-columns: minmax(0, 1fr); }
}

.form input,
.form textarea {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-sm);
  background: #FFFFFF;
  color: var(--secondary);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
}
.form textarea { resize: vertical; min-height: 140px; }
.form ::placeholder { color: var(--muted-text); opacity: 1; }

.form .btn { align-self: flex-start; margin-top: 8px; }
@media (max-width: 640px) { .form .btn { align-self: stretch; } }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--primary);
  padding-top: 80px;
}

.site-footer__cols {
  display: flex;
  gap: clamp(32px, 6vw, 80px);
  align-items: flex-start;
  margin-bottom: 56px;
}

@media (max-width: 860px) {
  .site-footer__cols { flex-direction: column; gap: 36px; margin-bottom: 36px; }
}

.site-footer__brand { width: 420px; flex-shrink: 0; }
@media (max-width: 860px) { .site-footer__brand { width: 100%; } }

.site-footer__brand img { height: 40px; width: auto; margin-bottom: 20px; }

.site-footer h4 {
  font-weight: 600;
  font-size: clamp(18px, 1.6vw, 20px);
  color: #FFFFFF;
  margin-bottom: 18px;
}

.site-footer p,
.site-footer a {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15.5px;
  color: rgba(255, 255, 255, 0.62);
  margin: 0;
}
.site-footer a:hover { color: #FFFFFF; }

.site-footer__col { flex-grow: 1; }

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__contact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-footer__contact-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 28px 0 32px;
}
.site-footer__bar p { font-size: 14px; color: rgba(255, 255, 255, 0.45); }

/* --------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
