/* Hudson Care & Rehab Center
   Main stylesheet
-------------------------------------------------- */

:root {
  --navy: #062d56;
  --navy-deep: #032746;
  --blue: #0074c8;
  --cream: #f6f0e7;
  --cream-light: #fbf8f3;
  --ink: #0b2d50;
  --text: #24384a;
  --white: #ffffff;
  --border: rgba(6, 45, 86, 0.14);
  --shadow: 0 12px 30px rgba(4, 35, 65, 0.12);
  --max-width: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--cream-light);
  font-family: "Montserrat", Arial, sans-serif;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9999;
  padding: 10px 14px;
  background: var(--white);
  color: var(--navy);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, var(--navy-deep), var(--navy));
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.header-inner {
  width: min(100% - 44px, var(--max-width));
  min-height: 86px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

.brand {
  min-width: 250px;
  text-decoration: none;
}

.brand-name {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1;
}

.brand-script {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.8rem, 2.4vw, 2.8rem);
  font-style: italic;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 43px;
  height: 43px;
  object-fit: contain;
}

.brand-subtitle {
  display: block;
  margin-top: 5px;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(15px, 2vw, 31px);
}

.primary-nav a {
  position: relative;
  padding: 31px 0 26px;
  color: var(--white);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 21px;
  left: 0;
  height: 2px;
  background: var(--white);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after {
  transform: scaleX(1);
}

.phone-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 44px;
  padding: 0 21px;
  background: var(--cream);
  color: var(--navy);
  border-radius: 3px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.phone-icon {
  font-size: 1.1rem;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  background: transparent;
  color: var(--white);
}

.menu-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 36% 64%;
  min-height: 330px;
  background: var(--cream);
}

.hero-copy {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 42px 42px 42px 5vw;
}

.hero-copy-inner {
  width: min(100%, 500px);
}

.eyebrow {
  margin: 0 0 8px;
  color: #46617b;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--navy);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(2rem, 3.2vw, 3.35rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.hero-lead {
  max-width: 470px;
  margin: 18px 0 24px;
  font-size: clamp(0.96rem, 1.2vw, 1.08rem);
}

.hero-image {
  min-height: 330px;
  background: url("../images/activity.jpg") center 42% / cover no-repeat;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 24px;
  border-radius: 2px;
  text-decoration: none;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.button-primary {
  background: var(--navy);
  color: var(--white);
}

/* Services */
.services {
  padding: 23px 4vw 25px;
  background: linear-gradient(90deg, #f8f3eb, #f3ece3);
}

.service-grid {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  padding: 8px 18px;
  text-align: center;
}

.service-card svg {
  width: 54px;
  height: 54px;
  margin: 0 auto 6px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  margin: 0 0 7px;
  color: var(--navy);
  font-size: 0.82rem;
  line-height: 1.15;
  text-transform: uppercase;
}

.service-card p {
  max-width: 210px;
  margin: 0 auto;
  font-size: 0.78rem;
  line-height: 1.45;
}

/* Community photo strip */
.community {
  padding: 14px 2vw;
  display: grid;
  grid-template-columns: minmax(300px, 350px) minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  background: linear-gradient(90deg, var(--navy-deep), var(--navy));
  color: var(--white);
}

.community-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 0 0 10px;
}

.community h2 {
  margin: 0 0 12px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 400;
  line-height: 1.25;
}

.community h2 em {
  font-weight: 400;
}

.community p {
  max-width: 310px;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
}

.photo-row {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.photo-row figure {
  height: 165px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: #d9d9d9;
}

.photo-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}

.photo-row figure:nth-child(1) img {
  object-position: center 55%;
}

.photo-row figure:nth-child(2) img {
  object-position: center center;
}

.photo-row figure:nth-child(3) img {
  object-position: center center;
}

.photo-row figure:nth-child(4) img {
  object-position: center 42%;
}

.photo-row figure:hover img {
  transform: scale(1.04);
}

/* Information section */
.info-section {
  padding: 19px 4vw 20px;
  background: var(--cream);
}

.info-grid {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.25fr 0.62fr;
  gap: clamp(30px, 4vw, 72px);
  align-items: start;
}

.footer-brand {
  margin-bottom: 11px;
}

.brand-name.dark,
.brand-subtitle.dark {
  color: var(--navy);
}

.info-grid h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.info-grid h3 {
  margin: 0 0 2px;
  color: var(--navy);
  font-size: 0.9rem;
}

.info-grid p {
  margin: 0 0 11px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.info-grid a {
  color: var(--navy);
  overflow-wrap: anywhere;
}

.care-seal {
  width: 142px;
  height: 142px;
  margin: 11px auto 0;
  display: grid;
  place-items: center;
  border: 2px solid var(--navy);
  border-radius: 50%;
  color: var(--navy);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  transform: rotate(-8deg);
}

.seal-top,
.seal-bottom {
  font-size: 0.65rem;
  font-weight: 700;
}

.seal-heart {
  font-size: 3rem;
  line-height: 0.8;
}

.site-footer {
  min-height: 36px;
  padding: 10px 4vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-deep);
  color: var(--white);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.7rem;
}

.amenities-anchor {
  position: relative;
  top: -86px;
}

/* Responsive */
@media (max-width: 1180px) {
  .header-inner {
    grid-template-columns: auto auto 1fr auto;
  }

  .menu-toggle {
    display: block;
    order: 2;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 12px 22px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy-deep);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
  }

  .primary-nav.open {
    display: flex;
  }

  .primary-nav a {
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255,255,255,.13);
  }

  .primary-nav a::after {
    display: none;
  }

  .phone-button {
    justify-self: end;
  }
}

@media (max-width: 900px) {
  .header-inner {
    width: min(100% - 26px, var(--max-width));
    grid-template-columns: 1fr auto auto;
    gap: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand-script {
    font-size: 1.7rem;
  }

  .brand-subtitle {
    font-size: 0.58rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 2;
    justify-content: flex-start;
    padding: 34px 24px;
  }

  .hero-image {
    min-height: 330px;
    background-position: center 38%;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-card:last-child {
    grid-column: 1 / -1;
  }

  .community {
    grid-template-columns: 1fr;
    padding: 22px 4vw;
  }

  .community-copy {
    padding-left: 0;
  }

  .photo-row figure {
    height: 150px;
  }

  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .phone-button {
    width: 44px;
    padding: 0;
  }

  .phone-button span:last-child {
    display: none;
  }

  .hero-image {
    min-height: 255px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card:last-child {
    grid-column: auto;
  }

  .photo-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-row figure {
    height: 140px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .care-seal {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
