:root {
  --paper: #eae3d3;
  --ink: #171c18;
  --ink-2: #1e2620;
  --ink-text: #1b211d;
  --muted: #5b5a4e;
  --muted-dark: #a9b3a9;
  --accent: #2f6e5c;
  --accent-bright: #8fcbb8;
  --line: #cbbfa0;
  --line-dark: rgba(255, 255, 255, 0.14);
  --radius: 4px;
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
}

p {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #f5f1e4;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.btn:hover {
  background: var(--accent-bright);
  color: var(--ink);
}
.btn--small {
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(234, 227, 211, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.header--scrolled {
  border-color: var(--line);
  box-shadow: 0 8px 24px -20px rgba(23, 28, 24, 0.5);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
}
.header__logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
  padding-top: clamp(4.5rem, 13vw, 7.5rem);
  padding-bottom: clamp(4rem, 10vw, 6rem);
}
.hero__inner {
  position: relative;
}
.hero__title {
  font-size: clamp(3rem, 9vw, 5.75rem);
  color: var(--paper);
  max-width: 11ch;
  animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.hero__lede {
  margin-top: 1.5rem;
  font-size: 1.2rem;
  color: var(--muted-dark);
  max-width: 34ch;
  animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.12s both;
}
.hero__actions {
  margin-top: 2.25rem;
  display: flex;
  animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.22s both;
}
.hero__wave {
  position: absolute;
  right: -40px;
  bottom: -10px;
  width: min(560px, 60%);
  color: var(--accent-bright);
  opacity: 0.5;
  pointer-events: none;
}
.hero__wave-path {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw 1.6s ease-out 0.3s forwards;
}
@media (max-width: 640px) {
  .hero__wave {
    display: none;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero__title,
  .hero__lede,
  .hero__actions,
  .hero__wave-path {
    animation: none !important;
  }
}

/* ---------- What it does ---------- */
.what {
  background: var(--paper);
}
.what__heading {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--ink-text);
  margin-bottom: 2.5rem;
}
.what__row {
  display: flex;
  flex-direction: column;
}
.what__item {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}
.what__item:last-child {
  border-bottom: 1px solid var(--line);
}
.what__num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.what__item h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink-text);
  margin-bottom: 0.5rem;
}
.what__item p {
  max-width: 38em;
}
@media (min-width: 860px) {
  .what__row {
    flex-direction: row;
  }
  .what__item {
    flex: 1;
    padding: 0 2rem;
    border-top: none;
  }
  .what__item:last-child {
    border-bottom: none;
  }
  .what__item:not(:first-child) {
    border-left: 1px solid var(--line);
  }
  .what__item:first-child {
    padding-left: 0;
  }
}

/* ---------- How it works ---------- */
.how {
  background: var(--ink-2);
  color: var(--paper);
}
.how__heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--paper);
  max-width: 20ch;
  margin-bottom: 2.75rem;
}
.how__timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.how__timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line-dark);
}
.how__step {
  position: relative;
  display: flex;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
}
.how__step:last-child {
  padding-bottom: 0;
}
.how__num {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--ink);
  border: 1px solid var(--line-dark);
  color: var(--accent-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  position: relative;
  z-index: 1;
}
.how__step-body h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--paper);
  margin-bottom: 0.4rem;
}
.how__step-body p {
  color: var(--muted-dark);
  max-width: 40em;
}

/* ---------- Contact strip ---------- */
/* Text is --paper on --accent = 5.6:1. The previous dark-on-teal
   pairing measured 2.88:1 and failed WCAG AA. */
.contact {
  background: var(--accent);
  color: var(--paper);
}
.contact__inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.contact__heading {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--paper);
}
.contact__sub {
  margin-top: 0.75rem;
  color: #dfe9e2;
  font-size: 1.05rem;
  max-width: 26ch;
}
.contact__direct {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.contact__direct a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(234, 227, 211, 0.45);
  align-self: flex-start;
  padding-bottom: 2px;
}
.contact__direct a:hover {
  border-bottom-color: var(--paper);
}
@media (min-width: 860px) {
  .contact__inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4rem;
  }
  .contact__copy {
    flex: 1 1 40%;
  }
}

