:root {
  --primary: #0f766e;
  --ink: #0f172a;
  --ink-soft: #475569;
  --line: #e2e8f0;
  --canvas: #ffffff;
  --canvas-alt: #f8fafc;
  --radius: 1rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}

::selection {
  background: color-mix(in srgb, var(--primary) 25%, white);
}

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

.section {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.section + .section {
  padding-top: 0;
}

.narrow {
  max-width: 640px;
}

.muted {
  color: var(--ink-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, box-shadow 0.25s;
  cursor: pointer;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 35%, transparent);
}

.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 40%, transparent);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.topbar {
  background: var(--footer-bg, #0f172a);
  color: #cbd5e1;
  font-size: 0.85rem;
  overflow: hidden;
  max-height: 2.5rem;
  opacity: 1;
  transition: max-height 0.45s var(--ease), opacity 0.35s var(--ease), border-color 0.3s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header.is-scrolled .topbar {
  max-height: 0;
  opacity: 0;
  border-bottom-color: transparent;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 2.25rem;
  align-items: center;
}

.topbar-item a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.topbar-item a:hover {
  color: #fff;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  position: relative;
  transition: min-height 0.3s var(--ease);
}

.site-header.is-scrolled .nav-wrap {
  min-height: 3.5rem;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
}

.logo:hover {
  opacity: 0.8;
}

.logo-img {
  max-height: 3rem;
  width: auto;
  display: block;
  transition: max-height 0.3s var(--ease);
}

.site-header.is-scrolled .logo-img {
  max-height: 2.25rem;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
  position: relative;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: color-mix(in srgb, var(--primary) 12%, white);
  color: var(--primary);
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  transition: gap 0.3s var(--ease);
}

.nav-button span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-toggle:checked ~ .nav-button span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle:checked ~ .nav-button span:nth-child(2) {
  opacity: 0;
}
.nav-toggle:checked ~ .nav-button span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Slider */

.hero-slider {
  position: relative;
  height: clamp(440px, 72vh, 680px);
  overflow: hidden;
  background: #0f172a;
  color: #fff;
}

.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.7s var(--ease-out);
  will-change: transform;
}

.slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
}

.slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 7s ease-out;
}

.slide.is-active .slide-image {
  transform: scale(1);
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.45) 50%, rgba(15, 23, 42, 0.15) 100%);
}

.slide-copy {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1120px;
  gap: 1rem;
  padding-block: 2rem;
}

.slide-copy h2 {
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  max-width: 18ch;
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.1;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.8s var(--ease-out) 0.25s, opacity 0.8s var(--ease-out) 0.25s;
}

.slide-copy p {
  max-width: 52ch;
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin: 0;
  color: #e2e8f0;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.8s var(--ease-out) 0.4s, opacity 0.8s var(--ease-out) 0.4s;
}

.slide-copy .btn {
  align-self: flex-start;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.8s var(--ease-out) 0.55s, opacity 0.8s var(--ease-out) 0.55s, filter 0.2s, box-shadow 0.25s;
}

.slide.is-active .slide-copy h2,
.slide.is-active .slide-copy p,
.slide.is-active .slide-copy .btn {
  transform: translateY(0);
  opacity: 1;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.25s, transform 0.25s var(--ease), opacity 0.25s;
  z-index: 2;
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.35);
  opacity: 1;
  transform: translateY(-50%) scale(1.08);
}

.slider-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.slider-arrow.prev {
  left: 1rem;
}

.slider-arrow.next {
  right: 1rem;
}

.slider-dots {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  padding: 0;
  cursor: pointer;
  transition: width 0.35s var(--ease), background 0.3s;
}

.slider-dots button:hover {
  background: rgba(255, 255, 255, 0.7);
}

.slider-dots button.is-active {
  width: 32px;
  background: #fff;
}

.slider-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 2;
}

.slider-progress-bar {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 0 3px 3px 0;
  transition: width 0.05s linear;
}

.hero-fallback {
  padding-block: clamp(4rem, 10vw, 7rem);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, white), #fff);
  border-bottom: 1px solid var(--line);
}

.hero-fallback h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

.hero-fallback p {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 50ch;
}

/* Page content */

.page-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.page-image {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.prose {
  font-size: 1.05rem;
  max-width: 72ch;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.6rem;
}

.prose h3 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1rem;
}

.prose img {
  border-radius: 0.75rem;
  margin-block: 1rem;
}

.page-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-centered .page-title {
  text-align: center;
}

.page-image-sm {
  max-width: 360px;
  max-height: 240px;
  margin-inline: auto;
  display: block;
}

.prose-centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.prose-centered p {
  max-width: 70ch;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
  width: 100%;
  max-width: 720px;
}

