/* Shared styles for content pages: about, privacy, blog index, blog articles */

:root {
  --bg: #000;
  --surface: #111;
  --surface-elevated: #1a1a1a;
  --accent: #FF4444;
  --accent-glow: rgba(255, 68, 68, 0.15);
  --text: #fff;
  --text-secondary: #999;
  --text-muted: #666;
  --border: #222;
  --border-hover: #444;
}

/* ========== FOUC Prevention ========== */
/* Hide translatable elements until i18n is ready */
[data-i18n]:not(.i18n-skip) { visibility: hidden; }
html.i18n-ready [data-i18n] { visibility: visible; }

/* ========== Reset & Base ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: -webkit-fill-available; }

body {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover {
  color: #ff6666;
  text-decoration: underline;
}

/* ========== Particle Canvas ========== */
#particle-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ========== Brand Fall ========== */
.brand-fall-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.brand-fall-item {
  position: absolute;
  top: -12vh;
  width: var(--size, 68px);
  height: var(--size, 68px);
  object-fit: contain;
  opacity: 0.18;
  animation: fall var(--duration) linear forwards;
  transform: translate3d(0, -12vh, 0) rotate(var(--rot));
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}

@keyframes fall {
  to { transform: translate3d(var(--drift), 120vh, 0) rotate(calc(var(--rot) + 140deg)); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-fall-layer { display: none; }
}

/* ========== Page Content Area ========== */
.page-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  z-index: 1;
  position: relative;
}

.page-content.scrollable {
  align-items: flex-start;
}

/* ========== Glass Panel (matches main page form-panel) ========== */
.glass-panel {
  background: rgba(17, 17, 17, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 0 80px rgba(255, 68, 68, 0.04);
  width: 100%;
  max-width: 520px;
  padding: 32px 24px;
}

/* Wider variant for long-form content (blog articles, privacy) */
.glass-panel.wide {
  max-width: 780px;
}

/* ========== Typography ========== */
h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin: 28px 0 10px;
}

h3 {
  font-size: 0.95rem;
  color: #ccc;
  margin: 24px 0 10px;
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.92rem;
  margin-bottom: 14px;
}

ul, ol {
  color: var(--text-secondary);
  margin: 14px 0 14px 24px;
  line-height: 1.7;
  font-size: 0.92rem;
}

li { margin-bottom: 6px; }

.meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ========== Logo ========== */
.page-logo {
  width: min(200px, 50vw);
  height: auto;
  display: block;
  margin: 0 auto 8px;
}

/* ========== Navigation ========== */
.breadcrumb {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a {
  color: var(--text-muted);
}
.breadcrumb a:hover {
  color: var(--accent);
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  font-weight: 500;
  font-size: 0.9rem;
}

/* ========== CTA ========== */
.cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin: 28px 0;
  text-align: center;
}
.cta p {
  color: #bbb;
  margin-bottom: 14px;
}
.cta-button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.15s;
}
.cta-button:hover {
  background: #ff6666;
  color: #fff;
  text-decoration: none;
}

/* ========== Page Footer (matches main page #app-footer) ========== */
.page-footer {
  z-index: 1;
  position: relative;
  padding: 12px 20px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.page-footer a {
  color: var(--text-muted);
  text-decoration: none;
}
.page-footer a:hover {
  color: #aaa;
  text-decoration: none;
}

.social-links {
  display: flex;
  gap: 12px;
  align-items: center;
}
.social-links a {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  width: 20px;
  height: 20px;
  transition: color 0.15s;
}
.social-links a:hover { color: #ccc; text-decoration: none; }
.social-links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ========== Blog-specific ========== */
.tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.post-list { list-style: none; margin: 0; padding: 0; }
.post-item {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}
.post-item:last-child { border-bottom: 1px solid var(--border); }
.post-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.post-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.post-title a {
  color: var(--text);
  text-decoration: none;
}
.post-title a:hover { color: var(--accent); text-decoration: none; }
.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ========== Article-specific ========== */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.comparison-table th,
.comparison-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.comparison-table th {
  background: var(--surface-elevated);
  color: var(--text);
}

.related-posts {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.related-posts h2 { margin-top: 0; }
.related-posts ul { list-style: none; margin: 0; padding: 0; }
.related-posts li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--surface-elevated);
}
.related-posts li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.related-posts a { color: var(--text); font-weight: 500; }
.related-posts a:hover { color: var(--accent); text-decoration: none; }
.related-posts p { margin: 4px 0 0; font-size: 0.8rem; }

/* ========== RTL ========== */
[dir="rtl"] { text-align: right; }
[dir="rtl"] ul,
[dir="rtl"] ol { margin: 14px 24px 14px 0; }

/* ========== Mobile ========== */
@media (max-width: 480px) {
  .glass-panel { padding: 24px 20px; border-radius: 12px; }
  .glass-panel.wide { max-width: 100%; }
  .page-content { padding: 8px; }
  h1 { font-size: 1.3rem; }
}
