/* ============================================================================
   linux16km.org — vanilla CSS (no framework, no build tool)
   ============================================================================ */

/* ---- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #050816;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea { font: inherit; }

/* ---- Layout helpers ---------------------------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.container-narrow { max-width: 768px; }
.container-medium { max-width: 1024px; }
.container-wide   { max-width: 1280px; }
.center { text-align: center; }

.section { padding: 96px 16px; }
@media (max-width: 768px) {
  .section { padding: 64px 16px; }
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: #fff;
  margin: 0 0 32px;
}
.subsection-title {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin: 40px 0 16px;
}
.section-subtitle {
  color: #9ca3af;
  margin: -24px 0 32px;
}
.divider {
  border: 0;
  border-top: 1px solid rgba(249, 115, 22, 0.1);
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- Rich text (strong tags) ------------------------------------------ */
.rich-text {
  font-size: 18px;
  line-height: 1.7;
  color: #d1d5db;
}
.rich-text p { margin: 0 0 24px; }
.rich-text strong {
  color: #ff6b35;
  font-weight: 600;
}

/* ---- Badges ------------------------------------------------------------ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  letter-spacing: 0.3px;
}
.badge-outline {
  padding: 6px 14px;
  border: 1px solid rgba(249, 115, 22, 0.3);
  background: rgba(249, 115, 22, 0.05);
  border-radius: 999px;
  font-size: 14px;
  color: #fb923c;
}
.badge-soft {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
}

/* ---- Cards ------------------------------------------------------------- */
.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  transition: background 0.3s;
}
.card:hover { background: rgba(255, 255, 255, 0.06); }

.cards-grid {
  display: grid;
  gap: 24px;
}
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
  .cards-2, .cards-3 { grid-template-columns: 1fr; }
}

.training-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin: 16px 0 12px;
}
.training-card p {
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px;
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
}

/* ---- Icons ------------------------------------------------------------- */
.icon       { width: 16px; height: 16px; flex-shrink: 0; }
.icon-lg    { width: 32px; height: 32px; }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.btn:hover { background: rgba(255, 255, 255, 0.1); }

.btn-lg    { padding: 14px 28px; font-size: 15px; font-weight: 600; }
.btn-block { width: 100%; justify-content: center; }
.btn-primary {
  background: #f97316;
  border-color: #f97316;
  color: #fff;
}
.btn-primary:hover { background: #ea580c; border-color: #ea580c; }
.btn-outline {
  background: transparent;
  border-color: rgba(249, 115, 22, 0.5);
  color: #f97316;
}
.btn-outline:hover {
  background: rgba(249, 115, 22, 0.1);
  border-color: #f97316;
}

/* ---- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  width: 384px;
  height: 384px;
  border-radius: 50%;
  filter: blur(80px);
}
.orb-1 { top: 25%;    left: -128px; background: rgba(249, 115, 22, 0.1); }
.orb-2 { bottom: 25%; right: -128px; background: rgba(249, 115, 22, 0.05); }

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 768px;
  margin: 0 auto;
}
.hero-content > * { opacity: 0; animation: hero-in 0.8s ease forwards; }
.hero-content > *:nth-child(1) { animation-delay: 0.0s; }
.hero-content > *:nth-child(2) { animation-delay: 0.1s; }
.hero-content > *:nth-child(3) { animation-delay: 0.2s; }
.hero-content > *:nth-child(4) { animation-delay: 0.3s; }

@keyframes hero-in {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-size: clamp(72px, 12vw, 144px);
  font-weight: 900;
  color: #fb923c;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 24px 0;
}
.hero-tagline {
  font-size: clamp(16px, 2vw, 20px);
  color: #d1d5db;
  line-height: 1.6;
  margin: 0 auto 40px;
  max-width: 576px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: #6b7280;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 10px); }
}

/* ---- Language switcher ------------------------------------------------- */
.lang-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(10, 14, 39, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}
.lang-btn {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.15s;
}
.lang-btn:hover { color: #d1d5db; }
.lang-btn-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ---- Tabs -------------------------------------------------------------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  width: fit-content;
  margin-bottom: 32px;
}
.tab {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  color: #d1d5db;
  transition: all 0.15s;
}
.tab:hover { background: rgba(255, 255, 255, 0.05); }
.tab-active {
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
}

/* ---- Blog post card ---------------------------------------------------- */
.post-card { cursor: pointer; height: 100%; }
.post-card .post-excerpt {
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.6;
  margin: 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  font-size: 12px;
  color: #6b7280;
}
.post-card .post-readmore {
  color: #f97316;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.15s;
}
.post-card:hover .post-readmore { gap: 8px; }
.post-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 12px 0 0;
}

