:root {
  --bg: #080808;
  --panel: rgba(10, 10, 10, 0.72);
  --panel-strong: rgba(14, 14, 14, 0.88);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --stroke: rgba(255, 255, 255, 0.09);
  --text: #f4f4f4;
  --muted: #b9b9b9;
  --muted-soft: #8e8e8e;
  --accent: #ff4a1c;
  --accent-2: #ff6b1f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.page-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.27), rgba(0,0,0,0.46)),
    url('/assets/inferi-theme-bg.png');
  background-position: center center;
  background-size: cover;
  filter: grayscale(1);
  opacity: 0.50;
  pointer-events: none;
  z-index: 0;
}

.site-shell {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.top-meta {
  padding-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--muted-soft);
  font-size: 12px;
  letter-spacing: 0.01em;
}

.top-meta-row {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 999px;
  padding: 8px 14px;
  backdrop-filter: blur(8px);
}

.meta-label {
  color: #cfcfcf;
  font-weight: 600;
  margin-right: 5px;
}

/* Top masthead: Inferi logo left and Google Sheets-driven feature art right. */
.masthead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  padding: 18px 0 0;
}

.logo-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 360px;
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: 28px;
  background: #030303;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hero-copy,
.feature-panel,
.controls-panel,
.products-section {
  background: var(--panel);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-copy {
  border-radius: 28px;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 220px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-2);
  letter-spacing: 0.18em;
  font-weight: 700;
  font-size: 12px;
}

.hero-copy h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.lead {
  max-width: 720px;
  margin: 24px 0 12px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.6;
}

.support-text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 580px;
}

.feature-panel {
  border-radius: 28px;
  overflow: hidden;
  height: 360px;
}

.feature-image-wrap {
  position: relative;
  min-height: 360px;
  height: 100%;
  background: linear-gradient(180deg, rgba(20,20,20,0.2), rgba(8,8,8,0.9));
}

.feature-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.56) 52%, rgba(0,0,0,0.92) 100%);
}

.feature-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px;
  z-index: 1;
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 74, 28, 0.18);
  border: 1px solid rgba(255, 93, 43, 0.35);
  color: #ffd8cc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.feature-content h2 {
  margin: 16px 0 10px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.feature-content p {
  margin: 0 0 18px;
  color: #dedede;
  line-height: 1.65;
  font-size: 14px;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff6425, #ef3911);
  color: white;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.controls-panel {
  margin-bottom: 24px;
  border-radius: 22px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.currency-switch {
  display: inline-flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  padding: 5px;
}

.currency-button,
.tab-button {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.currency-button {
  min-width: 72px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.currency-button.is-active {
  background: linear-gradient(180deg, #ffffff, #e9e9e9);
  color: #0c0c0c;
}

.tab-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tab-button {
  padding: 11px 15px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  font-size: 13px;
  font-weight: 600;
  transition: .18s ease;
}

.tab-button:hover,
.tab-button.is-active {
  color: white;
  border-color: rgba(255, 98, 37, 0.4);
  background: rgba(255, 98, 37, 0.14);
}

.products-section {
  border-radius: 28px;
  padding: 28px;
  margin-bottom: 48px;
}

.section-bar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.demo-warning,
.error-banner,
.loading-state,
.empty-state {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #f2f2f2;
  background: rgba(255,255,255,0.04);
}

.error-banner {
  color: #ffd2d2;
  border-color: rgba(255, 109, 109, 0.2);
  background: rgba(168, 38, 38, 0.12);
}

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

.product-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: 370px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.03);
  box-shadow: 0 15px 40px rgba(0,0,0,0.26);
}

.product-thumb {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.product-fallback {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  background: linear-gradient(160deg, rgba(255,98,37,0.18), rgba(255,255,255,0.03));
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 30px;
}

.product-card-body {
  padding: 16px 16px 18px;
}

.product-category {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-name {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.product-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.availability-pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}

.product-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,6,6,0.1), rgba(6,6,6,0.72) 60%, rgba(6,6,6,0.94) 100%);
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  padding: 22px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}

.product-card:hover .product-overlay,
.product-card:focus-within .product-overlay {
  opacity: 1;
  transform: translateY(0);
}

.overlay-label {
  margin: 0;
  color: #c9c9c9;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.overlay-price {
  margin: 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.overlay-sub {
  margin: 0;
  color: #d3d3d3;
  line-height: 1.5;
  font-size: 13px;
}

.hidden { display: none !important; }

@media (max-width: 1100px) {
  .masthead-grid { gap: 18px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .site-shell { width: min(1240px, calc(100% - 24px)); }
  .top-meta { justify-content: flex-start; gap: 10px; }
  .hero-copy { padding: 28px; min-height: 0; }
  .masthead-grid { gap: 12px; }
  .logo-panel, .feature-panel { height: 290px; }
  .feature-image-wrap { min-height: 290px; }
  .feature-content { padding: 18px; }
  .feature-content h2 { font-size: 25px; }
  .lead { font-size: 17px; }
  .controls-panel { padding: 16px; }
  .products-section { padding: 20px; }
  .section-bar { flex-direction: column; align-items: start; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .masthead-grid { grid-template-columns: 1fr; }
  .logo-panel { height: 250px; }
  .feature-panel, .feature-image-wrap { height: 340px; min-height: 340px; }
  .top-meta { font-size: 11px; }
  .top-meta-row { width: 100%; border-radius: 16px; }
  .feature-image-wrap { min-height: 340px; }
  .feature-content { padding: 22px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 340px; }
  .currency-switch { width: 100%; justify-content: center; }
  .currency-button { flex: 1 1 0; }
}
