/* ==========================================================================
   Sikkerklik — shared design system
   ========================================================================== */

/* Self-hosted fonts (no third-party requests / IP-sharing with Google) */
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/bebas-neue-400.woff') format('woff');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/inter-300.woff') format('woff');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-400.woff') format('woff');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/inter-500.woff') format('woff');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-600.woff') format('woff');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/inter-700.woff') format('woff');
}

:root {
  --bg: #eef1e9;
  --bg-deep: #e2e7da;
  --bg-elevated: #f7f8f3;
  --ink: #172420;
  --border: rgba(23, 36, 32, 0.14);
  --border-hover: rgba(35, 77, 58, 0.45);
  --cyan: #234d3a;
  --cyan-2: #17342a;
  --cyan-soft: #234d3a;
  --pine-pale: #dfe8e1;
  --pine-pale-2: #cfe0d5;
  --text: #172420;
  --text-muted: rgba(23, 36, 32, 0.7);
  --text-faint: rgba(23, 36, 32, 0.48);
  --header-bg: rgba(238, 241, 233, 0.9);
  --tint: rgba(23, 36, 32, 0.06);
  --tint-strong: rgba(23, 36, 32, 0.1);
  --grid-line: rgba(23, 36, 32, 0.05);
  --hero-grad-a: var(--ink);
  --hero-grad-b: var(--cyan);
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Inter', sans-serif;
  --header-h: 76px;
}

body.light-theme {
  --bg: #172420;
  --bg-deep: #0d1a15;
  --bg-elevated: #1e3229;
  --border: rgba(238, 241, 233, 0.14);
  --border-hover: rgba(223, 232, 225, 0.4);
  --cyan: #eef1e9;
  --cyan-2: #dfe3d6;
  --cyan-soft: #eef1e9;
  --pine-pale: #24392f;
  --pine-pale-2: #2c4438;
  --text: #eef1e9;
  --text-muted: rgba(238, 241, 233, 0.72);
  --text-faint: rgba(238, 241, 233, 0.48);
  --header-bg: rgba(13, 26, 21, 0.85);
  --tint: rgba(238, 241, 233, 0.08);
  --tint-strong: rgba(238, 241, 233, 0.14);
  --grid-line: rgba(238, 241, 233, 0.05);
  --hero-grad-a: var(--text);
  --hero-grad-b: #cfe0d5;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- ambient background ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow-orb { display: none; }

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 30%, transparent 90%);
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 32px;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.site-header .header-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 2px;
  color: var(--text);
}


.brand svg { width: 28px; height: 28px; flex-shrink: 0; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  padding: 9px 16px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover { color: var(--text); background: var(--tint); }
.main-nav a.active { color: var(--cyan-soft); background: var(--pine-pale); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  transition: transform 0.2s ease, background 0.2s ease;
}
.theme-toggle-btn:hover { transform: scale(1.08); background: var(--tint); }
.theme-toggle-btn img { width: 22px; height: 22px; filter: brightness(0); }
body.light-theme .theme-toggle-btn img { filter: brightness(0) invert(1); }

.nav-burger {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  width: 40px; height: 40px;
  cursor: pointer;
  font-size: 1.2rem;
}

.mobile-nav-panel { display: none; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-burger { display: flex; align-items: center; justify-content: center; }
  .mobile-nav-panel {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px;
  }
  .mobile-nav-panel.open { display: flex; }
  .mobile-nav-panel a {
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 500;
    border-radius: var(--radius-sm);
  }
  .mobile-nav-panel a:hover { background: var(--pine-pale); }
}

/* ---------- layout shell ---------- */
.page { min-height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 1px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--cyan);
  color: var(--bg);
}
.btn-primary:hover { background: var(--cyan-2); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(35, 77, 58, 0.3); }

.btn-ghost {
  background: var(--tint);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--border-hover); background: var(--tint-strong); }

/* ---------- hero (home) ---------- */
.hero {
  padding: 80px 24px 60px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.status-pill {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan-soft);
  background: var(--pine-pale);
  border: 1px solid var(--cyan);
  padding: 6px 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.status-pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan-soft);
  box-shadow: 0 0 8px var(--cyan-soft);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: 2px;
  margin: 0;
  max-width: 780px;
  line-height: 1.05;
  background: linear-gradient(180deg, var(--hero-grad-a) 0%, var(--hero-grad-b) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0;
}

.hero .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ---------- generic sections ---------- */
.section { padding: 50px 24px; }
.section-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  letter-spacing: 1.5px;
  margin: 0 0 8px;
  text-align: center;
}
.section-subtitle {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-muted);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* ---------- cards ---------- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 12px 30px rgba(23, 36, 32, 0.1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.card:hover { border-color: var(--border-hover); box-shadow: 0 16px 40px rgba(35, 77, 58, 0.16); }

.card h2 { font-family: var(--font-display); font-size: 1.9rem; letter-spacing: 1px; margin: 0 0 16px; }
.card p { font-size: 1.05rem; line-height: 1.7; font-weight: 300; color: var(--text-muted); margin: 0 0 14px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.feature-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-card .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--pine-pale);
  display: flex; align-items: center; justify-content: center;
}
.feature-card .icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 1px; margin: 0; }
.feature-card p { font-size: 0.98rem; font-weight: 300; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* ---------- services ---------- */
.service-card { display: flex; flex-direction: column; gap: 10px; }
.service-card .num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--cyan-soft);
  letter-spacing: 2px;
}
.service-card h3 { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 1px; margin: 0; }
.service-card p { font-size: 1rem; font-weight: 300; line-height: 1.6; color: var(--text-muted); margin: 0; }

