/* ---------- Reset / base ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  color: #222;
  background: #fff;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ---------- Layout container ---------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
}

/* Nav hidden off-canvas on mobile by default */
.main-nav {
  position: fixed;
  top: 0;
  right: -100%;
  height: 100vh;
  width: 70%;
  max-width: 300px;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  padding: 4rem 1.5rem;
}

.main-nav.open {
  right: 0;
}

.main-nav ul {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Hamburger button */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 200;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: #222;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

/* ---------- Hero ---------- */
.hero {
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #111;
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
}

/* ---------- Generic section ---------- */
.section {
  padding: 3rem 0;
}

.section h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

/* Grid stacks on mobile, becomes columns on larger screens */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  padding: 1.5rem;
  border: 1px solid #eee;
  border-radius: 8px;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 2rem 0;
  text-align: center;
  color: #777;
  border-top: 1px solid #eee;
  font-size: 0.9rem;
}

/* ==========================================================
   Breakpoints (mobile-first: base styles above = mobile)
   ========================================================== */

/* Tablet and up */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    height: auto;
    width: auto;
    max-width: none;
    box-shadow: none;
    padding: 0;
  }

  .main-nav ul {
    flex-direction: row;
    gap: 2rem;
  }

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

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop and up */
@media (min-width: 1100px) {
  .hero {
    padding: 6rem 0;
  }

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