/* The Rose Senior Home
   Colors come from the logo: its blue field, the red rose, and white. */
:root {
  --rose-blue: #165FA6;     /* logo background, exact */
  --blue-deep: #0F4479;
  --ink: #1A2B42;
  --ink-soft: #4A5A70;
  --rose-red: #C8202C;
  --sky: #EDF3F9;
  --line: #D5DFEA;
  --white: #FFFFFF;

  --sans: "Figtree", "Segoe UI", system-ui, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 5rem;
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}

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

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--ink);
}
h2 { font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem); }
h3 { font-size: 1.375rem; }
p { margin: 0 0 1em; }

a { color: var(--rose-blue); text-underline-offset: 0.18em; }
a:hover { color: var(--rose-red); }

:focus-visible {
  outline: 3px solid var(--rose-red);
  outline-offset: 3px;
  border-radius: 2px;
}

/* On blue surfaces the red focus ring is too faint; use white there. */
.site-header :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible,
.mobile-bar :focus-visible,
.lightbox :focus-visible {
  outline-color: var(--white);
}

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--white); color: var(--ink); padding: 0.75rem 1rem;
}
.skip-link:focus { top: 1rem; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.muted { color: var(--ink-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 700 1.0625rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--rose-blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); color: var(--white); }
.btn-light { background: var(--white); color: var(--rose-blue); }
.btn-light:hover { background: var(--sky); color: var(--blue-deep); }
.btn-outline-light { border-color: rgba(255,255,255,.75); color: var(--white); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: var(--white); border-color: var(--white); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--rose-blue);
  color: var(--white);
}
.header-inner {
  max-width: 84rem; margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
  display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; margin-right: auto; padding-block: 0.4rem; }
.brand-rose { width: 3.75rem; }
.brand-word { width: 9.5rem; }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav ul { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.site-nav a:not(.btn) { color: var(--white); text-decoration: none; font-weight: 700; font-size: 1.0625rem; }
.site-nav a:not(.btn):hover { text-decoration: underline; color: var(--white); }
.header-phone { white-space: nowrap; }

.menu-toggle {
  display: none;
  margin-left: auto;
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,.75); border-radius: 999px;
  font: 700 1rem var(--sans); padding: 0.5rem 1.1rem; min-height: 2.75rem;
  cursor: pointer;
}

/* Hero: the header's blue carries straight down into the hero text panel */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
  background: var(--rose-blue);
  color: var(--white);
}
.hero-text {
  padding: clamp(3rem, 7vw, 6rem) var(--gutter) clamp(3rem, 7vw, 6rem) max(var(--gutter), calc((100vw - 84rem) / 2 + var(--gutter)));
  align-self: center;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2.6rem, 1.6rem + 3.6vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 12ch;
  margin-bottom: 0.5em;
}
.hero-lede { font-size: 1.25rem; max-width: 34rem; color: #E4EEF8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-photo { position: relative; min-height: 26rem; }
.hero-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 55% 50%;
}

/* Sections */
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-head { max-width: 40rem; margin-bottom: 2.75rem; }
.section-head p { font-size: 1.1875rem; color: var(--ink-soft); }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.about-copy p { max-width: 36rem; }
.about-copy p:first-of-type { font-size: 1.25rem; }

.facts { margin: 0.5rem 0 0; border-top: 2px solid var(--ink); }
.facts > div {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.facts dt { font-weight: 700; color: var(--rose-red); }
.facts dd { margin: 0; }

/* Care */
.care { background: var(--sky); }
.care-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.care-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2.25rem 2.5rem; }
.care-item h3 { margin-bottom: 0.4em; }
.care-item p { margin: 0; color: var(--ink-soft); }
.care-item::before {
  content: ""; display: block;
  width: 2.25rem; height: 3px; margin-bottom: 1rem;
  background: var(--rose-red);
}
.care-photo { margin: 0; }
.care-photo img { border-radius: 0.5rem; }
.care-photo figcaption { font-size: 1rem; color: var(--ink-soft); margin-top: 0.75rem; }

.included {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.included ul {
  list-style: none; margin: 0; padding: 0;
  columns: 2; column-gap: 3rem;
}
.included li {
  break-inside: avoid;
  padding: 0.45rem 0 0.45rem 1.5rem;
  position: relative;
}
.included li::before {
  content: ""; position: absolute; left: 0; top: 1.05rem;
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--rose-red);
}

/* Life here gallery */
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, 17rem);
  grid-template-areas:
    "dinner dinner anniv game"
    "color  cake   anniv game"
    "hv     hv     hw    hw";
  gap: 1.25rem 1rem;
}
.g-birthday-dinner { grid-area: dinner; }
.g-anniversary { grid-area: anniv; }
.g-game-time { grid-area: game; }
.g-coloring { grid-area: color; }
.g-birthday-cake { grid-area: cake; }
.g-halloween-visitors { grid-area: hv; }
.g-halloween { grid-area: hw; }
.gallery li { display: flex; flex-direction: column; min-height: 0; }
.g-open {
  flex: 1; min-height: 0;
  padding: 0; border: 0; background: var(--sky);
  border-radius: 0.5rem; overflow: hidden; cursor: zoom-in;
}
.g-open img { width: 100%; height: 100%; object-fit: cover; }
.g-cap { margin: 0.5rem 0 0; font-size: 1rem; color: var(--ink-soft); }

