/* Svenn Home Page */

/* ── Poppins Font ── */

@font-face {
  font-family: 'Poppins';
  src: url('fonts/Poppins-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('fonts/Poppins-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('fonts/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #f5f5f7;
  --border: #e0e0e8;
  --border-hover: #c8c8d4;
  --text: #1a1a2e;
  --text-secondary: #4a4a5c;
  --text-muted: #8888a0;
  --primary: #E93D82;
  --primary-hover: #D32D6C;
  --radius: 8px;
}

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

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding: 0;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('images/svennbg.jpg');
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -1;
}

/* ── Header ── */

.app-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.app-header .header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-header .logo {
  height: 32px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--text);
}

/* ── Buttons ── */

.btn {
  display: inline-block;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--border-hover);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.8rem;
}

/* ── Animated Gradient Button ── */

.btn-gradient {
  background: linear-gradient(135deg, #ff8a2b, #E93D82, #a020f0, #ff2da0, #ff8a2b);
  background-size: 300% 300%;
  animation: gradientShift 4s ease infinite;
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-gradient:hover {
  animation-duration: 2s;
  box-shadow: 0 0 24px rgba(255, 45, 160, 0.4);
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Hero ── */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero::before {
  display: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 40px;
  padding-top: 113px; /* account for fixed header */
  display: flex;
  justify-content: flex-end;
}

/* ── Reusable Glass Effect ── */

.glass {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.hero-statement {
  max-width: 600px;
  text-align: center;
  padding: 48px 40px;
}

.hero-statement .hero-logo {
  height: 48px;
  margin-bottom: 20px;
}

.hero-statement h1 {
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

/* ── Features ── */

.features {
  padding: 100px 40px;
  position: relative;
  z-index: 2;
}

.features-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.features-heading {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.features-sub {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 60px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: left;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

.features-cta {
  padding-top: 10px;
}

/* ── Referral Inline (inside features) ── */

.referral-inline {
  margin-top: 60px;
  padding-top: 48px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
}

.referral-inline h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.referral-inline p {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

/* ── Footer ── */

.site-footer {
  background: var(--bg);
  padding: 32px 20px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 2;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.15s;
}

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

/* ── Scroll Animations ── */

.anim {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.anim.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger the hero elements */
.hero-statement .anim:nth-child(1) { transition-delay: 0s; }
.hero-statement .anim:nth-child(2) { transition-delay: 0.12s; }
.hero-statement .anim:nth-child(3) { transition-delay: 0.24s; }
.hero-statement .anim:nth-child(4) { transition-delay: 0.36s; }

/* Stagger the feature cards */
.features-grid .anim:nth-child(1) { transition-delay: 0s; }
.features-grid .anim:nth-child(2) { transition-delay: 0.08s; }
.features-grid .anim:nth-child(3) { transition-delay: 0.16s; }
.features-grid .anim:nth-child(4) { transition-delay: 0.24s; }
.features-grid .anim:nth-child(5) { transition-delay: 0.32s; }
.features-grid .anim:nth-child(6) { transition-delay: 0.4s; }

/* ── Responsive ── */

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1200px) {
  body::before {
    background-image: url('images/svennbgmid.jpg');
  }
}

@media (max-width: 768px) {
  body::before {
    background-image: url('images/svennbgmobile.jpg');
    background-position: left top;
  }
  .hero-inner {
    padding: 40px 16px;
    padding-top: 93px;
  }
  .hero-statement {
    max-width: 100%;
    padding: 32px 24px;
  }
  .hero-statement h1 {
    font-size: 1.8rem;
  }
  .hero-sub {
    font-size: 0.95rem;
  }
  .features {
    padding: 60px 20px;
  }
  .features-heading {
    font-size: 1.5rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .referral-inline h2 {
    font-size: 1.4rem;
  }
}

/* ── Demo Chat Widget ── */

#demo-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1100;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.demo-chat-fab {
  height: 48px;
  padding: 0 20px;
  border-radius: 24px;
  border: none;
  background: linear-gradient(135deg, #ff8a2b, #E93D82, #a020f0, #ff2da0, #ff8a2b);
  background-size: 300% 300%;
  animation: gradientShift 4s ease infinite;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(255, 45, 160, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.demo-chat-fab:hover {
  animation-duration: 2s;
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(255, 45, 160, 0.5);
}

.demo-chat-fab svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.demo-chat-fab-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.demo-chat-fab-icon { display: block; }
.demo-chat-fab-label { display: block; }
.demo-chat-fab-close { display: none; }

.demo-chat-fab.open {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
}
.demo-chat-fab.open .demo-chat-fab-icon { display: none; }
.demo-chat-fab.open .demo-chat-fab-label { display: none; }
.demo-chat-fab.open .demo-chat-fab-close { display: block; }

/* Panel */

.demo-chat-panel {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 420px;
  max-height: 600px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.demo-chat-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header */

.demo-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.25);
}

.demo-chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a2b, #ff2da0);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
}

.demo-chat-header-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.demo-chat-header-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

.demo-chat-header-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}

.demo-chat-header-close:hover {
  color: var(--text);
}

/* Messages */

.demo-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 360px;
  max-height: 420px;
}

.demo-chat-msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.demo-chat-msg-assistant {
  background: rgba(255, 138, 43, 0.08);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.demo-chat-msg-user {
  background: linear-gradient(135deg, #ff8a2b, #ff2da0);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Typing indicator */

.demo-chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
}

.demo-chat-typing .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: demoChatBounce 1.2s infinite;
}

.demo-chat-typing .dot:nth-child(2) { animation-delay: 0.15s; }
.demo-chat-typing .dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes demoChatBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Quick-reply buttons */

.demo-chat-quick-replies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 14px 8px;
}

.demo-chat-quick-btn {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text, #1a1a2e);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.demo-chat-quick-btn:hover {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}

.demo-chat-quick-btn:active {
  transform: translateY(0);
}

/* Input */

.demo-chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.25);
}

.demo-chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  background: white;
  color: var(--text);
  transition: border-color 0.15s;
}

.demo-chat-input:focus {
  border-color: #ff2da0;
}

.demo-chat-input::placeholder {
  color: var(--text-muted);
}

.demo-chat-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ff8a2b, #ff2da0);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.demo-chat-send:hover {
  opacity: 0.85;
}

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

.demo-chat-send svg {
  width: 18px;
  height: 18px;
}

/* ── Demo Chat Responsive ── */

@media (max-width: 768px) {
  #demo-chat-widget {
    bottom: 16px;
    right: 16px;
  }

  .demo-chat-panel {
    width: calc(100vw - 32px);
    max-height: calc(100vh - 140px);
    right: 0;
    bottom: 72px;
  }

  .demo-chat-messages {
    min-height: 280px;
    max-height: calc(100vh - 280px);
  }

  .demo-chat-fab {
    height: 44px;
    padding: 0 16px;
  }

  .demo-chat-fab.open {
    width: 44px;
    height: 44px;
    padding: 0;
  }

  .demo-chat-fab svg {
    width: 18px;
    height: 18px;
  }

  .demo-chat-fab-label {
    font-size: 0.82rem;
  }
}
