/* JSoft — Apple-inspired design system */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-dark: #0b0b0d;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --text-inverse: #f5f5f7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --border: rgba(0, 0, 0, 0.08);
  --border-dark: rgba(255, 255, 255, 0.1);
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    "Helvetica Neue", Arial, "Inter", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 17px;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: 100%;
  max-width: 1100px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  color: var(--text);
  opacity: 0.85;
  transition: opacity 0.2s var(--ease);
}

.nav-links a:hover {
  opacity: 1;
}

@media (max-width: 640px) {
  .nav-links {
    gap: 16px;
  }
  .nav-links a {
    font-size: 12px;
  }
}

/* ---- Layout ---- */
.section {
  padding: 120px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-tight {
  padding: 80px 24px;
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-inverse);
  max-width: none;
  margin: 0;
}

.section-alt {
  background: var(--bg-alt);
  max-width: none;
  margin: 0;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Hero ---- */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background:
    radial-gradient(ellipse at top, rgba(0, 113, 227, 0.08), transparent 60%),
    linear-gradient(180deg, #ffffff, #f5f5f7);
}

.hero-eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.8s var(--ease) 0.1s forwards;
}

.hero-title {
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
  max-width: 900px;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(30px);
  animation: rise 1s var(--ease) 0.25s forwards;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #0071e3 0%, #6c5ce7 50%, #ff3b7e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 40px;
  font-weight: 400;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 1s var(--ease) 0.4s forwards;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 1s var(--ease) 0.55s forwards;
}

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 980px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all 0.25s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.08);
}

.section-dark .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-inverse);
}

.section-dark .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-link {
  color: var(--accent);
  font-weight: 500;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.25s var(--ease);
}

.btn-link:hover {
  gap: 8px;
}

/* ---- Section headings ---- */
.section-eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 20px;
  max-width: 800px;
}

.section-lead {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 60px;
}

.section-dark .section-lead {
  color: rgba(245, 245, 247, 0.7);
}

/* ---- Product cards ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  display: flex;
  flex-direction: column;
  min-height: 360px;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(0, 113, 227, 0.08),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.product-card:hover::before {
  opacity: 1;
}

.product-card h3 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.product-card .tagline {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 16px;
}

.product-card .desc {
  color: var(--text);
  font-size: 15px;
  margin-bottom: 24px;
  flex-grow: 1;
}

.product-card .actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.product-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.product-tags span {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 980px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--accent);
  font-weight: 500;
}

/* ---- Feature list ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  margin-top: 60px;
}

.feature {
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark);
}

.section:not(.section-dark) .feature {
  background: #fff;
  border: 1px solid var(--border);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0071e3, #6c5ce7);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 22px;
}

.feature h4 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature p {
  font-size: 15px;
  color: var(--text-muted);
}

.section-dark .feature p {
  color: rgba(245, 245, 247, 0.65);
}

/* ---- Big CTA ---- */
.cta {
  text-align: center;
  padding: 140px 24px;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
  color: var(--text-inverse);
}

.cta h2 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 800px;
  margin: 0 auto 24px;
}

.cta p {
  color: rgba(245, 245, 247, 0.7);
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Footer ---- */
.footer {
  padding: 40px 24px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 12px;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--text);
}

/* ---- Scroll-driven animations ---- */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up.delay-1 {
  transition-delay: 0.08s;
}
.fade-up.delay-2 {
  transition-delay: 0.16s;
}
.fade-up.delay-3 {
  transition-delay: 0.24s;
}
.fade-up.delay-4 {
  transition-delay: 0.32s;
}

.parallax {
  will-change: transform;
}

/* ---- Hero visual / mock card ---- */
.hero-mock {
  margin-top: 64px;
  width: 100%;
  max-width: 760px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(60px) scale(0.96);
  animation: rise 1.2s var(--ease) 0.7s forwards;
}

.hero-mock-bar {
  height: 36px;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.hero-mock-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ddd;
}

.hero-mock-bar span:nth-child(1) {
  background: #ff5f57;
}
.hero-mock-bar span:nth-child(2) {
  background: #febc2e;
}
.hero-mock-bar span:nth-child(3) {
  background: #28c840;
}

.hero-mock-body {
  padding: 28px;
  text-align: left;
}

/* Hero mock — chat preview rows */
.hm-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 10px;
}
.hm-row:last-child {
  margin-bottom: 0;
}
.hm-row-end {
  justify-content: flex-end;
}

.hm-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0071e3, #6c5ce7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.hm-bubble {
  background: #f0f0f3;
  color: #1d1d1f;
  padding: 10px 14px;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  font-size: 14px;
  line-height: 1.45;
  max-width: 86%;
}

