:root {
  --color-bg: #14181c;
  --color-bg-alt: #1c2228;
  --color-surface: #232a31;
  --color-text: #eef1f3;
  --color-text-muted: #a7b0b8;
  --color-accent: #e8873a;
  --color-accent-hover: #f4a05e;
  --color-border: #2f373f;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); text-decoration: underline; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.02em;
}
.site-header__brand:hover { color: var(--color-accent); text-decoration: none; }
.site-header__logo {
  filter: drop-shadow(0 0 0 transparent);
  transition: transform 0.35s ease, filter 0.35s ease;
}
.site-header__brand:hover .site-header__logo {
  transform: rotate(-8deg) scale(1.08);
  filter: drop-shadow(0 0 6px rgba(232, 135, 58, 0.65));
}
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a { color: var(--color-text); }
.site-nav a:hover { color: var(--color-accent); }
.site-nav__cta {
  background: var(--color-accent);
  color: #14181c !important;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}
.site-nav__cta:hover { background: var(--color-accent-hover); text-decoration: none; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  flex-shrink: 0;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 60;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.site-header.is-nav-open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-nav-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
.site-header.is-nav-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-backdrop { display: none; }

@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .site-header__brand { font-size: 1.05rem; gap: 0.45rem; }
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    padding: 5.5rem 1.5rem 2rem;
    background: var(--color-bg-alt);
    border-left: 1px solid var(--color-border);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 55;
  }
  .site-header.is-nav-open .site-nav { transform: translateX(0); }
  .site-nav a { width: 100%; padding: 0.9rem 0; border-bottom: 1px solid var(--color-border); }
  .site-nav__cta { margin-top: 1.25rem; text-align: center; }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 50;
  }
  .site-header.is-nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  body.nav-open-lock { overflow: hidden; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  margin-top: 4rem;
  padding: 2.5rem 0 1rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}
.site-footer__brand { font-weight: 700; margin: 0 0 0.25rem; }
.social-links { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem; padding: 0; margin: 0; }
.site-footer__legal {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 2rem;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 3rem 0 2.5rem;
  min-height: min(47vw, 552px);
  text-align: center;
  background: linear-gradient(180deg, var(--color-bg-alt), var(--color-bg));
}
.hero + .section { padding-top: 1.5rem; }
.hero > .wrap { width: 100%; }
.hero__content {
  position: relative;
  z-index: 2;
}
.hero h1 { position: relative; font-size: 2.5rem; margin-bottom: 0.5rem; }
.hero p { position: relative; color: var(--color-text-muted); font-size: 1.15rem; max-width: 640px; margin: 0 auto; }

