:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c2328;
  --muted: #55606a;
  --line: #e3e0d8;
  --accent: #1f5c4a;
  --accent-text: #ffffff;
  --accent-soft: #e6efe9;
  --todo: #fff3c4;
  --todo-text: #5a4500;
  --radius: 12px;
  --max: 44rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14191c;
    --surface: #1b2226;
    --text: #e8ecee;
    --muted: #a3afb7;
    --line: #2c363c;
    --accent: #6fc3a4;
    --accent-text: #0d1a15;
    --accent-soft: #1d3029;
    --todo: #4a3d10;
    --todo-text: #ffe9a3;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 1; }

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 3.5rem;
}
.wordmark {
  font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none;
}
.wordmark span { color: var(--accent); }
header.site nav a { font-size: 0.9375rem; text-decoration: none; }

main { padding: 2rem 0 3rem; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); margin: 0 0 1rem; }
h2 { font-size: 1.375rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.0625rem; margin: 1.5rem 0 0.25rem; }

.lead { font-size: 1.1875rem; color: var(--muted); margin: 0 0 1.5rem; }

.button {
  display: inline-block; padding: 0.875rem 1.25rem; min-height: 3rem;
  border-radius: var(--radius); background: var(--accent); color: var(--accent-text);
  font-weight: 600; text-decoration: none;
}
.button.secondary { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.cards { display: grid; gap: 0.75rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.cards li {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.125rem;
}
.cards h3 { margin-top: 0; }
.cards p { margin: 0; color: var(--muted); }

.note {
  background: var(--accent-soft); border-radius: var(--radius);
  padding: 1rem 1.125rem; margin: 1.5rem 0;
}
.note p { margin: 0.25rem 0; }

.draft {
  background: var(--todo); color: var(--todo-text);
  border-radius: var(--radius); padding: 0.875rem 1.125rem; margin: 0 0 1.5rem;
  font-size: 0.9375rem;
}
.todo { background: var(--todo); color: var(--todo-text); padding: 0 0.25em; border-radius: 4px; }

.legal { font-size: 1rem; }
.legal h2 { font-size: 1.1875rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin: 0.25rem 0; }
.meta { color: var(--muted); font-size: 0.9375rem; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }

dl.company { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; }
dl.company dt { color: var(--muted); }
dl.company dd { margin: 0; }

.wrap.wide { max-width: 64rem; }
.wrap.wide h2 { max-width: calc(var(--max) - 2rem); margin-left: auto; margin-right: auto; }
/* Home page laid out as full-screen pages, one per swipe. The header and the hero share the first
   snap point so the header is always visible at the top; the footer snaps to the bottom so it stays reachable.
   Sections taller than the screen (cards on phones) still scroll freely inside. */
html.home { scroll-behavior: smooth; scroll-snap-type: y mandatory; }
.home header.site { scroll-snap-align: start; }
.home .page:not(.hero) { scroll-snap-align: start; scroll-snap-stop: always; }
.home footer.site { scroll-snap-align: end; }
.home main { padding: 0; }
.page {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 2.5rem 0;
}
.page > .wrap { width: 100%; }
.page h2:first-child { margin-top: 0; }
.hero { min-height: calc(100svh - 3.5rem - 1px); padding-bottom: 1rem; }
.hero .wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; }
.scroll-hint {
  align-self: center; display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  padding: 0.5rem 1rem; min-height: 2.75rem;
  color: var(--muted); font-size: 0.9375rem; text-decoration: none;
}
.scroll-hint .arrow {
  width: 0.75rem; height: 0.75rem; margin-top: 0.125rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); animation: hint-bounce 1.8s ease-in-out infinite;
}
@keyframes hint-bounce { 50% { translate: 0 0.3rem; } }
@media (prefers-reduced-motion: reduce) {
  html.home { scroll-behavior: auto; }
  .scroll-hint .arrow { animation: none; }
}