.hm-bubble-user {
  background: #0071e3;
  color: #fff;
  border-radius: 18px;
  border-bottom-right-radius: 6px;
  max-width: 84%;
}

/* ---- Floating chatbot widget on showcase ---- */
.chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0071e3, #6c5ce7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 113, 227, 0.35);
  z-index: 90;
  transition: transform 0.25s var(--ease);
  font-size: 26px;
}

.chat-launcher:hover {
  transform: scale(1.06);
}

.chat-launcher.hidden {
  display: none;
}

.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 24px);
  height: 580px;
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
  z-index: 95;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
}

.chat-widget.open {
  display: flex;
  animation: widget-in 0.3s var(--ease);
}

@keyframes widget-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 480px) {
  .chat-widget {
    bottom: 0;
    right: 0;
    border-radius: 22px 22px 0 0;
    height: 92vh;
  }
}

/* ---- Misc ---- */
.text-center {
  text-align: center;
}

::selection {
  background: rgba(0, 113, 227, 0.2);
}

/* =========================================================================
   Responsive — comprehensive breakpoints for tablets, phones, tiny phones.
   The base layout already uses clamp() for hero typography and auto-fit
   grids, so this just tightens spacing, button sizing, and edge cases.
   ========================================================================= */

/* Tablet / small laptop */
@media (max-width: 1024px) {
  .section {
    padding: 96px 24px;
  }
  .cta {
    padding: 120px 24px;
  }
  .feature-grid {
    margin-top: 48px;
  }
}

/* Tablet portrait */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  .nav {
    height: 52px;
  }
  .nav-inner {
    padding: 0 18px;
    gap: 16px;
  }
  .nav-brand {
    font-size: 17px;
  }

  .section {
    padding: 80px 20px;
  }
  .section-tight {
    padding: 56px 20px;
  }
  .section-inner {
    padding: 0;
  }
  .section-lead {
    margin-bottom: 44px;
  }

  .hero {
    padding: 100px 20px 60px;
    min-height: auto;
  }

  .product-grid {
    gap: 18px;
  }
  .product-card {
    padding: 32px;
    min-height: auto;
  }

  .cta {
    padding: 96px 20px;
  }

  .hero-mock {
    margin-top: 48px;
  }
  .hero-mock-body {
    padding: 22px;
  }
}

/* Phone */
@media (max-width: 600px) {
  .nav-inner {
    padding: 0 16px;
    gap: 12px;
  }
  .nav-links {
    gap: 14px;
  }
  .nav-links a {
    font-size: 12px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    align-items: center;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .section {
    padding: 64px 18px;
  }
  .product-card {
    padding: 26px;
    border-radius: 22px;
  }
  .product-card h3 {
    font-size: 24px;
  }
  .product-card .actions {
    flex-wrap: wrap;
    gap: 12px;
  }
  .product-card .actions .btn {
    width: 100%;
    justify-content: center;
  }
  .product-card .actions .btn-link {
    width: 100%;
    justify-content: center;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 36px;
  }
  .feature {
    padding: 22px;
  }

  .cta {
    padding: 72px 18px;
  }
  .cta p {
    font-size: 17px;
  }

  .footer-links {
    gap: 16px;
    font-size: 12px;
  }

  .hero-mock {
    border-radius: 20px;
    margin-top: 36px;
  }
  .hero-mock-bar {
    height: 28px;
    padding: 0 12px;
  }
  .hero-mock-bar span {
    width: 9px;
    height: 9px;
  }
  .hero-mock-body {
    padding: 18px 16px;
  }
  .hm-row {
    gap: 8px;
    margin-bottom: 12px;
  }
  .hm-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
  .hm-bubble {
    font-size: 14.5px;
    padding: 10px 13px;
    max-width: calc(100% - 36px);
  }
  .hm-bubble-user {
    max-width: 88%;
  }

  .chat-launcher {
    width: 54px;
    height: 54px;
    bottom: 18px;
    right: 18px;
    font-size: 22px;
  }
}

/* Very small phones (iPhone SE, old Androids) */
@media (max-width: 380px) {
  .nav-inner {
    gap: 8px;
  }
  .nav-links {
    gap: 10px;
  }
  .nav-links a {
    font-size: 11px;
  }
  .section {
    padding: 56px 14px;
  }
  .product-card {
    padding: 22px;
  }
  .hero {
    padding: 92px 14px 48px;
  }
  .hero-mock-bar {
    display: none;
  }
  .hero-mock-body {
    padding: 16px 14px;
  }
  .hm-bubble {
    font-size: 14px;
    padding: 9px 12px;
  }
}

/* Reduced motion — turn off scroll animations for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-up {
    opacity: 1;
    transform: none;
  }
}
