/* ===========================
   Atelier 356 — Stylesheet
   Dark, moody, premium woodworking portfolio
=========================== */

:root {
  --bg: #0d0b09;
  --bg-alt: #141210;
  --panel: #17140f;
  --ink: #ece5d8;
  --ink-dim: #a99f8f;
  --ink-faint: #6f6659;
  --line: #2a251d;
  --accent: #c08a4e;      /* warm brass/amber, reads well on near-black */
  --accent-dim: #8a6338;
  --wood: #7a4a2b;
  --shadow: rgba(0, 0, 0, 0.55);
  --radius: 2px;
  --maxw: 1180px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

/* Texture overlay for depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
  background-size: 3px 3px;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: background 0.35s ease, padding 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(13, 11, 9, 0.92);
  backdrop-filter: blur(8px);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 34px;
  width: auto;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  position: relative;
  padding-bottom: 4px;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--accent);
}

nav.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

nav.main-nav a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink);
  position: relative;
  transition: all 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ===== Language toggle ===== */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-toggle-mobile {
  display: none;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  padding: 4px 2px;
  transition: color 0.2s ease;
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.active {
  color: var(--accent);
  font-weight: 600;
}

.lang-sep {
  color: var(--ink-faint);
  font-size: 0.75rem;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(13,11,9,0.35) 0%, rgba(13,11,9,0.85) 78%, var(--bg) 100%),
    radial-gradient(ellipse at 50% 30%, #241d15 0%, #0d0b09 70%);
}

.hero-grain {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 4px);
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

.hero-mark {
  width: 96px;
  margin: 0 auto 32px;
  opacity: 0.95;
}

.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
  font-weight: 500;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 1.08;
  margin: 0 0 22px;
  color: var(--ink);
}

.hero p.lede {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--ink-dim);
  max-width: 560px;
  margin: 0 auto 40px;
  font-weight: 300;
}

.hero-cta {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink-faint);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-cue .line {
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--accent), transparent);
  animation: scrollpulse 2.2s ease-in-out infinite;
}

@keyframes scrollpulse {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 15px 34px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn:hover {
  background: var(--accent);
  color: #14110c;
}

.btn.btn-solid {
  background: var(--accent);
  color: #14110c;
}

.btn.btn-solid:hover {
  background: transparent;
  color: var(--accent);
}

/* ===== Section scaffolding ===== */
section {
  padding: 120px 0;
  position: relative;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500;
  margin: 0 0 18px;
  color: var(--ink);
}

.section-head p {
  color: var(--ink-dim);
  font-weight: 300;
  font-size: 1.02rem;
}

.divider-mark {
  width: 34px;
  height: 34px;
  margin: 0 auto 20px;
  opacity: 0.85;
}

/* ===== About ===== */
.about {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
  align-items: center;
}

.about-portrait {
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(160deg, #241c14, #100d09);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.about-portrait::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(192,138,78,0.25);
  pointer-events: none;
}

.about-portrait .ph-label {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 0.95rem;
  text-align: center;
  padding: 20px;
}

.about-copy .section-eyebrow { display: block; }

.about-copy h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  font-weight: 500;
  margin: 8px 0 24px;
}

.about-copy p {
  color: var(--ink-dim);
  font-weight: 300;
  margin-bottom: 18px;
}

.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.about-stats div strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.9rem;
  color: var(--accent);
  font-weight: 500;
}

.about-stats div span {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ===== Gallery ===== */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.filter-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: opacity 0.3s ease;
}

.gallery-item.hidden { display: none; }

.piece-swatch {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 26px;
}

.piece-swatch::before {
  content: "";
  position: absolute;
  inset: 0;
}

