/* FineCones
   Slate is the bench paper the pendants are photographed on. Bone is the pale heart of a cone.
   The only warm color on the page is the pine itself.
   Spacing runs on Fibonacci numbers (5 8 13 21 34 55 89 144) and type steps by √φ,
   the same arithmetic that arranges a cone's scales. */

@font-face { font-family: "Young Serif"; src: url("/fonts/young-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/hanken-grotesk.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --slate: #31353a;
  --slate-2: #3c4147;
  --line: #4d535a;
  --bone: #efe6d6;
  --bone-2: #d9d1c1;
  --lichen: #b9b597;
  --amber: #e3a65f;

  --s1: 0.3125rem; --s2: 0.5rem; --s3: 0.8125rem; --s4: 1.3125rem;
  --s5: 2.125rem;  --s6: 3.4375rem; --s7: 5.5625rem; --s8: 9rem;

  --t-1: 0.875rem; --t0: 1.0625rem; --t1: 1.3125rem; --t2: 1.6875rem; --t3: 2.125rem;
  --t4: 2.6875rem; --t5: 3.4375rem; --t6: 4.375rem; --t7: 5.5625rem;

  --serif: "Young Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 75rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--slate) url("/images/grain.png");
  color: var(--bone);
  font: 400 var(--t0)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -0.012em; text-wrap: balance; }
h1 { font-size: clamp(var(--t4), 8.6vw, var(--t7)); }
h2 { font-size: clamp(var(--t3), 4.6vw, var(--t4)); }
h3 { font-size: var(--t1); letter-spacing: 0; }
p { margin: 0 0 var(--s4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

.quiet { color: var(--lichen); }
.lead { font-size: var(--t1); line-height: 1.5; max-width: 33em; }
.wrap { width: min(100% - 2 * var(--s4), var(--wrap)); margin-inline: auto; }
.narrow { max-width: 42rem; }
.skip { position: absolute; left: var(--s3); top: -5rem; z-index: 30; padding: var(--s2) var(--s3); border-radius: 4px; background: var(--bone); color: var(--slate); }
.skip:focus { top: var(--s3); }

/* ---------- buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.6rem;
  border: 1px solid var(--bone); border-radius: 999px;
  background: var(--bone); color: var(--slate);
  font: 600 var(--t0)/1 var(--sans); text-decoration: none; cursor: pointer;
}
.button:hover { background: #fff7e8; }
.button[disabled] { background: none; border-color: var(--line); color: var(--lichen); cursor: not-allowed; }
.button.is-added { background: none; color: var(--bone); }
.button-wide { width: 100%; }
.text-button { padding: 0; border: 0; background: none; color: var(--lichen); font: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; cursor: pointer; }
.text-button:hover { color: var(--bone); }
.quiet-link { margin-left: var(--s3); color: var(--lichen); }
.quiet-link:hover { color: var(--bone); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgb(49 53 58 / 0.9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgb(77 83 90 / 0.55);
}
.site-header-row { display: flex; align-items: center; gap: var(--s4); min-height: var(--s6); }
.brand { display: inline-flex; align-items: center; gap: var(--s2); margin-right: auto; font-family: var(--serif); font-size: var(--t1); text-decoration: none; }
.mark { flex: none; }
.site-nav { display: none; gap: var(--s4); }
.site-nav a { color: var(--lichen); text-decoration: none; }
.site-nav a:hover { color: var(--bone); }
@media (min-width: 760px) { .site-nav { display: flex; } }
.cart-button { padding: 0.35rem 0.75rem 0.35rem 0.95rem; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--bone); font: inherit; cursor: pointer; }
.cart-button:hover { border-color: var(--lichen); }
.cart-button.has-items { border-color: var(--bone); }
.cart-count { display: inline-block; min-width: 1.3em; text-align: center; color: var(--lichen); font-variant-numeric: tabular-nums; }
.has-items .cart-count { color: var(--bone); }

/* The one bit of choreography: on load, the mark's dots arrive from the center out, the order a cone grows them in. */
@media (prefers-reduced-motion: no-preference) {
  .brand .mark circle { transform-origin: 50px 50px; animation: bloom 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i) * 16ms); }
  @keyframes bloom { from { opacity: 0; transform: scale(0.35); } }
}

/* ---------- hero ---------- */
.hero { padding-top: var(--s6); overflow: hidden; }
.hero-copy { display: grid; gap: var(--s4) var(--s6); }
.hero h1 { max-width: 12.5ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s4); }
.hero-actions .quiet-link { margin-left: 0; }
@media (min-width: 900px) {
  .hero { padding-top: var(--s7); }
  .hero-copy { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; }
  .hero-side { padding-bottom: var(--s2); }
}
/* The tray photo's paper was matched to --slate, so with soft edges the pendants sit on the page itself. */
.hero-tray { display: block; max-width: 125rem; margin: var(--s4) auto 0; }
.hero-tray img {
  width: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 80%, transparent), linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 80%, transparent), linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
  mask-composite: intersect;
}