.hero__actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.75rem;
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none !important;
}
.btn--primary { background: var(--color-accent); color: #14181c; }
.btn--primary:hover {
  background: var(--color-accent-hover);
  color: #14181c;
}
.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }
.hero__etsy {
  position: relative;
  display: inline-block;
  margin-top: 1rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.hero__etsy:hover { color: var(--color-accent); }

.hero__bg-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: 0;
  animation: hero-photo-in 1.2s ease-out forwards;
}
.hero__bg-photo--base {
  z-index: 0;
  transition: opacity 1.6s ease;
}
.hero.is-showcasing .hero__bg-photo--base {
  animation: none;
  opacity: 0;
}
.hero__showcase {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__showcase-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 1.6s ease, transform 7.5s ease-out;
}
.hero__showcase-image.is-active {
  opacity: 1;
  transform: scale(1);
}
.hero__bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, var(--color-bg) 0%, rgba(20, 24, 28, 0.82) 38%, rgba(20, 24, 28, 0.55) 100%),
    linear-gradient(180deg, rgba(20, 24, 28, 0.35), rgba(20, 24, 28, 0.55));
}
@keyframes hero-photo-in {
  to { opacity: 1; }
}
@media (max-width: 700px) {
  .hero__bg-overlay {
    background:
      linear-gradient(180deg, rgba(20, 24, 28, 0.55) 0%, rgba(20, 24, 28, 0.88) 65%, var(--color-bg) 100%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero__bg-photo { animation: none; opacity: 1; }
  .hero__bg-photo--base,
  .hero__showcase-image { transition: none; }
}

/* Section */
.section { padding: 3rem 0; }
.section h2 { font-size: 1.75rem; margin-bottom: 1.5rem; }

/* About bio */
.about-bio {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.about-bio__text { flex: 1 1 420px; max-width: 640px; }
.about-bio__photo-wrap {
  flex: 0 1 320px;
  width: 320px;
  max-width: 100%;
  margin: 0;
}
.about-bio__photo {
  display: block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.about-bio__caption {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}
.tools-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 0.5rem 0 0;
}
.tools-list li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.9rem;
  color: var(--color-text);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
a.card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  text-decoration: none;
}
a.card:hover .card__title,
a.card:hover .card__meta {
  color: var(--color-text);
}
.card__body { padding: 1.25rem; }
.card__title { font-size: 1.1rem; margin: 0 0 0.4rem; }
.card__meta { color: var(--color-text-muted); font-size: 0.9rem; }
.item-badge {
  display: inline-block;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  text-transform: capitalize;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}
.card__meta--clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__count {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin: 0.6rem 0 0;
}
.card__cta {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.2s ease;
}
a.card:hover .card__cta { transform: translateX(4px); }

/* Database-backed portfolio collections */
.model-collection__count {
  color: var(--color-text-muted);
  margin: 1rem 0 0.65rem;
}
.model-collection__instructions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 700px;
  margin: 0 0 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}
.model-collection__instruction-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--color-accent);
}
.model-collection__instruction-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.model-collection__grid { margin-top: 0; }
.model-collection__card { position: relative; }
.model-collection__card .card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.model-collection__card .card__title {
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.3;
}
.model-collection__card .item-badge { align-self: flex-start; }
.model-collection__library-link {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(20, 24, 28, 0.88);
  color: var(--color-accent);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.model-collection__library-link:hover,
.model-collection__library-link:focus-visible {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #14181c;
  outline: none;
  text-decoration: none;
  transform: translateY(-1px);
}
.model-collection__library-link svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.model-collection__empty {
  margin-top: 2rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  text-align: center;
}
.model-collection__empty h2 { margin-top: 0; }
.model-collection__empty p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 1.75rem;
}
.filter-chip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
}
.filter-chip:hover { border-color: var(--color-accent); color: var(--color-text); }
.filter-chip.is-active { background: var(--color-accent); border-color: var(--color-accent); color: #14181c; font-weight: 600; }

/* Keep gallery/card thumbnails a consistent height regardless of the source image's
   native aspect ratio (this portfolio mixes square product shots with tall/wide
   illustrations) so grid rows line up. */
.card > picture, .card .gallery-thumb {
  display: block;
  aspect-ratio: 4 / 3;
}
.card > picture img, .card .gallery-thumb img, .card .gallery-thumb picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card .gallery-thumb picture img { display: block; }

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.stat-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem 1rem;
}
.stat-tile.is-animated {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stat-tile.is-animated.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .stat-tile.is-animated { opacity: 1; transform: none; transition: none; }
}
.stat-tile__value { font-size: 2rem; font-weight: 700; color: var(--color-accent); }
.stat-tile__label { color: var(--color-text-muted); font-size: 0.9rem; }

/* Video badge overlay on gallery thumbnails */
.gallery-thumb { position: relative; }
.video-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(10, 12, 14, 0.75);
  color: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.lightbox__video { max-height: 70vh; margin: 0 auto; border-radius: 8px; width: 100%; }

/* Picture placeholder (pre-pipeline content) */
.picture-placeholder {
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(45deg, #2a323a, #2a323a 10px, #232a31 10px, #232a31 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Testimonials */
.testimonial {
  border-left: 3px solid var(--color-accent);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--color-text-muted);
  font-style: italic;
}
.testimonial cite { display: block; font-style: normal; margin-top: 0.4rem; color: var(--color-text); }

/* Forms */
.contact-layout {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.contact-layout__form { flex: 1 1 420px; max-width: 520px; }
.contact-layout__side {
  flex: 1 1 280px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.contact-side-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}
.contact-side-card h2 { font-size: 1rem; margin: 0 0 0.75rem; }
.contact-side-card ul { margin: 0; padding-left: 1.1rem; color: var(--color-text-muted); }
.contact-side-card li { margin-bottom: 0.3rem; }
.contact-side-card p { margin: 0; color: var(--color-text-muted); }
.contact-side-card__photo { border-radius: 8px; overflow: hidden; margin-bottom: 0.75rem; aspect-ratio: 4 / 3; }
.contact-side-card__photo picture, .contact-side-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.contact-side-card .social-links { margin-top: 0.25rem; }

form.contact-form { display: grid; gap: 1rem; }
.contact-form label { display: block; margin-bottom: 0.35rem; font-weight: 600; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-family: inherit;
}
.contact-form button {
  background: var(--color-accent);
  color: #14181c;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}
.contact-form button:hover { background: var(--color-accent-hover); }
.honeypot-field { position: absolute; left: -9999px; top: -9999px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--color-border); padding: 1.25rem 0; }
.faq-item h3 { margin: 0 0 0.5rem; }

.badge {
  display: inline-block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}
