/* onielegy.com: ink black, paper-coloured words, a red seal. The pictures are the light in the room. */
:root {
  --ink: #0b0909;
  --ink-2: #141010;
  --ink-3: #1e1918;
  --line: rgba(236, 220, 192, 0.14);
  --paper: #ecdcc0;
  --paper-2: #b9aa90;
  --paper-3: #7d7262;
  --red: #a3291c;
  --red-hi: #c23a29;
  --glow: 255, 46, 30;
  --serif: "Shippori Mincho", "Songti SC", "Hiragino Mincho ProN", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--ink); color: var(--paper);
  font: 16px/1.6 var(--sans); overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 3px; }

/* paper grain over everything, very faint */
.grain {
  position: fixed; inset: -50%; pointer-events: none; z-index: 50; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- header and footer */
.top {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter); background: linear-gradient(var(--ink) 60%, rgba(11, 9, 9, 0));
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand span { font: 600 22px/1 var(--serif); letter-spacing: 0.04em; }
.seal { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5)); }
.top nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); font-size: 14px; letter-spacing: 0.06em; }
.top nav a { text-decoration: none; color: var(--paper-2); }
.top nav a:hover { color: var(--paper); }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: none; font-size: 14px; letter-spacing: 0.06em;
}
.cart-btn b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ink-3); font-size: 12px; }
.cart-btn.has b { background: var(--red); color: var(--paper); }
.foot {
  margin-top: 120px; padding: 64px var(--gutter) 48px; border-top: 1px solid var(--line); text-align: center; color: var(--paper-2);
}
.foot-seal .seal { width: 46px; height: 46px; margin: 0 auto 18px; }
.foot-line { font: 400 18px/1.7 var(--serif); color: var(--paper); margin: 0 0 22px; }
.foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 26px; font-size: 14px; }
.foot nav a { color: var(--paper-2); text-decoration: none; }
.foot nav a:hover { color: var(--paper); }
.foot-small { font-size: 12px; color: var(--paper-3); margin-top: 26px; }

/* ---------------------------------------------------------------- shared */
.kicker { font: 600 11px/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--paper-3); margin: 0 0 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 30px; border: 0; border-radius: 2px;
  background: var(--red); color: var(--paper); text-decoration: none; font: 600 15px/1 var(--sans); letter-spacing: 0.08em;
  box-shadow: 0 0 0 0 rgba(var(--glow), 0); transition: background .2s, box-shadow .3s, transform .2s;
}
.btn:hover { background: var(--red-hi); box-shadow: 0 0 34px -6px rgba(var(--glow), 0.6); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.ig { display: inline-block; font-size: 14px; color: var(--paper-2); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.ig:hover { color: var(--paper); border-color: var(--paper-3); }

/* an artwork: the picture, its eyes, and on .framed a thin paper line around it, like the Reels */
.art { position: relative; display: block; line-height: 0; }
.art img { width: 100%; height: auto; }
.art.framed { padding: 10px; background: var(--ink); outline: 1px solid rgba(236, 220, 192, 0.42); outline-offset: -1px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9); }
.art.framed .eye { margin: 10px; }
.eye {
  position: absolute; width: calc(var(--r) * 6); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--glow), 0.95) 0, rgba(var(--glow), 0.55) 18%, rgba(var(--glow), 0.12) 42%, rgba(var(--glow), 0) 68%);
  mix-blend-mode: screen; opacity: 0; animation: breathe 7s ease-in-out infinite;
}
.art.framed .eye { translate: calc(-50% - 10px) calc(-50% - 10px); }
@keyframes breathe { 0%, 100% { opacity: 0.05; } 50% { opacity: 0.95; } }
a:hover .eye, .art:hover .eye { animation-duration: 2.4s; }
@media (prefers-reduced-motion: reduce) { .eye { animation: none; opacity: 0.6; } }