/* Location */
.location { background: var(--sky); }
.location-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: stretch;
}
.location address { font-style: normal; font-size: 1.375rem; font-weight: 600; margin-bottom: 1.25rem; }
.location h3 { margin-top: 1.75rem; font-size: 1.25rem; }
.plain-list { list-style: none; padding: 0; margin: 0 0 1.75rem; }
.plain-list li { padding-block: 0.3rem; }
.text-link { font-weight: 700; }
.map { min-height: 24rem; border-radius: 0.5rem; overflow: hidden; background: var(--line); }
.map iframe { width: 100%; height: 100%; min-height: 24rem; border: 0; display: block; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.contact-info > p { max-width: 32rem; font-size: 1.1875rem; }
.contact-list { margin: 2rem 0 0; }
.contact-list > div { padding-block: 0.9rem; border-top: 1px solid var(--line); }
.contact-list dt { font-weight: 700; font-size: 1rem; color: var(--rose-red); }
.contact-list dd { margin: 0.15rem 0 0; font-size: 1.1875rem; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--rose-blue);
  border-radius: 0.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.contact-form h3 { font-size: 1.625rem; margin-bottom: 1.25rem; }
.field { margin-bottom: 1.15rem; flex: 1; }
.field-row { display: flex; gap: 0 1rem; flex-wrap: wrap; }
.field-row .field { min-width: 12rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.field label .optional { font-weight: 400; color: var(--ink-soft); }
.field-hint { margin: -0.15rem 0 0.5rem; font-size: 1rem; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  padding: 0.7rem 0.85rem;
  border: 1.5px solid #9DB0C6; border-radius: 0.375rem;
  background: var(--white);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid rgba(22, 95, 166, .35); outline-offset: 0; border-color: var(--rose-blue);
}
.field [aria-invalid="true"] { border-color: var(--rose-red); }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 1rem 0 0; font-weight: 700; }
.form-status.is-error { color: var(--rose-red); }
.form-status.is-ok { color: #1E7A44; }

/* Footer */
.site-footer {
  background: var(--rose-blue);
  color: var(--white);
  padding-block: 3.5rem 2rem;
}
.site-footer a { color: var(--white); }
.site-footer a:hover { color: #FFD9DB; }
.footer-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 3rem;
  align-items: start;
}
.footer-logo { width: 8.5rem; }
.footer-title { color: var(--white); font-size: 1.5rem; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; }
.site-footer nav li { padding-block: 0.2rem; }
.copyright {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.25);
  font-size: 0.9375rem; color: #D5E3F2;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem;
}
.copyright p { margin: 0; }
.copyright a + a { margin-left: 1.25rem; }

/* Policy pages */
.header-back { margin-left: auto; }
.prose { max-width: 44rem; }
.prose h1 { font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem); margin-bottom: 0.3em; }
.prose h2 { font-size: 1.5rem; margin-top: 2.25rem; }
.prose ul { padding-left: 1.25rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4rem; }
.updated { color: var(--ink-soft); margin-bottom: 2rem; }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; background: transparent;
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
}
.lightbox::backdrop { background: rgba(10, 22, 40, .92); }
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox img { max-width: min(92vw, 1400px); max-height: 82vh; width: auto; border-radius: 0.375rem; }
.lightbox-cap { color: var(--white); margin: 1rem 0 0; }
.lb-btn {
  position: absolute;
  width: 3.25rem; height: 3.25rem; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.14); color: var(--white);
  font-size: 2rem; line-height: 1; cursor: pointer;
}
.lb-btn:hover { background: rgba(255,255,255,.28); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

.mobile-bar { display: none; }

/* Medium screens */
@media (max-width: 1100px) {
  .site-nav ul { gap: 1.1rem; }
  .header-phone { display: none; }
}

@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--rose-blue);
    padding: 0.5rem var(--gutter) 1.5rem;
    border-top: 1px solid rgba(255,255,255,.2);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 0.85rem 0; border-bottom: 1px solid rgba(255,255,255,.15); font-size: 1.1875rem; }
  .header-phone { display: block; padding: 1rem 0; }
  .site-nav .btn { align-self: flex-start; }

  .hero { grid-template-columns: 1fr; }
  .hero-photo { order: -1; min-height: 0; aspect-ratio: 16 / 9; }
  .hero-text { padding: 2.5rem var(--gutter) 3rem; }

  .about-grid, .care-layout, .location-grid, .contact-grid { grid-template-columns: 1fr; }
  .care-photo { max-width: 28rem; }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: 15rem;
    grid-template-areas:
      "dinner dinner"
      "anniv  game"
      "color  cake"
      "hv     hv"
      "hw     hw";
  }
  .footer-grid { grid-template-columns: auto 1fr; }
  .site-footer nav { grid-column: 1 / -1; }
  .site-footer nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
}

@media (max-width: 640px) {
  :root { --header-h: 4.25rem; }
  /* Keep focused fields and links clear of the fixed bottom bar. */
  html { scroll-padding-bottom: 6rem; }
  body { padding-bottom: 4.75rem; }
  .brand-rose { width: 3rem; }
  .brand-word { width: 7.5rem; }
  .care-list { grid-template-columns: 1fr; }
  .included ul { columns: 1; }
  .facts > div { grid-template-columns: 1fr; gap: 0.15rem; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 16rem; grid-template-areas: none; }
  .gallery li { grid-area: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-logo { width: 7rem; }

  .mobile-bar {
    display: flex; gap: 0.6rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 0.7rem var(--gutter) calc(0.7rem + env(safe-area-inset-bottom, 0px));
    background: var(--rose-blue);
    box-shadow: 0 -2px 12px rgba(10, 30, 60, .2);
  }
  .mobile-bar .btn { flex: 1; padding-inline: 0.75rem; font-size: 1rem; white-space: nowrap; }
}

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