:root {
  --paper: #f8f5ef;
  --paper-deep: #efe9df;
  --ink: #1c1d22;
  --muted: #6e6a63;
  --line: #e2dbcf;
  --navy: #002452;
  --navy-deep: #001a3d;
  --white: #fffdf9;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 2px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 300 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
@media (min-width: 720px) { .wrap { width: min(1200px, 100% - 64px); } }
.narrow { max-width: 720px; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lede { font-size: 1.15rem; max-width: 38em; }

.eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  padding: .85em 1.6em;
  background: var(--navy);
  color: var(--white);
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  font: 400 .8rem/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--navy-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }

.link-arrow {
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--navy);
  color: var(--white);
}
.site-header .brand { color: var(--white); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--navy);
  text-decoration: none;
  margin: 0;
}
.brand img { width: 48px; height: 48px; flex: none; }
@media (max-width: 480px) {
  .brand { font-size: 1.15rem; gap: .5rem; }
  .brand img { width: 40px; height: 40px; }
}
.site-nav { display: flex; gap: 2rem; }
.site-nav a {
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .4em 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current] { border-color: currentColor; }
.menu-toggle { display: none; }

@media (max-width: 760px) {
  .menu-toggle {
    display: block;
    background: none;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: var(--radius);
    padding: .5em 1em;
    font: 400 .75rem/1 var(--sans);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--white);
  }
  .site-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto;
    flex-direction: column;
    gap: 0;
    background: var(--navy);
    padding: .5rem 16px 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .9em 0; border-bottom: 1px solid rgba(255, 255, 255, .15); }
  .site-nav a:last-child { border-bottom: 0; }
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(3rem, 8vw, 6.5rem);
}
.hero h1 { margin-bottom: .4em; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-img { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-deep); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.hero-img:hover img { transform: scale(1.03); }
.hero-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: var(--white);
  padding: .4em .9em;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-img { aspect-ratio: 1; }
}

/* Collections */
.collections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
.collection-tile {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color .2s;
}
.collection-tile:hover { border-color: var(--navy); }
.collection-tile h2 { margin-bottom: .3em; }
.collection-img { aspect-ratio: 1; background: var(--paper-deep); overflow: hidden; }
.collection-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 420px) { .collection-tile { grid-template-columns: 1fr; } }

/* Sections & grid */
.section { padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  margin-bottom: 2rem;
}
.section-head h2 { margin: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 2.5vw, 2rem);
}
.card { text-decoration: none; display: block; }
.card-img { aspect-ratio: 1; background: var(--paper-deep); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding-top: .9rem; }
.card-body h3 { margin: 0 0 .15em; }
.card-body p { margin: 0; font-size: .9rem; }
/* Phones: two products per row, with tighter spacing and smaller titles to fit. */
@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem .75rem; }
  .card-body { padding-top: .6rem; }
  .card-body h3 { font-size: 1.1rem; line-height: 1.2; }
  .card-body p { font-size: .85rem; }
}
.no-img { display: block; width: 100%; height: 100%; aspect-ratio: 1; background: var(--paper-deep); }
.empty { padding: 3rem 0; text-align: center; }

