:root {
  --ivory: #f6f1e8;
  --paper: #fffdf9;
  --ink: #17120f;
  --muted: #786f68;
  --wine: #681e2e;
  --wine-dark: #47101d;
  --emerald: #073f36;
  --gold: #b79250;
  --line: #d9cfc0;
  --shadow: 0 28px 80px rgba(43, 27, 18, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.site-header {
  height: 88px;
  padding: 0 clamp(22px, 5vw, 80px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(246, 241, 232, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  width: max-content;
}
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50% 50% 45% 45%;
  font: italic 24px/1 Georgia, serif;
  color: var(--wine);
}
.brand strong, .brand small { display: block; letter-spacing: .22em; }
.brand strong { font: 600 17px/1 Georgia, serif; }
.brand small { margin-top: 5px; font-size: 7px; }

nav { display: flex; gap: 36px; }
.nav-link, .text-button {
  border: 0;
  background: transparent;
  padding: 10px 4px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-link:hover, .text-button:hover { color: var(--wine); }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }
.icon-button {
  border: 1px solid var(--ink);
  background: transparent;
  padding: 10px 14px;
  cursor: pointer;
}
.cart-button { display: inline-flex; gap: 10px; align-items: center; text-transform: uppercase; font-size: 11px; letter-spacing: .12em; }
.cart-button b {
  min-width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wine); color: #fff; font-size: 10px;
}

.hero {
  min-height: min(780px, calc(100vh - 88px));
  display: grid;
  grid-template-columns: minmax(420px, .88fr) minmax(0, 1.12fr);
  position: relative;
  overflow: hidden;
  background: var(--paper);
}
.hero::before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(183, 146, 80, .38);
  border-radius: 50%;
  left: -310px;
  top: 6%;
}
.hero-copy {
  padding: clamp(70px, 10vh, 120px) clamp(40px, 5vw, 92px);
  align-self: center;
  position: relative;
  z-index: 2;
}
.eyebrow {
  color: var(--gold);
  letter-spacing: .22em;
  font-size: 10px;
  font-weight: 700;
  margin: 0 0 22px;
}
h1, h2, blockquote { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
h1 { max-width: 760px; font-size: clamp(58px, 7.2vw, 116px); line-height: .93; letter-spacing: 0; margin: 0; }
h1 em { color: var(--wine); font-weight: 400; }
.hero-text { max-width: 480px; color: var(--muted); line-height: 1.8; margin: 38px 0; font-family: Georgia, serif; font-size: 17px; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-actions span { color: var(--gold); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.primary-button {
  border: 0;
  background: var(--wine);
  color: white;
  padding: 17px 24px;
  min-height: 50px;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: .25s ease;
}
.primary-button:hover { background: var(--wine-dark); transform: translateY(-1px); }
.primary-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.primary-button.full { width: 100%; }

.hero-visual {
  position: relative;
  min-height: clamp(560px, calc(100vh - 88px), 780px);
  display: grid;
  place-items: center;
  padding: clamp(26px, 4vw, 70px);
  background:
    radial-gradient(circle at 76% 18%, rgba(7, 63, 54, .12), transparent 28%),
    linear-gradient(135deg, #efe7da 0%, #fbf6ee 54%, #e7d8c2 100%);
}
.hero-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(104,30,46,.08), transparent 55%);
  pointer-events: none;
}
.hero-visual img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 26px 38px rgba(39, 24, 16, .18));
}
.hero-card {
  position: absolute;
  z-index: 2;
  right: clamp(22px, 4vw, 64px);
  bottom: clamp(22px, 4vw, 54px);
  padding: 24px 34px;
  background: rgba(255,253,249,.94);
  border: 1px solid rgba(183, 146, 80, .36);
  box-shadow: 0 20px 55px rgba(43, 27, 18, .12);
}
.hero-card span, .hero-card small, .hero-card strong { display: block; }
.hero-card span { font-size: 8px; letter-spacing: .22em; color: var(--gold); }
.hero-card strong { font: 23px/1.3 Georgia, serif; margin: 8px 0; }
.hero-card small { color: var(--muted); font-size: 11px; }
.hero-index { position: absolute; left: 3vw; bottom: 36px; writing-mode: vertical-rl; letter-spacing: .22em; color: var(--gold); font-size: 9px; }

.promise-strip {
  min-height: 84px;
  background: var(--wine);
  color: #f7efe5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8vw;
  padding: 22px;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 9px;
}
.promise-strip span::first-letter { color: var(--gold); }

.collection { padding: clamp(64px, 7vw, 94px) clamp(18px, 5vw, 72px) clamp(78px, 8vw, 108px); background: linear-gradient(180deg, #f7f2e9 0%, #fffaf2 100%); }
.collection-inner { max-width: 1580px; margin: 0 auto; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 520px); gap: clamp(34px, 5vw, 82px); align-items: end; margin-bottom: 30px; }
.section-heading h2, .modal-heading h2, .drawer h2 { font-size: clamp(46px, 5.2vw, 86px); line-height: .98; margin: 0; letter-spacing: 0; }
.section-heading h2 { max-width: 980px; text-wrap: balance; }
.section-heading > p { max-width: 540px; margin: 0; line-height: 1.8; color: var(--muted); font-family: Georgia, serif; }
.shop-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.shop-toolbar > span { color: var(--gold); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-button {
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, .64);
  padding: 12px 18px;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: 10px;
  cursor: pointer;
  transition: .2s ease;
}
.filter-button.active { background: var(--ink); color: white; border-color: var(--ink); }
.filter-button:hover { border-color: var(--gold); color: var(--wine); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 10px;
  cursor: pointer;
  background: rgba(255, 253, 249, .84);
  border: 1px solid rgba(217, 207, 192, .9);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.product-card:hover { transform: translateY(-4px); border-color: rgba(183, 146, 80, .72); box-shadow: 0 18px 48px rgba(43, 27, 18, .12); }
.product-image-wrap {
  --product-image-pad: clamp(14px, 2vw, 24px);
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, .74), transparent 48%),
    linear-gradient(145deg, #eee6da, #faf6ee);
}
.product-image-wrap::after { content: "View piece"; position: absolute; left: 50%; bottom: -48px; transform: translateX(-50%); background: var(--paper); padding: 14px 22px; white-space: nowrap; text-transform: uppercase; letter-spacing: .15em; font-size: 9px; transition: .25s ease; }
.product-card:hover .product-image-wrap::after { bottom: 18px; }
.product-card img {
  position: absolute;
  inset: var(--product-image-pad);
  width: calc(100% - var(--product-image-pad) - var(--product-image-pad));
  height: calc(100% - var(--product-image-pad) - var(--product-image-pad));
  object-fit: contain;
  display: block;
  transition: transform .55s ease;
}
.product-card:hover img { transform: scale(1.035); }
.product-meta { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 18px 4px 4px; }
.product-meta p { margin: 0; }
.product-category { color: var(--gold); font-size: 9px; letter-spacing: .17em; text-transform: uppercase; }
.product-name { font: 23px/1.2 Georgia, serif; margin: 0; }
.product-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(217, 207, 192, .72); }
.product-row span { color: var(--muted); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.product-price { font: 13px Georgia, serif; white-space: nowrap; color: var(--ink); }

.atelier { text-align: center; padding: 120px 24px; background: var(--paper); border-block: 1px solid var(--line); }
.atelier blockquote { max-width: 920px; font-size: clamp(40px, 5vw, 72px); line-height: 1.1; letter-spacing: 0; margin: 34px auto; color: var(--wine); }
.atelier > p:last-child { color: var(--muted); font-family: Georgia, serif; }
footer { padding: 70px clamp(22px, 6vw, 100px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 30px; }
footer p { color: var(--muted); font: italic 16px Georgia, serif; }
footer > small { text-align: right; color: var(--muted); font-size: 9px; }

dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(20, 13, 10, .67); backdrop-filter: blur(4px); }
.modal { width: min(1060px, calc(100% - 30px)); max-height: 92vh; background: var(--paper); box-shadow: var(--shadow); overflow: auto; }
.close-button {
  width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line);
  background: var(--paper); font: 28px/1 Georgia, serif; cursor: pointer; z-index: 5;
}
.modal > .close-button { position: sticky; float: right; top: 18px; margin: 18px 18px -60px 0; }
.product-detail { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); min-height: 660px; }
.detail-image {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
  padding: clamp(22px, 4vw, 44px);
  background: linear-gradient(145deg, #ece3d6, #fbf6ee);
}
.detail-image img { width: auto; height: auto; max-width: 100%; max-height: 620px; object-fit: contain; display: block; filter: drop-shadow(0 18px 30px rgba(39, 24, 16, .14)); }
.image-loader { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); font: italic 19px Georgia, serif; background: #eee6dc; }
.detail-copy { padding: 76px 58px 54px; display: flex; flex-direction: column; }
.detail-copy h2 { font: 46px/1.05 Georgia, serif; letter-spacing: 0; margin: 8px 0 16px; }
.detail-stone { color: var(--gold); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; }
.detail-description { color: var(--muted); line-height: 1.8; font-family: Georgia, serif; margin: 28px 0; }
.detail-list { list-style: none; padding: 24px 0; margin: 0 0 30px; border-block: 1px solid var(--line); }
.detail-list li { padding: 7px 0; font-size: 11px; letter-spacing: .08em; }
.detail-list li::before { content: "◇"; color: var(--gold); margin-right: 12px; }
.detail-price { font: 26px Georgia, serif; margin-top: auto; margin-bottom: 20px; }

.auth-modal { max-width: 520px; padding: 58px; }
.modal-heading { margin-bottom: 30px; }
.modal-heading h2 { font-size: 48px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.auth-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 14px; text-transform: uppercase; letter-spacing: .14em; font-size: 9px; cursor: pointer; }
.auth-tabs button.active { border-color: var(--wine); color: var(--wine); }
form label { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: 9px; font-weight: 700; margin-bottom: 18px; }
form input { width: 100%; margin-top: 8px; padding: 15px 13px; border: 1px solid var(--line); background: transparent; }
.hidden { display: none !important; }
.form-error { min-height: 18px; color: #a52828; font-size: 11px; line-height: 1.4; }

.drawer {
  width: min(560px, 100%);
  height: 100%;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  background: var(--paper);
}
.drawer[open] { animation: slide-in .25s ease both; }
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } }
.drawer-header { display: flex; justify-content: space-between; padding: 36px 34px 24px; border-bottom: 1px solid var(--line); }
.drawer h2 { font-size: 43px; }
.cart-empty, .orders-empty { padding: 80px 34px; text-align: center; color: var(--muted); font-family: Georgia, serif; }
.cart-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; padding: 20px 34px; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item img { width: 92px; height: 110px; object-fit: cover; }
.cart-item h3 { font: 18px Georgia, serif; margin: 0 0 7px; }
.cart-item p { margin: 0; color: var(--muted); font-size: 11px; }
.remove-button { border: 0; background: transparent; color: var(--muted); text-decoration: underline; font-size: 10px; cursor: pointer; margin-top: 12px; padding: 0; }
.cart-item > strong { font: 14px Georgia, serif; }
.checkout { padding: 28px 34px 42px; }
.total-row { display: flex; justify-content: space-between; font: 22px Georgia, serif; margin-bottom: 26px; }
.payment-note { background: var(--ivory); padding: 12px 14px; color: var(--muted); font-size: 10px; line-height: 1.5; margin-bottom: 20px; }
.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.orders-modal { max-width: 780px; padding: 58px; }
.order-card { border: 1px solid var(--line); padding: 22px; margin-bottom: 14px; display: grid; grid-template-columns: 1fr auto; gap: 20px; }
.order-card h3 { margin: 0 0 8px; font: 20px Georgia, serif; }
.order-card p { margin: 0; color: var(--muted); font-size: 11px; }
.order-card button { align-self: center; border: 1px solid var(--ink); background: transparent; padding: 11px 14px; text-transform: uppercase; letter-spacing: .12em; font-size: 8px; cursor: pointer; }
.receipt-modal { max-width: 650px; padding: 60px; }
.receipt { border: 1px solid var(--line); padding: 36px; position: relative; }
.receipt::before { content: "N"; position: absolute; right: 28px; top: 18px; color: rgba(183,146,80,.18); font: italic 100px Georgia, serif; }
.receipt-head { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 24px; }
.receipt-head h2 { margin: 6px 0; font: 36px Georgia, serif; }
.receipt-head p, .receipt-line p { color: var(--muted); font-size: 11px; margin: 4px 0; }
.receipt-line { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; }
.receipt-total { border-top: 1px solid var(--ink); margin-top: 18px; padding-top: 18px; font: 21px Georgia, serif; }
.receipt-code { margin-top: 28px; color: var(--muted); font-size: 8px; letter-spacing: .12em; }