/* ---------- sections ---------- */
.section { padding-block: var(--s7); }
.hero + .section { padding-top: var(--s5); }
.section-head { display: grid; gap: var(--s3); max-width: 40rem; margin-bottom: var(--s6); }
.section h2 + .grid { margin-top: var(--s5); }
.page-top { padding-block: var(--s6) var(--s7); }
.page-top h1 { font-size: clamp(var(--t4), 6vw, var(--t6)); margin-bottom: var(--s4); }

/* ---------- product grid: columns sit at staggered heights, like pieces laid out on the bench ---------- */
.grid { list-style: none; margin: 0; padding: 0 0 var(--s5); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) var(--s3); }
.grid > li:nth-child(2n) { translate: 0 var(--s5); }
@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6) var(--s4); padding-bottom: var(--s6); }
  .grid > li:nth-child(2n) { translate: none; }
  .grid > li:nth-child(3n + 2) { translate: 0 var(--s6); }
  .grid-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-row > li:nth-child(3n + 2) { translate: none; }
  .grid-row > li:nth-child(2n) { translate: 0 var(--s5); }
}
@media (min-width: 1180px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid > li:nth-child(3n + 2) { translate: none; }
  .grid > li:nth-child(2n) { translate: 0 var(--s6); }
}
.card-link { display: block; text-decoration: none; }
.card-photo { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 5px; background: var(--slate-2); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-text { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); margin-top: var(--s3); }
.card-name { font-family: var(--serif); font-size: var(--t1); line-height: 1.15; }
.card-price { color: var(--lichen); font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-link:hover .card-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.card.is-sold .card-photo img { filter: grayscale(0.75) brightness(0.6); }
.card.is-held .card-photo img { filter: brightness(0.78); }

/* ---------- how they're made ---------- */
.section-made { background: rgb(60 65 71 / 0.55); border-block: 1px solid rgb(77 83 90 / 0.5); }
.made { display: grid; gap: var(--s6); }
.made-copy .lead { margin-top: var(--s4); }
.steps { list-style: none; counter-reset: step; margin: var(--s5) 0 0; padding: 0; display: grid; gap: var(--s4); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.125rem 1fr; column-gap: var(--s3); }
.steps li::before { content: counter(step); grid-row: span 2; font-family: var(--serif); font-size: var(--t2); line-height: 1; color: var(--lichen); }
.steps h3, .steps p { grid-column: 2; }
.steps p { margin: var(--s1) 0 0; color: var(--bone-2); max-width: 30em; }
.made-photo { margin: 0; }
.made-photo img { width: 100%; border-radius: 5px; }
.made-photo figcaption { margin-top: var(--s2); font-size: var(--t-1); }
@media (min-width: 900px) { .made { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; gap: var(--s7); } }

/* ---------- custom request ---------- */
.custom { display: grid; gap: var(--s5); }
.custom-copy p { margin-top: var(--s4); max-width: 30em; color: var(--bone-2); }
@media (min-width: 900px) { .custom { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s7); } }
.form { display: grid; gap: var(--s4); justify-items: start; }
.field { display: grid; gap: var(--s1); width: 100%; }
.field span { font-size: var(--t-1); color: var(--lichen); }
.field input, .field textarea { width: 100%; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 6px; background: var(--slate-2); color: var(--bone); font: inherit; }
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 1px; border-color: var(--bone); }
.hp { position: absolute; left: -999rem; }
.form-note { min-height: 1.6em; margin: 0; color: var(--bone-2); }

/* ---------- good to know ---------- */
.facts { margin: var(--s5) 0 0; display: grid; gap: var(--s5) var(--s7); }
.facts dt { margin-bottom: var(--s1); font-family: var(--serif); font-size: var(--t1); }
.facts dd { margin: 0; max-width: 32em; color: var(--bone-2); }
@media (min-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } }

