@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

:root {
  --bg: #000000;
  --text: #e8e8e8;
  --text-muted: #a8a8a8;
  --steel: #808080;
  --steel-light: #c0c0c0;
  --steel-dark: #333333;
  --orange: #e65100;
  --orange-hover: #ff6d1a;
  --purple: #6a1b9a;
  --panel-bg: #0a0a0a;
  --border: rgba(192, 192, 192, 0.22);
  --max-width: 1120px;
  --header-height: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--orange);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--orange-hover);
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--orange);
  color: #000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin-inline: auto;
}

/* Brushed metal texture utility */
.brushed {
  background-color: var(--panel-bg);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 40%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.015) 0,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px,
      transparent 4px
    );
  border: 1px solid var(--border);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  overflow: visible;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
  height: var(--header-height);
  padding-block: 0;
  overflow: visible;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.logo-link:hover {
  text-decoration: none;
  color: var(--text);
}

.logo-img {
  width: 192px;
  height: 192px;
  object-fit: contain;
  /* Keep header bar compact while logo displays larger */
  margin-block: calc((var(--header-height) - 192px) / 2);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
}

/* Main */
main {
  padding-block: 2.5rem 4rem;
}

.hero {
  padding: 2.5rem;
  border-radius: 6px;
  margin-bottom: 2.5rem;
}

.hero-compact {
  padding: 2rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  font-weight: 700;
}

.hero .lead {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text-muted);
}

.hero .lead-oneline {
  white-space: nowrap;
}

.hero-tagline {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border-left: 3px solid var(--orange);
  color: var(--steel-light);
  font-weight: 500;
  font-size: 0.95rem;
}

.section {
  margin-bottom: 3rem;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: var(--steel-light);
  font-weight: 600;
}

.section h3 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.15rem;
  color: var(--text);
}

.section p,
.section li {
  color: var(--text-muted);
}

.section ul,
.section ol {
  padding-left: 1.25rem;
}

.section li + li {
  margin-top: 0.35rem;
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.35rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--orange);
  color: #000;
  border-color: #b84300;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: var(--orange-hover);
  color: #000;
}

.btn-secondary {
  background: transparent;
  color: var(--steel-light);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

/* Product catalogue grid */
.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}

.product-card:hover {
  border-color: rgba(230, 81, 0, 0.45);
}

.product-card-image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  width: 100%;
  background: #111;
}

.product-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-body h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--text);
}

.product-card-body p {
  margin: 0;
  flex: 1;
  font-size: 0.95rem;
}

.product-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.product-card-actions .btn {
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
}

/* Product page */
.product-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.product-hero-grid img {
  border-radius: 4px;
  border: 1px solid var(--border);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  background: #111;
}

.gif-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.gif-thumb {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: #111;
  cursor: zoom-in;
  transition: border-color 0.15s;
}

.gif-thumb:hover,
.gif-thumb:focus-visible {
  border-color: var(--orange);
  color: var(--text);
  text-decoration: none;
  outline: none;
}

.gif-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 5;
  object-fit: cover;
  object-position: center;
  display: block;
}

.gif-caption {
  padding: 0 0.75rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.option-card {
  padding: 1.25rem;
  border-radius: 6px;
}

.option-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--orange);
}

.option-card p {
  margin: 0;
  font-size: 0.92rem;
}

.included-list,
.excluded-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.included-list li,
.excluded-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.included-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--orange);
}

.excluded-list li::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: var(--steel);
}

.why-etsy {
  padding: 1.5rem;
  border-radius: 6px;
  border-left: 4px solid var(--purple);
}

.why-etsy h2 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--purple);
}

.note-box {
  padding: 1rem 1.25rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.use-cases {
  columns: 2;
  column-gap: 2rem;
}

/* Instructions */
.instructions-intro {
  margin-bottom: 2rem;
}

.step-list,
ol.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.step-item {
  counter-increment: step;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.step-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.step-item h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  color: var(--steel-light);
}

.step-item h2::before {
  content: "Step " counter(step) " - ";
  color: var(--orange);
}

.step-item p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.step-images {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.step-thumb {
  display: block;
  width: 300px;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  cursor: zoom-in;
  background: #111;
  transition: border-color 0.15s;
}

.step-thumb:hover,
.step-thumb:focus-visible {
  border-color: var(--orange);
  outline: none;
}

.step-thumb img {
  width: 100%;
  height: auto;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(95vw, 1200px);
  max-height: 90vh;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
}

.lightbox-close:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-etsy-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--steel);
}

/* 404 */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
}

.error-page h1 {
  font-size: 4rem;
  margin: 0;
  color: var(--steel);
}

.error-page p {
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .footer-etsy-note {
    white-space: normal;
  }

  .hero .lead-oneline {
    white-space: normal;
  }

  .logo-img {
    width: 120px;
    height: 120px;
    margin-block: calc((var(--header-height) - 120px) / 2);
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }

  .site-header {
    position: relative;
  }

  .header-inner {
    position: relative;
  }

  .product-hero-grid {
    grid-template-columns: 1fr;
  }

  .gif-gallery {
    grid-template-columns: 1fr;
  }

  .use-cases {
    columns: 1;
  }

  .hero {
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
