:root {
  --ink: #171715;
  --paper: #f3efe7;
  --white: #fffdf8;
  --cobalt: #1347ff;
  --line: rgba(23, 23, 21, .18);
  --muted: #6f6d67;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
}
button, select { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.site-header {
  min-height: 88px;
  padding: 20px clamp(20px, 5vw, 72px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 239, 231, .94);
  backdrop-filter: blur(14px);
}
.wordmark { text-decoration: none; display: inline-flex; flex-direction: column; line-height: .86; }
.wordmark span { font-family: "Instrument Serif", serif; font-size: 1.75rem; letter-spacing: -.03em; }
.wordmark small { font-size: .67rem; letter-spacing: .32em; margin-top: 7px; }
nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 38px); }
nav a { text-decoration: none; font-size: .88rem; }
.cart-button { border: 0; background: transparent; cursor: pointer; padding: 8px 0; }
.cart-button span { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 5px; border-radius: 50%; background: var(--ink); color: white; font-size: .75rem; }

.hero {
  min-height: 690px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-copy { padding: clamp(70px, 10vw, 145px) clamp(24px, 7vw, 105px); align-self: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; font-weight: 600; margin: 0 0 22px; }
h1, h2 { font-family: "Instrument Serif", serif; font-weight: 400; letter-spacing: -.035em; margin: 0; }
h1 { font-size: clamp(4rem, 7.2vw, 7.8rem); line-height: .85; }
h1 em { color: var(--cobalt); font-weight: 400; }
.intro { max-width: 430px; line-height: 1.7; color: var(--muted); margin: 32px 0; }
.primary-link { display: inline-block; background: var(--ink); color: white; padding: 15px 22px; text-decoration: none; font-weight: 600; font-size: .9rem; }
.hero-art { position: relative; min-height: 590px; background: #d4c9b8; overflow: hidden; }
.hero-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 35%, rgba(255,255,255,.38)), radial-gradient(circle at 15% 20%, rgba(255,255,255,.7), transparent 35%); }
.frame { position: absolute; padding: 14px; background: #261d18; box-shadow: 0 30px 70px rgba(35,24,18,.25); }
.frame span { display: block; width: 100%; height: 100%; background: linear-gradient(145deg, #ff5b2b 0 26%, #efc429 26% 44%, #1647e8 44% 72%, #f2e9da 72%); }
.frame-one { width: min(42vw, 490px); aspect-ratio: 4/5; left: 10%; top: 13%; transform: rotate(-4deg); }
.frame-two { width: min(23vw, 270px); aspect-ratio: 3/4; right: -4%; bottom: -2%; transform: rotate(8deg); }
.frame-two span { background: radial-gradient(circle at 70% 26%, #f9b4c2 0 15%, transparent 16%), linear-gradient(125deg, #0d1c37 0 46%, #f4ece0 47% 66%, #bf2f27 67%); }

.collection { padding: clamp(70px, 8vw, 120px) clamp(20px, 5vw, 72px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 48px; }
.section-heading h2, .about h2 { font-size: clamp(3.2rem, 5.5vw, 6rem); line-height: .92; }
.filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filter { border: 1px solid var(--line); background: transparent; padding: 9px 14px; cursor: pointer; border-radius: 100px; font-size: .82rem; }
.filter.active { background: var(--ink); color: white; border-color: var(--ink); }
.status { padding: 36px 0; color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 46px 22px; }
.product-card { cursor: pointer; }
.product-card button { all: unset; display: block; width: 100%; cursor: pointer; }
.product-image { aspect-ratio: 4/5; background: #e2ddd4; overflow: hidden; position: relative; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover img { transform: scale(1.025); }
.product-info { display: flex; justify-content: space-between; gap: 18px; align-items: start; padding-top: 15px; }
.product-info h3 { margin: 0 0 5px; font-family: "Instrument Serif", serif; font-size: 1.45rem; font-weight: 400; }
.product-info p { margin: 0; color: var(--muted); font-size: .8rem; }
.product-price { white-space: nowrap; font-weight: 600; font-size: .9rem; padding-top: 4px; }

.about { background: var(--ink); color: var(--white); padding: clamp(80px, 11vw, 150px) clamp(24px, 10vw, 160px); }
.about h2 { max-width: 900px; }
.about > p:last-child { max-width: 600px; line-height: 1.75; color: #c8c6bf; margin: 36px 0 0 auto; }
footer { padding: 42px clamp(20px, 5vw, 72px); display: flex; justify-content: space-between; align-items: end; gap: 24px; }
footer p { color: var(--muted); font-size: .82rem; margin: 0; }

.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(16,16,15,.76); padding: clamp(12px, 4vw, 50px); overflow: auto; }
.product-panel { position: relative; max-width: 1080px; min-height: 600px; margin: auto; background: var(--paper); display: grid; grid-template-columns: 1.08fr .92fr; }
.close-button { border: 0; background: transparent; font-size: 2rem; line-height: 1; cursor: pointer; padding: 8px; }
.product-panel > .close-button { position: absolute; right: 14px; top: 10px; z-index: 2; }
.panel-image { min-height: 600px; background: #e2ddd4; }
.panel-image img { width: 100%; height: 100%; object-fit: cover; }
.panel-copy { padding: clamp(55px, 7vw, 90px) clamp(28px, 5vw, 70px); align-self: center; }
.panel-copy h2 { font-size: clamp(2.7rem, 4.2vw, 4.8rem); line-height: .93; }
.panel-copy > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; max-height: 120px; overflow: auto; }
.panel-copy label { display: block; font-size: .8rem; font-weight: 600; margin: 30px 0 8px; }
.panel-copy select { width: 100%; padding: 14px; border: 1px solid var(--line); background: white; }
.primary-button { width: 100%; border: 0; background: var(--cobalt); color: white; padding: 16px 20px; font-weight: 600; cursor: pointer; margin-top: 12px; }
.primary-button:disabled { opacity: .5; cursor: wait; }

.cart-drawer { position: fixed; z-index: 70; top: 0; right: 0; width: min(480px, 100%); height: 100dvh; background: var(--paper); transform: translateX(105%); transition: transform .3s ease; display: flex; flex-direction: column; }
.cart-drawer.open { transform: translateX(0); }
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(16,16,15,.6); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 2.3rem; }
.cart-items { padding: 12px 24px; flex: 1; overflow: auto; }
.cart-row { display: grid; grid-template-columns: 70px 1fr auto; gap: 13px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-row img { width: 70px; height: 88px; object-fit: cover; background: #ddd; }
.cart-row h3 { margin: 2px 0 6px; font: 1.1rem "Instrument Serif", serif; }
.cart-row p { margin: 0 0 8px; color: var(--muted); font-size: .75rem; }
.remove-item { border: 0; background: transparent; padding: 0; text-decoration: underline; font-size: .75rem; cursor: pointer; }
.cart-foot { padding: 24px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; }
.cart-foot > p { color: var(--muted); font-size: .75rem; }
.checkout-error { color: #a21d1d !important; min-height: 1em; }
.empty-cart { color: var(--muted); padding: 25px 0; }

@media (max-width: 820px) {
  .site-header { min-height: 74px; padding: 15px 20px; }
  nav a { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 72px 24px 65px; }
  .hero-art { min-height: 440px; }
  .frame-one { width: 64vw; left: 12%; }
  .frame-two { width: 40vw; }
  .section-heading { display: block; }
  .filters { justify-content: flex-start; margin-top: 24px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 12px; }
  .product-panel { grid-template-columns: 1fr; }
  .panel-image { min-height: 360px; height: 52vh; }
  footer { display: block; }
  footer p { margin-top: 20px; }
}

@media (max-width: 480px) {
  h1 { font-size: 3.7rem; }
  .product-grid { grid-template-columns: 1fr; }
  .product-info h3 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
