:root {
  --bg: #f4f0ea;
  --ink: #17151a;
  --muted: #6b6a6f;
  --faint: #a3a1a6;
  --red: #b5122b;
  --red-dark: #96101f;
  --line: #ddd8d0;
  --serif: "Arvo", Georgia, "Times New Roman", serif;
  --sans: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ---------- Navigation ---------- */
.nav {
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo__icon {
  width: 22px;
  height: 28px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.logo__text {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.16em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav__links a:not(.btn) {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #55535a;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.nav__links a:not(.btn):hover { color: var(--ink); }

.nav__links a.active {
  color: var(--ink);
  border-bottom-color: var(--red);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  border-radius: 4px;
  transition: background .2s, transform .2s, box-shadow .2s;
}

.btn--small {
  background: var(--red);
  color: #fff;
  font-size: 14px;
  padding: 9px 14px;
}

.btn--small:hover { background: var(--red-dark); }

.btn--primary {
  background: var(--red);
  color: #fff;
  font-size: 16px;
  padding: 15px 28px;
  box-shadow: 0 8px 18px -8px rgba(181, 18, 43, .6);
}

.btn--primary:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.btn--outline {
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 28px;
}

.btn--outline:hover {
  background: var(--ink);
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 90px 24px 60px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 40px;
}

.tag {
  display: inline-block;
  border: 1px solid #b9b4ab;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.4vw, 62px);
  line-height: 1.1;
  letter-spacing: 0;
  margin: 28px 0 28px;
  max-width: 560px;
}

.lead {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 450px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.stats {
  list-style: none;
  display: flex;
  gap: 26px;
  margin-top: 38px;
}

.stats strong {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1;
}

.stats li > span {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Hero illustration ---------- */
.hero__art {
  width: 100%;
  max-width: 540px;
  margin-left: auto;
}

.hero__art img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Clients / logo carousel ---------- */
.clients {
  max-width: 1120px;
  margin: 0 auto;
  padding: 70px 0 100px;
  text-align: center;
}

.clients h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.8vw, 40px);
  line-height: 1.2;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.clients h2 em {
  font-style: normal;
  color: var(--red);
}

.clients__lead {
  margin: 18px auto 0;
  padding: 0 24px;
  font-size: 16.5px;
  color: var(--muted);
}

.clients__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  font-weight: 700;
  font-size: 17px;
}

.clients__link span {
  color: var(--red);
  font-size: 22px;
  line-height: 1;
  transition: transform .2s;
}

.clients__link:hover span { transform: translateX(4px); }

.marquee {
  margin-top: 64px;
  overflow: hidden;
  /* soft fade on the left and right edges */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 45s linear infinite;   /* bigger number = slower */
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__group {
  display: flex;
  align-items: center;
  list-style: none;
  flex-shrink: 0;
}

.marquee__group li {
  display: grid;
  place-items: center;
  width: 190px;
  height: 80px;
  padding: 0 20px;
}

.marquee__group img {
  max-width: 100%;
  max-height: 44px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .75;
  transition: filter .3s, opacity .3s;
}

.marquee__group li:hover img {
  filter: grayscale(0);
  opacity: 1;
}

/* Moves right to left. Two identical groups, so -50% loops with no jump. */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ---------- Homepage sections (same look as the .clients section) ---------- */
.problem {
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 24px 80px;
  text-align: center;
}

.problem p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--muted);
}

.block {
  max-width: 1120px;
  margin: 0 auto;
  padding: 70px 24px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.block h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.8vw, 40px);
  line-height: 1.2;
  max-width: 760px;
  margin: 0 auto;
}

.block__lead {
  max-width: 620px;
  margin: 18px auto 0;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* Three-column text rows, no boxes */
.cols {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 48px 0 0;
  padding: 0 24px;
}

.cols--4 { grid-template-columns: repeat(4, 1fr); counter-reset: step; }

.cols h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 10px;
}

.cols h3 a:hover { color: var(--red); }

.cols p {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* Red step numbers, like the red index on the Works page */
.cols--4 li { counter-increment: step; }

.cols--4 li::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--red);
  margin-bottom: 12px;
}

@media (max-width: 860px) {
  .cols { grid-template-columns: 1fr; gap: 32px; }
  .cols--4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .cols--4 { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { padding-top: 56px; }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero__art { margin: 0 auto; }
}

@media (max-width: 640px) {
  .nav__inner { flex-direction: column; gap: 12px; }
  .nav__links { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .stats { gap: 18px; }
}

/* ---------- Contact form ---------- */
.contact {
  background: var(--ink);
  color: #fff;
}

.contact__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px 90px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: start;
}

.contact .tag {
  border-color: rgba(255, 255, 255, .4);
  color: #fff;
}

.contact h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
  margin: 26px 0 20px;
}

.contact__text p {
  font-size: 16.5px;
  line-height: 1.7;
  color: #d4d0c9;
  max-width: 420px;
}

.form {
  display: grid;
  gap: 20px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 13px 14px;
  transition: border-color .2s;
}

.field input::placeholder { color: var(--muted); }

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--red);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%2317151a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.field select:invalid { color: var(--muted); }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14.5px;
  line-height: 1.55;
  color: #d4d0c9;
  cursor: pointer;
}

.consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--red);
  cursor: pointer;
}

.consent a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form .btn {
  justify-self: start;
  border: 0;
  cursor: pointer;
}

@media (max-width: 860px) {
  .contact__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 64px 24px 72px;
  }
}

@media (max-width: 560px) {
  .form__row { grid-template-columns: 1fr; }
}

/* ---------- Legal pages ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 100px;
}

.legal h1 {
  font-size: clamp(34px, 4.6vw, 48px);
  margin: 24px 0 12px;
}

.legal__date {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 36px;
}

.legal h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  margin: 40px 0 12px;
}

.legal p,
.legal li {
  font-size: 16.5px;
  line-height: 1.75;
  color: #3a383e;
}

.legal p + p { margin-top: 14px; }

.legal ul {
  margin: 12px 0 0 22px;
}

.legal li + li { margin-top: 6px; }

.legal a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.footer a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Care Plans page ---------- */
.hero--single {
  text-align: center;
  padding-bottom: 30px;
}

.hero--single h1,
.hero--single .lead {
  margin-left: auto;
  margin-right: auto;
}

.hero--single .lead { max-width: 560px; }

.block--first { border-top: 0; }

.plans { align-items: start; }

.plans article {
  border-top: 2px solid var(--ink);
  padding-top: 22px;
}

.plan__price {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 12px;
}

.plan__price span {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.plans ul {
  list-style: none;
  margin-top: 18px;
  text-align: left;
  display: inline-block;
}

.plans li {
  position: relative;
  padding-left: 18px;
  font-size: 16px;
  line-height: 1.7;
}

.plans li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: 20px;
  line-height: 1.3;
}

.form__error {
  font-size: 14.5px;
  line-height: 1.55;
  color: #ffb3bd;
}

.form__error[hidden] { display: none; }

/* ===== Motion and feel (Apple-style principles) ===== */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); }

/* Typography: tighter at large sizes, looser for reading */
h1 { letter-spacing: -0.025em; line-height: 1.08; }
h2 { letter-spacing: -0.02em;  line-height: 1.15; }
h3 { letter-spacing: -0.01em;  line-height: 1.25; }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* Translucent navigation (a lighter material that stays readable) */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 240, 234, .72);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  transition: box-shadow .3s var(--ease-out);
}
.nav.is-scrolled { box-shadow: 0 10px 24px -18px rgba(23, 21, 26, .35); }

/* Press feedback: reacts the moment you press, settles smoothly on release */
.btn, .work, .clients__link {
  transition: transform .45s var(--ease-out);
  will-change: transform;
}
.btn:active, .work:active, .clients__link:active {
  transform: scale(.97);
  transition-duration: .08s;
}
.work:hover { transform: translateY(-4px); }
.work:active { transform: translateY(0) scale(.985); }

/* Content eases in as it scrolls into view */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Accessibility: respect the visitor's settings */
@media (prefers-reduced-motion: reduce) {
  .btn, .work, .clients__link { transition: none; }
  .work:hover { transform: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .nav { background: var(--bg); border-bottom: 1px solid var(--ink); }
}