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

:root {
  --bg: #0a0a0a;
  --text: #f0ece2;
  --accent: #c8a96e;
  --muted: #555;
  --border: #1e1e1e;
  /* --mono-font: 'DM Mono', monospace; */
  --mono-font: 'Consolas', 'Courier New', monospace;
  /* --header-font: 'Playfair Display', serif; */
  --header-font: "Georgia", "Times New Roman", serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono-font);
  min-height: 100vh;
  position: relative;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 10;
  opacity: 0.4;
}

/* Soft radial glow */
body::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200, 169, 110, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* Site header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  z-index: 20;
  background: var(--bg);
}

.site-logo {
  font-family: var(--header-font);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.1em;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 0.25rem;
}

.lang-btn {
  background: none;
  border: 1px solid var(--muted);
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.lang-btn:hover,
.lang-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* Site footer */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: center;
  z-index: 20;
  background: var(--bg);
}

.copyright {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Decorative line */
.divider {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  margin: 2rem auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Index page ── */
body.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.content {
  text-align: center;
  position: relative;
  z-index: 5;
  animation: fadeIn 1.2s ease forwards;
  padding: 2rem;
}

.eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.headline {
  font-family: var(--header-font);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.subtext {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  max-width: 300px;
  margin: 0 auto;
  line-height: 1.8;
}

.faq-link {
  display: inline-block;
  margin-top: 2.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.faq-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── FAQ page ── */
body.faq-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6rem 2rem 5rem;
  min-height: 100vh;
}

.faq-wrap {
  width: 100%;
  max-width: 680px;
  position: relative;
  z-index: 5;
  animation: fadeIn 1s ease forwards;
}

.back-link {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 3rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent);
}

.faq-section {
  margin-bottom: 5rem;
  padding-bottom: 3rem;
  padding-top: 2rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 5rem;
}

#how-to-connect {
  padding-top: 2rem;
  scroll-margin-top: 5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.faq-item {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-family: var(--header-font);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.faq-answer {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.8;
  letter-spacing: 0.03em;
}

.faq-wrap .eyebrow {
  margin-bottom: 0.75rem;
}

.faq-wrap .headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 2rem;
}

.faq-intro {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.8;
  letter-spacing: 0.05em;
  margin-bottom: 3rem;
}

.app-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.app-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.app-item:hover {
  border-color: #333;
}

.app-info {
  flex: 1;
  min-width: 200px;
}

.app-item .app-name {
  font-family: var(--header-font);
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.4rem;
}

.app-desc {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.app-dl {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.app-dl a,
.app-dl .app-link {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.35rem 0.6rem;
  transition: all 0.2s;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.app-dl a:hover,
.app-dl .app-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.app-dl svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  fill: currentColor;
}

.app-link-group {
  position: relative;
  display: inline-flex;
}

.app-link-group .app-link {
  padding-right: 1.6rem;
  position: relative;
}

.app-link-group .app-link::after {
  content: '▾';
  position: absolute;
  right: 0.35rem;
  font-size: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: inherit;
  pointer-events: none;
}

.app-link-group .dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #111;
  border: 1px solid #2a2a2a;
  min-width: 100px;
  z-index: 100;
  flex-direction: column;
}

.app-link-group.open .dropdown {
  display: flex;
}

.dropdown a {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  border-bottom: 1px solid #1a1a1a;
}

.dropdown a:last-child {
  border-bottom: none;
}

.dropdown a:hover {
  color: var(--accent);
  background: #161616;
}

@media (max-width: 700px) {
  .app-item {
    flex-direction: column;
    gap: 1.25rem;
  }

  .app-dl {
    justify-content: flex-start;
  }
}

/* App cards */
.apps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.app-card {
  border: 1px solid var(--border);
  padding: 1.75rem;
  position: relative;
  transition: border-color 0.2s;
}

.app-card:hover {
  border-color: #333;
}

.app-name {
  font-family: var(--header-font);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.app-desc {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.app-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  transition: all 0.2s;
  background-color: var(--bg);
}

.app-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.app-link svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  fill: currentColor;
}

.app-link.unavailable {
  opacity: 0.3;
  pointer-events: none;
  cursor: default;
}

/* Dropdown wrapper */
.app-link-group {
  position: relative;
  display: inline-flex;
}

.app-link-group .app-link {
  padding-right: 1.4rem;
}

/* The ↓ chevron on multi-option buttons */
.app-link-group .app-link::after {
  content: '▾';
  position: absolute;
  right: 0.5rem;
  font-size: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: inherit;
}

.app-link-group .dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #111;
  border: 1px solid #2a2a2a;
  min-width: 160px;
  z-index: 100;
  flex-direction: column;
}

.app-link-group.open .dropdown {
  display: flex;
}

.dropdown a {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0.55rem 0.85rem;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  border-bottom: 1px solid #1a1a1a;
}

.dropdown a:last-child {
  border-bottom: none;
}

.dropdown a:hover {
  color: var(--accent);
  background: #161616;
}
