/* ---------- PACS Independent Living — design tokens ---------- */
:root {
  --ink: #1D3D3E;
  --ink-soft: #545454;
  --teal: #1D3D3E;          /* deep teal (primary dark) */
  --teal-deep: #122a2b;     /* darker teal */
  --teal-soft: #2B5254;     /* secondary surface (tile bg on dark) */
  --cream: #F2F0EA;         /* very light off-white */
  --cream-light: #FAFAFA;   /* near-white bg */
  --blush: #ECECEC;         /* neutral light gray */
  --gold: #A6FF79;          /* acid lime accent */
  --gold-deep: #8EE060;     /* deeper lime */
  --line: rgba(0, 0, 0, 0.10);
}

html { scroll-behavior: smooth; }
body {
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
::selection { background: var(--gold); color: var(--teal-deep); }

/* ---------- Type ---------- */
.font-display {
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: -0.022em;
  font-weight: 600;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 500;
}

/* ---------- Sticky nav ---------- */
.nav {
  transition: background-color 360ms ease, border-color 360ms ease, backdrop-filter 360ms ease, padding 360ms ease;
}
.nav.scrolled {
  background: rgba(250, 250, 250, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 0;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform 280ms ease, background-color 280ms ease, color 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn .arrow {
  transition: transform 280ms ease;
  display: inline-flex;
}
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary { background: var(--teal); color: var(--cream-light); }
.btn-primary:hover {
  background: var(--teal-deep);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -12px rgba(18, 42, 43, 0.5);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--cream-light);
  border-color: var(--ink);
}
.btn-gold { background: var(--gold); color: var(--teal-deep); }
.btn-gold:hover {
  background: var(--gold-deep);
  color: var(--cream-light);
  transform: translateY(-1px);
}

/* ---------- Image frames ---------- */
.frame {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  background: var(--blush);
  box-shadow: 0 30px 60px -30px rgba(18, 42, 43, 0.4);
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1200ms cubic-bezier(0.2, 0.6, 0.2, 1);
  -webkit-touch-callout: none;
  user-select: none;
}
.frame:hover img { transform: scale(1.04); }
.frame { border-radius: 0; }
.frame-arch  { border-radius: 0; }
.frame-soft  { border-radius: 0; }
.frame-circle { border-radius: 0; }

/* ---------- Cards ---------- */
.card {
  background: var(--cream-light);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 28px;
  transition: transform 320ms ease, box-shadow 320ms ease, border-color 320ms ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -28px rgba(18, 42, 43, 0.3);
  border-color: rgba(29, 61, 62, 0.22);
}
.card-tile {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 32px;
  box-shadow: 0 24px 60px -32px rgba(18, 42, 43, 0.22);
}

/* ---------- Feature tile (icon-badge style) ---------- */
.feature-tile {
  display: block;
  background: var(--teal-deep);
  color: var(--cream-light);
  border-radius: 0;
  padding: 28px;
  transition: transform 320ms ease, background-color 320ms ease;
  text-decoration: none;
}
.feature-tile:hover {
  background: #0E1F18;
  transform: translateY(-3px);
}
.feature-tile .icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 0;
  background: var(--gold);
  color: var(--teal-deep);
  margin-bottom: 28px;
}
.feature-tile .icon-badge svg {
  width: 26px;
  height: 26px;
}
.feature-tile .icon-badge i.ph {
  font-size: 28px;
  line-height: 1;
  color: var(--teal-deep);
}
.feature-tile h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.022em;
  color: var(--gold);
  margin: 0;
}
.feature-tile p {
  margin-top: 14px;
  color: rgba(244, 236, 221, 0.78);
  font-size: 0.95rem;
  line-height: 1.6;
}
.feature-tile .tile-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  color: var(--gold);
  font-weight: 500;
  font-size: 14px;
  transition: gap 220ms ease;
}
.feature-tile:hover .tile-link {
  gap: 10px;
}

/* ---------- Premium tile (glassmorphism, light bg) ---------- */
.tile-glass {
  position: relative;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 0;
  padding: 28px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 30px 60px -30px rgba(18, 42, 43, 0.22);
  transition: transform 320ms ease, background-color 320ms ease, box-shadow 320ms ease;
}
.tile-glass:hover {
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 32px 64px -28px rgba(18, 42, 43, 0.32);
}

/* ---------- Premium tile (glass, on dark/teal sections) ---------- */
.tile-glass-dark {
  position: relative;
  background: rgba(250, 250, 250, 0.06);
  border: 1px solid rgba(250, 250, 250, 0.18);
  border-radius: 0;
  padding: 28px;
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 30px 60px -30px rgba(0, 0, 0, 0.45);
  color: var(--cream-light);
  transition: transform 320ms ease, background-color 320ms ease, border-color 320ms ease;
}
.tile-glass-dark:hover {
  background: rgba(250, 250, 250, 0.12);
  border-color: rgba(250, 250, 250, 0.32);
  transform: translateY(-3px);
}

/* ---------- Hero: subtle grid + colored hue glows ---------- */
.hero-grid-bg {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--cream-light);
  background-image:
    linear-gradient(rgba(29, 61, 62, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 61, 62, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
}
.hero-grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(45% 65% at 50% 110%, rgba(29, 61, 62, 0.30), transparent 65%),
    radial-gradient(35% 45% at 0% 0%, rgba(166, 255, 121, 0.28), transparent 70%),
    radial-gradient(35% 45% at 100% 0%, rgba(29, 61, 62, 0.22), transparent 70%);
}
.hero-grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(180deg, transparent 50%, var(--cream-light) 100%);
}

