/* Hero */
.hero {
  max-width: 525px;
  margin: 24px auto 32px auto;
  text-align: center;
  padding: 0 16px;
}
.hero-eyebrow {
  font-size: 14px;
  letter-spacing: 0.18em;
  color: #606060;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.hero-title {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-weight: 200;
  font-size: clamp(30px, 4vw, 40px);
  max-width: clamp(240px, 50vw, 480px);
  line-height: 1.15;
  margin: 0 auto 32px auto;
  text-align: center;
  width: 100%;
}
.hero-subtitle {
  font-size: 18px;
  color: #3a3a3a;
  max-width: 820px;
  margin: 0 auto 20px auto;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: #fff;
  border-radius: 10px;
  padding: 12px 18px;
  text-decoration: none;
  box-shadow: 0 2px 0 rgba(0,0,0,0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.hero-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); background: var(--primary-dark); }
.hero-cta .g-icon { display: inline-flex; margin-right: 10px; }

/* Root layout */
.pattern-root {
  max-width: 800px;
  margin: 24px auto;
  margin-left: auto;
  margin-right: auto;
}

.dimension {
  margin-bottom: 48px;
  align-items: center;
}

.dimension-title {
  font-size: 18px;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', 'Apple Color Emoji', 'Segoe UI Emoji';
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 16px 0;
}
.dimension-title a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 0; /* allow icon to sit flush left */
  height: 35px; /* half of prior */
  border-radius: 999px;
  border: 1px solid #d8dee9;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: #111827;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  overflow: hidden; /* allow icon to touch border cleanly */
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background-color 120ms ease;
}
.dimension-title a:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff, #eef2ff);
}
.dimension-title a:active { transform: translateY(0); box-shadow: 0 1px 0 rgba(0,0,0,0.05); }
.dimension-title .dimension-icon {
  align-self: stretch; /* fill the button height */
  height: 100%;
  width: auto;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: contain;
  margin-left: -3px; /* nudge left */
  transform: scale(1.12); /* slightly larger */
  transform-origin: left center;
}
.dimension-title .dimension-arrow { width: 18px; height: 18px; color: #64748b; margin-left: 2px; }

.rows {
  display: grid;
  row-gap: 32px;
}

.row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 16px;
}

/* Cards */
.card {
  position: relative;
  width: 100%; /* make cards 25% smaller within their grid cell */
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: 1px solid #cfcfcf;
  background: #fff;
  box-shadow: 0 2px 0 #d0d0d0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  margin: 0 auto; /* center smaller card in its cell */
}
.card-index {
  position: absolute;
  top: 6px;
  right: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: #475569; /* slate-600 */
  background: rgba(255,255,255,0.9);
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1;
  transition: opacity 180ms ease;
}

.card:hover .card-index { opacity: 0; }

.card.element {
  background: #f7f7f7;
  border-color: #000;
}

.card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(6px, 1.2vw, 12px) clamp(6px, 1.2vw, 12px) clamp(22px, 3vw, 38px) clamp(6px, 1.2vw, 12px);
  text-align: center;
  height: 100%;
  width: 100%;
}

.card img.icon {
  max-width: 72%;
  max-height: 72%;
  object-fit: contain;
  transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 500ms cubic-bezier(0.22, 1, 0.36, 1),
              filter 500ms cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateY(0) scale(1);
  filter: blur(0);
  will-change: opacity, transform, filter;
}

.card-label {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  font-family: 'Inter', sans-serif;
  font-size: clamp(12px, 1.8vw, 18px);
  font-weight: 300;
  color: #444;
  text-align: center;
  padding: 0 12px;
  z-index: 2; /* keep name visible above overlay */
}

/* Hover overlay for question */
.card .overlay {
  position: absolute;
  inset: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(12px, 2.4vw, 24px);
  font-size: clamp(12px, 1.6vw, 14px);
  line-height: 1.35;
  color: #111;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 1000ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 1000ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
  z-index: 1; /* sit beneath the label */
}

.card:hover .overlay {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* On hover, hide only the icon */
.card:hover img.icon { opacity: 0; transform: translateY(-4px) scale(0.9); filter: blur(2px); }

/* Defer to 2 columns much later; scale cards down until ~600px */
@media (max-width: 500px) {
  .rows { gap: 48px;}
  .row { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

/* Single column only on extremely small screens */
@media (max-width: 250px) {
  .row { grid-template-columns: 1fr; }
}

