/*
Theme Name: Restore Assisted Living Corp
Theme URI: https://restoreassistedliving.com
Author: Restore Assisted Living Corp
Description: Design for the Restore Assisted Living Corp site (dark teal by default, light option, large-text option). Needs the companion plugin "Restore Assisted Living Core" for pages and forms.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: restore-assisted-living
*/

/* Layout concept: calm, high-contrast, large-type site for adult children and seniors. One hash-routed page set, sticky header with the phone number always visible, one priority-list call to action repeated on every page. */
/* Dark is the default display. Visitors can switch to light with the Theme button. */
:root {
  --bg: #0F1B1B;
  --surface: #162626;
  --ink: #E8F1ED;
  --muted: #AABFBA;
  --teal: #4DC0D2;
  --teal-strong: #86D8E5;
  --logo-teal: #0B8A9D;
  --logo-green: #A5B548;
  --on-teal: #062229;
  --olive: #C5D56E;
  --olive-soft: #262F14;
  --line: #2B4040;
  --ring: #7FD3E2;
  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F3F7F4;
  --surface: #FFFFFF;
  --ink: #14282A;
  --muted: #465D5A;
  --teal: #0A7587;
  --teal-strong: #075564;
  --on-teal: #FFFFFF;
  --olive: #5A6720;
  --olive-soft: #EDF2D6;
  --line: #D0DCD5;
  --ring: #0B8A9D;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { font-size: 112.5%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.6;
  padding-inline: 1rem; padding-block: 0;
  -webkit-text-size-adjust: 100%;
}
.wrap { width: 100%; max-width: 72rem; margin-inline: auto; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.05rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0; max-width: 65ch; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-strong); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--teal); color: var(--on-teal); padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; top: .5rem; }

/* opening-soon strip */
.strip { background: var(--olive-soft); color: var(--ink); margin-inline: -1rem; padding: .5rem 1rem; font-size: .85rem; font-weight: 600; }
.strip .wrap { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; justify-content: space-between; }

/* header */
header.site { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); margin-inline: -1rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand svg { width: 3.2rem; aspect-ratio: 131 / 90; flex: none; display: block; }
.brand .bt { display: flex; flex-direction: column; line-height: 1.05; }
.brand b { font-family: "Marcellus", var(--font-display); font-weight: 400; font-size: 1.6rem; letter-spacing: .14em; color: var(--teal); }
.brand span { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--olive); margin-top: .15rem; }
.lt { fill: var(--logo-teal); } .lg { fill: var(--logo-green); }
.logo-full { display: block; aspect-ratio: 131 / 125; height: auto; }
.hero-logo { width: min(100%, 19rem); margin-inline: auto; }
.foot-logo { width: 8.5rem; margin-bottom: .9rem; }
nav.main ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex-wrap: wrap; }
nav.main a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; padding: .55rem .7rem; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
nav.main a:hover { background: var(--olive-soft); }
nav.main a[aria-current="page"] { color: var(--teal); box-shadow: inset 0 -3px 0 var(--teal); border-radius: 0; }
.hdr-tools { display: flex; align-items: center; gap: .5rem; }
.phone { font-weight: 700; text-decoration: none; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.menu-btn { display: none; }
.icon-btn { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; min-height: 44px; min-width: 44px; padding: 0 .7rem; font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; }
.icon-btn:hover { background: var(--olive-soft); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .7rem 1.25rem; border-radius: 12px; font: inherit; font-weight: 700; text-decoration: none; border: 2px solid var(--teal); cursor: pointer; }
.btn.primary { background: var(--teal); color: var(--on-teal); }
.btn.primary:hover { background: var(--teal-strong); color: var(--on-teal); border-color: var(--teal-strong); }
.btn.ghost { background: transparent; color: var(--teal); }
.btn.ghost:hover { background: var(--olive-soft); }

main { padding-block: 2.5rem 3rem; }
.page { display: flex; flex-direction: column; gap: 3.5rem; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--olive); margin-bottom: .6rem; }
.lede { font-size: 1.15rem; color: var(--muted); margin-top: 1rem; }
.section-head { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2.5rem; align-items: center; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero-art { background: var(--surface); border: 1px solid var(--line); border-radius: 28px 28px var(--radius) var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.hero-art svg { width: 100%; height: auto; display: block; }
.art-teal { fill: var(--teal); } .art-olive { fill: var(--olive); } .art-soft { fill: var(--olive-soft); } .art-bg { fill: var(--bg); }
.status { display: flex; flex-direction: column; gap: .15rem; font-size: .95rem; }
.status b { font-family: var(--font-display); font-size: 1.1rem; }

/* generic grids */
.grid { display: grid; gap: 1.25rem; }
.g3 { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.card p { color: var(--muted); }
.card a.more { margin-top: auto; font-weight: 700; padding-top: .4rem; }
.promise { border-top: 4px solid var(--teal); border-radius: 4px var(--radius) var(--radius) var(--radius); }
.promise:nth-child(2) { border-top-color: var(--olive); }

.band { background: var(--teal); color: var(--on-teal); border-radius: 22px; padding: clamp(1.5rem, 4vw, 2.75rem); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.band h2 { color: var(--on-teal); }
.band p, .band li { color: var(--on-teal); }
.band ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.band .btn.primary { background: var(--on-teal); color: var(--teal-strong); border-color: var(--on-teal); }
.band .btn.primary:hover { background: var(--olive-soft); color: var(--teal-strong); }

.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.checks li { display: grid; grid-template-columns: 1.4rem 1fr; gap: .6rem; align-items: start; }
.checks li::before { content: ""; width: 1.1rem; height: 1.1rem; margin-top: .3rem; border-radius: 50%; background: var(--olive-soft); border: 2px solid var(--olive); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; }

/* tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 38rem; font-size: .95rem; }
th, td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--olive); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 700; }

/* day timeline */
.day { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-left: 3px solid var(--line); margin-left: .5rem; }
.day li { display: grid; grid-template-columns: 5.2rem 1fr; gap: 1rem; padding: .7rem 0 .7rem 1.1rem; position: relative; }
.day li::before { content: ""; position: absolute; left: -.55rem; top: 1.15rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--teal); }
.day time { font-weight: 700; color: var(--teal); font-variant-numeric: tabular-nums; }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; }
details + details { margin-top: .75rem; }
summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 700; min-height: 48px; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--teal); }
details[open] summary::after { content: "\2212"; }
details p { padding: 0 1.25rem 1.1rem; color: var(--muted); }

