:root {
  --paper: #fbf9f4;
  --ink: #221f1c;
  --soft: #6f6860;
  --rule: #d9d3c7;
  --rust: #a4532e;
  --serif: "EB Garamond", Georgia, serif;
  --type: "Courier Prime", "Courier New", monospace;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 19px/1.55 var(--serif);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3 { font-weight: 400; margin: 0; }
h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1; letter-spacing: -.01em; }

/* typewritten labels */
.tag { font: 13px/1.6 var(--type); color: var(--soft); }

.arrow-link {
  display: inline-block;
  font: 15px var(--type);
  color: var(--ink);
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 5px;
}
.arrow-link:hover { color: var(--rust); }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.wordmark { font-size: 1.35rem; text-decoration: none; }
.wordmark span, .big-mark span { color: var(--rust); }
.nav nav { display: flex; gap: 22px; font: 14px var(--type); }
.nav nav a { text-decoration: none; }
.nav nav a:hover { text-decoration: underline; }

/* hero */
.hero {
  display: grid;
  grid-template-columns: 7fr 5fr;
  grid-template-areas: "mark mark" "body img";
  gap: 0 var(--gutter);
  padding: 24px var(--gutter) clamp(48px, 8vw, 96px);
}
.big-mark {
  grid-area: mark;
  font-size: clamp(4rem, 17vw, 15rem);
  line-height: .9;
  letter-spacing: -.035em;
  margin: 0 0 clamp(24px, 4vw, 48px) -.05em;
}
.hero-body { grid-area: body; max-width: 30em; padding-top: 6px; }
.hero-body .tag { margin: 0 0 1.2rem; }
.intro { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.35; margin: 0 0 1rem; }
.intro.small { font-size: 1.1rem; color: var(--soft); margin-bottom: 2rem; }
.hero-img { grid-area: img; margin: 0; transform: translateY(-14%); }
.hero-img img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }

/* sections */
.section { padding: clamp(48px, 8vw, 96px) var(--gutter); border-top: 1px solid var(--ink); }

/* shop */
.shop-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 40px; margin-bottom: 12px; }
.filters { display: grid; gap: 2px; }
.filter-group { margin: 0; display: flex; flex-wrap: wrap; gap: 0 14px; align-items: baseline; }
.filter-group .tag { width: 3.5em; }
.filter-group button {
  font: 14px var(--type); color: var(--soft);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.filter-group button:hover { color: var(--ink); }
.filter-group button.active { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.collection-note { max-width: 34em; color: var(--soft); margin: 0 0 40px; min-height: 1.5em; }

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 40px 20px;
}
.grid li:nth-child(7n+1) { grid-column: span 2; }
.grid li:nth-child(7n+1) img { aspect-ratio: 8/5; }
.card { display: block; width: 100%; background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.card:hover img { filter: brightness(.94); }
.card .cap { display: flex; gap: 10px; margin-top: 10px; }
.card .no { font: 13px/1.9 var(--type); color: var(--soft); }
.card .name { font-size: 1.15rem; line-height: 1.3; }
.card .name small { display: block; font: 12px var(--type); color: var(--soft); }

/* about */
.about { display: grid; grid-template-columns: 7fr 4fr; gap: var(--gutter); align-items: start; }
.about-text { max-width: 36em; }
.about-text h2 { margin-bottom: 1.6rem; }
.about-text p:first-of-type::first-letter { font-size: 3.4em; float: left; line-height: .8; padding: 6px 8px 0 0; }
.route { margin-top: 2rem; padding-top: 1rem; border-top: 1px dashed var(--rule); }
.about-img { margin: 80px 0 0; }
.about-img img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }

/* contact */
.contact h2 { margin-bottom: 1.6rem; }
.contact-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.lines { line-height: 2; }
.form { display: grid; gap: 18px; align-content: start; }
.form label { display: grid; gap: 2px; font: 13px var(--type); color: var(--soft); }
.form input, .form textarea {
  font: 1.1rem var(--serif); color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  padding: 6px 0; resize: vertical; border-radius: 0;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--ink); }
.form .arrow-link { justify-self: start; margin-top: 8px; }

/* footer */
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 20px var(--gutter); border-top: 1px solid var(--ink); }

/* product dialog */
dialog {
  border: 1px solid var(--ink); padding: 0; background: var(--paper); color: var(--ink);
  width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
}
dialog::backdrop { background: rgba(34, 31, 28, .45); }
.close { position: absolute; top: 12px; right: 16px; z-index: 1; background: var(--paper); border: 0; padding: 2px 6px; font: 13px var(--type); cursor: pointer; }
.pd { display: grid; grid-template-columns: 1fr 1fr; }
.pd img { width: 100%; height: 100%; max-height: calc(100vh - 32px); object-fit: cover; }
.pd-info { padding: clamp(24px, 4vw, 48px); align-self: end; display: grid; gap: 12px; justify-items: start; }
.pd-info h3 { font-size: 2.2rem; line-height: 1.05; }
.pd-info p { margin: 0; }

@media (max-width: 760px) {
  body { font-size: 18px; }
  .hero { grid-template-columns: 1fr; grid-template-areas: "mark" "img" "body"; }
  .hero-img { transform: none; margin-bottom: 28px; }
  .about, .contact-cols, .pd { grid-template-columns: 1fr; }
  .about-img { margin: 0; }
  .grid { grid-template-columns: 1fr 1fr; gap: 28px 12px; }
  .grid li:nth-child(7n+1) img { aspect-ratio: 4/3; }
  .pd img { max-height: 50vh; }
}
