/* ============================================================
   shared.css — Kontakt site-wide styles
   Variables, reset, base, nav, footer, common components.
   Theme switching via shell.js ([data-theme="dark"]).
   ============================================================ */

/* --- Fonts ------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,300;0,700;0,900;1,300;1,700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* --- Variables: Light (default) ---------------------------- */
:root {
  --bg:        #FAFAF7;
  --surface:   #F2EDE5;
  --surface2:  #E8E3DB;
  --text:      #1C1A17;
  --muted:     #6B6560;
  --muted2:    #9B958F;
  --accent:    #E8601C;
  --border:    #E5E0D8;
  --radius:    12px;
  --nav-bg:    rgba(250,250,247,0.92);
  --shadow:    0 1px 3px rgba(0,0,0,0.08);
}

/* --- Variables: Dark --------------------------------------- */
[data-theme="dark"] {
  --bg:        #0C0B09;
  --surface:   #141310;
  --surface2:  #1C1A17;
  --text:      #F2EDE4;
  --muted:     #7A7570;
  --muted2:    #5A5550;
  --accent:    #E8601C;
  --accent-light: #F07840;
  --border:    rgba(242,237,228,0.10);
  --nav-bg:    rgba(12,11,9,0.90);
  --shadow:    0 1px 3px rgba(0,0,0,0.4);
  --green:        #2DA44E;
  --green-bg:     rgba(45,164,78,0.12);
  --green-border: rgba(45,164,78,0.2);
}

/* --- Variables: Light (app extras) ------------------------ */
:root {
  --accent-light: #F07840;
  --green:        #2DA44E;
  --green-bg:     rgba(45,164,78,0.15);
  --green-border: rgba(45,164,78,0.25);
}

/* --- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* --- Base -------------------------------------------------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }

/* --- Typography -------------------------------------------- */
h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
}
h1 em { color: var(--accent); font-style: italic; }

h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 16px;
}
h2 em { font-style: italic; color: var(--accent); }

h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

/* --- Nav --------------------------------------------------- */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
#site-nav .nav-logo {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 900;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
#site-nav .nav-logo span { color: var(--accent); }
#site-nav .nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
#site-nav .nav-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  transition: color .12s, background .12s;
}
#site-nav .nav-link:hover { color: var(--text); background: var(--surface); }
#site-nav .nav-link.active { color: var(--text); font-weight: 500; }
#site-nav .nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn-nav {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: color .12s, border-color .12s;
  white-space: nowrap;
}
.btn-nav:hover { color: var(--text); border-color: var(--muted2); }
.btn-nav-cta { background: var(--accent); border-color: var(--accent); color: #fff !important; font-weight: 500; }
.btn-nav-cta:hover { background: #f07840; border-color: #f07840; }

#nav-switcher {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
#nav-switcher button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px 9px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  color: var(--muted);
  line-height: 1;
  transition: color .12s, background .12s;
}
#nav-switcher button:hover { color: var(--text); background: var(--surface); }
#nav-switcher button.active { color: var(--text); font-weight: 600; }
#nav-switcher .sep { width: 1px; height: 14px; background: var(--border); flex-shrink: 0; }
#nav-switcher #theme-btn svg { display: block; stroke: currentColor; }

@media (max-width: 600px) {
  #site-nav .nav-links { display: none; }
  #site-nav { padding: 0 16px; }
}

/* --- Footer ----------------------------------------------- */
#site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--muted2);
}
#site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  margin-bottom: 12px;
}
#site-footer .footer-links a { color: var(--muted2); text-decoration: none; transition: color .12s; }
#site-footer .footer-links a:hover { color: var(--accent); }
#site-footer .footer-copy { color: var(--muted2); }

/* --- Buttons ---------------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.btn-primary:hover { background: #f07840; color: #fff; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 22px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: color .15s;
}
.btn-ghost:hover { color: var(--text); }

/* --- Layout ----------------------------------------------- */
.section {
  padding: 60px 24px;
  max-width: 760px;
  margin: 0 auto;
}
.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero {
  padding: 120px 24px 80px;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.hero-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.6;
}
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- Badge ------------------------------------------------- */
.badge {
  display: inline-block;
  background: rgba(232,96,28,0.12);
  color: var(--accent);
  border: 1px solid rgba(232,96,28,0.3);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}

