:root {
  --ink: #12100e;
  --ink-soft: #2a2622;
  --paper: #f2ebe1;
  --paper-dim: #d9d0c3;
  --accent: #c45c26;
  --accent-soft: #e8a078;
  --line: rgba(242, 235, 225, 0.14);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --radius: 18px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  /* Canvas fill: prevents white flash when body is position:fixed (modal scroll lock). */
  background-color: #0c0b0a;
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(196, 92, 38, 0.22), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(242, 235, 225, 0.08), transparent 50%),
    linear-gradient(165deg, #1a1613 0%, var(--ink) 45%, #0c0b0a 100%);
  background-attachment: fixed;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--paper);
  background: transparent;
  font-family: var(--font-body);
  line-height: 1.55;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.05;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header,
main,
.site-footer { position: relative; z-index: 1; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1.2rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(18, 16, 14, 0.1);
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, #f4eee4 0%, #ebe3d6 100%);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.brand-logo {
  height: 54px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}
.nav button {
  border: 1px solid transparent;
  background: transparent;
  color: #5c564f;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nav button:hover,
.nav button.active {
  color: var(--ink);
  border-color: rgba(18, 16, 14, 0.12);
  background: rgba(18, 16, 14, 0.04);
}

.hero {
  min-height: calc(100vh - 5rem);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.25rem);
  align-items: center;
  padding: clamp(2rem, 6vh, 4.5rem) clamp(1.2rem, 4vw, 3rem);
}

.hero-copy {
  padding-left: clamp(1rem, 4vw, 2.75rem);
  padding-right: clamp(0.5rem, 2vw, 1.25rem);
  max-width: 34rem;
  justify-self: center;
  width: 100%;
}

.hero-copy .eyebrow,
.catalog-head .eyebrow,
.detail-copy .eyebrow {
  margin: 0 0 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--accent-soft);
  font-weight: 600;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.4rem, 9vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.lede {
  margin: 1.35rem 0 0;
  max-width: 22.5rem;
  font-size: 1.08rem;
  color: var(--paper-dim);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary {
  background: var(--accent);
  color: #1a120e;
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}
.btn-ghost:hover { background: rgba(242, 235, 225, 0.06); }

.hero-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  min-height: 70vh;
  align-content: center;
}
.hero-rail img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: var(--shadow);
  background: var(--ink-soft);
  animation: rise 0.9s ease both;
}
.hero-rail img:nth-child(2) { transform: translateY(1.6rem); animation-delay: 0.12s; }
.hero-rail img:nth-child(3) { transform: translateY(-0.8rem); animation-delay: 0.22s; }
.hero-rail img:nth-child(4) { animation-delay: 0.08s; }
.hero-rail img:nth-child(5) { transform: translateY(1.1rem); animation-delay: 0.18s; }
.hero-rail img:nth-child(6) { transform: translateY(-0.4rem); animation-delay: 0.28s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; }
}

.catalog {
  padding: 2.5rem clamp(1.2rem, 4vw, 3rem) 4rem;
}
.catalog.hidden,
.hero.hidden,
.page-panel.hidden { display: none; }

.page-panel {
  padding: 2.5rem clamp(1.2rem, 4vw, 3rem) 4rem;
  max-width: 820px;
}
.page-panel h2 {
  margin: 0 0 1.4rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
}
.prose p {
  margin: 0 0 1rem;
  color: var(--paper-dim);
  font-size: 1.05rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}
.contact-grid h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.contact-grid p { margin: 0 0 0.35rem; color: var(--paper-dim); }
.contact-grid a { color: var(--accent-soft); text-decoration: none; }
.contact-grid a:hover { text-decoration: underline; }
.muted { opacity: 0.75; font-size: 0.9rem; }

.catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}
.catalog-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.toolbar input {
  width: min(280px, 70vw);
  border: 1px solid var(--line);
  background: rgba(242, 235, 225, 0.05);
  color: var(--paper);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 16px;
  outline: none;
}
.toolbar input:focus { border-color: var(--accent-soft); }
.toolbar input::placeholder { color: rgba(217, 208, 195, 0.55); }
.count {
  color: var(--paper-dim);
  font-size: 0.9rem;
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem 1rem;
}