.phones {
  display: grid; gap: 1.5rem; justify-content: center;
  grid-template-columns: minmax(0, 20rem);
}
.phones figure { margin: 0; min-width: 0; }
.phones figcaption { text-align: center; font-weight: 600; margin: 0 0 0.5rem; }
.phone {
  border: 8px solid #222; border-radius: 24px; overflow: hidden;
  background: #efeae2; color: #111;
  font-size: 0.875rem; line-height: 1.4;
}
.ph-head { background: #1f5c4a; color: #fff; padding: 0.625rem 0.75rem; font-weight: 600; }
.ph-head small { display: block; font-weight: 400; opacity: 0.8; font-size: 0.6875rem; }
.chat { padding: 0.625rem; display: flex; flex-direction: column; gap: 0.5rem; }
.msg {
  max-width: 88%; padding: 0.4375rem 0.5625rem; border-radius: 8px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08); overflow-wrap: anywhere;
}
.msg.in { background: #fff; align-self: flex-start; }
.msg.out { background: #d9fdd3; align-self: flex-end; }
.msg.small, .msg .aside { font-size: 0.75rem; color: #555; }
.msg .aside { margin-top: 0.25rem; }
.msg .t { font-size: 0.625rem; color: #667; text-align: right; margin-top: 0.1875rem; }
.vocale { display: flex; align-items: center; gap: 0.375rem; }
.wave {
  flex: 1; min-width: 3rem; height: 14px; opacity: 0.6;
  background: repeating-linear-gradient(90deg, #888 0 2px, transparent 2px 5px);
}
.btns { display: flex; gap: 0.375rem; margin-top: 0.375rem; }
.btns span {
  flex: 1; text-align: center; background: #fff; border: 1px solid #cdd;
  color: #0a6cd6; border-radius: 6px; padding: 0.3125rem 0; font-size: 0.75rem;
}

/* Below 768px the phones become a swipeable carousel, one phone at a time. */
.dots { display: none; }
@media (max-width: 47.99rem) {
  .phones {
    display: flex; gap: 1rem; align-items: flex-start; justify-content: flex-start;
    position: relative; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .phones::-webkit-scrollbar { display: none; }
  .phones figure { flex: 0 0 100%; scroll-snap-align: center; }
  .phones .phone { max-width: 20rem; margin: 0 auto; }
  .dots { display: flex; justify-content: center; gap: 0.25rem; margin-top: 0.75rem; }
  .dots button {
    width: 2.75rem; height: 2.75rem; padding: 0; border: 0; background: transparent; cursor: pointer;
    display: grid; place-items: center;
  }
  .dots button::before {
    content: ""; width: 0.625rem; height: 0.625rem; border-radius: 50%;
    background: var(--line); transition: background 0.2s;
  }
  .dots button[aria-current="true"]::before { background: var(--accent); }
}

/* Live chat animation, enabled by chat-demo.js. Hidden states use opacity and transparent
   colors only, so layout space is reserved and text stays readable by assistive tech. */
.chat-anim .phones figure, .chat-anim .msg { transition: opacity 0.4s ease, transform 0.4s ease; }
.chat-anim .phones figure:not(.shown) { opacity: 0; transform: translateY(12px); }
.chat-anim .msg:not(.shown) { opacity: 0; transform: translateY(6px); }
.chat-anim .msg { position: relative; }
.chat-anim .msg.typing { background: transparent; box-shadow: none; color: transparent; }
.chat-anim .msg.typing * { color: transparent; background: transparent; border-color: transparent; }
.chat-anim .msg.typing::after {
  content: "•••"; position: absolute; top: 0; left: 0;
  padding: 0.25rem 0.75rem; border-radius: 8px; background: #fff; color: #889;
  font-size: 1.125rem; letter-spacing: 0.15em; line-height: 1.4;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  animation: typing-dots 1s ease-in-out infinite;
}
@keyframes typing-dots { 50% { color: #ccd; } }

@media (min-width: 60rem) {
  .phones { grid-template-columns: repeat(3, minmax(0, 19rem)); align-items: start; }
}

footer.site {
  border-top: 1px solid var(--line); padding: 1.5rem 0 2rem;
  color: var(--muted); font-size: 0.875rem;
}
footer.site p { margin: 0.25rem 0; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-bottom: 0.75rem; }

@media (min-width: 40rem) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  main { padding-top: 3rem; }
}

/* Home with character: dark green hero, serif display headings, amber highlights. */
:root {
  --hero-bg: #0f3a2f;
  --hero-text: #f4efe4;
  --hero-muted: #c9d6cf;
  --amber: #e9a23b;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
}
@media (prefers-color-scheme: dark) {
  :root { --hero-bg: #0b2a22; --amber: #f0b45a; }
}

.home h1, .home h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.015em; }
.home h2 { font-size: clamp(1.625rem, 5vw, 2.25rem); line-height: 1.15; margin: 0 0 1rem; }

.kicker {
  margin: 0 0 0.75rem; font-size: 0.8125rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}

.home header.site { background: var(--hero-bg); border-bottom-color: transparent; }
.home header.site .wordmark { color: var(--hero-text); }
.home header.site .wordmark span, .home header.site nav a { color: var(--amber); }

.hero { background: var(--hero-bg); color: var(--hero-text); overflow: hidden; }
.hero .kicker { color: var(--amber); }
.hero h1 { font-size: clamp(2.25rem, 9vw, 3.75rem); line-height: 1.05; margin: 0 0 1.25rem; }
.hero h1 em {
  font-style: italic; color: var(--amber);
  background: linear-gradient(transparent 82%, rgba(233, 162, 59, 0.35) 82%);
}
.hero .lead { color: var(--hero-muted); }
.hero .button { background: var(--amber); color: #1b1407; }
.hero .button.secondary { background: transparent; color: var(--hero-text); border-color: rgba(244, 239, 228, 0.5); }
.hero .button:focus-visible { outline-color: var(--amber); }
.hero .scroll-hint { color: var(--hero-muted); }

.hero .wrap.hero-grid { display: grid; gap: 2rem; align-content: center; }
.notifs { display: grid; gap: 0.625rem; max-width: 22rem; }
.notif {
  background: rgba(255, 255, 255, 0.96); color: #1c2328; border-radius: 16px;
  padding: 0.75rem 0.875rem; font-size: 0.875rem; line-height: 1.4;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.notif b { display: block; }
.notif .app { display: block; font-size: 0.6875rem; color: #55606a; margin-bottom: 0.125rem; }
.notif .app::before {
  content: ""; display: inline-block; width: 0.625rem; height: 0.625rem; margin-right: 0.375rem;
  border-radius: 3px; background: #25d366; vertical-align: -0.0625rem;
}
.notif:nth-child(1) { transform: rotate(-1.5deg); }
.notif:nth-child(2) { transform: rotate(1deg) translateX(0.75rem); margin-right: 0.75rem; }
.chat-anim .notif { animation: notif-in 0.6s ease both; }
.chat-anim .notif:nth-child(2) { animation-delay: 0.9s; }
@keyframes notif-in { from { opacity: 0; translate: 0 1rem; } }

.section-head { text-align: center; margin: 0 auto 1.5rem; max-width: 36rem; }

.cards li { border-top: 3px solid var(--accent); }

.closing .wrap > h2 + p { color: var(--muted); }
.cta-band {
  margin: 2rem 0 1.5rem; padding: 2rem 1.5rem; border-radius: 20px;
  background: var(--hero-bg); color: var(--hero-text);
}
.cta-band h2 { margin-bottom: 0.5rem; }
.cta-band p { color: var(--hero-muted); margin: 0 0 1rem; }
.cta-band .actions { margin-bottom: 0.75rem; }
.cta-band .small { font-size: 0.875rem; margin: 0; }
.button.light { background: var(--amber); color: #1b1407; }

@media (min-width: 60rem) {
  .hero .wrap.hero-grid { max-width: 64rem; grid-template-columns: 1.4fr 1fr; align-items: center; }
  .notifs { justify-self: end; }
}
