@import url("https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+Antique:wght@400;500;700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap");

:root {
  --hover: #b5522a;
  --muted: #6a6a6a;
  --text: #444;
  --logo: #0e0e0e;
  --icon: #c6c6c6;
  --sidebar: 250px;
  --bg: #fffff8;
  --font-body: "Zen Kaku Gothic New", "Avenir Next", Avenir, Helvetica, Arial, sans-serif;
  --font-heading: "Zen Kaku Gothic Antique", "Avenir Next", Avenir, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  color: var(--hover);
}

.site {
  min-height: 100vh;
}

.nav-wrapper {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar);
  height: 100vh;
  overflow: auto;
  padding: 4% 40px 60px 3%;
  background: var(--bg);
  z-index: 20;
}

.logo {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 400;
  color: var(--logo);
  letter-spacing: -0.5px;
  display: block;
  margin-bottom: 32px;
  line-height: 1.05;
  text-decoration: none;
}

.logo:hover {
  color: var(--logo);
}

.logo-break {
  display: block;
}

h1,
h2,
h3,
.page-heading,
.product-card .name {
  font-family: var(--font-heading);
}

#menu {
  margin-top: 32px;
}

#menu ul {
  list-style: none;
}

#menu a {
  display: inline-block;
  color: #2c2c2c;
  font-weight: 400;
  font-size: 14px;
  line-height: 2;
  padding: 0.25em 0.4em 0.25em 0;
  text-decoration: none;
}

#menu a:hover,
#menu a:focus,
#menu li.selected a {
  color: var(--hover);
}

.social_icons {
  margin-top: 28px;
}

.social_icons ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
}

.social-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #000;
}

.social-icon-link:hover {
  color: var(--hover);
}

.social-icon {
  width: 18px;
  height: 18px;
  display: block;
  overflow: visible;
}

#content {
  margin-left: var(--sidebar);
  padding: 4% 2% 6% 0;
  min-height: 100vh;
}

.store #content {
  padding-top: 64px;
}

body.content:not(.work) #content {
  padding-top: 80px;
}

body.work #content {
  padding-top: 36px;
}

body.gallery #content {
  padding-top: 72px;
}

.masonry {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.asset {
  width: auto;
  min-width: 0;
  padding: 0 5% 5% 0;
  display: block;
  cursor: default;
  color: inherit;
  text-decoration: none;
}

.asset:has(img) {
  cursor: zoom-in;
}

.masonry::after {
  content: none;
}

.asset img {
  width: 100%;
  background: #eee;
}

.asset .black {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #e6e6e6;
  color: #888;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.asset .black::after {
  content: "coming soon";
}

.work-page {
  max-width: 960px;
  margin: 0;
  padding: 28px 2% 60px 0;
  text-align: left;
}

.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px 32px;
  align-items: start;
  margin-bottom: 28px;
}

.work-page .work-hero {
  width: 100%;
  max-width: 520px;
  margin: 0;
}

.work-info h1,
.work-page h1 {
  font-size: 22px;
  font-weight: 400;
  color: #111;
  margin-bottom: 12px;
}

.work-page .work-copy {
  max-width: none;
  margin: 0;
}

.work-process {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(68, 68, 68, 0.14);
}

.work-process h2 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 400;
  color: #111;
  margin: 0 0 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.work-page .work-more img {
  width: 100%;
  max-width: none;
  margin: 0;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(68, 68, 68, 0.16);
}

body.work .back-link {
  display: inline-block;
  position: relative;
  top: 12px;
  margin: 24px 0 8px;
  text-align: left;
  font-size: 15.5px;
}

.back-link .label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-link .arrow {
  font-size: 12px;
}

.work-more {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.cart-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 40;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: #000;
  cursor: pointer;
}

.cart-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.cart-drawer-wrap {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}

body.cart-open {
  overflow: hidden;
}

body.cart-open .cart-drawer-wrap {
  pointer-events: auto;
}

.cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.2s ease;
}

body.cart-open .cart-backdrop {
  opacity: 1;
}

.cart-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(380px, 100%);
  height: 100%;
  background: var(--bg);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 32px;
}

body.cart-open .cart-drawer {
  transform: translateX(0);
}

.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.cart-drawer h2 {
  font-size: 18px;
  font-weight: 400;
  color: #111;
}

.cart-close {
  position: relative;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.cart-close::before,
.cart-close::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 8px;
  width: 20px;
  height: 2px;
  background: #8b8b8b;
}

.cart-close::before {
  transform: rotate(45deg);
}

.cart-close::after {
  transform: rotate(-45deg);
}

.cart-empty {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  margin-top: 48px;
}

.mobile-bar {
  display: none;
}

.hamburger {
  width: 40px;
  height: 40px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  flex-shrink: 0;
}

.hamburger span,
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 9px;
  width: 22px;
  height: 2px;
  background: #222;
}

.hamburger span {
  top: 19px;
}

.hamburger::before {
  top: 13px;
}

.hamburger::after {
  top: 25px;
}

body.menu-open .hamburger span {
  opacity: 0;
}

body.menu-open .hamburger::before {
  top: 19px;
  transform: rotate(45deg);
}

body.menu-open .hamburger::after {
  top: 19px;
  transform: rotate(-45deg);
}

