/* Gary Nicholls Imaginarium - hand-written, no framework, no build step. */

:root {
  --bg:        #0e0e10;
  --bg-2:      #16161a;
  --surface:   #1c1c21;
  --text:      #ece9e4;
  --muted:     #9b9aa2;
  --line:      rgba(255,255,255,.10);
  --line-2:    rgba(255,255,255,.18);
  --accent:    #c2a15c;          /* brass - reads steampunk without shouting */
  --accent-lo: rgba(194,161,92,.14);
  --max:       1280px;
  --gut:       clamp(1.25rem, 4vw, 3.5rem);
  --head: Roboto, "Helvetica Neue", Arial, sans-serif;
  --body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 clamp(15px, 1.05vw, 16.5px)/1.75 var(--body);
  -webkit-font-smoothing: antialiased;
}

/* height:auto matters. Without it, the width and height attributes on an <img>
   are obeyed literally: a capped width leaves the height alone and the picture
   stretches. */
img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }

h1, h2, h3, .h {
  font-family: var(--head);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0;
}

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- skip link ------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #17140c; padding: .75rem 1.25rem; font-weight: 700;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* --- header ---------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,14,16,.86);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 2rem;
  min-height: 74px;
  position: relative;
}
.brand { font-family: var(--head); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: .9rem; line-height: 1.25; }
.brand small { display: block; color: var(--muted); font-size: .62rem; letter-spacing: .22em; font-weight: 400; margin-top: .3rem; }

.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(.9rem, 1.8vw, 1.9rem); }
.nav a {
  font-family: var(--head); font-size: .74rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  padding: .4rem 0; border-bottom: 1px solid transparent; transition: color .18s, border-color .18s;
}
.nav a:hover, .nav a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 3px; padding: .5rem .7rem; font: inherit; cursor: pointer; margin-left: auto; }

/* --- hero ------------------------------------------------------------ */
.hero { position: relative; min-height: min(84vh, 760px); display: grid; place-items: center; overflow: hidden; text-align: center; }
.hero-img { position: absolute; inset: 0; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,12,.62) 0%, rgba(10,10,12,.48) 45%, rgba(14,14,16,.96) 100%);
}
.hero-in { position: relative; padding: 6rem var(--gut); max-width: 60rem; }
.hero h1 { font-size: clamp(1.6rem, 5vw, 3.4rem); letter-spacing: .16em; }
.hero p.tag { font-family: var(--head); text-transform: uppercase; letter-spacing: .3em; font-size: clamp(.62rem, 1.4vw, .8rem); color: var(--accent); margin: 1.5rem 0 0; }
.hero .btn { margin-top: 2.5rem; }

/* --- buttons --------------------------------------------------------- */
.btn {
  display: inline-block; font-family: var(--head); font-size: .76rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  padding: 1rem 2.1rem; border: 1px solid var(--accent); color: var(--accent);
  background: transparent; border-radius: 2px; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--accent); color: #17140c; }
