:root {
  --cream: #f6f0e4;
  --cream-dark: #ece3d1;
  --border: #d9d0c0;
  --ink: #161412;
  --ink-soft: #3d3936;
  --muted: #6b665f;
  --green: #1fbf6b;
  --green-hover: #1aa85e;
  --green-active: #158f4f;
  --green-dark: #0b3d22;
  --green-tint: #dff5e9;
}

* { box-sizing: border-box; }

.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;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Figtree", sans-serif;
}

a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--green-dark); }

.page { display: flex; flex-direction: column; min-height: 100vh; }

.hero {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero-copy {
  padding: 40px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background-color: var(--cream);
  background-image: url('../assets/pattern-bg.svg');
  background-repeat: repeat;
}

.logo { width: 200px; height: auto; display: block; margin: 0 0 32px; }

.eyebrow {
  margin: 0;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

h1 {
  margin: 12px 0 0;
  font-weight: 600;
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: pretty;
}

.lead {
  margin: 16px 0 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.signup-form[hidden] { display: none; }
.signup-form { width: 100%; margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.signup-row { display: flex; gap: 10px; flex-wrap: wrap; }

.field-label { font-weight: 500; font-size: 13px; color: var(--ink-soft); margin: 0 0 -2px; }

input[type="tel"] {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 14px 16px;
  outline: none;
  flex: 1;
  min-width: 200px;
}
input[type="tel"]:focus { border-color: var(--green); }
input::placeholder { color: #9c968d; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

button[type="submit"] {
  font-family: "Figtree", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--green-dark);
  background: var(--green);
  border: none;
  border-radius: 5px;
  padding: 14px 22px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s cubic-bezier(0.23, 1, 0.32, 1);
}
@media (hover: hover) and (pointer: fine) {
  button[type="submit"]:hover:not(:disabled) {
    background: var(--green-hover);
    transform: translateY(-1px);
  }
}
button[type="submit"]:active:not(:disabled) {
  background: var(--green-active);
  transform: translateY(0);
}
button[type="submit"]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
button[type="submit"]:disabled { opacity: 0.6; cursor: default; }

@media (prefers-reduced-motion: reduce) {
  button[type="submit"] { transition: background-color 0.15s ease; }
  button[type="submit"]:hover:not(:disabled) { transform: none; }
}

.hint { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.hint.error { color: #b3261e; }

.success-box[hidden] { display: none; }
.success-box {
  width: 100%;
  margin-top: 28px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--green-tint);
  border-radius: 10px;
  padding: 18px 20px;
  box-sizing: border-box;
}
.success-box p { margin: 0; font-size: 16px; line-height: 1.45; color: var(--green-dark); }
.success-box svg { flex: none; margin-top: 2px; }

.chat-illustration { display: block; margin: 28px auto 0; }
.chat-illustration[hidden] { display: none; }

.features { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-direction: column; width: 100%; }
.features li { border-top: 1px solid var(--border); padding: 18px 0; display: flex; gap: 16px; align-items: flex-start; }
.icon-chip { flex: none; width: 44px; height: 44px; border-radius: 999px; background: var(--cream-dark); display: flex; align-items: center; justify-content: center; }
.features h3 { margin: 0; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.features p { margin: 4px 0 0; font-size: 15px; line-height: 1.45; color: var(--ink-soft); }

.hero-media { position: relative; width: 100%; height: 340px; overflow: hidden; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }

.reminder-card {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reminder-label { margin: 0; font-weight: 500; font-size: 11px; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.reminder-msg {
  margin: 0;
  min-height: 40px;
  font-size: 14px;
  line-height: 1.45;
  transition: opacity 0.28s cubic-bezier(0.23, 1, 0.32, 1), transform 0.28s cubic-bezier(0.23, 1, 0.32, 1);
}
.reminder-msg.is-hidden { opacity: 0; transform: translateY(4px); }
.tabular { font-family: "Inter", sans-serif; font-variant-numeric: tabular-nums; }

.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.23, 1, 0.32, 1);
}
.typing-dots.is-visible { height: 1.2em; opacity: 1; }
.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing-bounce 1s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.reminder-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background: var(--green-tint);
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--green-dark);
  transition: background-color 0.28s ease, color 0.28s ease;
}
.reminder-badge-icon[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .reminder-msg { transition: opacity 0.2s ease; }
  .reminder-msg.is-hidden { transform: none; }
  .typing-dots span { animation: none; opacity: 0.7; }
}

.site-footer {
  background: var(--cream-dark);
  padding: 18px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.doc-page { display: flex; flex-direction: column; min-height: 100vh; }
.doc-header { width: 100%; max-width: 680px; margin: 0 auto; padding: 48px 24px 0; }
.doc-back { display: inline-block; margin-bottom: 32px; font-size: 14px; color: var(--muted); }
.doc h1 { margin: 0; font-size: 32px; }
.doc-updated { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

.doc-toc { display: none; }

.doc-layout { flex: 1; width: 100%; max-width: 680px; margin: 0 auto; }
.doc { padding: 32px 24px 64px; }
.doc h2 { margin: 32px 0 12px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.doc p { margin: 0 0 16px; font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.doc ul { margin: 0 0 16px; padding-left: 20px; }
.doc li { font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 6px; }
.doc strong { color: var(--ink); }

@media (min-width: 900px) {
  .doc-header { max-width: 900px; padding: 72px 40px 0; }
  .doc h1 { font-size: 42px; }

  .doc-layout {
    max-width: 900px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 48px;
    align-items: start;
    padding: 0 40px;
  }

  .doc-toc {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 40px;
    padding: 40px 0 64px;
    border-right: 1px solid var(--border);
  }
  .doc-toc a { font-size: 14px; color: var(--muted); line-height: 1.4; }
  .doc-toc a:hover { color: var(--ink); }

  .doc { padding: 40px 0 96px; max-width: 640px; }
  .doc h2 { font-size: 22px; }
  .doc p, .doc li { font-size: 17px; }
}

.notfound-page { display: flex; flex-direction: column; align-items: center; min-height: 100vh; }
.notfound { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 56px 24px 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.notfound .logo { margin-left: auto; margin-right: auto; }

.notfound-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--cream-dark);
  color: var(--muted);
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.notfound h1 { font-size: 32px; line-height: 1.15; text-wrap: pretty; }
.notfound .lead { text-align: center; max-width: 440px; }

.notfound-cta {
  display: inline-block;
  margin-top: 28px;
  font-family: "Figtree", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--green-dark);
  background: var(--green);
  border-radius: 5px;
  padding: 14px 24px;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s cubic-bezier(0.23, 1, 0.32, 1);
}
@media (hover: hover) and (pointer: fine) {
  .notfound-cta:hover { background: var(--green-hover); transform: translateY(-1px); }
}
.notfound-cta:active { background: var(--green-active); transform: translateY(0); }
.notfound-cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.notfound-photo {
  width: 100%;
  max-width: 640px;
  margin: 48px 0 56px;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.notfound-photo img { display: block; width: 100%; height: auto; }

@media (prefers-reduced-motion: reduce) {
  .notfound-cta { transition: background-color 0.15s ease; }
  .notfound-cta:hover { transform: none; }
}

@media (min-width: 900px) {
  .page { min-height: 100dvh; }
  .hero { flex-direction: row; align-items: stretch; }
  .hero-copy { flex: 0 0 620px; padding: 32px 56px 16px; }
  .logo { width: 160px; margin-bottom: 24px; }
  .eyebrow { font-size: 13px; }
  h1 { font-size: 38px; }
  .lead { max-width: 480px; font-size: 16px; }
  .signup-form { margin-top: 24px; }
  .success-box { margin-top: 24px; padding: 14px 16px; }
  .chat-illustration { display: none; }

  .features { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .features li { border-top: none; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px; flex-direction: column; gap: 6px; }
  .features h3 { font-size: 14px; }
  .features p { font-size: 12.5px; }

  .hero-media { flex: 1; height: auto; min-height: 0; }
  .reminder-card { left: 32px; right: auto; bottom: 32px; width: 280px; padding: 12px 14px; }
  .site-footer { padding: 10px 24px; font-size: 13px; }
}

@media (min-width: 1200px) {
  .hero-copy { padding: 48px 72px 32px; }
  h1 { font-size: 46px; }
}