/* ---- Training log stats ------------------------------------------------ */
.stat-card { text-align: center; }
.stat-card .stat-icon {
  width: 24px; height: 24px;
  color: #f97316;
  margin: 0 auto 8px;
}
.stat-card .stat-value {
  font-size: 30px;
  font-weight: 700;
  color: #fff;
}
.stat-card .stat-label {
  color: #9ca3af;
  font-size: 13px;
}

/* ---- Breakdown by type ------------------------------------------------- */
.breakdown-card .type-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.breakdown-card .type-icon-box {
  padding: 8px;
  border-radius: 8px;
}
.breakdown-card .type-name {
  color: #fff;
  font-weight: 500;
  text-transform: capitalize;
}
.breakdown-card .type-detail {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.6;
}

.type-color-running      { color: #34d399; background: rgba(52, 211, 153, 0.1); }
.type-color-skiing       { color: #38bdf8; background: rgba(56, 189, 248, 0.1); }
.type-color-rollerskiing { color: #fbbf24; background: rgba(251, 191, 36, 0.1); }

/* ---- Recent activities ------------------------------------------------- */
.recent-list {
  max-height: 384px;
  overflow-y: auto;
  padding-right: 8px;
}
.recent-list::-webkit-scrollbar { width: 6px; }
.recent-list::-webkit-scrollbar-track { background: transparent; }
.recent-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
.recent-list::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

.recent-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}
.recent-item:hover { background: rgba(255, 255, 255, 0.04); }
.recent-item .recent-icon {
  padding: 8px;
  border-radius: 8px;
  flex-shrink: 0;
}
.recent-item .recent-info { flex: 1; min-width: 0; }
.recent-item .recent-type {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-transform: capitalize;
}
.recent-item .recent-notes {
  color: #6b7280;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-item .recent-stats {
  text-align: right;
  flex-shrink: 0;
}
.recent-item .recent-distance {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}
.recent-item .recent-duration {
  color: #6b7280;
  font-size: 12px;
}
.recent-item .recent-date {
  color: #6b7280;
  font-size: 12px;
  flex-shrink: 0;
}

/* ---- Contact form ------------------------------------------------------ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  outline: none;
  transition: border-color 0.15s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #6b7280; }
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(249, 115, 22, 0.5);
}
.contact-form textarea { resize: none; }

.honeypot {
  position: absolute;
  width: 0; height: 0;
  opacity: 0;
  overflow: hidden;
}

.form-msg {
  text-align: center;
  font-size: 14px;
  margin: 0;
}
.form-success { color: #34d399; }
.form-error   { color: #f87171; }
.form-privacy {
  color: #4b5563;
  font-size: 12px;
  text-align: center;
  margin: 0;
}

/* ---- Footer ------------------------------------------------------------ */
.footer {
  padding: 32px 16px;
  border-top: 1px solid rgba(249, 115, 22, 0.1);
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}

/* ---- Empty state ------------------------------------------------------- */
.empty-state {
  color: #6b7280;
  text-align: center;
  padding: 48px 0;
}

/* ---- Loading state ----------------------------------------------------- */
.loading {
  display: flex;
  justify-content: center;
  padding: 48px 0;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(249, 115, 22, 0.2);
  border-top-color: #f97316;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Reveal on scroll -------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-content > * { animation: none; opacity: 1; }
  .scroll-indicator { animation: none; }
}
