:root {
  --bg: #ffffff;
  --text: #111;
  --muted: #666;
  --border: #eaeaea;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Offset for fixed header */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  padding-top: 10px; /* Space for fixed header */
}

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

.hidden {
  display: none !important;
}

/* ===== Layout ===== */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 64px 80px;
}

/* ===== Header ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  padding: 0 64px;
  height: 80px;
  display: flex;
  justify-content: center;
  transition: border-color 0.3s ease;
}

header.scrolled {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.logo {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 400;
}

nav a {
  margin-left: 32px;
  font-size: 14px;
  color: var(--muted);
}

nav a:hover {
  color: var(--text);
}

/* ===== Hero ===== */
.hero {
  padding: 120px 0;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 140%;
  z-index: -1;
  background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  opacity: 0.8;
  pointer-events: none;
}

.hero h1 {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}

.hero-tag{
  display: inline-block;
  font-size: 14px;
  font-weight: 400;
  font-family: "Georgia", serif;
  font-style: italic;
  letter-spacing: 0;
  background: #000;
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 4px;
}

/* ===== Products ===== */
.products {
  display: grid;
  /* Optimized for 5 products: Responsive grid that auto-fits */
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
  justify-content: center; /* Centers items if the row isn't full */
  margin-bottom: 96px; /* Spacing before About section */
}

.product {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  background: #fafafa;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.product-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}

.product-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  margin-right: 12px;
  object-fit: contain;
  flex-shrink: 0;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s;
}

.product-info:hover {
  opacity: 0.8;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 4px;
}

.product-subtitle {
  font-size: 12px;
  color: #777;
  font-weight: 400;
  line-height: 1.4;
}

.product-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
  min-height: 42px; /* Align heights */
}

.product-thumb {
  width: 100%;
  height: 180px;
  background-color: #f9fafb;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f3f4f6;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-thumb:hover img {
  transform: scale(1.05);
}

.product-actions {
  display: flex;
  gap: 16px;
  padding-top: 4px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}

.link-btn svg {
  margin-right: 6px;
  color: #999;
  transition: color 0.2s ease;
}

.link-btn:hover {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.link-btn:hover svg {
  color: var(--text);
}

/* ===== About Section ===== */
.about {
  border-top: 1px solid var(--border);
  padding-top: 96px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text h2 {
  font-size: 24px;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.about-text p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 24px;
  max-width: 480px;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #fff;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.modal-overlay.open .modal-container {
  transform: translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}

.modal-close:hover {
  background: #e0e0e0;
}

.modal-close svg {
  color: #666;
  width: 16px;
  height: 16px;
}

.modal-content {
  padding: 40px;
  overflow-y: auto;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

/* Modal Typography & Layout */
.modal-content h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 16px;
  color: #111;
}

.modal-content p {
  margin-bottom: 16px;
  color: #444;
}

.modal-section-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin: 32px 0 16px;
  display: block;
}

.modal-features {
  display: grid;
  gap: 24px;
}

.modal-feature-item h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-feature-item ul {
  margin: 0;
  padding-left: 24px;
  color: #555;
  font-size: 15px;
}

.modal-feature-item li {
  margin-bottom: 6px;
}

.modal-cta {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #eaeaea;
  text-align: center;
}

.modal-cta p {
  font-size: 18px;
  font-weight: 500;
  color: #111;
  margin-bottom: 8px;
}

.modal-cta .sub-cta {
  font-size: 15px;
  color: #666;
  font-weight: 400;
}

/* Modal Gallery */
.modal-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.modal-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s;
  cursor: zoom-in;
}

.modal-image:hover {
  transform: scale(1.02);
}

/* ===== Footer ===== */
footer {
  margin-top: 96px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}

footer a {
  margin-left: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .page {
    padding: 32px 20px 64px;
  }

  .hero {
    padding: 80px 0;
  }

  .hero h1 {
    font-size: 36px;
  }

  nav {
    display: none; /* Mobile menu hidden for simplicity per original file */
  }
  
  .products {
      grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}