/* generated warm-wood gradient variants for placeholders */
.wood-1 .piece-swatch::before { background: linear-gradient(150deg,#5a3c22,#1c1309); }
.wood-2 .piece-swatch::before { background: linear-gradient(150deg,#6e4a28,#241809); }
.wood-3 .piece-swatch::before { background: linear-gradient(150deg,#48311c,#18110a); }
.wood-4 .piece-swatch::before { background: linear-gradient(150deg,#63431f,#20150a); }
.wood-5 .piece-swatch::before { background: linear-gradient(150deg,#4c351d,#170f08); }
.wood-6 .piece-swatch::before { background: linear-gradient(150deg,#6b4a26,#22160a); }

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.05) 55%);
  transition: opacity 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:hover .piece-swatch::before {
  transform: scale(1.04);
}

.piece-swatch::before,
.gallery-item img {
  transition: transform 0.5s ease;
}

.piece-info {
  position: relative;
  z-index: 2;
  color: var(--ink);
}

.piece-info .cat {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.piece-info .name {
  font-family: var(--serif);
  font-size: 1.25rem;
}

.piece-info .meta {
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin-top: 4px;
}

.gallery-note {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.85rem;
  margin-top: 40px;
  font-style: italic;
}

/* ===== Process ===== */
.process {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.process-step {
  text-align: center;
  position: relative;
}

.process-step .num {
  font-family: var(--serif);
  font-size: 2.6rem;
  color: var(--accent-dim);
  font-weight: 500;
  margin-bottom: 18px;
  display: block;
}

.process-step h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 12px;
}

.process-step p {
  color: var(--ink-dim);
  font-size: 0.92rem;
  font-weight: 300;
}

/* ===== Testimonial ===== */
.testimonial {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 130px 32px;
}

.testimonial blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 28px;
}

.testimonial cite {
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ===== Contact ===== */
.contact {
  background:
    linear-gradient(180deg, var(--bg) 0%, #100d0a 100%);
  border-top: 1px solid var(--line);
}

.contact-centered {
  text-align: center;
}

.contact-details {
  max-width: 640px;
  margin: 0 auto;
}

.contact-details h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 500;
  margin: 8px 0 20px;
}

.contact-details > p {
  color: var(--ink-dim);
  font-weight: 300;
  margin: 0 auto 44px;
  max-width: 480px;
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 22px;
}

.contact-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 240px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.contact-link-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-link-card .label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.contact-link-card .value {
  color: var(--ink);
  font-size: 1.1rem;
  font-family: var(--serif);
}

.contact-link-card:hover .value {
  color: var(--accent);
}

.contact-note {
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-style: italic;
  max-width: 480px;
  margin: 0 auto;
}

/* ===== Footer ===== */
footer.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img { height: 26px; }

.footer-brand span {
  font-family: var(--serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.footer-links a:hover { color: var(--accent); }

.footer-copy {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.75rem;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 8, 6, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox.open { display: flex; }

.lightbox-inner {
  max-width: 720px;
  width: 100%;
  text-align: center;
}

.lightbox-swatch {
  aspect-ratio: 4/5;
  max-height: 60vh;
  margin: 0 auto 24px;
  border: 1px solid var(--line);
}

.lightbox-inner .cat {
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lightbox-inner h3 {
  font-family: var(--serif);
  font-size: 1.8rem;
  margin: 10px 0;
}

.lightbox-inner p {
  color: var(--ink-dim);
  font-weight: 300;
}

.lightbox-close {
  position: absolute;
  top: 28px;
  right: 32px;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1.1rem;
}

.lightbox-close:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Reveal-on-scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 48px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  nav.main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 78%;
    max-width: 320px;
    background: var(--bg-alt);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
  }
  nav.main-nav.open { transform: translateX(0); }
  nav.main-nav ul {
    flex-direction: column;
    gap: 28px;
    padding: 0 40px;
  }
  .lang-toggle-desktop { display: none; }
  .lang-toggle-mobile {
    display: flex;
    margin: 36px 40px 0;
  }
  .nav-toggle { display: flex; }
  section { padding: 80px 0; }
  .gallery-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .contact-link-card { width: 100%; min-width: 0; }
}
