/* Kasap Wood Co. — site styles
   Layout matched to the Blacktail Studio furniture page (see
   projects/kasap-furniture/docs/site-spec-20261021.md). */

:root {
  --bg: #e9e9e9;
  --panel: #ffffff;
  --ink: #111111;
  --muted: #6b6b6b;
  --line: #d4d4d4;
  --accent: #111111;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --gutter: 20px;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

.caps {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Announcement bar */
.announce {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 7px 16px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* Header */
.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wordmark .mark {
  width: 26px; height: 26px;
  border: 2px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; letter-spacing: 0; font-weight: 700;
}
.wordmark small {
  font-size: 9px; letter-spacing: 0.3em; font-family: var(--sans); font-weight: 500;
  color: var(--muted); margin-left: 6px;
}
.nav {
  display: flex; gap: 22px; align-items: center; margin-left: auto;
}
.nav a { padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a.active, .nav a:hover { border-bottom-color: var(--ink); }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 11px 18px;
  border: 1px solid var(--accent);
  border-radius: 2px;
}
.btn:hover { background: #333; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: #f2f2f2; }
.btn[disabled] { background: #bbb; border-color: #bbb; cursor: default; }
.social { display: flex; gap: 14px; margin-left: 8px; }
.social a { width: 18px; height: 18px; display: inline-block; opacity: 0.8; }
.social svg { width: 100%; height: 100%; fill: var(--ink); }
.menu-toggle { display: none; background: none; border: 0; padding: 6px; margin-left: auto; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; }

/* Category row */
.cats {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 16px 6px;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px 26px;
}
.cats button {
  background: none; border: 0; padding: 4px 0;
  color: var(--ink); border-bottom: 1px solid transparent;
}
.cats button.active { border-bottom-color: var(--ink); }

/* Grid */
.grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 16px 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px var(--gutter);
}
.tile { position: relative; cursor: pointer; }
.tile .frame {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ddd;
}
.tile .frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity 320ms ease;
}
.tile .frame img.alt { opacity: 0; }
@media (hover: hover) {
  .tile:hover .frame img.alt { opacity: 1; }
}
.badge {
  position: absolute; top: 10px; right: 10px;
  background: #111; color: #fff;
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 7px 8px; line-height: 1.1; text-align: center;
  border-radius: 50%; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
}
.badge.stock { background: #2f5d3a; }
.tile .name {
  font-family: var(--serif);
  font-size: 17px;
  text-align: center;
  margin: 12px 0 2px;
}
.tile .price {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; }

/* Modal / piece view */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal .card {
  background: #fff;
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 28px;
  padding: 28px;
  position: relative;
}
.modal .close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted);
}
.gallery .main {
  aspect-ratio: 1 / 1; background: #ddd; overflow: hidden;
}
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px;
}
.gallery .thumbs button {
  padding: 0; border: 2px solid transparent; background: #ddd; aspect-ratio: 1 / 1; overflow: hidden;
}
.gallery .thumbs button.active { border-color: var(--ink); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.info h2 { font-family: var(--serif); font-weight: 500; font-size: 30px; margin: 6px 0 4px; }
.info .price { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.info .status { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 10px; }
.info .status.sold { color: #8a2a2a; }
.info .status.stock { color: #2f5d3a; }
.info .status.made { color: var(--muted); }
.info dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13px; margin: 0 0 14px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; }
.info p { font-size: 14px; line-height: 1.6; }
.info .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.info .actions .btn { text-align: center; }
.info .note { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Content pages */
.page {
  max-width: 760px; margin: 0 auto; padding: 40px 16px 64px;
}
.page h1 { font-family: var(--serif); font-weight: 500; font-size: 36px; margin: 0 0 6px; }
.page .lede { color: var(--muted); margin: 0 0 28px; }
.page p { font-size: 15px; line-height: 1.7; }
.page h2 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 28px 0 8px; }
.panel { background: #fff; padding: 28px; border: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.about-grid .photo { aspect-ratio: 4 / 5; background: #ccc; overflow: hidden; }
.about-grid .photo img { width: 100%; height: 100%; object-fit: cover; }
.tag { font-family: var(--serif); font-size: 22px; line-height: 1.4; border-left: 3px solid var(--ink); padding-left: 16px; margin: 24px 0; }

.byow { margin-bottom: 20px; }
.byow h2 { margin-top: 0; }
.byow ul { padding-left: 18px; font-size: 14px; line-height: 1.6; }
.byow li { margin-bottom: 8px; }
[hidden] { display: none !important; }

/* Form */
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
form label { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; margin: 14px 0 6px; }
form input, form select, form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #bbb; background: #fff; font: inherit; border-radius: 2px;
}
form textarea { min-height: 120px; resize: vertical; }
form .help { font-size: 12px; color: var(--muted); margin-top: 4px; }
form .submit { margin-top: 22px; }

/* Footer */
.site-footer {
  background: #111; color: #cfcfcf;
  padding: 36px 16px;
  margin-top: 24px;
}
.site-footer .inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px;
  font-size: 13px;
}
.site-footer h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: #fff; }
.site-footer a:hover { color: #fff; }
.site-footer .legal { grid-column: 1 / -1; font-size: 11px; color: #8a8a8a; margin-top: 12px; }

/* Responsive */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .modal .card { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .site-footer .inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .site-header .inner { flex-wrap: wrap; gap: 12px; }
  .nav {
    display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 10px; margin: 6px 0 0;
  }
  .nav.open { display: flex; }
  .menu-toggle { display: block; }
  .social { display: none; }
  .grid { grid-template-columns: 1fr; gap: 28px; }
  .modal { padding: 0; }
  .modal .card { max-height: 100vh; padding: 20px 16px 32px; }
  form .row { grid-template-columns: 1fr; }
  .site-footer .inner { grid-template-columns: 1fr; }
  .cats { gap: 10px 18px; }
}
