:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --tint: #f3ece1;
  --ink: #2a2119;
  --muted: #6f6254;
  --line: #e7ddcf;
  --wood: #9b6332;
  --wood-dark: #774820;
  --wood-light: #d9b48a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(60, 40, 20, .08);
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--wood-dark); }
a:hover { color: var(--wood); }
h1, h2, h3, .h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.h3, h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--wood); outline-offset: 3px; }

.container { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.tinted { background: var(--tint); }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--wood); margin-bottom: .6rem; }
.eyebrow.light { color: var(--wood-light); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 1rem; }
.plain-list { list-style: none; margin: 0; padding: 0; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.4rem; border-radius: 999px; border: 1px solid var(--wood); background: var(--wood); color: #fff; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, transform .2s; }
.button:hover { background: var(--wood-dark); border-color: var(--wood-dark); color: #fff; transform: translateY(-1px); }
.button.small { padding: .55rem 1rem; font-size: .92rem; }
.button.ghost { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .7); color: #fff; }
.button.ghost:hover { background: #fff; color: var(--ink); }
.button.secondary { background: transparent; color: var(--wood-dark); }
.button.secondary:hover { background: var(--tint); color: var(--wood-dark); }
.button.danger { background: #a3352a; border-color: #a3352a; }
.button.danger:hover { background: #82271e; border-color: #82271e; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 248, 243, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--serif); font-size: 1.2rem; }
.brand-text small { color: var(--muted); font-size: .8rem; }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a:not(.button) { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:not(.button):hover, .site-nav a[aria-current] { color: var(--wood); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; position: relative; }
.nav-toggle span[aria-hidden], .nav-toggle span[aria-hidden]::before, .nav-toggle span[aria-hidden]::after { position: absolute; left: 11px; width: 20px; height: 2px; background: var(--ink); content: ""; }
.nav-toggle span[aria-hidden] { top: 21px; }
.nav-toggle span[aria-hidden]::before { left: 0; top: -6px; }
.nav-toggle span[aria-hidden]::after { left: 0; top: 6px; }

@media (max-width: 820px) {
  .header-inner { position: relative; }
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: -1.25rem; right: -1.25rem; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1.25rem; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a:not(.button) { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .site-nav .button { margin-top: 1rem; }
}

/* Hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, #f6eee2 0%, #efe2cf 60%, #e8d6bd 100%); }
.hero-grain { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #c9a273; stroke-opacity: .35; stroke-width: 1.5; }
.hero-grain path, .hero-grain ellipse { stroke-dasharray: 1; animation: draw 4s ease-out both; }
.hero-grain path:nth-child(2n) { animation-delay: .4s; }
.hero-grain path:nth-child(3n) { animation-delay: .8s; }
.hero-grain ellipse { animation-delay: 1.4s; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding: clamp(3rem, 7vw, 5.5rem) 0; }
.hero h1 { max-width: 15ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* "From sketch to furniture" hero animation */
.sketch-card { margin: 0; transform: rotate(1.2deg); }
.sketch-stage { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background-color: #fbf7ef; background-image: linear-gradient(rgba(120, 150, 180, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 150, 180, .13) 1px, transparent 1px); background-size: 24px 24px; box-shadow: 0 2px 0 #fff inset, 0 24px 50px rgba(70, 45, 20, .25), 0 0 0 10px #fff; }
.sketch-photo, .sketch-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.sketch-photo { object-fit: cover; }
.sketch-lines { opacity: 0; }
.sketch-lines path { fill: none; stroke: #4d3b2b; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; }
.sketch-lines .faint { stroke-opacity: .35; stroke-width: 1.6; }
.sketch-lines .dims path { stroke: var(--wood); stroke-width: 1.8; }
.dim-text { font: italic 600 22px var(--serif); fill: var(--wood); }
.sketch-tag { position: absolute; left: 16px; top: 12px; font: italic 1rem var(--serif); color: #4d3b2b; opacity: 0; }
.sketch-edge { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: linear-gradient(180deg, transparent, #fff 20%, #ffe2b8 50%, #fff 80%, transparent); box-shadow: 0 0 18px 6px rgba(255, 220, 170, .7); opacity: 0; }
.sketch-card figcaption { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.4rem; color: var(--muted); font-size: .92rem; }
.sketch-replay { border: 1px solid var(--line); background: rgba(255, 255, 255, .7); color: var(--wood-dark); border-radius: 999px; padding: .35rem .9rem; font: 600 .85rem var(--sans); cursor: pointer; }
.sketch-replay:hover { background: #fff; }

.sketch-card.play .sketch-lines { opacity: 1; animation: wipe-out 1.8s 3.4s cubic-bezier(.6, 0, .3, 1) both; }
.sketch-card.play .sketch-tag { animation: tag 5.2s both; }
.sketch-card.play .sketch-photo { animation: wipe-in 1.8s 3.4s cubic-bezier(.6, 0, .3, 1) both; }
.sketch-card.play .sketch-edge { animation: edge 1.8s 3.4s cubic-bezier(.6, 0, .3, 1) both; }
.sketch-card.play .sketch-lines path { animation: draw .9s ease-in-out both; }
.sketch-card.play .sketch-lines .d2 { animation-delay: .35s; }
.sketch-card.play .sketch-lines .d3 { animation-delay: .8s; }
.sketch-card.play .sketch-lines .d4 { animation-delay: 1.3s; }
.sketch-card.play .sketch-lines .d5 { animation-delay: 1.8s; }
.sketch-card.play .sketch-lines .d6 { animation-delay: 2.3s; }
.sketch-card.play .dim-text { animation: fade-in .6s 2.9s both; }

@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes wipe-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes wipe-out { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }
@keyframes edge { 0% { left: 0; opacity: 0; } 8%, 92% { opacity: 1; } 100% { left: calc(100% - 3px); opacity: 0; } }
@keyframes tag { 0%, 5% { opacity: 0; } 15%, 62% { opacity: .8; } 72%, 100% { opacity: 0; } }

/* Header illustration: a pine sprouting from a stump (decorative, not a logo) */
.brand-art { flex: none; width: 56px; height: 48px; overflow: visible; }
.ba-hill { animation: fade-in .8s ease-out both; }
.ba-rings ellipse { stroke-dasharray: 1; animation: draw 1.1s ease-out .2s both; }
.ba-rings ellipse + ellipse { animation-delay: .5s; }
.ba-pine { transform-box: fill-box; transform-origin: 50% 100%; animation: sprout 1s cubic-bezier(.3, 1.45, .5, 1) .7s both; }
.ba-tier { transform-box: fill-box; transform-origin: 50% 100%; animation: tier .5s ease-out both; }
.ba-tier:nth-child(2) { animation-delay: 1s; }
.ba-tier:nth-child(3) { animation-delay: 1.15s; }
.ba-tier:nth-child(4) { animation-delay: 1.3s; }
.ba-dust circle { opacity: 0; }
.brand:hover .ba-pine, .brand:focus-visible .ba-pine { animation: sway 1.4s ease-in-out infinite alternate; }
.brand:hover .ba-dust circle, .brand:focus-visible .ba-dust circle { animation: dust 1.4s ease-in infinite; }
.brand:hover .ba-dust circle:nth-child(2) { animation-delay: .45s; }
.brand:hover .ba-dust circle:nth-child(3) { animation-delay: .9s; }
@keyframes sprout { from { transform: scale(.15, 0); } to { transform: scale(1, 1); } }
@keyframes tier { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes dust { 0% { opacity: 0; transform: translate(0, -6px); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(2px, 10px); } }

/* Workbench band: a hand plane gliding over a plank */
.plane-band { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; text-align: center; }
.plane-band svg { display: block; width: 100%; height: auto; overflow: visible; }
.plane-band p { margin: .8rem 0 2.5rem; font: italic 1.15rem var(--serif); color: var(--muted); }
.plane { animation: plane-glide 8s linear infinite; }
.planed { transform-box: fill-box; transform-origin: left center; animation: planed 8s linear infinite; }
.shaving { transform-box: fill-box; transform-origin: left bottom; animation: shaving .8s ease-in-out infinite alternate; }
.chips path { opacity: 0; animation: chip 8s linear infinite; }
.chips path:nth-child(1) { animation-name: chip1; }
.chips path:nth-child(2) { animation-name: chip2; }
.chips path:nth-child(3) { animation-name: chip3; }
@keyframes plane-glide { 0% { transform: translateX(-200px); opacity: 0; } 4% { opacity: 1; } 94% { opacity: 1; } 100% { transform: translateX(1300px); opacity: 0; } }
@keyframes planed { 0%, 6% { transform: scaleX(0); opacity: 1; } 86% { transform: scaleX(1); opacity: 1; } 94% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes shaving { from { transform: scale(.75) rotate(-6deg); } to { transform: scale(1.08) rotate(4deg); } }
@keyframes chip1 { 0%, 19% { opacity: 0; } 22%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes chip2 { 0%, 40% { opacity: 0; } 43%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes chip3 { 0%, 62% { opacity: 0; } 65%, 92% { opacity: 1; } 100% { opacity: 0; } }

/* Catalogue */
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head p:last-child { color: var(--muted); }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.category-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .25s, box-shadow .25s; }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.category-media { aspect-ratio: 4 / 3; background: var(--tint); overflow: hidden; }
.category-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.category-card:hover .category-media img { transform: scale(1.05); }
.category-body { display: flex; flex-direction: column; gap: .35rem; padding: 1.2rem 1.3rem 1.4rem; flex: 1; }
.category-title { font: 600 1.3rem/1.25 var(--serif); }
.category-text { color: var(--muted); font-size: .95rem; flex: 1; }
.category-meta { color: var(--wood); font-weight: 600; font-size: .9rem; margin-top: .4rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.feature-list li { background: var(--surface); border-radius: var(--radius); padding: 1.2rem 1.4rem; border-left: 4px solid var(--wood); display: grid; gap: .2rem; }
.feature-list span { color: var(--muted); font-size: .95rem; }

/* Contacts */
.contact-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.5); padding: clamp(1.8rem, 5vw, 3.5rem); box-shadow: var(--shadow); }
.contact-list { margin: 0; display: grid; gap: 1.1rem; }
.contact-list dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.contact-list dd { margin: 0; font-size: 1.15rem; font-weight: 600; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.contact-list a { text-decoration: none; }

@media (max-width: 820px) {
  .about-grid, .contact-card { grid-template-columns: 1fr; }
}

/* Category page */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1rem; background: linear-gradient(180deg, var(--tint), var(--bg)); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumbs a { color: var(--muted); }
.gallery-section { padding-top: 1.5rem; }
.gallery { columns: 3 300px; column-gap: 1rem; }
.gallery-item { display: block; margin-bottom: 1rem; break-inside: avoid; border-radius: 10px; overflow: hidden; background: var(--tint); }
.gallery-item img { width: 100%; height: auto; transition: transform .4s, opacity .3s; }
.gallery-item:hover img { transform: scale(1.03); opacity: .92; }
.empty { padding: 3rem; text-align: center; background: var(--tint); border-radius: var(--radius); color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }
.chip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { display: inline-block; padding: .5rem 1rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.chip:hover { border-color: var(--wood); color: var(--wood-dark); }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 2rem 2.4rem; border-radius: calc(var(--radius) * 1.5); background: linear-gradient(120deg, var(--wood-dark), var(--wood)); color: #fff; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .85); }
.cta-band .button { background: #fff; color: var(--wood-dark); border-color: #fff; }

/* Lightbox */
.lightbox { border: 0; padding: 0; margin: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: transparent; color: #fff; }
.lightbox::backdrop { background: rgba(18, 12, 6, .94); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 4.5rem 1.5rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 7rem); object-fit: contain; border-radius: 6px; }
.lightbox figcaption { margin-top: .8rem; color: rgba(255, 255, 255, .8); }
.lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox figure { padding: 3.5rem .5rem 5rem; }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 1rem; transform: none; }
}

/* Footer */
.site-footer { background: #2a2119; color: rgba(255, 255, 255, .75); padding: 4rem 0 0; font-size: .95rem; }
.site-footer a { color: rgba(255, 255, 255, .9); text-decoration: none; }
.site-footer a:hover { color: var(--wood-light); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; }
.footer-grid li { margin-bottom: .35rem; }
.footer-brand { font: 600 1.4rem var(--serif); color: #fff; }
.footer-title { color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 3rem; padding: 1.4rem 0; font-size: .85rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; animation: none !important; }
  .sketch-card .sketch-lines, .sketch-card .sketch-tag { opacity: 0 !important; }
  .plane { transform: translateX(520px); }
}