/* ---------------------------------------------------------------- home */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); align-items: center;
  min-height: calc(100vh - 80px); padding: 24px var(--gutter) 64px; max-width: 1280px; margin: 0 auto;
}
.hero-art { max-width: 480px; justify-self: end; width: 100%; animation: rise 1.4s cubic-bezier(.2, .7, .1, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: brightness(0.2); } to { opacity: 1; transform: none; filter: none; } }
.hero-words h1 { font: 600 clamp(30px, 4.4vw, 58px)/1.18 var(--serif); margin: 0 0 22px; letter-spacing: 0.005em; text-wrap: balance; }
.lede { color: var(--paper-2); max-width: 30em; margin: 0 0 34px; font-size: 17px; }
.sec-head { padding: 0 var(--gutter); max-width: 1280px; margin: 0 auto 28px; display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.sec-head h2 { font: 600 clamp(24px, 3vw, 34px)/1.2 var(--serif); margin: 0; }
.sec-head p { margin: 0; color: var(--paper-3); font-size: 14px; }
.posts { position: relative; padding-top: 40px; }
/* the lantern: the grid sits in the dark, and a warm light follows the pointer */
.home .posts::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; transition: opacity .6s;
  background: radial-gradient(520px circle at var(--lx, 50%) var(--ly, 30%), rgba(255, 170, 90, 0.07), rgba(11, 9, 9, 0) 60%),
              radial-gradient(900px circle at var(--lx, 50%) var(--ly, 30%), rgba(11, 9, 9, 0) 30%, rgba(11, 9, 9, 0.38) 75%);
}
@media (hover: none) { .home .posts::after { display: none; } }
.post-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(28px, 4vw, 54px) clamp(18px, 3vw, 36px);
  padding: 0 var(--gutter); max-width: 1280px; margin: 0 auto;
}
.pc { display: flex; flex-direction: column; gap: 14px; }
.pc-arts { display: grid; gap: 6px; }
.pc.n2 .pc-arts { grid-template-columns: 1fr 1fr; }
.pc.n3 .pc-arts { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.pc.n3 .pc-art:first-child { grid-row: span 2; }
.pc-art { position: relative; overflow: hidden; background: var(--ink-2); }
.pc-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .1, 1), filter .6s; filter: brightness(0.86); }
.pc-art:hover img { transform: scale(1.035); filter: brightness(1.04); }
.pc-words { text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.pc-lines { font: 400 17px/1.45 var(--serif); display: flex; flex-direction: column; }
.pc-meta { font-size: 12px; letter-spacing: 0.08em; color: var(--paper-3); }
.pc-words:hover .pc-meta { color: var(--paper-2); }

/* ---------------------------------------------------------------- a post */
.post-page { padding: 40px var(--gutter) 0; max-width: 1280px; margin: 0 auto; text-align: center; }
.poem { font: 600 clamp(24px, 3.4vw, 42px)/1.4 var(--serif); margin: 0 auto 22px; max-width: 26em; display: flex; flex-direction: column; text-wrap: balance; }
.pp-grid { display: grid; gap: clamp(22px, 4vw, 56px); margin-top: 54px; justify-content: center; }
.pp-grid.n1 { grid-template-columns: minmax(0, 460px); }
.pp-grid.n2 { grid-template-columns: repeat(2, minmax(0, 420px)); }
.pp-grid.n3 { grid-template-columns: repeat(3, minmax(0, 380px)); }
.pp-art { text-decoration: none; display: flex; flex-direction: column; gap: 14px; }
.pp-line { font: 400 17px/1.45 var(--serif); }
.pp-go { font-size: 13px; letter-spacing: 0.08em; color: var(--red-hi); }
.pp-art:hover .pp-go { color: var(--paper); }

/* ---------------------------------------------------------------- an art: the product picker */
.art-page {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(28px, 5vw, 80px);
  padding: 24px var(--gutter) 0; max-width: 1280px; margin: 0 auto; align-items: start;
}
.ap-stage { position: sticky; top: 76px; }
.ap-mock {
  position: relative; display: grid; place-items: center; aspect-ratio: 6 / 7; border-radius: 4px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 25%, #e9dfcc 0, #d8cbb2 55%, #c2b296 100%);
}
/* the artwork alone (before a product is picked) still sits in the dark */
.ap-mock:has(> .art) { background: radial-gradient(120% 90% at 50% 30%, #2a2220 0, #161211 55%, #0e0b0b 100%); }
.ap-mock > .art { width: min(78%, 460px); }
.ap-mock svg { width: 100%; height: 100%; display: block; animation: settle .5s cubic-bezier(.2, .7, .1, 1); }
@keyframes settle { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
.ap-side h1 { font: 600 clamp(26px, 3.2vw, 40px)/1.25 var(--serif); margin: 0 0 14px; text-wrap: balance; }
.picker { margin-top: 34px; display: flex; flex-direction: column; gap: 22px; }
.pk-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.pk-products button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 9px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--ink-2); text-align: center; transition: border-color .2s, background .2s;
}
.pk-products button svg { width: 52px; height: 52px; border-radius: 3px; background: radial-gradient(circle at 50% 35%, #e6dcc8, #cbbca2); }
.pk-products button span { font-size: 13px; }
.pk-products button small { font-size: 11px; color: var(--paper-3); }
.pk-products button:hover { border-color: rgba(236, 220, 192, 0.32); }
.pk-products button[aria-checked="true"] { border-color: var(--red-hi); background: #1d1311; }
.pk-row { display: flex; flex-direction: column; gap: 10px; }
.pk-row[hidden] { display: none; }
.pk-label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper-3); }
.pk-label em { font-style: normal; color: var(--paper-2); letter-spacing: 0.04em; text-transform: none; margin-left: 6px; }
.pk-colours { display: flex; flex-wrap: wrap; gap: 10px; }
.pk-colours button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(236, 220, 192, 0.3); padding: 0; box-shadow: inset 0 0 0 3px var(--ink); }
.pk-colours button[aria-checked="true"] { outline: 2px solid var(--red-hi); outline-offset: 2px; }
.pk-sizes, .pk-words { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-sizes button, .pk-words button {
  min-width: 52px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 3px; background: none; font-size: 14px; color: var(--paper-2);
}
.pk-sizes button[aria-checked="true"], .pk-words button.on { border-color: var(--paper); color: var(--paper); background: var(--ink-3); }
.pk-blurb { margin: 0; color: var(--paper-2); font-size: 14px; }
.pk-buy { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.pk-price { font: 600 28px/1 var(--serif); }
.pk-buy .btn { flex: 1; max-width: 260px; }
.pk-note { margin: 0; font-size: 12px; color: var(--paper-3); }
.more { max-width: 1280px; margin: 100px auto 0; padding: 0 var(--gutter); }
.more h2 { font: 600 22px/1.2 var(--serif); margin: 0 0 22px; }
.more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 220px)); gap: 20px; }
.more-grid a { text-decoration: none; display: flex; flex-direction: column; gap: 10px; font: 400 14px/1.4 var(--serif); color: var(--paper-2); }
.more-grid a:hover { color: var(--paper); }
.more-grid img, .pp-art img { width: 100%; height: auto; }

/* ---------------------------------------------------------------- the bag */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); }
.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(440px, 100vw); display: flex; flex-direction: column;
  background: var(--ink-2); border-left: 1px solid var(--line); box-shadow: -30px 0 80px rgba(0, 0, 0, 0.6);
  animation: slide .35s cubic-bezier(.2, .7, .1, 1);
}
@keyframes slide { from { transform: translateX(100%); } to { transform: none; } }
.cart[hidden], .scrim[hidden] { display: none; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font: 600 22px/1 var(--serif); margin: 0; }
.x { border: 0; background: none; font-size: 18px; color: var(--paper-2); padding: 6px; }
.cart-items { flex: 1; overflow-y: auto; padding: 8px 22px; }
.ci { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.ci-mock { width: 76px; height: 88px; border-radius: 3px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #e6dcc8, #cbbca2); }
.ci-mock svg { width: 100%; height: 100%; }
.ci-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ci-main b { font: 600 14px/1.3 var(--serif); }
.ci-main span { font-size: 12px; color: var(--paper-2); }
.ci-main em { font-style: normal; font-size: 12px; color: var(--paper-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-side { display: flex; flex-direction: column; align-items: end; gap: 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 3px; }
.qty button { width: 26px; height: 26px; border: 0; background: none; color: var(--paper-2); }
.qty span { min-width: 18px; text-align: center; font-size: 13px; }
.cart-foot { padding: 18px 22px 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.cf-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--paper-2); }
.cf-row.total { font: 600 20px/1 var(--serif); color: var(--paper); }
.cart-foot .btn { width: 100%; }
.cart-empty { padding: 40px 0; text-align: center; color: var(--paper-3); font: 400 17px/1.5 var(--serif); }
.soon { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid rgba(194, 58, 41, 0.5); border-radius: 4px; background: rgba(163, 41, 28, 0.08); }
.soon p { margin: 0; font-size: 14px; }
.soon form { display: flex; gap: 8px; }
.soon input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--ink); color: var(--paper); font-size: 15px; }
.soon .btn { padding: 10px 16px; width: auto; }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 70; translate: -50% 0; padding: 12px 20px; border-radius: 3px;
  background: var(--paper); color: var(--ink); font-size: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); animation: toast 2.6s both;
}
@keyframes toast { 0% { opacity: 0; transform: translateY(10px); } 12%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ---------------------------------------------------------------- plain pages */
.text-page { max-width: 680px; margin: 0 auto; padding: 48px var(--gutter) 0; }
.text-page h1 { font: 600 clamp(30px, 4vw, 46px)/1.2 var(--serif); margin: 0 0 30px; }
.text-page h2 { font: 600 20px/1.3 var(--serif); margin: 36px 0 10px; }
.text-page p { color: var(--paper-2); font-size: 17px; line-height: 1.75; }
.text-page .big, .order .big { font: 400 24px/1.5 var(--serif); color: var(--paper); }
.text-page a { color: var(--paper); }
.order { min-height: 40vh; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 8px; text-align: center; }
  .hero-art { justify-self: center; max-width: 380px; }
  .lede { margin-left: auto; margin-right: auto; }
  .art-page { grid-template-columns: 1fr; }
  .ap-stage { position: static; }
  .pp-grid.n2, .pp-grid.n3 { grid-template-columns: minmax(0, 420px); }
  .top nav a[href$="about/"] { display: none; }
}
@media (max-width: 420px) {
  .brand span { font-size: 20px; }
  .seal { width: 30px; height: 30px; }
  .pk-products { grid-template-columns: repeat(4, 1fr); }
  .pk-products button small { display: none; }
}
