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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: #ffffff;
  color: #1a1a1a;
  overflow-x: hidden;
}

/* ── Canvas ─────────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Hero ────────────────────────────────────────────── */
#hero {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111111;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #999;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: fadeInUp 1.2s ease 0.8s both;
}

.arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid #bbb;
  border-bottom: 2px solid #bbb;
  transform: rotate(45deg);
  animation: bounce 1.4s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50%       { transform: rotate(45deg) translateY(5px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Products ────────────────────────────────────────── */
#products {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: #ffffff;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 700px;
  width: 100%;
}

/* ── Product card ────────────────────────────────────── */
.product-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  border-color: #d0d0d0;
}

.product-image-placeholder {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.4rem;
  border-radius: 26px;
  overflow: hidden;
}

/* If the user drops an <img> inside the placeholder */
.product-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
}

.product-card h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #111;
}

.product-card p {
  font-size: 0.9rem;
  color: #888;
}

/* ── Product detail pages ────────────────────────────── */
.product-detail {
  max-width: 740px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.product-detail .back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #888;
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: color 0.15s;
}

.product-detail .back:hover { color: #333; }

.product-detail .app-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.product-detail .app-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
}

.product-detail .app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.product-detail .app-title h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

.product-detail .app-title p {
  color: #888;
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

/* Tab nav */
.tab-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 2rem;
}

.tab-btn {
  padding: 0.6rem 1.2rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}

.tab-btn.active {
  color: #111;
  border-bottom-color: #111;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.tab-panel h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.6rem 0 0.6rem;
}

.tab-panel h2:first-child { margin-top: 0; }

.tab-panel p, .tab-panel li {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #444;
}

.tab-panel ul {
  padding-left: 1.2rem;
  margin-top: 0.4rem;
}

.tab-panel li { margin-bottom: 0.3rem; }

.last-updated {
  font-size: 0.78rem;
  color: #aaa;
  margin-top: 2.5rem;
}
