/* ==========================================================================
   BASE & TYPOGRAPHY - MYBENCHSPACE
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.65;
  color: var(--text-main);
  background: var(--bg-body-gradient);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

p.lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 680px;
}

a {
  color: var(--brand-teal);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-spring);
}

a:hover {
  color: var(--brand-teal-light);
}

img, svg {
  display: block;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

/* --- Section Layout --- */
section {
  padding: 5.5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  background: var(--brand-mint);
  color: var(--brand-teal);
}

.section-title {
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
}

/* --- Global Navbar Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--duration-normal) var(--ease-spring);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  transition: transform var(--duration-normal) var(--ease-bounce);
}

.brand-link:hover .brand-logo-img {
  transform: scale(1.08) rotate(-4deg);
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  color: var(--brand-navy);
}

.brand-title span {
  color: var(--brand-teal);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-item a {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  color: var(--text-main);
  padding: 0.5rem 0.25rem;
  position: relative;
}

.nav-item a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--brand-teal);
  transition: width var(--duration-normal) var(--ease-spring);
  border-radius: var(--radius-full);
}

.nav-item a:hover::after,
.nav-item.active a::after {
  width: 100%;
}

.nav-item a:hover {
  color: var(--brand-teal);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switch {
  display: flex;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.lang-btn {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-spring);
}

.lang-btn.active {
  background: var(--bg-surface);
  color: var(--brand-navy);
  box-shadow: var(--shadow-xs);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--bg-subtle);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
}

.mobile-nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--brand-navy);
  border-radius: 2px;
  transition: all var(--duration-fast) var(--ease-spring);
}

/* Medium widths (small laptops, iPad landscape): tighter header so logo and menu never overlap */
@media (max-width: 1240px) {
  .nav-menu { gap: 1.1rem; }
  .nav-actions { gap: 0.6rem; }
  .brand-link { gap: 0.6rem; }
  .brand-logo-img { width: 38px; height: 38px; }
  .brand-title { font-size: 1.35rem; }
  .nav-item a { font-size: 0.9rem; }
}

@media (max-width: 1060px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--duration-normal) var(--ease-spring);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav-toggle {
    display: flex;
  }
}

/* Phones: logo, language and menu only (the download button is in the menu sections) */
@media (max-width: 600px) {
  .nav-actions {
    gap: 0.6rem;
  }

  .nav-actions > .btn {
    display: none;
  }

  .brand-link {
    gap: 0.5rem;
  }

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

  .brand-title {
    font-size: 1.3rem;
  }
}