/* ---------- Section transition fades (cream<->teal smooth) ---------- */
.fade-top { position: relative; }
.fade-top::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 240px;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(
    180deg,
    var(--cream-light) 0%,
    rgba(242, 240, 234, 0.92) 25%,
    rgba(242, 240, 234, 0.60) 55%,
    rgba(242, 240, 234, 0.22) 82%,
    transparent 100%
  );
}
.fade-bottom { position: relative; }
.fade-bottom::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 200px;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(
    0deg,
    var(--cream-light) 0%,
    rgba(242, 240, 234, 0.85) 30%,
    rgba(242, 240, 234, 0.45) 65%,
    transparent 100%
  );
}
.fade-top > *, .fade-bottom > * { position: relative; z-index: 4; }

/* ---------- Auto-marquee for blog cards ---------- */
.blog-marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 5%, black 95%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, black 5%, black 95%, transparent 100%);
}
.blog-marquee-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: scroll-x-blog 60s linear infinite;
}
@keyframes scroll-x-blog {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.blog-marquee:hover .blog-marquee-track,
.blog-marquee:focus-within .blog-marquee-track {
  animation-play-state: paused;
}
.blog-marquee-card {
  flex: 0 0 auto;
  width: min(86vw, 380px);
}
@media (min-width: 1024px) {
  .blog-marquee-card { width: 400px; }
}
@media (prefers-reduced-motion: reduce) {
  .blog-marquee-track { animation: none; }
  .blog-marquee {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .blog-marquee-card { scroll-snap-align: start; }
}

/* ---------- Section variants for depth ---------- */
.depth-band {
  position: relative;
  background: linear-gradient(180deg, var(--cream-light) 0%, var(--blush) 50%, var(--cream-light) 100%);
}
.depth-band-warm {
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(166, 255, 121, 0.12), transparent 70%),
    var(--cream-light);
}

/* ---------- Horizontal scroller (blog/articles) ---------- */
.scroller-h {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 24px;
  padding: 8px 24px 32px;
  margin-inline: -24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(29, 61, 62, 0.25) transparent;
  -webkit-overflow-scrolling: touch;
}
.scroller-h::-webkit-scrollbar {
  height: 8px;
}
.scroller-h::-webkit-scrollbar-track {
  background: transparent;
}
.scroller-h::-webkit-scrollbar-thumb {
  background: rgba(29, 61, 62, 0.22);
  border-radius: 999px;
}
.scroller-h::-webkit-scrollbar-thumb:hover {
  background: rgba(29, 61, 62, 0.4);
}
.scroller-card {
  flex: 0 0 auto;
  width: min(86vw, 380px);
  scroll-snap-align: start;
}
@media (min-width: 1024px) {
  .scroller-card { width: 400px; }
}
.scroller-fade {
  position: relative;
}
.scroller-fade::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 60px;
  background: linear-gradient(90deg, transparent, var(--cream-light));
  pointer-events: none;
  z-index: 2;
}

/* ---------- Tag chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
}
.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- Scroll reveal ---------- */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms cubic-bezier(0.2, 0.6, 0.2, 1),
              transform 900ms cubic-bezier(0.2, 0.6, 0.2, 1);
  will-change: opacity, transform;
}
[data-animate].in-view {
  opacity: 1;
  transform: translateY(0);
}
[data-animate-delay="1"] { transition-delay: 80ms; }
[data-animate-delay="2"] { transition-delay: 160ms; }
[data-animate-delay="3"] { transition-delay: 240ms; }
[data-animate-delay="4"] { transition-delay: 320ms; }
[data-animate-delay="5"] { transition-delay: 400ms; }
[data-animate="scale"] { transform: translateY(28px) scale(0.96); }
[data-animate="scale"].in-view { transform: translateY(0) scale(1); }

/* ---------- Marquee ---------- */
.marquee {
  display: flex;
  width: max-content;
  animation: scroll-x 38s linear infinite;
}
@keyframes scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee:hover { animation-play-state: paused; }

/* ---------- Underline link ---------- */
.link-under {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  transition: gap 220ms ease;
}
.link-under:hover {
  gap: 10px;
}

/* ---------- Mobile nav ---------- */
.mobile-nav {
  transform: translateY(-100%);
  transition: transform 420ms cubic-bezier(0.2, 0.6, 0.2, 1);
}
.mobile-nav.open { transform: translateY(0); }

/* ---------- Footer ---------- */
.footer-link {
  color: rgba(242, 240, 234, 0.72);
  transition: color 220ms ease;
}
.footer-link:hover { color: var(--cream-light); }

/* ---------- Article prose ---------- */
.prose-pacs {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.72;
}
.prose-pacs h2 {
  font-family: 'Times New Roman', Times, serif;
  font-size: 36px;
  letter-spacing: -0.015em;
  margin: 56px 0 16px;
  line-height: 1.15;
}
.prose-pacs h3 {
  font-family: 'Times New Roman', Times, serif;
  font-size: 26px;
  margin: 36px 0 12px;
  line-height: 1.25;
}
.prose-pacs p { margin: 16px 0; }
.prose-pacs ul, .prose-pacs ol {
  margin: 16px 0 16px 22px;
  padding-left: 6px;
}
.prose-pacs li { margin: 8px 0; }
.prose-pacs ul li { list-style: disc; }
.prose-pacs ol li { list-style: decimal; }
.prose-pacs a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose-pacs a:hover { color: var(--teal-deep); }
.prose-pacs strong { color: var(--ink); font-weight: 600; }
.prose-pacs blockquote {
  border-left: 3px solid var(--gold);
  padding: 6px 0 6px 22px;
  margin: 28px 0;
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-animate],
  [data-animate].in-view {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .marquee { animation: none; }
}