/* Lightbox */
html.lightbox-active,
html.lightbox-active body {
  overflow: hidden;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(251, 250, 248, 0.96);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 80px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox .caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  padding: 0 24px;
}

.lightbox .caption p {
  margin: 0;
}

.lightbox .close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.lightbox .close::before,
.lightbox .close::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 8px;
  width: 20px;
  height: 2px;
  background: #8b8b8b;
}

.lightbox .close::before {
  transform: rotate(45deg);
}

.lightbox .close::after {
  transform: rotate(-45deg);
}

.lightbox .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #8b8b8b;
  font-size: 36px;
  line-height: 1;
}

.lightbox .prev {
  left: 8px;
}

.lightbox .next {
  right: 8px;
}

/* About */
.about-hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}

.about-hero h2 {
  color: #111;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 12px;
}

.about-hero p {
  margin-bottom: 12px;
}

.about-hero img {
  width: 100%;
  max-width: 300px;
  border: 1px solid rgba(68, 68, 68, 0.22);
}

.cv h3,
.cv p b,
.cv strong {
  color: #111;
  font-weight: 400;
}

.cv p {
  margin-bottom: 8px;
}

.cv .year {
  margin-top: 14px;
  font-weight: 600;
}

.cv p a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cv .section {
  margin-top: 32px;
}

.cv-divider {
  border: 0;
  border-top: 1px solid rgba(68, 68, 68, 0.35);
  margin: 72px 0 32px;
}

/* Shop */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 280px));
  gap: 28px 18px;
  padding: 0 2% 40px;
}

.page-heading {
  font-size: 26px;
  font-weight: 400;
  color: #2c2c2c;
  text-align: center;
  padding: 0 2% 32px;
  margin: 0;
  line-height: 1.2;
  text-transform: none;
}

.product-card {
  text-align: center;
  color: inherit;
}

.product-card img {
  width: 100%;
  margin: 0 auto 12px;
}

.product-card .name {
  font-size: 22px;
  font-weight: 400;
  color: #2c2c2c;
  line-height: 1.3;
}

.product-card .price {
  font-size: 16px;
  color: #444;
  margin-top: 4px;
}

.product-card .stock-out {
  color: #c41212;
  font-size: 13px;
  margin-top: 4px;
}

.product-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  padding: 0 2% 40px;
  max-width: 1100px;
}

.product-detail img {
  width: 100%;
}

.product-info h1 {
  font-size: 24px;
  font-weight: 400;
  color: #111;
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-info .price {
  font-size: 20px;
  margin-bottom: 18px;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.qty-row select {
  padding: 6px 8px;
  font-family: inherit;
}

.add-cart {
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid rgba(68, 68, 68, 0.2);
  border-radius: 24px;
  background: var(--bg);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  color: #444;
}

.add-cart:hover {
  border-color: rgba(68, 68, 68, 0.8);
  background: rgba(68, 68, 68, 0.05);
  color: #444;
}

.product-copy {
  max-width: none;
  margin: 0 0 18px;
}

.product-copy p {
  margin-bottom: 10px;
}

.back-link {
  display: inline-block;
  margin: 0 0 20px 2%;
  color: #5a5a5a;
  font-size: 15.5px;
}

body.product .back-link {
  font-size: 15.5px;
  margin-top: 24px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #c41212;
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  z-index: 200;
  display: none;
}

.toast.show {
  display: block;
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 260px));
  }
}

@media (max-width: 767px) {
  .nav-wrapper {
    display: none;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 56px);
    position: fixed;
    top: 56px;
    left: 0;
    overflow-y: auto;
    padding: 4px 24px 20px;
    border-bottom: 1px solid #eee;
  }

  body.menu-open .nav-wrapper {
    display: block;
  }

  .nav-wrapper > .logo {
    display: none;
  }

  #menu {
    margin-top: 0;
  }

  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px 8px 16px;
    min-height: 56px;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 30;
  }

  .mobile-bar .logo {
    font-size: 18px;
    margin: 0;
    padding-right: 8px;
    white-space: nowrap;
  }

  .mobile-bar .logo-break {
    display: inline;
  }

  .mobile-bar .logo-break::before {
    content: " ";
  }

  .mobile-bar .hamburger {
    margin-right: 48px;
  }

  .cart-btn {
    top: 8px;
    right: 8px;
    z-index: 41;
  }

  #content {
    margin-left: 0;
    padding: 12px 12px 48px;
  }

  .masonry {
    display: block;
  }

  .asset {
    width: 100%;
    padding: 0 0 16px;
  }

  .about-hero,
  .product-detail {
    grid-template-columns: 1fr;
  }

  .product-detail img {
    width: 70%;
    max-width: 260px;
    margin: 0 auto 16px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px 12px;
  }

  .work-more {
    grid-template-columns: 1fr 1fr;
  }

  .work-layout {
    grid-template-columns: 1fr;
  }

  .work-page {
    padding-right: 0;
  }

  .work-page .work-hero,
  .work-info,
  .work-process {
    width: 100%;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Same width as the centred photo so the link starts at its left edge. */
  body.work .back-link {
    display: block;
    max-width: 520px;
    margin: 24px auto 8px;
  }

  .work-page img,
  .work-page .work-more {
    width: 100%;
  }
}