.about-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1.75rem 1.25rem;
  background: var(--canvas-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}

.about-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.1);
  border-color: color-mix(in srgb, var(--primary) 40%, white);
}

.about-stat-num {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.03em;
}

.about-stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0;
  letter-spacing: -0.02em;
}

/* Cards */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
  opacity: 0;
  transform: translateY(20px);
  animation: cardIn 0.6s var(--ease-out) forwards;
}

.card-grid .card:nth-child(1) { animation-delay: 0.05s; }
.card-grid .card:nth-child(2) { animation-delay: 0.12s; }
.card-grid .card:nth-child(3) { animation-delay: 0.19s; }
.card-grid .card:nth-child(4) { animation-delay: 0.26s; }
.card-grid .card:nth-child(5) { animation-delay: 0.33s; }
.card-grid .card:nth-child(6) { animation-delay: 0.40s; }
.card-grid .card:nth-child(7) { animation-delay: 0.47s; }
.card-grid .card:nth-child(8) { animation-delay: 0.54s; }
.card-grid .card:nth-child(9) { animation-delay: 0.61s; }

@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
  border-color: color-mix(in srgb, var(--primary) 40%, white);
}

.card img {
  width: 100%;
  aspect-ratio: 400 / 260;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.card:hover img {
  transform: scale(1.06);
}

.card-body {
  padding: 1.25rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.card-body h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.card-body p {
  margin: 0;
  font-size: 0.95rem;
  flex: 1;
}

.card-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: gap 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.card:hover .card-link {
  gap: 0.6rem;
}

/* Scroll reveal */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */

.site-footer {
  background: var(--footer-bg, #0f172a);
  color: #cbd5e1;
  margin-top: 4rem;
  padding-top: 3.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
}

.site-footer .muted {
  color: #94a3b8;
}

.footer-heading {
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.35rem;
}

.footer-contact svg {
  flex-shrink: 0;
  color: #5eead4;
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.site-footer a {
  color: #5eead4;
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: #fff;
}

.copyright {
  border-top: 1px solid #1e293b;
  padding-block: 1.25rem;
  font-size: 0.9rem;
  color: #94a3b8;
}

@media (max-width: 800px) {
  .topbar-inner {
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-block: 0.25rem;
  }

  .nav-button {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1.25rem 1rem;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
    border-radius: 0 0 1rem 1rem;
  }

  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .slider-arrow {
    display: none;
  }

  .slide-copy {
    padding-bottom: 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0.01ms !important;
  }

  .card,
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Customer chat widget */

.chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.chat-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--primary, #0f766e);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  position: relative;
}

.chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.35);
}

.chat-fab:active {
  transform: scale(0.96);
}

.chat-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid #fff;
}

.chat-panel[hidden] {
  display: none !important;
}

.chat-panel {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 2rem);
  height: 480px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatSlideIn 0.35s var(--ease-out);
}

@keyframes chatSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-panel-head {
  background: var(--primary, #0f766e);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.chat-panel-head strong {
  display: block;
  font-size: 1rem;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  opacity: 0.9;
}

.chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
}

.chat-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 0.5rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.chat-close:hover {
  opacity: 1;
}

.chat-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #f8fafc;
}

.chat-bubble {
  max-width: 80%;
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.chat-bubble-visitor {
  align-self: flex-end;
  background: var(--primary, #0f766e);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble-admin {
  align-self: flex-start;
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}

.chat-bubble-time {
  display: block;
  font-size: 0.65rem;
  margin-top: 0.25rem;
  opacity: 0.6;
}

.chat-sys-msg {
  text-align: center;
  font-size: 0.78rem;
  color: #94a3b8;
  padding: 0.5rem;
}

.chat-intro {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 0.5rem;
}

.chat-intro-text {
  font-size: 0.9rem;
  color: #475569;
  margin: 0;
}

.chat-name-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-name-form input {
  padding: 0.65rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  font-family: inherit;
}

.chat-name-form input:focus {
  outline: none;
  border-color: var(--primary, #0f766e);
}

.chat-name-form .btn {
  width: 100%;
}

.chat-panel-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.chat-panel-form input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  font-family: inherit;
}

.chat-panel-form input:focus {
  outline: none;
  border-color: var(--primary, #0f766e);
}

.chat-panel-form input:disabled {
  background: #f1f5f9;
}

.chat-send-btn {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 0.6rem;
  background: var(--primary, #0f766e);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.chat-send-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .chat-widget {
    bottom: 1rem;
    right: 1rem;
  }
  .chat-panel {
    width: calc(100vw - 2rem);
    height: calc(100vh - 100px);
  }
}