/* --- Steps ------------------------------------------------- */
.steps { display: flex; flex-direction: column; gap: 20px; margin-top: 32px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(232,96,28,0.12);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-body h3 { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.step-body p { font-size: 13px; color: var(--muted); }

/* --- Pricing card ------------------------------------------ */
.pricing-card {
  background: var(--surface);
  border: 1px solid rgba(232,96,28,0.35);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  max-width: 380px;
  margin: 28px auto 0;
  position: relative;
}
.pricing-badge, .pricing-badge-pill {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 20px;
  white-space: nowrap;
}
.price { font-family: 'Fraunces', serif; font-size: 52px; font-weight: 900; line-height: 1; }
.price sup { font-size: 22px; vertical-align: top; margin-top: 8px; }
.price-period { font-size: 13px; color: var(--muted); margin: 6px 0 20px; }
.features, .feat-list {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.features li, .feat-list li { display: flex; gap: 8px; font-size: 14px; }
.features .icon, .feat-list .icon { color: var(--accent); flex-shrink: 0; }

/* --- Modal ------------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.modal-title { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.modal-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  margin-bottom: 12px;
}
.modal-input:focus { border-color: var(--accent); }
.modal-btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.modal-error { color: #ff6b6b; font-size: 13px; margin-bottom: 10px; display: none; }
.modal-success { display: none; text-align: center; }

/* --- Trial chat -------------------------------------------- */
.trial-chat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 560px;
  margin: 28px auto 0;
}
.trial-msgs, .trial-chat-msgs {
  padding: 20px;
  min-height: 180px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.trial-msg { display: flex; gap: 8px; align-items: flex-start; }
.trial-msg.user { flex-direction: row-reverse; }
.trial-msg-av, .trial-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.trial-bubble, .trial-msg-bubble {
  background: var(--surface2);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 80%;
}
.trial-msg.user .trial-bubble,
.trial-msg.user .trial-msg-bubble { background: rgba(232,96,28,0.15); }

.trial-footer, .trial-chat-footer {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.trial-input, .trial-chat-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  resize: none;
}
.trial-input:focus, .trial-chat-input:focus { border-color: var(--accent); }
.trial-send, .trial-send-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.trial-send:hover, .trial-send-btn:hover { background: #f07840; }
.trial-send:disabled, .trial-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.trial-counter {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
}
.trial-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.trial-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 12px;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.trial-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.trial-tab:hover:not(.active) { border-color: var(--accent); color: var(--text); }
.trial-cta-box {
  background: rgba(232,96,28,0.08);
  border: 1px solid rgba(232,96,28,0.25);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
  margin-top: 16px;
  display: none;
}
.trial-cta-box p { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.trial-email-row { display: flex; gap: 8px; margin: 0 auto 12px; max-width: 360px; }
.trial-email-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  outline: none;
}
.trial-email-input:focus { border-color: var(--accent); }
.trial-email-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.trial-email-btn:hover { border-color: var(--accent); }
.trial-email-note { font-size: 11px; color: var(--muted); margin-bottom: 12px; }

/* --- FAQ --------------------------------------------------- */
.faq {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 32px;
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  gap: 12px;
}
.faq-q:hover { background: rgba(255,255,255,0.02); }
.faq-a { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s; }
.faq-a.open { max-height: 300px; padding: 0 20px 16px; }
.faq-a p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* --- Typing indicator + animations ------------------------- */
.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: tBounce 1.2s infinite;
  display: inline-block;
  margin: 0 2px;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes tBounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }
@keyframes bounce   { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- CTA sections ----------------------------------------- */
.cta-bottom {
  padding: 72px 24px;
  text-align: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.cta-bottom h2 { margin-bottom: 8px; }
.cta-bottom p { color: var(--muted); font-size: 15px; margin-bottom: 32px; }

/* --- CTA box (always dark) -------------------------------- */
.cta-box {
  background: #1C1A17;
  color: #F2EDE4;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
}
.cta-box h2 { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; color: #F2EDE4; }
.cta-box p  { color: rgba(242,237,228,0.6); font-size: 14px; margin-bottom: 20px; }
.cta-box a, .cta-box button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

/* --- Info/tip box ----------------------------------------- */
.infobox {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 1.5rem 0;
  font-size: 14px;
  color: var(--muted);
}
.infobox strong { display: block; color: var(--text); margin-bottom: 4px; font-size: 13px; }

/* --- Blog listing (blog/index.html) ----------------------- */
.wrap { max-width: 800px; margin: 0 auto; padding: 40px 24px 80px; }
.page-header { margin-bottom: 40px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.page-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.page-sub { font-size: 16px; color: var(--muted); }
.cat-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted2); margin: 36px 0 14px; }
.articles {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.article-card {
  background: var(--bg);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}
.article-card:hover { background: var(--surface); }
.card-icon { font-size: 20px; flex-shrink: 0; width: 36px; text-align: center; }
.card-body { flex: 1; min-width: 0; }
.card-title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.card-desc { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-arrow { color: var(--muted2); font-size: 14px; flex-shrink: 0; }
