/* ============================================================
   BeckCloud — Main Stylesheet
   Mobile-first. Dark-mode default (variables in dark.css).
   Fonts: JetBrains Mono (headings) + Inter (body).
   ============================================================ */

/* ---- Font imports ---- */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

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

/* ---- Base ---- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--brand-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

::selection {
  background: var(--brand-primary);
  color: var(--text-inverse);
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }

p {
  margin-bottom: 1rem;
}

small {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ---- Utility ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-default);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* ---- Logo ---- */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-logo svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-logo .wordmark {
  font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.5px;
  color: var(--brand-primary);
}

/* ---- Nav links ---- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--brand-primary);
  border-bottom-color: var(--brand-primary);
}

/* ---- Theme toggle ---- */
.theme-btn {
  background: none;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.theme-btn:hover {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.theme-btn svg {
  width: 18px;
  height: 18px;
}

/* ---- Hamburger ---- */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  padding: 6rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
}

.hero > .container {
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
  margin-bottom: 1.25rem;
}

.hero .tagline {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.hero .subtitle {
  max-width: 540px;
  margin: 0 auto 2.5rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

/* ---- CTA Button ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  background: var(--gradient-brand);
  color: var(--text-inverse);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232, 168, 56, 0.25);
  color: var(--text-inverse);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

/* ============================================================
   SECTIONS (shared)
   ============================================================ */

section {
  padding: 4rem 0;
}

.section-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 0.75rem;
}

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

.section-desc {
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 3rem;
}

/* ============================================================
   SERVICES
   ============================================================ */

#services {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.services-category {
  margin-bottom: 3rem;
}

.services-category:last-child {
  margin-bottom: 0;
}

.category-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.service-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.service-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.service-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}

.service-card h4 {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.service-card .service-domain {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.service-card p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.5;
}

/* ============================================================
   ABOUT
   ============================================================ */

.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ---- Stats bar ---- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.stat {
  text-align: center;
  padding: 1.25rem 0.5rem;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: 8px;
}

.stat-value {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--brand-primary);
  display: block;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   CONTACT
   ============================================================ */

#contact {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

#contact .section-desc {
  margin-left: auto;
  margin-right: auto;
}

.contact-placeholder {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  color: var(--text-tertiary);
  padding: 0.75rem 1.5rem;
  border: 1px dashed var(--border-default);
  border-radius: 8px;
  margin-top: 1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.site-footer p {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-bottom: 0.25rem;
}

.site-footer .no-tracking {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  opacity: 0.7;
}

/* ============================================================
   RESPONSIVE — Tablet (≥ 768px)
   ============================================================ */

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-bar {
    grid-template-columns: repeat(4, 1fr);
  }

  .about-content {
    grid-template-columns: 1fr;
    max-width: 700px;
    margin: 0 auto;
  }
}

/* ============================================================
   RESPONSIVE — Desktop (≥ 1024px)
   ============================================================ */

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    padding: 8rem 0 6rem;
  }

  .hero-logo {
    width: 100px;
    height: 100px;
  }

  .about-content {
    grid-template-columns: 1fr;
    max-width: 720px;
  }
}

/* ============================================================
   RESPONSIVE — Mobile nav (≤ 767px)
   ============================================================ */

@media (max-width: 767px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-default);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem;
    gap: 0;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 0.875rem 0;
    border-bottom: none;
  }

  .theme-btn-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.5rem;
  }
}

@media (min-width: 768px) {
  .hamburger {
    display: none;
  }

  .theme-btn-wrapper {
    display: none;
  }
}