/* ---------- pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.price-card { text-align: center; display: flex; flex-direction: column; gap: 6px; }
.price-card.featured { border-color: var(--border-hover); box-shadow: 0 16px 40px rgba(35, 77, 58, 0.18); transform: translateY(-6px); }
.plan-title { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 1px; }
.plan-price { font-family: var(--font-display); font-size: 2.4rem; letter-spacing: 1px; margin: 4px 0 10px; }
.plan-price span { font-size: 1rem; font-family: var(--font-body); color: var(--text-muted); }
.plan-desc { font-size: 0.98rem; font-weight: 300; font-family: var(--font-body); line-height: 1.5; color: var(--text-muted); margin: 0; }

/* ---------- CTA banner ---------- */
.cta-banner {
  margin: 20px 24px 0;
  padding: 46px 30px;
  border-radius: var(--radius);
  text-align: center;
  background: var(--pine-pale);
  border: 1px solid var(--border-hover);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.cta-banner h2 { font-family: var(--font-display); font-size: 2rem; margin: 0; letter-spacing: 1.5px; }
.cta-banner p { font-weight: 300; color: var(--text-muted); max-width: 520px; margin: 0; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  padding: 22px 32px;
}

.site-footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-text { color: var(--text-faint); font-size: 0.85rem; font-weight: 300; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { font-size: 0.85rem; color: var(--text-faint); text-decoration: none; }
.footer-links a:hover { color: var(--cyan-soft); }

/* ---------- shield icon ---------- */
.shield-icon-lg {
  width: 60px; height: 60px;
  filter: drop-shadow(0 0 10px rgba(35, 77, 58, 0.35));
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- chatbot page ---------- */
.chat-page { padding: 24px; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-shell {
  flex: 1;
  min-height: 0;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(23, 36, 32, 0.1);
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.chat-header .avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--pine-pale);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-header .avatar svg { width: 20px; height: 20px; }
.chat-header .meta { display: flex; flex-direction: column; gap: 2px; }
.chat-header .meta .name { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 1px; }
.chat-header .meta .status { font-size: 0.78rem; color: var(--cyan-soft); font-weight: 500; }

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg { max-width: 78%; display: flex; flex-direction: column; gap: 4px; }
.msg.bot { align-self: flex-start; }
.msg.user { align-self: flex-end; }

.msg .bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.98rem;
  line-height: 1.55;
  font-weight: 300;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg.bot .bubble {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.msg.user .bubble {
  background: var(--cyan);
  color: var(--bg);
  font-weight: 400;
  border-bottom-right-radius: 4px;
}

.attachment-card {
  align-self: flex-end;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  padding: 6px;
}
.attachment-card img { display: block; max-width: 220px; max-height: 260px; border-radius: 8px; }

.typing-dots { display: inline-flex; gap: 4px; align-items: center; padding: 4px 2px; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan-soft);
  animation: blink 1.2s infinite both;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.suggestion-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 20px 14px;
}
.suggestion-chip {
  font-size: 0.85rem;
  font-family: var(--font-body);
  color: var(--cyan-soft);
  background: var(--pine-pale);
  border: 1px solid var(--cyan);
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.suggestion-chip:hover { background: var(--pine-pale-2); border-color: var(--border-hover); }

.pending-row {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 0 20px 12px;
  padding: 8px 10px;
  background: var(--pine-pale);
  border-radius: 10px;
  font-size: 0.85rem;
}
.pending-row.show { display: flex; }
.pending-row img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; }
.pending-row .name { flex: 1; color: var(--cyan-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-row button {
  background: none; border: none; cursor: pointer;
  color: var(--cyan-soft); font-size: 1.2rem; line-height: 1; padding: 2px 6px;
}

.chat-input-bar { border-top: 1px solid var(--border); padding: 14px 16px; }
.chat-input-row { display: flex; gap: 10px; align-items: flex-end; }

.attach-btn {
  background: var(--pine-pale);
  color: var(--cyan-soft);
  border: 1px solid var(--border);
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.attach-btn:hover { background: var(--pine-pale-2); }
.attach-btn:disabled { opacity: 0.5; cursor: default; }
.attach-btn svg { width: 19px; height: 19px; }

#chatInput {
  flex: 1;
  resize: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  outline: none;
  max-height: 140px;
  line-height: 1.4;
  transition: border-color 0.2s ease;
}
#chatInput:focus { border-color: var(--border-hover); }

.send-btn {
  background: var(--cyan);
  border: none;
  color: var(--bg);
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
.send-btn:hover { background: var(--cyan-2); transform: translateY(-2px); }
.send-btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.send-btn svg { width: 20px; height: 20px; }

.chat-disclaimer {
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: center;
  margin: 10px 0 0;
  line-height: 1.5;
}

.error-banner {
  font-size: 0.85rem;
  color: #ff8a8a;
  background: rgba(255, 74, 74, 0.08);
  border: 1px solid rgba(255, 74, 74, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 0 20px 12px;
  display: none;
}

/* ---------- contact form ---------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.form-input,
.form-textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.form-input:focus,
.form-textarea:focus { border-color: var(--border-hover); }
.form-textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: none;
  line-height: 1.5;
}
.form-status.success { display: block; background: var(--pine-pale); color: var(--cyan-soft); border: 1px solid var(--cyan); }
.form-status.error { display: block; background: rgba(255, 74, 74, 0.08); color: #ff8a8a; border: 1px solid rgba(255, 74, 74, 0.25); }

.btn:disabled { opacity: 0.6; cursor: default; transform: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .grid-3, .price-grid { grid-template-columns: 1fr; }
  .site-header { padding: 0 16px; }
  .hero { padding: 56px 16px 40px; }
  .section { padding: 36px 16px; }
  .msg { max-width: 88%; }
  .price-card.featured { transform: none; }
}
