.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 5.5rem;
}

.hero::before,
.section-soft::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(22, 163, 74, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(22, 163, 74, 0.055) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.hero-grid,
.split-grid,
.single-hero-grid,
.article-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero-grid {
  grid-template-columns: 1.05fr 0.95fr;
}

.split-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-copy,
.section-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.hero h1 {
  max-width: 18ch;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 900;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--brand), var(--brand-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p,
.section-copy p,
.section-heading p,
.center > p {
  max-width: 40rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.75;
}

.section-copy h2,
.section-heading h1,
.section-heading h2,
.center h1,
.center h2 {
  max-width: 22ch;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 850;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.hero-contact {
  display: grid;
  gap: 0.65rem;
  width: min(100%, 34rem);
}

.hero-contact span,
.hero-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 0.7rem 0.85rem;
  font-weight: 750;
  box-shadow: 0 8px 22px -18px rgba(7, 17, 31, 0.4);
  word-break: break-word;
}

.chat-preview {
  position: relative;
  width: min(100%, 28rem);
  justify-self: end;
  font-family: "Inter", "Plus Jakarta Sans", system-ui, sans-serif;
}

.chat-preview::before {
  content: "";
  position: absolute;
  inset: -1.5rem;
  z-index: -1;
  border-radius: 2.5rem;
  background: linear-gradient(135deg, rgba(167, 243, 193, 0.45), rgba(209, 250, 224, 0.28), transparent);
  filter: blur(28px);
}

.chat-card {
  position: relative;
  overflow: hidden;
  border: 9px solid #111b21;
  border-bottom-width: 12px;
  border-radius: 2rem;
  background: #efe7db;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 28px 70px -26px rgba(7, 17, 31, 0.5);
}

.chat-card::before {
  content: "";
  position: absolute;
  top: 0.28rem;
  left: 50%;
  z-index: 3;
  width: 4.8rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #111b21;
  transform: translateX(-50%);
}

.chat-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.28rem;
  z-index: 3;
  width: 5.5rem;
  height: 0.22rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transform: translateX(-50%);
}

.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #008069;
  color: #fff;
  padding: 0.7rem 1rem 0.22rem;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.phone-status span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.64rem;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.35rem;
  background: #008069;
  color: #fff;
  padding: 0.55rem 0.85rem 0.8rem;
}

.chat-head strong {
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.15;
}

.chat-head > div {
  min-width: 0;
}

.chat-head small {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  line-height: 1.15;
}

.chat-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  line-height: 1;
}

.chat-back {
  display: grid;
  place-items: center;
  width: 1.2rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  line-height: 1;
}

.chat-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}

.chat-avatar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.08rem;
  width: 0.55rem;
  height: 0.55rem;
  border: 2px solid #008069;
  border-radius: 999px;
  background: #25d366;
}

.chat-body {
  display: grid;
  gap: 0.55rem;
  min-height: 18.6rem;
  align-content: start;
  background-color: #efe7db;
  background-image:
    radial-gradient(circle at 18px 18px, rgba(7, 94, 84, 0.055) 1.4px, transparent 1.6px),
    radial-gradient(circle at 46px 42px, rgba(7, 94, 84, 0.04) 1.2px, transparent 1.4px);
  background-size: 64px 64px;
  padding: 0.85rem 0.75rem;
}

.chat-date {
  justify-self: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #667781;
  padding: 0.18rem 0.62rem;
  font-size: 0.72rem;
  font-weight: 750;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.bubble {
  position: relative;
  max-width: 88%;
  border-radius: 0.5rem;
  padding: 0.45rem 0.62rem 0.3rem;
  color: #111b21;
  font-size: 0.88rem;
  line-height: 1.42;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.12);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.bubble.sent {
  justify-self: end;
  border-top-right-radius: 0;
  background: #d9fdd3;
}

.bubble.received {
  justify-self: start;
  border-top-left-radius: 0;
  background: #fff;
}

.bubble.sent::before,
.bubble.received::before {
  content: "";
  position: absolute;
  top: 0;
  border-style: solid;
}

.bubble.sent::before {
  right: -0.45rem;
  border-width: 0 0 0.55rem 0.55rem;
  border-color: transparent transparent transparent #d9fdd3;
}

.bubble.received::before {
  left: -0.45rem;
  border-width: 0 0.55rem 0.55rem 0;
  border-color: transparent #fff transparent transparent;
}

.msg-meta {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  margin: 0.28rem 0 0 0.55rem;
  color: #667781;
  font-size: 0.66rem;
  line-height: 1;
  white-space: nowrap;
}

.bubble.sent .msg-meta {
  color: #667781;
}

.bubble.sent .fa-check-double {
  color: #53bdeb;
  font-size: 0.68rem;
}

.auto-chat.is-typing .bubble.sent::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 0.1rem;
  background: currentColor;
  vertical-align: -0.12em;
  animation: cursor-blink 0.85s steps(1) infinite;
}

.auto-chat.is-waiting .bubble.received,
.auto-chat.is-waiting .typing-dots {
  opacity: 0;
  transform: translateY(0.4rem);
}

.auto-chat.is-replied .bubble.received {
  animation: message-in 0.22s ease-out both;
  opacity: 1;
  transform: translateY(0);
}

.typing-dots {
  display: inline-flex;
  width: fit-content;
  gap: 0.35rem;
  border-radius: 0 0.5rem 0.5rem;
  background: var(--surface);
  padding: 0.6rem 0.85rem;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.12);
}

.typing-dots span {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: #94a3b8;
  animation: typing 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.chat-input {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #efe7db;
  padding: 0.55rem 0.65rem 0.7rem;
}

.chat-field {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.2rem;
  flex: 1;
  border-radius: 999px;
  background: #fff;
  color: #667781;
  padding: 0.5rem 0.75rem;
  font-size: 0.86rem;
}

.chat-field i {
  color: #8696a0;
  font-size: 1rem;
}

.chat-attach {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #667781;
  font-size: 0.92rem;
  line-height: 1;
}

.chat-input > i {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: #00a884;
  color: #fff;
  font-size: 1.05rem;
  font-style: normal;
}

@keyframes pulse-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  50% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
}

@keyframes typing {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes message-in {
  0% {
    opacity: 0;
    transform: translateY(0.45rem) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes timeline {
  0% { transform: scaleY(0); }
  100% { transform: scaleY(1); }
}
