/* Nile Reed papyrus store. One family (Fraunces), soft papyrus palette,
   lapis blue saved for the main action. Spacing scale 4, 8, 16, 24, 48, 72. */

:root {
  --page: #f7f1e5;
  --card: #fffdf8;
  --band: #efe5d1;
  --ink: #2a2118;
  --ink-soft: #5c4f40;
  --line: #e2d6bf;
  --lapis: #1e3a6e;
  --lapis-hover: #16305c;
  --gold: #7a5718;
  --gold-soft: #e8c37a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(60, 40, 10, 0.12);
  --container: 1200px;
  --font: "Fraunces", Georgia, "Times New Roman", serif;
  --glyph: "Noto Sans Egyptian Hieroglyphs", "Segoe UI Historic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: clip;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lapis); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 16px; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.05rem; margin-top: 24px; }
p { margin: 0 0 16px; }

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--card); padding: 8px 16px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}
.lead { font-size: 1.15rem; line-height: 1.65; color: var(--ink-soft); max-width: 40rem; }
.sub { color: var(--ink-soft); max-width: 42rem; }
.fine { font-size: 0.85rem; color: var(--ink-soft); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font: 600 1rem/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--lapis); color: #fff; }
.btn-primary:hover { background: var(--lapis-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-soft); }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--lapis); font: 600 0.95rem var(--font); text-decoration: underline; cursor: pointer; }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 241, 229, 0.92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.topnav { display: flex; gap: 24px; margin-left: auto; }
.topnav a { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
.topnav a:hover { color: var(--ink); }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink);
  font: 600 0.95rem var(--font); cursor: pointer;
}
.cart-count {
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 999px; background: var(--lapis); color: #fff; font-size: 0.8rem;
}
@media (max-width: 760px) {
  .topnav { display: none; }
  .cart-btn { margin-left: auto; }
}

/* Hero */
.hero { padding: 48px 0 72px; }
.hero-in { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0; }
.proof { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--ink-soft); font-size: 0.95rem; }
.proof strong { color: var(--ink); }
.hero-art { position: relative; aspect-ratio: 1 / 0.9; }
.hero-img {
  position: absolute;
  width: 58%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--card);
}
.hero-img-a { left: 21%; top: 4%; z-index: 3; animation: floaty 7s ease-in-out infinite; }
.hero-img-b { left: 0; top: 22%; width: 44%; transform: rotate(-6deg); z-index: 2; }
.hero-img-c { right: 0; top: 26%; width: 44%; transform: rotate(6deg); z-index: 1; }
@keyframes floaty { 50% { transform: translateY(-10px); } }
@media (max-width: 900px) {
  .hero { padding-top: 24px; }
  .hero-in { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { order: -1; max-width: 520px; width: 100%; margin-inline: auto; }
}

/* Sections */
.section { padding: 72px 0; }
.band { background: var(--band); }
.section-head { margin-bottom: 24px; }
@media (max-width: 760px) { .section { padding: 48px 0; } }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip {
  min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-soft);
  font: 500 0.95rem var(--font); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--page); }

/* Grid */
.grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: rise 0.35s ease both;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-img { aspect-ratio: 1; object-fit: cover; width: 100%; background: #fff; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 1.05rem; font-weight: 600; margin: 0; }
.card-hook { color: var(--ink-soft); font-size: 0.92rem; margin: 0; flex: 1; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 16px 16px; }
.card-price { font-weight: 700; font-size: 1.1rem; }
.card-add {
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--lapis); background: transparent; color: var(--lapis);
  font: 600 0.9rem var(--font); cursor: pointer;
}
.card-add:hover { background: var(--lapis); color: #fff; }

/* Name maker */
.maker { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; }
.field-label { display: block; font-weight: 600; margin: 8px 0; }
.field {
  width: 100%; max-width: 360px; min-height: 52px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--card);
  font: 500 1.15rem var(--font); color: var(--ink);
}
.field:focus { border-color: var(--lapis); outline: none; box-shadow: 0 0 0 3px rgba(30, 58, 110, 0.18); }
.maker-actions { display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0 16px; }
.maker-out { display: grid; justify-items: center; gap: 24px; }
.cartouche {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 220px; min-height: 120px; max-width: 100%;
  padding: 24px 48px 24px 40px;
  border: 5px solid var(--gold);
  border-radius: 999px;
  background: #fbf3df;
  font-family: var(--glyph);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1;
  color: var(--ink);
  flex-wrap: wrap;
}
.cartouche::after {
  content: ""; position: absolute; right: -16px; top: 18%; bottom: 18%;
  width: 6px; border-radius: 3px; background: var(--gold);
}
.cartouche .g { display: inline-block; animation: pop 0.25s ease both; }
@keyframes pop { from { opacity: 0; transform: scale(0.6); } }
.glyph-key { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.glyph-key li {
  display: grid; justify-items: center; gap: 4px;
  min-width: 64px; padding: 8px; border-radius: 10px; background: var(--card); border: 1px solid var(--line);
  font-size: 0.78rem; color: var(--ink-soft); text-align: center;
}
.glyph-key .kg { font-family: var(--glyph); font-size: 1.6rem; color: var(--ink); line-height: 1.1; }
.glyph-key b { color: var(--ink); font-size: 0.9rem; }
@media (max-width: 900px) { .maker { grid-template-columns: 1fr; gap: 24px; } }

/* Split */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; }
.split-art img { border-radius: var(--radius); box-shadow: var(--shadow); max-height: 560px; width: auto; margin-inline: auto; }
.steps { padding-left: 24px; margin: 0; display: grid; gap: 16px; color: var(--ink-soft); }
.steps strong { color: var(--ink); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gold); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { color: var(--ink-soft); margin: 8px 0 0; max-width: 42rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 24px 0; }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer a { color: var(--ink-soft); text-decoration: none; }
.brand-small { font-weight: 700; }