.toast { position: fixed; bottom: 30px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: white; padding: 15px 22px; font-size: 11px; letter-spacing: .06em; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 1100px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1500px) {
  .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 1121px) {
  .section-heading h2 { white-space: nowrap; }
}

@media (max-width: 1120px) {
  .section-heading { grid-template-columns: 1fr; gap: 22px; }
  .section-heading h2 { white-space: normal; max-width: 740px; }
}

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto; height: 76px; padding-inline: 18px; }
  .site-header nav { display: none; }
  .brand-mark { width: 34px; height: 34px; }
  .text-button { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding: 74px 24px 42px; }
  .hero-actions { display: grid; justify-items: start; gap: 13px; }
  .hero-actions span { font-size: 9px; line-height: 1.5; }
  .hero-visual { min-height: 450px; padding: 20px; }
  .hero-card { bottom: 20px; padding: 18px 22px; }
  .hero-index { display: none; }
  .promise-strip { flex-direction: column; gap: 14px; }
  .section-heading { gap: 20px; }
  .section-heading h2 { white-space: normal; }
  .product-grid { grid-template-columns: 1fr; }
  .collection { padding-top: 80px; }
  footer { grid-template-columns: 1fr; text-align: left; }
  footer > small { text-align: left; }
  .product-detail { grid-template-columns: 1fr; }
  .detail-image { min-height: 430px; }
  .detail-image img { max-height: 380px; }
  .detail-copy { padding: 42px 28px; }
  .auth-modal, .orders-modal, .receipt-modal { padding: 48px 24px 30px; }
  .modal-heading h2 { font-size: 39px; }
  .cart-item { grid-template-columns: 74px 1fr; padding-inline: 22px; }
  .cart-item img { width: 74px; height: 90px; }
  .cart-item > strong { grid-column: 2; }
  .checkout { padding-inline: 22px; }
}