/* ---------- Contact form ---------- */
.form {
  flex: 1 1 50%;
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form__row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.form__field > span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--paper);
}
.form__field em {
  font-style: normal;
  font-weight: 400;
  color: #d5e4dc;
}
.form__field input {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(234, 227, 211, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
}
.form__field input::placeholder {
  color: #dbe9e2;
}
.form__field input:focus {
  outline: 2px solid var(--paper);
  outline-offset: 1px;
}
.form__submit {
  background: var(--paper);
  color: var(--ink);
  align-self: flex-start;
  margin-top: 0.25rem;
}
.form__submit:hover:not(:disabled) {
  background: #fff;
  color: var(--ink);
}
.form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.form__note,
.form__error {
  font-size: 0.85rem;
  color: #dfe9e2;
}
.form__error a {
  color: var(--paper);
}
.form--done {
  justify-content: center;
}
.form__done-line {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--paper);
}
.form__done-sub {
  color: #dfe9e2;
}
@media (min-width: 520px) {
  .form__row {
    flex-direction: row;
  }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--muted-dark);
}
.footer__inner {
  padding: 3rem 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.footer__top {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer__logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--paper);
}
.footer__top a {
  color: var(--accent-bright);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.85rem;
}
.footer__privacy {
  color: var(--muted-dark);
  max-width: 34em;
}
.footer__copy {
  color: var(--muted-dark);
}
@media (min-width: 720px) {
  .footer__top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}


/* ---------- Hero additions ---------- */
.hero__who {
  margin-top: 1.25rem;
  font-size: 1rem;
  color: var(--accent-bright);
  max-width: 40ch;
  animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.16s both;
}
.hero__reassure {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted-dark);
  animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.28s both;
}
.hero__actions {
  gap: 0.85rem;
  flex-wrap: wrap;
}
.btn--ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(234, 227, 211, 0.4);
}
.btn--ghost:hover {
  background: rgba(234, 227, 211, 0.1);
  color: var(--paper);
}
.hero__scroll {
  position: absolute;
  left: 0;
  bottom: -1rem;
  color: var(--muted-dark);
  opacity: 0.7;
  animation: nudge 2.4s ease-in-out infinite;
}
.hero__scroll:hover {
  color: var(--accent-bright);
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__who,
  .hero__reassure,
  .hero__scroll {
    animation: none !important;
  }
}
@media (max-width: 640px) {
  .hero__scroll {
    display: none;
  }
}

/* ---------- SMS demo ---------- */
.sms {
  background: var(--paper);
}
.sms__inner {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}
.sms__copy h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--ink-text);
  margin-bottom: 1rem;
}
.sms__copy p {
  max-width: 34em;
}
.sms__phone {
  display: flex;
  justify-content: center;
}
.sms__phone-frame {
  width: min(320px, 100%);
  background: var(--ink);
  border-radius: 22px;
  padding: 1.5rem 1.1rem 1.75rem;
  box-shadow: 0 30px 60px -30px rgba(23, 28, 24, 0.55);
}
.sms__phone-notch {
  width: 70px;
  height: 5px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  margin: 0 auto 1.4rem;
}
.sms__label {
  display: block;
  color: var(--muted-dark);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}
.sms__bubble {
  background: var(--paper);
  color: var(--ink-text);
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0.85rem 1rem;
  border-radius: 16px 16px 16px 4px;
}
@media (min-width: 860px) {
  .sms__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
  }
  .sms__copy {
    flex: 1 1 50%;
  }
  .sms__phone {
    flex: 1 1 40%;
  }
}

/* ---------- Live demo ---------- */
.demo {
  background: var(--ink-2);
  color: var(--paper);
  border-top: 1px solid var(--line-dark);
}
.demo__inner {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.demo__copy h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--paper);
  margin-bottom: 0.85rem;
}
.demo__copy p {
  color: var(--muted-dark);
  max-width: 36em;
}
.demo__number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.25rem);
  color: var(--accent-bright);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.demo__number:hover {
  color: var(--paper);
}
@media (min-width: 860px) {
  .demo__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
  }
}

/* ---------- Footer meta ---------- */
.footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}
.footer__meta a {
  color: var(--muted-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.footer__meta a:hover {
  color: var(--paper);
  border-bottom-color: var(--muted-dark);
}

button.btn {
  border: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

@supports (animation-timeline: scroll()) {
  @keyframes header-scrolled {
    to {
      border-color: var(--line);
      box-shadow: 0 8px 24px -20px rgba(23, 28, 24, 0.5);
    }
  }
  .header {
    animation: header-scrolled linear both;
    animation-timeline: scroll();
    animation-range: 0px 24px;
  }
}
