/* ============================================================
   clehmann App Development — Modern, Professional, Timeless
   ============================================================ */

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

/* ── DESIGN TOKENS ── */
:root {
  /* Colours */
  --bg:           #f7f8fa;
  --surface:      #ffffff;
  --surface-2:    #f0f2f5;
  --text:         #0d1117;
  --text-2:       #374151;
  --muted:        #6b7280;
  --accent:       #1a56db;
  --accent-dark:  #1447b8;
  --accent-light: #eff4ff;
  --accent-ring:  rgba(26, 86, 219, 0.18);
  --border:       rgba(13, 17, 23, 0.08);
  --border-med:   rgba(13, 17, 23, 0.14);
  --shadow-sm:    0 1px 3px rgba(13, 17, 23, 0.06), 0 1px 2px rgba(13, 17, 23, 0.04);
  --shadow-md:    0 4px 12px rgba(13, 17, 23, 0.08), 0 2px 4px rgba(13, 17, 23, 0.04);
  --shadow-lg:    0 12px 32px rgba(13, 17, 23, 0.10), 0 4px 8px rgba(13, 17, 23, 0.05);

  /* Geometry */
  --radius:       16px;
  --radius-sm:    10px;
  --radius-xs:    6px;
  --max:          720px;
  --pad:          2rem;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { text-decoration: underline; }
strong { font-weight: 600; }

/* ── NAV ── */
.site-nav {
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
  width: 100%;
  padding: 1.75rem var(--pad) 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
  padding: 0.35rem 0.75rem 0.35rem 0.5rem;
  border-radius: var(--radius-xs);
  transition: color 0.15s, background 0.15s;
}
.back-link:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

/* ── MAIN ── */
main {
  flex: 1;
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--pad) 5rem;
}

/* ── LABEL ── */
.label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.85rem;
}

/* ── APP HERO (index list) ── */
.app-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 2.25rem;
}

/* ── APP HERO — detail page (centred logo) ── */
.app-detail-page .app-hero {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Larger, centred icon on detail pages */
.app-detail-page .hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}

.hero-text h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.4px;
  font-weight: 400;
  color: var(--text);
}
.hero-text .app-cat {
  font-size: 0.73rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.35rem;
  font-weight: 500;
}

/* ── DESCRIPTION CARD ── */
.desc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  font-size: 0.95rem;
  line-height: 1.8;
  font-weight: 300;
  color: var(--text-2);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}

/* ── LINK BUTTONS ── */
.link-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border-med);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.83rem;
  color: var(--text-2);
  font-weight: 400;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, border-color 0.15s, color 0.15s,
              transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.link-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent-ring);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

/* ── LEGAL SECTIONS ── */
.legal-section { margin-bottom: 1.25rem; }

.legal-section h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--text);
}

.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  font-size: 0.875rem;
  line-height: 1.85;
  font-weight: 300;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}

.legal-card h3 {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 1.5rem 0 0.6rem;
  border-top: 1px solid var(--border);
  margin-top: 0;
}
.legal-card h3:first-child {
  padding-top: 0;
  border-top: none;
}

.legal-card p { margin-bottom: 0.7rem; }
.legal-card p:last-child { margin-bottom: 0; }

.legal-card ul, .legal-card ol {
  padding-left: 1.2rem;
  margin-bottom: 0.7rem;
}
.legal-card li { margin-bottom: 0.25rem; }

.legal-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin: 1rem 0;
}
.legal-card th {
  text-align: left;
  padding: 0.4rem 0.5rem 0.4rem 0;
  border-bottom: 1.5px solid var(--border-med);
  font-weight: 600;
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.legal-card td {
  padding: 0.5rem 0.5rem 0.5rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-2);
  line-height: 1.6;
}

.legal-card .notice {
  border: 1px solid var(--accent-ring);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.85rem;
  line-height: 1.65;
  margin: 0.75rem 0 1rem;
}

.legal-card .lang-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.75rem 0;
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.legal-card .lang-divider::before,
.legal-card .lang-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.legal-card .contact-line {
  font-size: 0.82rem;
  color: var(--muted);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.legal-card .contact-line a { color: var(--muted); }
.legal-card .contact-line a:hover { color: var(--accent); text-decoration: underline; }

/* ── LANG SWITCHER ── */
.lang-tab-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.lang-tab {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border: 1px solid var(--border-med);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.lang-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.lang-tab:hover:not(.active) {
  border-color: var(--muted);
  color: var(--text);
}

.lang-block { display: none; }
.lang-block.active { display: block; }

/* ── FOOTER ── */
footer {
  padding: 1.5rem var(--pad);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
  width: 100%;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a, .footer-copy {
  font-size: 0.75rem;
  color: var(--muted);
}
.footer-links a:hover { color: var(--accent); text-decoration: none; }

/* ── 404 ── */
.error-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem;
  gap: 1.25rem;
}
.error-code {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 7rem;
  line-height: 1;
  font-weight: 400;
  color: var(--border-med);
  letter-spacing: -4px;
}
.error-msg {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 300;
}

/* ── RESPONSIVE ── */
@media (max-width: 520px) {
  :root { --pad: 1.25rem; }
  .hero-text h1 { font-size: 1.6rem; }
  .app-detail-page .hero-icon { width: 96px; height: 96px; border-radius: 22px; }
  .legal-card { padding: 1.25rem; }
  .error-code { font-size: 5rem; }
  footer { flex-direction: column; align-items: flex-start; }
}
