:root {
  --ink: #17130d;
  --ink-soft: #4a4033;
  --paper: #f3eee4;
  --paper-2: #e8e0d0;
  --cream: #faf7f0;
  --gold: #c5962a;
  --gold-deep: #8a6712;
  --line: #d4c8b2;
  --danger: #8a2a16;
  --shadow: 0 18px 40px rgb(23 19 13 / 0.12);
  --header-h: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --body: "Source Serif 4", "Georgia", serif;
  --ui: "Karla", "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  hanging-punctuation: first last;
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

a.icon-btn,
a.icon-btn:link,
a.icon-btn:visited,
a.icon-btn:hover,
a.icon-btn:active,
a.icon-btn:focus-visible {
  text-decoration: none;
  color: var(--ink);
}

a:hover {
  color: var(--gold-deep);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.wrap-wide {
  width: min(1280px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding-inline: 1rem;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  border-block-end: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  text-decoration: none;
}

.logo img {
  width: min(220px, calc(100vw - 15rem));
  height: auto;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.6rem;
  font-family: var(--ui);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-desktop a {
  text-decoration: none;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.nav-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--paper) !important;
  padding-inline: 1rem;
  height: 42px;
  min-height: 42px;
  line-height: 1;
  text-decoration: none;
}

button.icon-btn,
button.nav-toggle {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

.nav-toggle,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  box-sizing: border-box;
  height: 42px;
  min-height: 42px;
  min-width: 42px;
  padding: 0 0.9rem;
  font-family: var(--ui);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  text-box: trim-both cap alphabetic;
}

a.icon-btn:hover,
a.icon-btn:focus-visible {
  text-decoration: none;
  color: var(--gold-deep);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-count {
  display: inline;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-decoration: none;
}

.nav-dialog {
  width: min(100%, 28rem);
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0 0 0 auto;
  border: 0;
  padding: 1.5rem;
  background: var(--ink);
  color: var(--paper);
}

.nav-dialog::backdrop {
  background: rgb(23 19 13 / 0.45);
}

.nav-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nav-dialog a {
  font-family: var(--serif);
  font-size: clamp(2rem, 8vw, 2.8rem);
  text-decoration: none;
  line-height: 1.15;
}

.nav-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-dialog .icon-btn {
  border-color: var(--paper);
  color: var(--paper);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-items: end;
  color: var(--cream);
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(23 19 13 / 0.15) 0%, rgb(23 19 13 / 0.72) 78%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 2rem 0 2.6rem;
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.kicker {
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.7rem;
  max-width: 100%;
}

.hero h1,
.page-hero h1,
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 8vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.hero p {
  max-width: 34rem;
  font-size: 1.1rem;
  margin: 0 0 1.4rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.15rem;
  font-family: var(--ui);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid currentColor;
  cursor: pointer;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.btn-gold:hover {
  background: #d4aa3c;
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: inherit;
}

.btn-dark {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn-dark:hover {
  color: var(--gold);
}

/* Editorial blocks */
.section {
  padding-block: 4rem;
}

.section-tight {
  padding-block: 2.5rem;
}

.split {
  display: grid;
  gap: 1.75rem;
}

.split img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.eyebrow {
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 0.6rem;
}

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.2rem;
  max-width: 38rem;
}

.pull {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.2;
  margin: 1.5rem 0;
  max-width: 20ch;
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* Work index: not identical cards */
.work-index {
  display: grid;
  gap: 0;
  border-block: 1px solid var(--line);
}

.work-row {
  display: grid;
  gap: 0.6rem;
  padding-block: 1.4rem;
  border-block-end: 1px solid var(--line);
  text-decoration: none;
}

.work-row:last-child {
  border-block-end: 0;
}

.work-num {
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--gold-deep);
}

.work-row h3 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 500;
  margin: 0;
}

.work-row p {
  margin: 0;
  color: var(--ink-soft);
}

.work-meta {
  font-family: var(--ui);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

/* Photo ribbon */
.ribbon {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.6rem;
}

.ribbon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ribbon-tall {
  aspect-ratio: 3 / 4;
}

.ribbon-stack {
  display: grid;
  gap: 0.6rem;
}

.ribbon-stack img {
  aspect-ratio: 16 / 10;
}

.caption {
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0.45rem 0 0;
}

/* Shop preview */
.shop-feature {
  display: grid;
  gap: 1.5rem;
}

.product-tile,
.product-grid,
.wrap,
.wrap-wide {
  min-width: 0;
}

.product-tile {
  background: var(--cream);
  padding: 1rem;
}

.product-tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #ece8df;
}

.product-tile h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0.8rem 0 0.2rem;
}

.price {
  font-family: var(--ui);
  font-size: 0.9rem;
}

.product-grid {
  display: grid;
  gap: 1.1rem;
}

/* Forms */
form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field-row {
  display: grid;
  gap: 1rem;
}

label {
  font-family: var(--ui);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

input:user-invalid,
select:user-invalid,
textarea:user-invalid {
  border-color: var(--danger);
}

.hint,
.error {
  font-family: var(--ui);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.error {
  color: var(--danger);
}

fieldset {
  border: 1px solid var(--line);
  padding: 1rem;
  margin: 0;
  min-width: 0;
  width: 100%;
}

legend {
  font-family: var(--ui);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-inline: 0.4rem;
}

.choice-list {
  display: grid;
  gap: 0.55rem;
}

.choice {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  min-height: 48px;
}

.choice input {
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  accent-color: var(--gold-deep);
  margin-top: 0.2rem;
}

.choice label {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--body);
  font-size: 1rem;
}

/* Page heroes */
.page-hero {
  padding: 3rem 0 2rem;
}

.page-hero p {
  max-width: 36rem;
  font-size: 1.15rem;
}

.legal {
  max-width: 42rem;
}

.legal h2 {
  font-size: 1.7rem;
  margin-top: 2rem;
}

.legal p,
.legal li {
  color: var(--ink-soft);
}

.legal ul {
  padding-inline-start: 1.1rem;
}

/* Dialogs */
.cart-dialog,
.confirm-dialog {
  width: min(32rem, calc(100% - 1.5rem));
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.cart-dialog::backdrop,
.confirm-dialog::backdrop {
  background: rgb(23 19 13 / 0.4);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dialog-head h2 {
  font-size: 1.8rem;
  margin: 0;
}

.cart-lines {
  display: grid;
  gap: 0.8rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.cart-line {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  gap: 0.7rem;
  align-items: center;
}

.cart-line img {
  width: 4rem;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--cream);
}

.qty {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.qty button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--cream);
  cursor: pointer;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--ui);
  margin-block: 0.8rem;
}

.empty-cart {
  color: var(--ink-soft);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #d9d0c2;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  gap: 1.8rem;
}

.site-footer a {
  color: #f3eee4;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.footer-brand img {
  width: min(220px, 72vw);
  height: auto;
  filter: invert(1);
}

.footer-brand span {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--paper);
}

.product-tile .btn {
  margin-top: 0.9rem;
  width: 100%;
}

.about-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-col h2 {
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.7rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-col a {
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-base {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #3a3328;
  font-family: var(--ui);
  font-size: 0.78rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  justify-content: space-between;
}

.sticky-cta {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--paper);
}

.sticky-cta p {
  margin: 0;
  font-size: 0.95rem;
}

.note {
  background: var(--paper-2);
  padding: 1rem 1.1rem;
  font-size: 1rem;
}

.size-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.size-picks label {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--cream);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

.size-picks input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.size-picks input:checked + span,
.size-picks label:has(input:checked) {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.credit-list {
  display: grid;
  gap: 1rem;
}

.credit-list article {
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--line);
}

@media (pointer: coarse) {
  input,
  select,
  textarea,
  .btn {
    min-height: 52px;
  }
}

@media (max-width: 420px) {
  .site-header {
    gap: 0.4rem;
    padding-inline: 0.7rem;
  }

  .logo img {
    width: min(150px, calc(100vw - 13.25rem));
  }

  .header-actions {
    gap: 0.35rem;
  }
}

@media (max-width: 979px) {
  .header-actions {
    align-items: center;
    align-self: center;
    flex-shrink: 0;
  }

  .header-actions .icon-btn,
  .header-actions .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
    box-sizing: border-box;
    height: 2.5rem;
    min-height: 2.5rem;
    max-height: 2.5rem;
    padding: 0 0.75rem;
    line-height: 1;
    text-decoration: none;
    -webkit-text-decoration: none;
    appearance: none;
    -webkit-appearance: none;
  }
}

/* Tablet */
@media (min-width: 700px) {
  .site-header {
    padding-inline: 1.5rem;
  }

  .wrap,
  .hero-copy,
  .wrap-wide {
    width: min(1120px, calc(100% - 3rem));
  }

  .wrap-wide {
    width: min(1280px, calc(100% - 3rem));
  }

  .hero-copy {
    padding-bottom: 3.4rem;
  }

  .split {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2.5rem;
  }

  .split-reverse img {
    order: 2;
  }

  .work-row {
    grid-template-columns: 3rem 1.4fr 1.6fr auto;
    align-items: baseline;
    gap: 1rem;
    padding-block: 1.6rem;
  }

  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .shop-feature,
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .sticky-cta {
    display: none;
  }

  .section {
    padding-block: 5rem;
  }
}

/* Desktop */
@media (min-width: 980px) {
  .nav-desktop {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .logo img {
    width: 248px;
  }

  .hero h1 {
    max-width: 14ch;
  }

  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .shop-feature {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .about-grid {
    grid-template-columns: 0.9fr 1.1fr;
    display: grid;
    gap: 3rem;
    align-items: start;
  }
}

@media (max-width: 699px) {
  .ribbon {
    grid-template-columns: 1fr;
  }
}
