/* style.css — Wilder Focus // wilderfocus.com */

/* ── Reset & root ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0e0d0b;
  --bg-raised:   #131210;
  --bg-card:     #1b1916;
  --text:        #f0ebe0;
  --text-dim:    #9a8e78;
  --text-muted:  #524940;
  --accent:      #c8a060;
  --accent-dim:  #8a6a35;
  --border:      #2a2620;
  --serif:       Georgia, 'Times New Roman', serif;
  --sans:        -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Film grain — adds photographic texture to the dark bg */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 250px 250px;
  z-index: 9999;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; width: 100%; height: auto; }

/* ── Scroll reveal ────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(1.75rem);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: none;
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2.5rem;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
}

.nav--solid {
  background: rgba(14, 13, 11, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-logo:hover { color: var(--accent); text-decoration: none; }
.nav-slash { font-style: normal; color: var(--accent); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.25rem;
}
.nav-links a {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: brightness(0.38);
  opacity: 0;
  transition: opacity 1.8s ease;
}
.hero-img.is-visible { opacity: 1; }
/* Gradient: barely-there at top, dramatic at bottom — text sits on dark base */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(14, 13, 11, 0.18) 0%,
    rgba(14, 13, 11, 0.08) 35%,
    rgba(14, 13, 11, 0.55) 70%,
    rgba(14, 13, 11, 0.94) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 2.5rem 4.5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(3.8rem, 11vw, 9.5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 0.93;
  color: var(--text);
  letter-spacing: -0.025em;
  margin-bottom: 1.4rem;
}
.hero-word { display: block; }

.hero-tagline {
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-style: italic;
}

.hero-scroll {
  position: absolute;
  bottom: 2.25rem;
  right: 2.5rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: scrollBob 2.2s ease-in-out infinite;
}
.hero-scroll svg { width: 0.9rem; height: 0.9rem; }

@keyframes scrollBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ── Intro ────────────────────────────────────────────────────────────────── */
.intro {
  padding: 6.5rem 2.5rem;
  text-align: center;
}
.intro-inner {
  max-width: 660px;
  margin: 0 auto;
}
.intro-text {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3.5vw, 2.5rem);
  font-style: italic;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 1.6rem;
}
.intro-sub {
  font-size: 1.02rem;
  color: var(--text-dim);
  line-height: 1.75;
}

/* ── Section header ───────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 0 2.5rem;
  max-width: 1240px;
  margin: 0 auto 2.75rem;
}
.section-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.section-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Shop ─────────────────────────────────────────────────────────────────── */
.shop-section {
  padding: 0 2.5rem 7rem;
}
.product-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.product-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--bg);
}
.product-title {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--text);
}
.product-price { font-size: 0.85rem; color: var(--accent); font-weight: 600; }
.product-size {
  font: inherit;
  font-size: 0.8rem;
  padding: 0.45rem 0.5rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.product-buy {
  display: inline-block;
  width: 100%;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--accent-dim);
  background: transparent;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.product-buy:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.product-buy:disabled { opacity: 0.5; cursor: default; }
.product-error { font-size: 0.75rem; color: #e07a6a; }
.product-empty { font-size: 0.85rem; color: var(--text-dim); }

/* ── Gallery ──────────────────────────────────────────────────────────────── */
.gallery-section {
  padding: 0 2.5rem 7rem;
}
.gallery-grid {
  max-width: 1240px;
  margin: 0 auto;
  columns: 3;
  column-gap: 0.6rem;
}

.photo {
  position: relative;
  break-inside: avoid;
  margin-bottom: 0.6rem;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
}
.photo img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.55s ease, filter 0.4s ease;
}
.photo figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 0.9rem 0.75rem;
  background: linear-gradient(to top, rgba(14, 13, 11, 0.88) 0%, transparent 100%);
  font-size: 0.68rem;
  font-style: italic;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translateY(0.4rem);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
/* Only show caption if there's content */
.photo figcaption:empty { display: none; }

.photo:hover img   { transform: scale(1.04); }
.photo:hover figcaption,
.photo:focus figcaption { opacity: 1; transform: none; }

.photo:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.photo.batch-hidden { display: none; }

.load-more-wrap {
  text-align: center;
  margin-top: 2.5rem;
}
.load-more-btn {
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ── CTA ──────────────────────────────────────────────────────────────────── */
.cta-section {
  padding: 7rem 2.5rem;
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.cta-inner { max-width: 600px; margin: 0 auto; }

.cta-heading {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5.5vw, 3.8rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 1.6rem;
}
.cta-heading em { color: var(--accent); font-style: italic; }

.cta-body {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 2.75rem;
}

.cta-btn {
  display: inline-block;
  padding: 0.8rem 2.25rem;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cta-btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  text-decoration: none;
}

/* ── About ────────────────────────────────────────────────────────────────── */
.about-section { padding: 7rem 2.5rem; }

.about-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 3.5rem;
  align-items: start;
}
.about-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  margin-top: 0.5rem;
}

.about-initial {
  font-family: var(--serif);
  font-size: 4.5rem;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.1rem;
  opacity: 0.35;
  user-select: none;
}
.about-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-style: italic;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.85rem;
}
.about-card p {
  font-size: 0.96rem;
  color: var(--text-dim);
  line-height: 1.78;
}
.about-card a {
  color: var(--accent-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.about-card a:hover { color: var(--accent); }

/* ── Contact ──────────────────────────────────────────────────────────────── */
.contact-section {
  padding: 7rem 2.5rem;
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  text-align: center;
}
.contact-inner { max-width: 580px; margin: 0 auto; }

.contact-lead {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 1.6rem;
}
.contact-details {
  font-size: 0.86rem;
  color: var(--text-dim);
  margin-bottom: 2.75rem;
}
.contact-sep { margin: 0 0.8rem; color: var(--text-muted); }
.contact-detail {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.contact-detail:hover { color: var(--accent); }

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}
.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-dim);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.contact-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200, 160, 96, 0.07);
  text-decoration: none;
}
.contact-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  padding: 2.25rem;
  text-align: center;
  border-top: 1px solid var(--border);
}
.site-footer p {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text-dim); }

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(10, 9, 7, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }

.lb-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#lb-img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.lb-caption {
  margin-top: 0.85rem;
  font-size: 0.73rem;
  font-style: italic;
  color: var(--text-dim);
  text-align: center;
  min-height: 1.2em;
}
.lb-counter {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.lb-close {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  transition: color 0.2s;
}
.lb-close:hover { color: var(--text); }

.lb-prev,
.lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 1.25rem;
  transition: color 0.2s;
}
.lb-prev { left: 0.5rem; }
.lb-next { right: 0.5rem; }
.lb-prev:hover,
.lb-next:hover { color: var(--text); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .gallery-grid { columns: 2; }
  .about-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-divider { display: none; }
}

@media (max-width: 640px) {
  .nav          { padding: 1.1rem 1.5rem; }
  .nav-links    { gap: 1.5rem; }
  .gallery-section { padding: 0 1rem 5rem; }
  .shop-section { padding: 0 1rem 5rem; }
  .gallery-grid { columns: 1; column-gap: 0; }
  .hero-content { padding: 0 1.5rem 3.5rem; }
  .intro,
  .cta-section,
  .about-section,
  .contact-section { padding: 5rem 1.5rem; }
  .section-header { padding: 0 1.5rem; }
  .hero-scroll { display: none; }
}