.card {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: transform 0.25s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.card:hover { transform: translateY(-4px); }
.card:hover .card-cover { box-shadow: 0 18px 40px rgba(0,0,0,0.4); }
.card-cover {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  background: var(--ink-soft);
  display: block;
  transition: box-shadow 0.25s ease;
}
.card-title {
  margin: 0.7rem 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price { display: none; }

html.modal-open,
body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}
body.modal-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

.detail {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(980px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom);
  background: #1c1916;
  color: var(--paper);
  box-shadow: var(--shadow);
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
.detail::backdrop {
  overscroll-behavior: none;
  touch-action: none;
  background: rgba(8, 7, 6, 0.72);
  backdrop-filter: blur(4px);
}
.detail-close-row {
  display: flex;
  justify-content: flex-end;
  padding: 0.85rem 1rem 0;
  margin: 0;
}
.detail-body {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 1.5rem;
  padding: 0.5rem 1.4rem 1.6rem;
}
.detail-cover img {
  width: 100%;
  border-radius: 12px;
  display: block;
  background: var(--ink-soft);
}
.detail-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.15;
}
.price { display: none; }
.detail-desc {
  color: var(--paper-dim);
  font-size: 0.98rem;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.detail-desc p {
  margin: 0 0 0.75rem;
  text-align: justify;
  text-justify: inter-word;
}
.detail-desc table { width: 100%; border-collapse: collapse; }

.site-footer {
  padding: 2.75rem clamp(1.4rem, 5vw, 3.75rem) 3.25rem;
  border-top: 1px solid rgba(18, 16, 14, 0.1);
  background: linear-gradient(180deg, #ebe3d6 0%, #e4dbcc 100%);
  color: #5c564f;
  font-size: 0.92rem;
  display: grid;
  gap: 1.65rem;
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.14);
}
.footer-brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem 1.35rem;
}
.footer-logo {
  height: 36px;
  width: auto;
  flex-shrink: 0;
}
.footer-mail {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(18, 16, 14, 0.28);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 0.55rem;
}
.footer-mail:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.footer-brand-text {
  flex: 1 1 14rem;
  min-width: 0;
}
.footer-brand strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.footer-brand p { margin: 0; }
.footer-copy {
  margin: 0;
  opacity: 0.85;
  font-size: 0.72rem;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
}
.footer-copy a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(18, 16, 14, 0.28);
}
.footer-copy a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
@media (max-width: 900px) {
  html {
    /* iOS Safari paints fixed backgrounds poorly / can flash white. */
    background-attachment: scroll;
  }
  .site-header {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    row-gap: 1rem;
    padding-top: max(0.85rem, env(safe-area-inset-top));
    padding-left: max(1.2rem, env(safe-area-inset-left));
    padding-right: max(1.2rem, env(safe-area-inset-right));
  }
  .brand {
    justify-content: center;
  }
  .brand-logo {
    height: 58px;
  }
  .nav {
    width: 100%;
    justify-content: center;
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 2rem;
    padding-left: max(1.2rem, env(safe-area-inset-left));
    padding-right: max(1.2rem, env(safe-area-inset-right));
  }
  .hero-copy {
    padding-left: clamp(0.75rem, 5vw, 2rem);
    padding-right: clamp(0.75rem, 5vw, 2rem);
    justify-self: stretch;
    max-width: none;
    text-align: center;
  }
  .lede {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-rail {
    min-height: auto;
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-rail img:nth-child(n) { transform: none; }
  .catalog,
  .page-panel {
    padding-left: max(1.2rem, env(safe-area-inset-left));
    padding-right: max(1.2rem, env(safe-area-inset-right));
  }
  .detail {
    width: min(980px, calc(100vw - 1.25rem));
    max-width: calc(100vw - 1.25rem);
    max-height: calc(100vh - 1.25rem);
    max-height: calc(100dvh - 1.25rem);
  }
  .detail-body { grid-template-columns: 1fr; }
  .detail-cover { max-width: min(220px, 55vw); }
  .site-footer {
    padding-left: max(1.2rem, env(safe-area-inset-left));
    padding-right: max(1.2rem, env(safe-area-inset-right));
    padding-bottom: max(2.5rem, calc(1.25rem + env(safe-area-inset-bottom)));
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: max(0.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.75rem max(1rem, env(safe-area-inset-left));
    text-align: center;
  }
  .brand-logo { height: 52px; }
  .nav {
    gap: 0.15rem;
    justify-content: center;
  }
  .nav button {
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
    min-height: 40px;
  }
  .hero {
    padding: 1.5rem max(1rem, env(safe-area-inset-right)) 2rem max(1rem, env(safe-area-inset-left));
  }
  .hero h1 {
    font-size: clamp(2.6rem, 14vw, 3.6rem);
  }
  .lede {
    max-width: 18.5rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
  }
  .hero-actions {
    gap: 0.65rem;
    justify-content: center;
  }
  .hero-actions .btn {
    flex: 1 1 auto;
    text-align: center;
    min-height: 44px;
  }
  .hero-rail { grid-template-columns: repeat(2, 1fr); }
  .hero-rail img:nth-child(n+5) { display: none; }
  .catalog,
  .page-panel {
    padding: 2rem max(1rem, env(safe-area-inset-right)) 3rem max(1rem, env(safe-area-inset-left));
  }
  .catalog-head {
    align-items: stretch;
  }
  .toolbar {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.55rem 0.75rem;
  }
  .toolbar input {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 0.75rem;
  }
  .card-title { font-size: 0.88rem; }
  .detail {
    width: calc(100vw - 0.75rem);
    max-width: calc(100vw - 0.75rem);
    max-height: calc(100vh - 0.75rem);
    max-height: calc(100dvh - 0.75rem);
    border-radius: 14px;
  }
  .detail-close-row {
    padding: max(0.75rem, env(safe-area-inset-top)) 0.85rem 0;
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #1c1916 70%, rgba(28, 25, 22, 0));
    z-index: 2;
  }
  .detail-close-row .btn {
    min-height: 40px;
    padding: 0.55rem 1rem;
  }
  .detail-body {
    padding: 0.35rem 1rem 1.35rem;
    gap: 1.1rem;
  }
  .detail-cover { max-width: min(200px, 62vw); margin: 0 auto; }
  .footer-brand {
    align-items: center;
  }
  .footer-brand-text {
    flex: 1 1 100%;
  }
  .footer-copy { white-space: normal; }
}

@media (max-width: 380px) {
  .nav button {
    padding: 0.48rem 0.55rem;
    font-size: 0.74rem;
  }
  .grid { gap: 0.85rem 0.55rem; }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn { width: 100%; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }
  .hero-rail { display: none; }
  .detail {
    max-height: calc(100vh - 0.5rem);
    max-height: calc(100dvh - 0.5rem);
  }
}
