:root {
  --ink: #241814;
  --muted: #6e5548;
  --bg: #f0e6dc;
  --bg-soft: #e4d4c6;
  --paper: #fff8f2;
  --teak: #3a2418;
  --rose: #c45c26;
  --rose-deep: #9a3f18;
  --leaf: #3d6b4f;
  --amber: #e09f3e;
  --line: rgba(36, 24, 20, 0.12);
  --font: 'Anuphan', sans-serif;
  --heading: 'Prompt', 'Anuphan', sans-serif;
  --mono: 'IBM Plex Mono', 'Anuphan', monospace;
  --max: 1120px;
  --demo-h: 48px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(224, 159, 62, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 35% at 0% 30%, rgba(61, 107, 79, 0.1), transparent 50%),
    linear-gradient(180deg, #f7efe6 0%, var(--bg) 45%, #e8d8ca 100%);
  line-height: 1.65;
  overflow-x: hidden;
  font-synthesis: none;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; font-size: 16px; }
ul, ol { list-style: none; }
.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.mono { font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.68rem; font-weight: 500; }

.demo-bar {
  position: sticky; top: 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap; padding: 0.55rem 1.25rem;
  background: var(--teak); color: #fff; font-size: 0.82rem;
}
.demo-bar strong {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em;
  color: var(--amber); font-weight: 500;
}
.demo-bar__actions { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.demo-bar a {
  padding: 0.35rem 0.7rem; border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius); font-size: 0.78rem; font-weight: 500;
}
.demo-bar a.is-primary { background: var(--rose); border-color: var(--rose); color: #fff; }

.site-header {
  position: sticky; top: var(--demo-h); z-index: 50;
  background: rgba(240, 230, 220, 0.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); position: relative;
}
.brand {
  font-family: var(--heading); font-weight: 700; font-size: 1.3rem;
  display: inline-flex; align-items: baseline; gap: 0.45rem;
}
.brand small {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--rose-deep); font-weight: 500;
}
.menu-toggle {
  display: none; background: none; border: 1px solid var(--line);
  padding: 0.45rem 0.8rem; cursor: pointer; border-radius: var(--radius); color: var(--ink);
}
.nav { display: flex; align-items: center; gap: 1.15rem; }
.nav a { font-size: 0.92rem; font-weight: 500; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.nav-cta {
  background: var(--rose); color: #fff !important;
  padding: 0.55rem 1.05rem; border-radius: var(--radius); font-weight: 700;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.9rem 1.4rem; font-weight: 700; border-radius: var(--radius);
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--warm { background: var(--rose); color: #fff; }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,0.45); background: transparent; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.text-link { font-weight: 700; color: var(--rose-deep); }

.hero {
  position: relative; min-height: min(90dvh, 820px);
  display: flex; align-items: flex-end; color: #fff; overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  animation: ken 22s var(--ease) both;
}
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(115deg, rgba(36, 24, 20, 0.92) 0%, rgba(36, 24, 20, 0.55) 48%, rgba(196, 92, 38, 0.28) 100%),
    repeating-linear-gradient(90deg, transparent, transparent 48px, rgba(255,255,255,0.03) 48px, rgba(255,255,255,0.03) 49px);
}
.hero__inner {
  position: relative; z-index: 2;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto; padding: 4.5rem 0 3.5rem;
  animation: rise 0.9s var(--ease) both;
}
.hero__brand {
  font-family: var(--heading); font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700; margin-bottom: 0.85rem; letter-spacing: -0.02em;
}
.hero__brand span {
  display: inline-block; margin-left: 0.55rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; vertical-align: middle; color: var(--amber); font-weight: 500;
}
.hero h1 {
  font-family: var(--heading); font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; max-width: 14ch;
  margin-bottom: 1rem;
}
.hero h1 em { font-style: normal; color: #ffd7a8; }
.hero__lead { max-width: 36ch; font-size: 1.05rem; color: rgba(255,255,255,0.88); margin-bottom: 1.5rem; }

.section { padding: 5rem 0; }
.section--teak {
  background: var(--teak); color: #f7efe6;
}
.section--teak .section__head p:not(.eyebrow) { color: rgba(247, 239, 230, 0.7); }
.section--book { padding-bottom: 6rem; }
.section__head { margin-bottom: 2.25rem; max-width: 36rem; }
.eyebrow {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--rose); margin-bottom: 0.65rem;
}
.eyebrow.light { color: var(--amber); }
.section__head h2 {
  font-family: var(--heading); font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 0.55rem;
}
.section__head p { color: var(--muted); }

/* Roster board — signature */
.roster {
  border: 1.5px solid var(--ink);
  background: var(--paper);
  overflow: auto;
  box-shadow: 8px 8px 0 rgba(58, 36, 24, 0.12);
}
.roster__head, .roster__row {
  display: grid;
  grid-template-columns: 7.5rem repeat(7, minmax(5.2rem, 1fr));
  min-width: 720px;
}
.roster__head {
  background: var(--teak); color: #fff;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.roster__head > span {
  padding: 0.85rem 0.5rem; text-align: center;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.roster__corner { text-align: left !important; padding-left: 0.85rem !important; }
.roster__row { border-top: 1px solid var(--line); }
.roster__shift {
  padding: 0.85rem; background: var(--bg-soft);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.15rem; justify-content: center;
}
.roster__shift strong { font-family: var(--heading); font-size: 1rem; }
.roster__shift small { color: var(--muted); font-size: 0.75rem; }
.cell {
  padding: 0.7rem 0.55rem; border-right: 1px solid var(--line);
  min-height: 4.6rem; display: flex; flex-direction: column; gap: 0.2rem;
  justify-content: center; transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.cell span { font-weight: 600; font-size: 0.82rem; line-height: 1.25; }
.cell em { font-style: normal; font-size: 0.72rem; color: var(--muted); }
.cell:hover { transform: scale(1.02); z-index: 1; }
.cell--filled { background: color-mix(in srgb, var(--rose) 14%, white); }
.cell--filled span { color: var(--rose-deep); }
.cell--soft { background: color-mix(in srgb, var(--leaf) 12%, white); }
.cell--soft span { color: var(--leaf); }
.cell--open {
  background: repeating-linear-gradient(-45deg, transparent, transparent 4px, rgba(36,24,20,0.04) 4px, rgba(36,24,20,0.04) 8px);
  color: var(--muted);
}
.roster-legend {
  display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.25rem;
  font-size: 0.88rem; color: var(--muted);
}
.dot {
  display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px;
  margin-right: 0.4rem; vertical-align: -1px;
}
.dot--filled { background: color-mix(in srgb, var(--rose) 55%, white); }
.dot--soft { background: color-mix(in srgb, var(--leaf) 50%, white); }
.dot--open { background: var(--bg-soft); border: 1px solid var(--line); }

.duty-rail {
  display: grid; gap: 0;
  border-top: 1px solid rgba(247,239,230,0.18);
}
.duty-rail li {
  display: grid; grid-template-columns: 1fr; gap: 0.45rem;
  padding: 1.6rem 0; border-bottom: 1px solid rgba(247,239,230,0.18);
  animation: slide-in 0.7s var(--ease) both;
}
.duty-rail li:nth-child(2) { animation-delay: 0.08s; }
.duty-rail li:nth-child(3) { animation-delay: 0.16s; }
.duty-rail h3 { font-family: var(--heading); font-size: 1.35rem; letter-spacing: -0.02em; }
.duty-rail p { color: rgba(247,239,230,0.72); max-width: 48ch; }
.duty-rail .text-link { color: var(--amber); }
.duty-rail .mono { color: var(--amber); }

.carer-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.carer {
  display: grid; grid-template-rows: auto 1fr; gap: 1rem;
}
.carer img {
  aspect-ratio: 4/5; object-fit: cover; width: 100%;
  border-radius: var(--radius);
  filter: saturate(0.92);
}
.carer h3 { font-family: var(--heading); font-size: 1.25rem; margin: 0.25rem 0; }
.carer p { color: var(--muted); font-size: 0.95rem; }
.carer .mono { color: var(--rose); }


.book-split {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 2.5rem; align-items: start;
}
.contact-ids { margin: 1rem 0 1.5rem; color: var(--muted); }
.book-photo img {
  border-radius: var(--radius); aspect-ratio: 3/2; object-fit: cover; width: 100%;
}
.book-form {
  background: var(--paper); border: 1.5px solid var(--ink);
  padding: 1.6rem; display: grid; gap: 1rem;
  box-shadow: 6px 6px 0 rgba(58, 36, 24, 0.1);
}
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input, .field select, .field textarea {
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 0.75rem 0.9rem; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--rose); outline-offset: 1px; border-color: transparent;
}

.site-footer {
  background: var(--teak); color: #f7efe6; padding: 3rem 0 1.5rem;
}
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem;
}
.site-footer .brand small { color: var(--amber); }
.footer__lede { color: rgba(247,239,230,0.65); margin-top: 0.6rem; max-width: 28ch; }
.site-footer h4 {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--amber); margin-bottom: 0.75rem;
}
.site-footer a { display: block; color: rgba(247,239,230,0.8); margin-bottom: 0.4rem; font-size: 0.92rem; }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  padding-top: 1.25rem; border-top: 1px solid rgba(247,239,230,0.15);
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em;
  color: rgba(247,239,230,0.55);
}

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@keyframes ken {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes slide-in {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}

.voice-roster {
  display: grid;
  gap: 0;
}
.voice-row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.85rem 1.5rem;
  align-items: start;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
}
.voice-row:first-child { border-top: 1px solid var(--line); }
.voice-row__tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose);
  padding-top: 0.25rem;
}
.voice-row__body p {
  font-family: var(--heading);
  font-size: 1.15rem;
  line-height: 1.4;
  margin: 0 0 0.55rem;
}
.voice-row__body cite {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .voice-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .carer-strip, .book-split, .footer__grid { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; right: 0; left: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 0.75rem 1.25rem 1rem; gap: 0.35rem;
  }
  .nav.is-open { display: flex; }
  .nav-cta { text-align: center; }
}

@media (max-width: 640px) {
  .hero { min-height: min(85dvh, 700px); }
  .hero h1 { max-width: none; }
}