/* ---------- product page ---------- */
.product { padding-block: var(--s4) var(--s6); }
.crumb { margin-bottom: var(--s4); color: var(--lichen); }
.product-layout { display: grid; gap: var(--s5); }
.gallery { display: flex; gap: var(--s3); margin-inline: calc(-1 * var(--s4)); padding-inline: var(--s4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 86%; width: 86%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 5px; background: var(--slate-2); scroll-snap-align: center; }
.gallery-single img { flex-basis: 100%; width: 100%; }
.product-info h1 { font-size: clamp(var(--t4), 6vw, var(--t6)); }
.product-price { margin: var(--s2) 0 var(--s4); font-size: var(--t2); font-variant-numeric: tabular-nums; }
.status-note { margin-top: var(--s3); }
.prose { margin-top: var(--s5); color: var(--bone-2); }
.prose p { max-width: 36em; }
.prose h2 { margin: var(--s6) 0 var(--s3); font-size: var(--t3); color: var(--bone); }
.specs { margin: var(--s5) 0 0; }
.specs div { display: grid; grid-template-columns: 6.5rem 1fr; gap: var(--s3); padding-block: var(--s3); border-top: 1px solid var(--line); }
.specs div:last-child { border-bottom: 1px solid var(--line); }
.specs dt { color: var(--lichen); }
.specs dd { margin: 0; }
.notes { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s1); font-size: var(--t-1); }
@media (min-width: 900px) {
  .product-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--s6); align-items: start; }
  .product-info { position: sticky; top: 5rem; }
  .gallery { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 0; overflow: visible; }
  .gallery img { width: 100%; }
  .gallery img:first-child, .gallery img:last-child:nth-child(2) { grid-column: 1 / -1; }
}

/* ---------- thank-you ---------- */
.mark-xl { margin-bottom: var(--s4); color: var(--lichen); }
.thanks-items { margin: 0 0 var(--s4); padding: 0; list-style: none; font-family: var(--serif); font-size: var(--t2); }

/* ---------- footer ---------- */
.site-footer { margin-top: var(--s6); padding-block: var(--s6); border-top: 1px solid rgb(77 83 90 / 0.55); }
.site-footer-row { display: grid; gap: var(--s4); }
.footer-brand { display: flex; align-items: center; gap: var(--s3); font-family: var(--serif); font-size: var(--t1); line-height: 1.25; }
.footer-brand p { margin: 0; }
.footer-brand .quiet { font-family: var(--sans); font-size: var(--t0); }
.mark-lg { color: var(--lichen); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.footer-legal { margin: 0; font-size: var(--t-1); }
@media (min-width: 760px) { .site-footer-row { grid-template-columns: 1fr auto; align-items: center; } .footer-legal { grid-column: 1 / -1; } }

/* ---------- cart drawer ---------- */
.cart { width: min(27rem, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; padding: 0; border: 0; background: var(--slate-2); color: var(--bone); box-shadow: -1.5rem 0 4rem rgb(0 0 0 / 0.35); }
.cart::backdrop { background: rgb(24 26 29 / 0.62); }
@media (prefers-reduced-motion: no-preference) {
  .cart[open] { animation: drawer 0.28s cubic-bezier(0.2, 0.7, 0.2, 1); }
  @keyframes drawer { from { translate: 100% 0; } }
}
.cart-inner { display: flex; flex-direction: column; height: 100%; padding: var(--s4); }
.cart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s4); }
.cart-head h2 { font-size: var(--t2); }
.cart-notice { margin: 0 0 var(--s4); padding: var(--s3); border: 1px solid rgb(227 166 95 / 0.55); border-radius: 6px; background: rgb(227 166 95 / 0.12); }
.cart-items { flex: 1; list-style: none; margin: 0; padding: 0; overflow-y: auto; display: grid; align-content: start; gap: var(--s3); }
.cart-item { display: grid; grid-template-columns: 4rem 1fr auto; align-items: center; gap: var(--s3); }
.cart-item img { width: 4rem; height: 5rem; object-fit: cover; border-radius: 4px; }
.cart-item-name { font-family: var(--serif); font-size: var(--t1); text-decoration: none; }
.cart-item-name:hover { text-decoration: underline; }
.cart-item-side { text-align: right; display: grid; gap: var(--s1); justify-items: end; font-variant-numeric: tabular-nums; }
.cart-item .text-button { font-size: var(--t-1); }
.cart-empty { flex: 1; display: grid; align-content: center; justify-items: start; gap: var(--s2); }
.cart-empty p { margin: 0; }
.cart-empty .button { margin-top: var(--s3); }
.cart-foot { display: grid; gap: var(--s3); padding-top: var(--s4); border-top: 1px solid var(--line); }
.totals { margin: 0; display: grid; gap: var(--s1); }
.totals div { display: flex; justify-content: space-between; gap: var(--s3); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.totals-total { padding-top: var(--s2); font-size: var(--t1); font-weight: 600; }
.cart-fine { margin: 0; font-size: var(--t-1); }
