:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #4b5563;
  --accent: #e4751e;
  --accent-hover: #da8c4b;
  --accent-2: #10b981;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1100px;
}

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

body {
  margin: 0;
  font-family: "Inter", "SF Pro Display", "Segoe UI", system-ui, -apple-system,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  width: 100%;
}

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

a:hover {
  color: var(--accent-2);
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(249, 250, 251, 0.9);
  border-bottom: 1px solid var(--border);
}

html {
  scroll-padding-top: 70px;
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: opacity 220ms ease, transform 220ms ease;
}

.brand img {
  height: 36px;
  width: 36px;
}

header.hero-visible .brand {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.nav-links {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 0.95rem;
}

.main {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 28px 18px 72px;
  display: grid;
  gap: 28px;
}

.main section {
  width: 100%;
  overflow-x: hidden;
}

.main section + section {
  margin-top: 6px;
}

.hero {
  background: linear-gradient(135deg, rgba(228, 117, 30, 0.08), transparent),
    linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  overflow-x: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
}

.hero-content {
  display: grid;
  gap: 10px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text);
  justify-self: end;
}

.hero-brand img {
  width: 180px;
  height: auto;
}

.hero-brand-hero {
  font-size: 1.25rem;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.2;
}

.hero p {
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.6;
}

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

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

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

.button.secondary {
  background: #fef3e7;
  color: var(--accent);
  box-shadow: none;
}

.button.secondary:hover {
  background: #e5cda3;
  color: #da8c4b;
}

.button .icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

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

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  width: 100%;
  overflow-x: hidden;
}

.card h3 {
  margin: 0 0 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.section-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.screenshot {
  width: 100%;
  max-width: 920px;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  margin: 18px auto 0;
}

.content {
  line-height: 1.7;
  color: var(--muted);
}

.content + .code-snippet,
.heading-line + .code-snippet,
.code-snippet + .content {
  margin-top: 14px;
}

.content h2 {
  margin-top: 28px;
  color: var(--text);
}

.content pre {
  background: #0b1220;
  color: #e5e7eb;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #1f2937;
  overflow-x: auto;
}

.snippet-block {
  margin: 14px 0;
  width: 100%;
  min-width: 0;
}

.code-snippet {
  position: relative;
  background: #282c34;
  border: 1px solid #3b4048;
  border-radius: 12px;
  padding: 14px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.snippet-block:last-of-type .code-snippet {
  margin-bottom: 0;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #111827;
  color: #e5e7eb;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.copy-btn:hover {
  background: #1f2937;
  color: #fff;
}

.code-snippet pre {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
}

.code-snippet pre,
.code-snippet pre code,
.code-snippet pre .hljs {
  overflow-x: auto;
  scrollbar-width: none; /* hide scrollbar in Firefox */
  -ms-overflow-style: none; /* hide scrollbar in IE/Edge */
  max-width: 100%;
}

.code-snippet pre::-webkit-scrollbar,
.code-snippet pre code::-webkit-scrollbar,
.code-snippet pre .hljs::-webkit-scrollbar {
  display: none; /* hide scrollbar in WebKit */
}

.heading-line {
  font-size: 1rem;
  margin: 14px 0 8px;
  color: var(--text);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
  overflow-x: hidden;
}

footer {
  border-top: 1px solid var(--border);
  padding: 22px 18px 32px;
  color: var(--muted);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.made-in-swiss {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f6f3f3;
  border: 1px solid #e6dcdc;
  color: #766363;
  font-weight: 500;
  font-size: 0.82rem;
  font-family: inherit;
  opacity: 0.8;
  margin-top: 6px;
}

.swiss-badge {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 5px;
  background: #b07b7b;
  flex-shrink: 0;
}

.swiss-badge::before,
.swiss-badge::after {
  content: "";
  position: absolute;
  background: #f5f0f0;
  border-radius: 2px;
}

.swiss-badge::before {
  width: 7px;
  height: 2px;
  top: 5px;
  left: 2.5px;
}

.swiss-badge::after {
  width: 2px;
  height: 7px;
  top: 2.5px;
  left: 5px;
}

/* Mobile styles */
@media (max-width: 768px) {
  .nav {
    padding: 12px 14px;
  }

  .brand span {
    display: none;
  }

  .nav-links {
    gap: 10px;
    font-size: 0.875rem;
  }

  .main {
    padding: 20px 14px 48px;
    gap: 20px;
    overflow-x: hidden;
  }

  .hero {
    padding: 18px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-brand img {
    width: 120px;
  }

  .hero-brand {
    justify-self: center;
  }

  .section-title {
    font-size: 1rem;
  }

  .two-col {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .card {
    padding: 14px;
  }

  .code-snippet {
    padding: 12px;
  }

  .copy-btn {
    padding: 5px 8px;
    font-size: 0.8rem;
  }

  .button {
    padding: 9px 12px;
    font-size: 0.9rem;
  }

  .screenshot {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav-links {
    font-size: 0.8rem;
    gap: 8px;
  }

  .nav-links a {
    padding: 4px 6px;
  }

  .main {
    padding: 16px 12px 36px;
    min-width: 0;
    overflow-x: hidden;
  }

  .main section {
    min-width: 0;
  }

  .hero {
    padding: 14px;
    max-width: 100%;
    min-width: 0;
  }

  .card {
    max-width: 100%;
    min-width: 0;
  }

  .code-snippet {
    max-width: 100%;
    min-width: 0;
    padding: 10px;
    font-size: 0.85rem;
  }

  .code-snippet pre {
    font-size: 0.75rem;
  }

  .snippet-block {
    min-width: 0;
  }

  .hero h1 {
    font-size: 1.25rem;
    margin-bottom: 6px;
  }

  .hero p {
    font-size: 0.875rem;
    margin-bottom: 14px;
  }

  .hero-brand-hero {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .section-title {
    font-size: 0.95rem;
  }

  .heading-line {
    font-size: 0.9rem;
  }

  footer {
    padding: 18px 12px 24px;
    font-size: 0.85rem;
  }
}

@media (max-width: 360px) {
  .nav {
    padding: 10px 8px;
  }

  .main {
    padding: 12px 8px 28px;
    gap: 16px;
    min-width: 0;
    overflow-x: hidden;
  }

  .main section {
    min-width: 0;
  }

  .hero {
    padding: 12px;
    gap: 12px;
    max-width: 100%;
    min-width: 0;
  }

  .card {
    padding: 10px;
    max-width: 100%;
    min-width: 0;
  }

  .code-snippet {
    padding: 8px;
    max-width: 100%;
    min-width: 0;
  }

  .snippet-block {
    min-width: 0;
  }

  .code-snippet pre,
  .code-snippet pre code {
    max-width: 100%;
  }

  footer {
    padding: 14px 8px 20px;
  }
}
