/* ============================================
   Kilnfish Studios — Base Styles
   Dark, brooding, a little witchy
   ============================================ */

:root {
  --color-bg: #0a0a0a;
  --color-surface: #111111;
  --color-surface-raised: #1a1a1a;
  --color-text: #e8e4df;
  --color-text-muted: #8a8580;
  --color-text-dim: #5a5550;
  --color-accent: #c45a3c;
  --color-accent-glow: #d4724f;
  --color-bone: #d4cfc6;
  --color-ember: #8b3a2a;
  --color-border: rgba(255,255,255,0.06);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
  --nav-height: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---- Typography ---- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-bone);
}

h1 { font-size: clamp(2.25rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

/* ---- Layout ---- */

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

.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--color-surface);
}

/* ---- Navigation ---- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.85);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.nav__logo-img {
  height: 40px;
  width: auto;
  filter: none;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  transition: color 0.2s;
  position: relative;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--color-text);
}

.nav__links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}


/* Mobile nav */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .nav__toggle {
    display: block;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links a {
    font-size: 1rem;
    padding: 0.5rem 0;
  }
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  border: none;
  cursor: pointer !important;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn--primary:hover {
  background: var(--color-accent-glow);
  box-shadow: 0 4px 24px rgba(196,90,60,0.3);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-text-dim);
}

.btn--outline:hover {
  border-color: var(--color-text);
  background: rgba(255,255,255,0.05);
}

.btn--small {
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
}

/* ---- Hero ---- */

.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero__bg-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 85vw;
  max-width: 1000px;
  opacity: 0;
  filter: brightness(0.5) contrast(1.1);
  pointer-events: none;
  animation: logo-emerge 3s ease-out 0.5s forwards;
  mask-image: radial-gradient(ellipse 80% 80% at center, black 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at center, black 40%, transparent 75%);
}

@keyframes logo-emerge {
  0% {
    opacity: 0;
    filter: brightness(0) contrast(1.1);
    transform: translate(-50%, -50%) scale(0.95);
  }
  100% {
    opacity: 0.35;
    filter: brightness(0.5) contrast(1.1);
    transform: translate(-50%, -50%) scale(1);
  }
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.hero__tagline {
  font-family: var(--font-body);
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin: 1.25rem 0 2rem;
  max-width: 440px;
}

.hero__image {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  border: 1px solid var(--color-border);
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

a.btn, button.btn {
  cursor: pointer !important;
}

@media (max-width: 768px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero__tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__image {
    max-width: 400px;
    margin: 0 auto;
    aspect-ratio: 1;
  }

  .hero__bg-logo {
    right: -20%;
    width: 80vw;
  }
}

/* ---- Product Grid ---- */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--color-surface-raised);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-card__image {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-surface);
}

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

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

.product-card__info {
  padding: 1.25rem;
}

.product-card__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.product-card__price {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.product-card__tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 100px;
}

/* ---- About Section ---- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.about-grid__image {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/5;
  border: 1px solid var(--color-border);
}

.about-grid__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-grid__text p {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.75;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-grid__image {
    max-width: 400px;
    aspect-ratio: 1;
  }
}

/* ---- Footer ---- */

.footer {
  background: var(--color-surface);
  color: var(--color-text-muted);
  padding: 3rem 0;
  border-top: 1px solid var(--color-border);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-bone);
}

.footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer__links a {
  font-size: 0.85rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.footer__links a:hover {
  opacity: 1;
}

.footer__copy {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  opacity: 0.3;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

/* ---- Misc ---- */

.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* Page header for inner pages */
.page-header {
  padding: 4rem 0 3rem;
  text-align: center;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.page-header p {
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  font-size: 1.05rem;
}

/* Sold out / coming soon badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge--sold-out {
  background: var(--color-ember);
  color: var(--color-text);
}

.badge--new {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-muted);
}

.empty-state p {
  font-size: 1.1rem;
}