/* form */
form { display: flex; flex-direction: column; gap: 1.1rem; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.1rem; }
label, legend { font-weight: 700; font-size: .95rem; display: block; margin-bottom: .35rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 10px; padding: .7rem .85rem; min-height: 48px; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); }
textarea { min-height: 7rem; resize: vertical; }
.consent { display: grid; grid-template-columns: 1.5rem 1fr; gap: .7rem; align-items: start; font-weight: 400; }
.consent input { width: 1.4rem; min-height: 1.4rem; height: 1.4rem; margin-top: .2rem; accent-color: var(--teal); }
.err { color: #FF9C93; font-size: .85rem; font-weight: 600; min-height: 1.1em; }
:root[data-theme="light"] .err { color: #B3261E; }
.result { background: var(--olive-soft); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: .8rem; }
.result pre { white-space: pre-wrap; word-break: break-word; font: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .9rem; margin: 0; font-size: .92rem; }
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 2.5rem; align-items: start; }
.facts { display: flex; flex-direction: column; gap: 1.1rem; }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--olive); }
.facts dd { margin: .15rem 0 0; font-size: 1.1rem; }
.bigphone { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }

footer.site { margin-inline: -1rem; padding: 2.25rem 1rem 2.5rem; background: var(--surface); border-top: 1px solid var(--line); }
footer.site .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.75rem; }
footer.site h3 { font-size: 1rem; margin-bottom: .6rem; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
footer.site small { display: block; margin-top: 1.75rem; color: var(--muted); }
.legal p + p { margin-top: .9rem; }

@media (max-width: 52rem) {
  .hero, .band, .split, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-flex; align-items: center; }
  nav.main { display: none; width: 100%; order: 5; }
  nav.main.open { display: block; }
  nav.main ul { flex-direction: column; gap: 0; }
  nav.main a { border-bottom: 1px solid var(--line); border-radius: 0; }
  nav.main a[aria-current="page"] { box-shadow: none; background: var(--olive-soft); }
  .phone { font-size: .9rem; }
  .day li { grid-template-columns: 4.4rem 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
.facts dd { overflow-wrap: anywhere; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: var(--radius); padding: 1rem 1.25rem; font-weight: 600; background: var(--olive-soft); }
.notice.bad { background: transparent; border: 2px solid #B3261E; }
body.admin-bar header.site { top: 32px; }
@media (max-width: 782px) { body.admin-bar header.site { top: 46px; } }
.entry-plain h1 { margin-bottom: 1rem; }
.entry-plain p + p { margin-top: 1rem; }

/* photos */
.photo { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--olive-soft); }
.photo img { display: block; width: 100%; height: auto; }
.card-photo { margin: -1.4rem -1.4rem .6rem; border-radius: var(--radius) var(--radius) 0 0; }
.card-photo img { aspect-ratio: 3 / 2; object-fit: cover; }
.hero-art { padding: 0; gap: 0; overflow: hidden; }
.hero-art .status { padding: 1.1rem 1.25rem 1.25rem; }
.hero-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.feature { align-items: center; }
.feature .stack { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.page-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2.5rem; align-items: center; }
.page-head .photo img { aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 52rem) { .page-head { grid-template-columns: minmax(0, 1fr); } }

/* ---- v1.1 additions: status tags, locations, forms, checklist, photo labels, print ---- */
nav.main a { padding: .55rem .55rem; font-size: .88rem; }
.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; }
.strip a { color: inherit; font-weight: 700; }
.fine { font-size: .92rem; color: var(--muted); margin-top: 1.1rem; max-width: 60ch; }
.tag { display: inline-block; align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--olive-soft); color: var(--olive); border: 1px solid var(--olive); border-radius: 999px; padding: .15rem .65rem; }
.callout { background: var(--olive-soft); border-left: 5px solid var(--olive); border-radius: 4px var(--radius) var(--radius) 4px; padding: 1.1rem 1.25rem; color: var(--ink); max-width: 70ch; }
.callout p { color: var(--ink); }
.statlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; font-size: .95rem; }
.statlist li { display: grid; grid-template-columns: 8.5rem 1fr; gap: .75rem; }
.statlist b { color: var(--olive); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; padding-top: .15rem; }
.defs { margin: 0; display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: .9rem 1.5rem; }
.defs dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--olive); padding-top: .2rem; }
.defs dd { margin: 0; }
@media (max-width: 40rem) { .defs { grid-template-columns: minmax(0, 1fr); gap: .15rem; } .defs dd { margin-bottom: .8rem; } .statlist li { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.linkrow { display: flex; flex-wrap: wrap; gap: .75rem; }
.sources { font-size: .85rem; color: var(--muted); max-width: 75ch; margin-top: .75rem; }
.sources ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.sources li + li { margin-top: .25rem; }
.bio { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; max-width: 70ch; }
.bio p { max-width: none; }

/* illustrative photo label (every photo on the site) */
.photo, .hero-art { position: relative; }
.photo::after, .hero-art::after { content: "Illustrative photo"; position: absolute; left: .6rem; top: .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .04em; background: rgba(10,30,32,.78); color: #fff; padding: .2rem .6rem; border-radius: 999px; pointer-events: none; }
.card-photo::after { left: .5rem; top: .5rem; }

/* forms */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; }
.choice { display: inline-grid; grid-template-columns: 1.4rem auto; gap: .55rem; align-items: center; font-weight: 600; margin: 0; min-height: 44px; }
.choice input { width: 1.3rem; min-height: 1.3rem; height: 1.3rem; accent-color: var(--teal); margin: 0; }
.form-note { font-size: .88rem; color: var(--muted); max-width: 60ch; }
.form-alt { margin-top: 1rem; font-size: .95rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice.bad { background: #3A1A17; color: #FFC9C3; border-radius: var(--radius); padding: .9rem 1rem; font-weight: 600; margin-bottom: 1rem; }
:root[data-theme="light"] .notice.bad { background: #FDECEA; color: #7A1A14; }
.req { color: var(--muted); font-weight: 400; }

/* checklist */
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.checklist li { display: grid; grid-template-columns: 1.5rem 1fr; gap: .7rem; align-items: start; }
.checklist li::before { content: ""; width: 1.05rem; height: 1.05rem; margin-top: .3rem; border: 2px solid var(--ink); border-radius: 3px; background: transparent; }
.checklist-group { break-inside: avoid; }
.checklist-group h2 { font-size: 1.3rem; margin-bottom: .8rem; }

@media print {
  .strip, header.site, footer.site, .skip, .no-print, .band { display: none !important; }
  body { background: #fff; color: #000; padding: 0; font-size: 11pt; }
  .page { gap: 1rem; }
  .photo::after { display: none; }
  a { color: #000; text-decoration: none; }
  .checklist li::before { border-color: #000; }
  .checklist-group { margin-bottom: .8rem; }
  main { padding: 0; }
}

h1[tabindex="-1"]:focus { outline: none; }

/* large text and narrow screens: never let content push the page wider than the screen */
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); }
.row2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
footer.site .cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.facts dd, .callout, .card, .result { overflow-wrap: anywhere; }
.hdr-tools { flex-wrap: wrap; }
@media (max-width: 52rem) { .hdr-tools { justify-content: flex-end; } }

[hidden] { display: none !important; }