/* Page head */
.page-head { padding-block: clamp(2.5rem, 7vw, 5rem) 2rem; }
.page-head .btn { margin-top: 1.5rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.tabs a {
  padding: .55em 1.2em;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
}
.tabs a:hover { border-color: var(--ink); }
.tabs a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.sub-tabs { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.sub-tabs a { padding: .4em 1em; font-size: .72rem; }
.sub-tabs a[aria-current] { background: var(--navy); border-color: var(--navy); }
.crumbs { display: flex; flex-wrap: wrap; gap: .5em; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Piece */
.back-bar { padding-top: clamp(1.25rem, 3vw, 2rem); }
/* Back link: a bigger arrow and a finger-sized tap area (at least 44px tall). */
.back-bar .link-arrow { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding-right: .75rem; font-size: .9rem; }
.back-arrow { width: 1.05em; height: 1.05em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 720px) {
  .back-bar { padding-top: .75rem; }
  .back-bar .link-arrow { min-height: 48px; font-size: 1rem; }
  .back-arrow { width: 1.1em; height: 1.1em; }
}
.back-bar + .piece { padding-top: clamp(1rem, 2.5vw, 2rem); }
.piece {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.gallery { position: sticky; top: 96px; }
.gallery-main { position: relative; aspect-ratio: 1; background: var(--paper-deep); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
/* Colour / thumbnail switch: the new photo fades in over the old one (public/js/site.js). */
.gallery-main .gallery-next { position: absolute; inset: 0; opacity: 0; transition: opacity .25s ease; }
.gallery-main .gallery-next.is-in { opacity: 1; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .6rem; margin-top: .6rem; }
.thumb { padding: 0; border: 1px solid transparent; background: var(--paper-deep); cursor: pointer; aspect-ratio: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .7; transition: opacity .2s; }
.thumb:hover img, .thumb[aria-current] img { opacity: 1; }
.thumb[aria-current] { border-color: var(--ink); }
.piece-info h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.piece-collection { margin: -.4rem 0 .9rem; font-size: .9rem; color: var(--muted); }
.piece-collection a { color: var(--navy); }
.price { font-size: 1.1rem; margin-bottom: 1.75rem; }
.prose p { max-width: 36em; }
.prose.large { font-size: 1.15rem; }
.details { list-style: none; margin: 1.75rem 0 2rem; padding: 0; border-top: 1px solid var(--line); }
.details li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.details li > span:first-child { color: var(--muted); }
.details li > span:last-child { text-align: right; }
.detail-values { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
.details li.changed > span:last-child { animation: detail-flash 1.2s ease; }
@keyframes detail-flash { from { color: var(--navy); background: #e6ebf2; } to { background: transparent; } }
.piece-info .btn { margin-bottom: 1rem; }
@media (max-width: 860px) {
  .piece { grid-template-columns: 1fr; }
  .gallery { position: static; }
}

/* Colours */
.variants { margin: -.75rem 0 1.75rem; }
.variant-label { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.swatches { display: flex; flex-wrap: wrap; gap: .6rem; }
.swatch {
  width: 40px;
  height: 40px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transition: border-color .2s;
}
.swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--paper-deep); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.swatch:hover { border-color: var(--line); }
.swatch[aria-pressed="true"] { border-color: var(--ink); }
.keys-hint { display: none; margin: .6rem 0 0; font-size: .75rem; color: var(--muted); }
.keys-hint kbd { display: inline-block; min-width: 1.6em; padding: .05em .35em; border: 1px solid var(--line); border-radius: 4px; background: var(--white); font: inherit; text-align: center; }
@media (hover: hover) and (pointer: fine) { .keys-hint { display: block; } }
.sizes { margin: -.75rem 0 1.75rem; }
.variants + .sizes { margin-top: 0; }
.size-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.size-option {
  min-width: 3rem;
  padding: .55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: .95rem;
  cursor: pointer;
}
.size-option:hover { border-color: var(--muted); }
.size-option[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.card-swatches { display: flex; align-items: center; gap: 4px; margin-top: .45rem !important; }
.card-swatches span { width: 11px; height: 11px; border-radius: 50%; background: var(--paper-deep); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.card-swatches small { font-size: .75rem; color: var(--muted); margin-left: 2px; }

/* Story band */
.story-band { background: var(--navy); color: var(--white); }
.story-band .eyebrow, .story-band .link-arrow { color: #c9d3f0; }
.story-inner { padding-block: clamp(3.5rem, 9vw, 6.5rem); max-width: 760px; text-align: center; }
.story-inner .lede { margin-inline: auto; }
.story-logo { width: 88px; height: 88px; margin: 0 auto 1.5rem; }

/* Contact */
.contact-list { margin: 2rem 0; border-top: 1px solid var(--line); }
.contact-list div { display: grid; grid-template-columns: 140px 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.contact-list dt { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: .2em; }
.contact-list dd { margin: 0; }
.contact-list dd p { margin: 0; }
@media (max-width: 480px) { .contact-list div { grid-template-columns: 1fr; gap: .25rem; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; background: var(--paper-deep); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-block: 3rem 2rem; }
.footer-brand { display: flex; align-items: center; gap: 1.25rem; }
.footer-brand img { width: 96px; height: 96px; flex: none; }
.footer-brand .brand { font-size: 1.35rem; }
.footer-contact p { margin: 0 0 .3em; }
.footer-base { padding-bottom: 2rem; font-size: .8rem; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.site-header :focus-visible, .story-band :focus-visible { outline-color: var(--white); }

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

/* Enquiry pop-up */
.enquiry {
  width: min(520px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(0, 20, 50, .25);
}
.enquiry::backdrop { background: rgba(0, 18, 42, .55); }
/* Opening and closing: the pop-up fades and rises a little while the dark backdrop fades.
   @starting-style sets where opening starts; allow-discrete keeps it on screen while closing. */
.enquiry, .enquiry::backdrop {
  transition: opacity .25s ease, transform .25s ease, overlay .25s ease allow-discrete, display .25s ease allow-discrete;
}
.enquiry:not([open]) { opacity: 0; transform: translateY(8px) scale(.98); }
.enquiry:not([open])::backdrop { opacity: 0; }
@starting-style {
  .enquiry[open] { opacity: 0; transform: translateY(8px) scale(.98); }
  .enquiry[open]::backdrop { opacity: 0; }
}
/* After sending, the thank-you message fades in in place of the form. */
.enquiry-done:not([hidden]) { animation: enquiry-done-in .3s ease-out both; }
@keyframes enquiry-done-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  .enquiry, .enquiry::backdrop { transition: none; }
  .enquiry-done:not([hidden]) { animation: none; }
}
.enquiry h2 { margin: 0 0 .8rem; font-size: 2rem; }
.enquiry-close { position: absolute; top: .5rem; right: .6rem; width: 44px; height: 44px; border: 0; background: none; font-size: 1.8rem; line-height: 1; color: var(--muted); cursor: pointer; }
.enquiry-close:hover { color: var(--ink); }
.enquiry-form { display: grid; gap: 1rem; }
.enquiry-form label { display: grid; gap: .3rem; font-size: .9rem; font-weight: 400; }
.enquiry-form input, .enquiry-form textarea {
  width: 100%; padding: .7em .8em; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; font: inherit; font-size: 1rem; color: var(--ink);
}
.enquiry-form input:focus, .enquiry-form textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; }
.enquiry-form textarea { resize: vertical; }
.enquiry-form .btn { justify-self: start; }
.enquiry-form .optional { color: var(--muted); font-weight: 300; }
.enquiry-facts { margin: 0 0 .25rem; padding: .8rem 1rem; display: grid; grid-template-columns: max-content 1fr; gap: .15rem 1rem; background: var(--paper); font-size: .9rem; }
.enquiry-facts div { display: contents; }
.enquiry-facts dt { color: var(--muted); }
.enquiry-facts dd { margin: 0; }
.enquiry-error { margin: 0; color: #b42318; }
.enquiry-done p { margin: 0 0 1.25rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacy h2 { margin: 2.2rem 0 .4rem; font-size: 1.7rem; }
.privacy p { max-width: 38em; }
.footer-base a { color: inherit; }
.enquiry-privacy { margin: 0; font-size: .82rem; color: var(--muted); }

/* Page changes: a short cross-fade between pages (and from one product to the next)
   in browsers that support view transitions; others change page as before. The header
   has its own name so it stays still while the page below it fades. */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: page-out .1s ease-in both; }
::view-transition-new(root) { animation: page-in .25s ease-out .1s both; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* Cookie banner (only when a Google Analytics ID is set in Site text). */
.consent {
  position: fixed;
  z-index: 20;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 34rem;
  margin-left: auto;
  padding: 1rem 1.1rem;
  display: grid;
  gap: .75rem;
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 10px 30px rgba(0, 18, 42, .25);
  font-size: .9rem;
}
.consent[hidden] { display: none; }
.consent p { margin: 0; }
.consent a { color: inherit; }
.consent-actions { display: flex; gap: .5rem; }
.consent .btn { padding: .75em 1.3em; background: var(--white); color: var(--navy); border-color: var(--white); cursor: pointer; }
.consent .btn-ghost-dark { background: transparent; color: var(--white); border-color: rgba(255, 253, 249, .5); }
.link-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