/* Sticky bar (phones) */
.sticky-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 8px 8px 20px;
  background: var(--ink); color: var(--page);
  border-radius: 999px; box-shadow: var(--shadow);
}
.sticky-bar .btn { min-height: 44px; }
@media (min-width: 761px) { .sticky-bar { display: none !important; } }

/* Dialogs */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--card); }
dialog::backdrop { background: rgba(30, 22, 12, 0.55); }
.close {
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.product {
  width: min(1040px, 100% - 32px);
  max-height: calc(100vh - 32px);
  border-radius: 20px;
  overflow: auto;
}
.product .close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; z-index: 2; }
.p-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 24px; }
.p-main { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: var(--radius); }
.p-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.p-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; background: #fff; cursor: pointer; width: 72px; height: 72px; overflow: hidden; }
.p-thumbs button[aria-current="true"] { border-color: var(--lapis); }
.p-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.p-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.p-price strong { font-size: 1.6rem; }
.p-price span { color: var(--ink-soft); font-size: 0.9rem; }
.p-hook { font-size: 1.1rem; font-weight: 600; }
.p-story, .p-perfect { color: var(--ink-soft); line-height: 1.65; }
.p-details { padding-left: 20px; margin: 0 0 16px; color: var(--ink-soft); display: grid; gap: 8px; }
.buy { display: flex; gap: 12px; margin: 16px 0 24px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 44px; height: 46px; border: 0; background: transparent; font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.qty output { min-width: 28px; text-align: center; font-weight: 600; }
.btn-add { flex: 1; min-width: 200px; }
.related-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.related-list a { display: grid; gap: 6px; color: var(--ink); text-decoration: none; font-size: 0.85rem; }
.related-list img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #fff; }
@media (max-width: 760px) {
  .product { width: 100%; max-width: 100%; max-height: 100%; height: 100%; border-radius: 0; margin: 0; }
  .p-wrap { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
}

.cart {
  margin: 0 0 0 auto; height: 100%; max-height: 100%;
  width: min(420px, 100%);
  display: none; flex-direction: column;
  padding: 24px;
}
.cart[open] { display: flex; }
.cart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cart-head h2 { margin: 0; font-size: 1.5rem; }
.cart-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; overflow: auto; flex: 1; align-content: start; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; }
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #fff; }
.cart-item .name { font-weight: 600; font-size: 0.95rem; }
.cart-item .qty button { width: 34px; height: 34px; font-size: 1.1rem; }
.cart-item .remove { background: none; border: 0; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font: 0.8rem var(--font); padding: 0; }
.cart-empty { color: var(--ink-soft); }
.totals { margin: 16px 0; display: grid; gap: 8px; }
.totals div { display: flex; justify-content: space-between; }
.totals dt { color: var(--ink-soft); }
.totals dd { margin: 0; font-weight: 600; }
.totals .grand { border-top: 1px solid var(--line); padding-top: 8px; font-size: 1.15rem; }
.totals .grand dt { color: var(--ink); font-weight: 700; }

.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: var(--page); padding: 12px 20px; border-radius: 999px;
  box-shadow: var(--shadow); font-size: 0.95rem;
}

/* Phones get two designs per row so the whole catalog is a quick scroll */
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-body { padding: 12px 12px 8px; }
  .card-title { font-size: 0.95rem; }
  .card-hook { display: none; }
  .card-row { padding: 0 12px 12px; flex-direction: column; align-items: stretch; }
  .card-add { width: 100%; }
}

/* Shipping region picker in the cart */
.region { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.region-label { width: 100%; font-weight: 600; font-size: 0.95rem; }