.btn-solid { background: var(--accent); color: #17140c; }
.btn-solid:hover { background: #d7b876; border-color: #d7b876; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* --- sections -------------------------------------------------------- */
.sec { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.sec-head h2 { font-size: clamp(1rem, 2.1vw, 1.35rem); }
.eyebrow { font-family: var(--head); text-transform: uppercase; letter-spacing: .28em; font-size: .66rem; color: var(--accent); margin: 0 0 .9rem; }
.lead { font-size: clamp(1rem, 1.5vw, 1.15rem); color: #cfccc6; max-width: 46rem; }
.prose p { margin: 0 0 1.4rem; color: #c7c4bf; }
.prose p:last-child { margin-bottom: 0; }
.two-col { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* --- artwork grid ---------------------------------------------------- */
.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.75rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); list-style: none; margin: 0; padding: 0; }

.card { display: flex; flex-direction: column; }
.card-img { position: relative; overflow: hidden; background: var(--bg-2); aspect-ratio: 1 / 1; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.3,1); }
.card:hover .card-img img { transform: scale(1.045); }
.card-body { padding-top: 1.1rem; }
.card h3 { font-size: .84rem; letter-spacing: .13em; }
.card .meta { color: var(--muted); font-size: .78rem; margin: .5rem 0 0; }
.card .price { font-family: var(--head); letter-spacing: .08em; font-size: .88rem; margin-top: .55rem; color: var(--accent); }
.badge {
  position: absolute; top: .85rem; left: .85rem; z-index: 2;
  background: rgba(14,14,16,.82); border: 1px solid var(--line-2);
  font-family: var(--head); font-size: .58rem; letter-spacing: .18em; text-transform: uppercase;
  padding: .4rem .6rem; color: var(--text);
}

/* --- filter bar ------------------------------------------------------ */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.filters a {
  font-family: var(--head); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase;
  padding: .6rem 1rem; border: 1px solid var(--line); color: var(--muted); border-radius: 2px;
}
.filters a:hover { color: var(--text); border-color: var(--line-2); }
.filters a[aria-current] { color: var(--accent); border-color: var(--accent); background: var(--accent-lo); }

/* --- single artwork -------------------------------------------------- */
.piece { display: grid; gap: clamp(2rem, 5vw, 4.5rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .piece { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .8fr); } }
.piece-media { background: var(--bg-2); border: 1px solid var(--line); }
.piece-media img { width: 100%; height: auto; }
.thumbs { display: flex; gap: .6rem; margin-top: .6rem; flex-wrap: wrap; }
.thumbs button { width: 74px; height: 74px; padding: 0; border: 1px solid var(--line); background: none; cursor: pointer; }
.thumbs button[aria-current] { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.buy { position: sticky; top: 100px; }
.piece h1 { font-size: clamp(1.25rem, 2.6vw, 1.9rem); }
.piece .subtitle { color: var(--accent); font-size: .95rem; font-style: italic;
                   margin: .75rem 0 0; letter-spacing: .01em; }
.piece .credits { color: var(--muted); font-size: .82rem; margin: .6rem 0 0; }
.piece .medium { color: var(--muted); font-size: .85rem; margin: 1rem 0 0; }
.piece .price-lg { font-family: var(--head); font-size: 1.5rem; letter-spacing: .06em; color: var(--accent); margin: 1.5rem 0 0; }
.piece .price-lg small.remaining { color: #d9a86b; }
.piece .price-lg small { display: block; font-family: var(--body); font-size: .72rem; letter-spacing: 0; color: var(--muted); text-transform: none; margin-top: .35rem; }

.opts { margin: 1.75rem 0 0; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.opts legend, .opts .lbl { font-family: var(--head); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: .8rem; }
.opts fieldset { border: 0; margin: 0; padding: 0; }
.size-opt { display: block; margin-bottom: .55rem; position: relative; }
.size-opt input { position: absolute; opacity: 0; inset: 0; }
.size-opt span {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  border: 1px solid var(--line); padding: .85rem 1rem; cursor: pointer; transition: border-color .18s, background .18s;
}
.size-opt span em { font-style: normal; color: var(--muted); font-size: .76rem; }
.size-opt input:checked + span { border-color: var(--accent); background: var(--accent-lo); }
.size-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.from-story { max-width: 44rem; margin-top: clamp(2.5rem, 5vw, 3.5rem);
              padding: 1.1rem 1.4rem; border-left: 2px solid var(--accent);
              background: var(--surface); font-size: .88rem; color: #c7c4bf; }
.from-story a { color: var(--accent); }

.piece-desc { max-width: 44rem; margin-top: clamp(3rem, 6vw, 5rem); }
.craft { margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: clamp(2rem, 4vw, 2.5rem);
          border-top: 1px solid var(--line); }
.craft dl { display: grid; gap: 1.5rem 2.5rem; margin: 0; }
@media (min-width: 700px) { .craft dl { grid-template-columns: 1fr 1fr; } }
.craft dt { font-family: var(--head); font-size: .7rem; letter-spacing: .16em;
            text-transform: uppercase; color: var(--accent); margin-bottom: .5rem; }
.craft dd { margin: 0; color: #c7c4bf; font-size: .92rem; }

.piece-desc .desc-head { font-size: .74rem; letter-spacing: .2em; color: var(--muted); margin-bottom: 1.5rem; }

.buy .btn { width: 100%; margin-top: 1.5rem; }
.assurance { list-style: none; margin: 1.5rem 0 0; padding: 0; font-size: .78rem; color: var(--muted); }
.assurance li { padding-left: 1.4rem; position: relative; margin-bottom: .5rem; }
.assurance li::before { content: "\2014"; position: absolute; left: 0; color: var(--accent); }

/* --- checkout summary -------------------------------------------------- */
.summary { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--accent);
           padding: 1.5rem 1.75rem; margin: 2rem 0; }
.summary h3 { font-size: .68rem; letter-spacing: .2em; color: var(--muted); margin-bottom: 1.25rem; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: .65rem 1.5rem; margin: 0; }
.summary dt { color: #d6d3ce; }
.summary dt span { display: block; color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.summary dd { margin: 0; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline;
                 border-top: 1px solid var(--line); margin: 1.25rem 0 0; padding-top: 1rem; }
.summary-total span { font-family: var(--head); font-size: .7rem; letter-spacing: .2em;
                      text-transform: uppercase; color: var(--muted); }
.summary-total strong { font-family: var(--head); font-size: 1.35rem; letter-spacing: .04em; color: var(--accent); }
.summary-note { font-size: .78rem; color: var(--muted); margin: 1.25rem 0 0; line-height: 1.6; }
.summary-note a { color: var(--accent); }

/* --- checkout form ---------------------------------------------------- */
.checkout-form { margin-top: 2rem; }
.cf-field select {
  width: 100%; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 2px; padding: .8rem .9rem;
  font: inherit; line-height: 1.5;
}
.cf-field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.cf-note { font-size: .78rem; color: var(--muted); margin: .45rem 0 0; }
.cf-note a { color: var(--accent); }
.cf-row { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .cf-row { grid-template-columns: 1fr 1fr; } }
.cf-field { margin-bottom: 1.25rem; }
.cf-field label { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
                  color: var(--muted); margin-bottom: .5rem; }
.cf-field label span { text-transform: none; letter-spacing: 0; opacity: .75; }
.cf-field input, .cf-field textarea {
  width: 100%; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 2px; padding: .8rem .9rem;
  font: inherit; line-height: 1.5;
}
.cf-field textarea { resize: vertical; }
.cf-field input:focus, .cf-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.cf-error input, .cf-error textarea { border-color: #d9736b; }
.cf-err { color: #e08c85; font-size: .8rem; margin: .45rem 0 0; }

/* --- messages, enquiries and the mailing list -------------------------- */
.msg { border-radius: 4px; padding: 1rem 1.15rem; margin: 0 0 1.5rem;
       font-size: .9rem; line-height: 1.6; }
.msg p { margin: 0 0 .5rem; }
.msg p:last-child { margin-bottom: 0; }
.msg ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.msg-ok  { background: rgba(120,180,130,.12); border: 1px solid rgba(120,180,130,.4); }
.msg-err { background: rgba(217,115,107,.10); border: 1px solid rgba(217,115,107,.45); }
.msg-warn{ background: rgba(212,175,95,.10);  border: 1px solid rgba(212,175,95,.40); }

.cf-form { margin: 2rem 0 0; }
.cf-about { font-size: .85rem; color: var(--muted); margin: 0 0 1.5rem; }
.cf-about a { color: var(--accent); }
.cf-check label { display: flex; gap: .6rem; align-items: flex-start;
                  text-transform: none; letter-spacing: 0; font-size: .9rem;
                  color: inherit; cursor: pointer; }
.cf-check input { width: auto; margin-top: .15rem; }
.cf-form .actions { margin-top: 1.75rem; }

/* "Ask about this piece", under the buy button. */
.ask { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.ask p { margin: 0 0 1rem; font-size: .88rem; line-height: 1.65; color: var(--muted); }
.ask strong { color: var(--fg, inherit); }
.ask-note { font-size: .78rem; margin-bottom: 0 !important; }
.btn-quiet { font-size: .82rem; }

/* The mailing list, above the footer on every page. */
.foot-signup { border-top: 1px solid var(--line); padding: 3rem 0; }
.foot-signup h2 { margin: 0 0 .6rem; font-size: 1.25rem; }
.foot-signup p { margin: 0; font-size: .9rem; line-height: 1.7; color: var(--muted); max-width: 34rem; }
.foot-signup-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 800px) { .foot-signup-grid { grid-template-columns: 1fr 1fr; gap: 3rem; } }

.signup-row { display: grid; gap: .6rem; }
.signup-row label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.signup-row input { width: 100%; padding: .7rem .8rem; font: inherit; font-size: .95rem;
                    background: var(--bg-2); color: inherit;
                    border: 1px solid var(--line-2); border-radius: 3px; }
.signup-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.signup-row button { justify-self: start; }
@media (min-width: 560px) {
  .signup-row { grid-template-columns: 1fr auto; align-items: end; }
  .signup-row label { grid-column: 1 / -1; margin-bottom: -.2rem; }
}
.signup .cf-note { margin-top: .7rem; }
.signup-lead { margin: 0 0 .9rem; font-size: .9rem; }

/* --- the artwork ------------------------------------------------------- */
/* Not draggable, and no long-press save menu on a phone. Paired with the
   script in inc/footer.php. Neither is a real lock; see the note there. */
img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

@media print {
  /* Printing the page, or saving it as a PDF, should not carry the artwork
     away with it. The words print; the pictures do not. */
  img, picture, .gallery, .hero-art { display: none !important; }
  .exhibit-when, .price { color: #000; }
  main::after {
    content: "Images are copyright Gary Nicholls and are not included when this page is printed. g-n-p.co.uk";
    display: block;
    margin-top: 2rem;
    font-size: .8rem;
    color: #555;
  }
}

/* The exhibition archive, grouped by show. */
.exhibit { margin: 3rem 0; }
.exhibit + .exhibit { border-top: 1px solid var(--line, #e5e2dd); padding-top: 2.25rem; }
.exhibit > h3 { margin: 0; font-size: 1.15rem; letter-spacing: .01em; }
.exhibit-when { margin: .2rem 0 0; font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.exhibit .gallery { margin-top: 1.25rem; }

.gallery { display: grid; gap: .9rem; margin: 2.5rem 0;
           grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: 220px; object-fit: cover; background: var(--bg-2);
               border: 1px solid var(--line); }
.gallery figcaption { font-size: .78rem; color: var(--muted); margin-top: .5rem; line-height: 1.5; }

/* --- notes / callouts ------------------------------------------------ */
.note { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--accent); padding: 1.5rem 1.75rem; }

/* Deliberately loud: marks a fact only Gary can supply. Search the project
   for "todo" before going live; none of these should survive. */
.todo {
  background: rgba(217,115,107,.10); border: 1px dashed #d9736b;
  padding: 1rem 1.25rem; margin: 1.25rem 0; border-radius: 3px;
  font-size: .88rem; color: #e6b3ae;
}
.todo strong { color: #f0c9c5; }

/* --- legal pages ------------------------------------------------------ */
.legal { max-width: 44rem; }
.legal h3 { font-family: var(--head); font-size: .8rem; letter-spacing: .16em;
            text-transform: uppercase; color: var(--text); margin: 2.75rem 0 1rem; }
.legal h3:first-child { margin-top: 0; }
.legal h4 { font-family: var(--head); font-size: .72rem; letter-spacing: .14em;
            text-transform: uppercase; color: var(--muted); margin: 1.75rem 0 .6rem; }
.legal ul { color: #c7c4bf; padding-left: 1.15rem; margin: 0 0 1.4rem; }
.legal li { margin-bottom: .5rem; }
.legal a { color: var(--accent); }
.legal .updated { color: var(--muted); font-size: .8rem; margin: 0 0 2.5rem; }
.legal dl { margin: 0 0 1.4rem; }
.legal dt { font-weight: 600; color: var(--text); margin-top: 1rem; }
.legal dd { margin: .3rem 0 0; color: #c7c4bf; }
.legal .rates { width: 100%; max-width: 30rem; border-collapse: collapse; margin: 1.25rem 0 1.75rem; }
.legal .rates th, .legal .rates td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); }
.legal .rates th { font-family: var(--head); font-size: .66rem; letter-spacing: .14em;
                   text-transform: uppercase; color: var(--muted); font-weight: 600; }
.legal .rates td:not(:first-child) { color: var(--accent); font-variant-numeric: tabular-nums; }
.legal .rates td:first-child { color: #c7c4bf; }

/* --- footer ---------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); padding: clamp(3rem, 6vw, 5rem) 0 3rem; color: var(--muted); font-size: .82rem; }
.foot-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.foot-grid h3 { font-size: .68rem; letter-spacing: .2em; color: var(--text); margin-bottom: 1rem; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: .55rem; }
.foot-grid a:hover { color: var(--text); }
.colophon { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.75rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .74rem; }

/* --- responsive nav -------------------------------------------------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line); padding: .5rem 0;
  }
  .nav[hidden] { display: none; }
  .nav a { padding: .85rem var(--gut); border-bottom: 1px solid var(--line); }
  .nav a:hover, .nav a[aria-current] { border-bottom-color: var(--line); background: var(--surface); }
  .buy { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Test mode. Deliberately loud: a customer must never see this and think it
   normal, and Gary must never forget it is on. */
.test-banner {
  margin: 0;
  padding: .6rem 1rem;
  text-align: center;
  font-size: .85rem;
  color: #1a1408;
  background: repeating-linear-gradient(45deg, #e8c766, #e8c766 12px, #d9b449 12px, #d9b449 24px);
}
.test-banner strong { text-transform: uppercase; letter-spacing: .08em; }

/* A reader's words beside the price. Quiet: it should read as someone talking,
   not as a marketing panel. */
.proof { margin: 2rem 0 0; padding: 0; }
.proof blockquote { margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--accent); }
.proof blockquote p { margin: 0; font-size: .9rem; line-height: 1.65; font-style: italic; }
.proof figcaption { margin: .65rem 0 0 1rem; font-size: .78rem; color: var(--muted); }
.proof figcaption a { color: var(--accent); }
