/* Traddy support site — shared styles */

:root {
  --bg: #f7f8fb;
  --bg-elevated: #ffffff;
  --text: #1c1e26;
  --text-muted: #5b6072;
  --border: #e4e6ee;
  --accent: #3762f2;
  --accent-hover: #2a4fd6;
  --accent-soft: #eaefff;
  --pill-free-bg: #e6f6ec;
  --pill-free-text: #1c7a41;
  --pill-pro-bg: #fdf0e0;
  --pill-pro-text: #a8621a;
  --code-bg: #eef0f6;
  --shadow: 0 1px 2px rgba(20, 24, 40, 0.04), 0 8px 24px rgba(20, 24, 40, 0.06);
  --radius: 14px;
  --max-width: 880px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101218;
    --bg-elevated: #171a23;
    --text: #edeef4;
    --text-muted: #a2a6b8;
    --border: #262a37;
    --accent: #7d97ff;
    --accent-hover: #96aeff;
    --accent-soft: #1c2440;
    --pill-free-bg: #163827;
    --pill-free-text: #6bd99a;
    --pill-pro-bg: #3a2a12;
    --pill-pro-text: #e7ac5e;
    --code-bg: #1d2029;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand svg {
  flex-shrink: 0;
}

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

.site-nav a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--accent-soft);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Language switcher */

.lang-switcher select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 28px 7px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235b6072' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.lang-switcher select:hover {
  border-color: var(--accent);
}

.lang-switcher select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Hero */

.hero {
  padding: 64px 0 40px;
  text-align: center;
}

.hero-icon {
  margin: 0 auto 24px;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 42px);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.hero p.lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
}

.btn:hover {
  text-decoration: none;
}

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

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

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--accent-soft);
  color: var(--text);
}

/* Main content sections */

main {
  padding: 8px 0 80px;
}

section {
  margin: 48px 0;
}

section h2 {
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.page-title {
  padding: 48px 0 8px;
}

.page-title h1 {
  font-size: clamp(28px, 4vw, 36px);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.page-title p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 620px;
}

.updated-at {
  color: var(--text-muted);
  font-size: 13px;
}

/* Feature cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
}

.pill-free {
  background: var(--pill-free-bg);
  color: var(--pill-free-text);
}

.pill-pro {
  background: var(--pill-pro-bg);
  color: var(--pill-pro-text);
}

/* FAQ / accordion */

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item .faq-body {
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 14.5px;
}

.faq-item .faq-body p {
  margin: 0 0 10px;
}

.faq-item .faq-body p:last-child {
  margin-bottom: 0;
}

/* Contact card */

.contact-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.contact-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* Legal text (privacy / terms) */

.legal h2 {
  font-size: 19px;
  margin: 32px 0 10px;
}

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

.legal ul {
  padding-left: 20px;
}

code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
}

.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
}

/* 404 */

.error-page {
  text-align: center;
  padding: 96px 0;
}

.error-page .code {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.error-page h1 {
  font-size: 28px;
  margin: 8px 0 12px;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

@media (max-width: 560px) {
  .site-header .wrap {
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    flex-direction: column;
    gap: 10px;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .lang-switcher {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .lang-switcher select {
    width: 100%;
    max-width: 260px;
  }
}
