/*
Theme Name: Mistachris
Theme URI: https://wemeander.wixsite.com/mistachris
Author: Les Davis
Description: Custom lightweight theme for Mistachris, contemporary New Zealand fine artist. Rebuilt from a Wix draft — no page builder dependency.
Version: 1.4.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: mistachris
*/

/* -----------------------------------------------------------
   Self-hosted Jost (OFL licensed) — matches the header/nav
   typeface from the original design. No external font requests.
----------------------------------------------------------- */
@font-face{
  font-family: 'Jost';
  src: url('assets/fonts/Jost-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: 'Jost';
  src: url('assets/fonts/Jost-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: 'Jost';
  src: url('assets/fonts/Jost-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* -----------------------------------------------------------
   Tokens
   Palette drawn from the artist's own subject matter: aged
   chart paper, deep night-water ink, and weathered brass —
   the material world of navigation instruments — rather than
   a generic "gallery" palette.
----------------------------------------------------------- */
:root{
  --ink: #1E2A2E;          /* deep water charcoal — headings, body text */
  --ink-soft: #4A5A5C;     /* secondary text */
  --paper: #FFFFFF;        /* page background */
  --paper-deep: #F4F4F2;   /* light neutral — cards, alt sections */
  --gold: #9C7A34;         /* weathered brass — links, accents */
  --gold-bright: #B58A3D;  /* brass hover state */
  --teal: #3F5E59;         /* wayfinding teal — secondary accent */
  --rule: rgba(30,42,46,0.14);
  --rule-strong: rgba(30,42,46,0.28);

  --logo-dark: #000000;    /* "mista" */
  --logo-light: #AAA8A8;   /* "chris" */
  --accent-purple: #6456CA;/* current nav item + underline, from the reference header */

  --font-display: 'Jost', 'Century Gothic', var(--font-body);
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --max-width: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a{ color: var(--gold); text-decoration: none; }
a:hover, a:focus{ color: var(--gold-bright); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

h1, h2, h3, h4{
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}
h1{ font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2{ font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3{ font-size: 1.25rem; }

p{ margin: 0 0 1.2em; }

.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow{
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.9em;
}

/* -----------------------------------------------------------
   Signature motif — an abstract star-path / bearing mark.
   Deliberately geometric rather than referencing any specific
   cultural pattern: radiating sightlines from a fixed point,
   evoking navigation-by-star broadly.
----------------------------------------------------------- */
.wayfinder-mark{ display:block; opacity:0.9; }
.wayfinder-mark circle{ fill:none; stroke:currentColor; stroke-width:1; }
.wayfinder-mark line{ stroke:currentColor; stroke-width:1; }
.wayfinder-mark .star{ fill:currentColor; stroke:none; }

/* -----------------------------------------------------------
   Skip link
----------------------------------------------------------- */
.skip-link{
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75em 1.25em;
  z-index: 1000;
}
.skip-link:focus{
  left: var(--gutter);
  top: 0.75em;
}

/* -----------------------------------------------------------
   Header / nav
----------------------------------------------------------- */
.site-header{
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.site-header__inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(1.8rem, 5vw, 3rem) 0 clamp(1.2rem, 3vw, 1.8rem);
}
.site-title{
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1;
}
.site-title a{
  display: inline-block;
}
.site-title a:hover{ opacity: 0.85; }
.site-title__dark{ color: var(--logo-dark); }
.site-title__light{ color: var(--logo-light); }

.site-tagline{
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1rem, 2vw, 1.25rem);
  letter-spacing: 0.35em;
  color: var(--ink);
  margin: 0.5em 0 0;
  padding-left: 0.35em; /* optically re-center the wide letter-spacing */
}

.nav-toggle{
  display: none;
  background: none;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 0.5em 0.8em;
  margin-top: 1.6em;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

.primary-nav{ margin-top: clamp(1.6rem, 4vw, 2.4rem); }
.primary-nav ul{
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2.6em;
  margin: 0;
  padding: 0;
}
.primary-nav a{
  display: inline-block;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover{
  color: var(--accent-purple);
}
.primary-nav .current-menu-item > a{
  color: var(--accent-purple);
  border-bottom-color: var(--accent-purple);
}

@media (max-width: 700px){
  .nav-toggle{ display: inline-block; }
  .primary-nav{
    display: none;
    width: 100%;
  }
  .primary-nav.is-open{ display: block; }
  .primary-nav ul{
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--rule);
    margin-top: 1em;
  }
  .primary-nav a{
    display: block;
    padding: 0.9em 0;
    border-bottom: 1px solid var(--rule);
  }
  .primary-nav .current-menu-item > a{
    border-bottom: 1px solid var(--rule);
  }
}

/* -----------------------------------------------------------
   Buttons
----------------------------------------------------------- */
.btn{
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 0.75em 1.6em;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-radius: 1px;
  transition: background .15s ease, color .15s ease;
}
.btn:hover{ background: var(--ink); color: var(--paper); }
.btn--solid{ background: var(--ink); color: var(--paper); }
.btn--solid:hover{ background: var(--teal); color: var(--paper); border-color: var(--teal); }

/* -----------------------------------------------------------
   Artwork pairs (Original art page) — each artwork is a core
   Gallery block with 2 images (piece + in-situ shot). "Enlarge
   on click" on the images gives a native prev/next lightbox
   scoped to that pair, no plugin required (WP 6.4+).
----------------------------------------------------------- */
.entry-content .wp-block-gallery{
  margin: 0 auto clamp(3rem, 8vw, 5rem) !important;
  max-width: 760px;
}
.entry-content .wp-block-gallery + .wp-block-gallery{
  border-top: 1px solid var(--rule);
  padding-top: clamp(2rem, 6vw, 3rem);
}

/* FooGallery plugin output — matched to the same 760px column so
   it lines up with the title/details text under it. */
.entry-content .foogallery,
.entry-content .fg-gallery-container{
  max-width: 760px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Any other block (heading, paragraph, preformatted, group) placed
   in the gallery/content area lines up with the gallery above it,
   at the same width, on any screen size. */
.entry-content > *:not(.wp-block-gallery){
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.entry-content pre{
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Artwork caption — apply "artwork-title" to the title Heading
   block and "artwork-details" to the specs Paragraph block
   (Block settings → Advanced → Additional CSS class(es)). */
.artwork-title{
  max-width: 760px;
  margin: 0 auto 0.7em;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.artwork-title .artwork-number{
  display: inline-block;
  font-size: 0.55em;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink-soft);
  margin-left: 0.5em;
}
.artwork-details{
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* -----------------------------------------------------------
   Generic page / entry content
----------------------------------------------------------- */
.page-section{ padding: clamp(2rem, 6vw, 4rem) 0; }
.entry-content{ max-width: 800px; margin: 0 auto; }
.entry-content > *:first-child{ margin-top: 0; }

.page-header{
  border-bottom: 1px solid var(--rule);
  padding: clamp(2rem, 6vw, 3.5rem) 0 clamp(1.5rem, 4vw, 2rem);
}

/* -----------------------------------------------------------
   About page — two column
----------------------------------------------------------- */
.about-grid{
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}
.about-grid__portrait img{
  border: 1px solid var(--rule);
}
@media (max-width: 780px){
  .about-grid{ grid-template-columns: 1fr; }
  .about-grid__portrait{ max-width: 260px; }
}

/* -----------------------------------------------------------
   Gallery grids — style core Gutenberg Gallery / Image blocks
   so editors just add images via the block editor.
----------------------------------------------------------- */
.entry-content .wp-block-gallery,
.entry-content .wp-block-image{
  margin: 0 0 var(--gutter);
}
.wp-block-gallery{
  gap: clamp(0.8rem, 2vw, 1.5rem) !important;
}
.wp-block-gallery figure img{
  border: 1px solid var(--rule);
}
figcaption{
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
  margin-top: 0.5em;
}
.gallery-empty-note{
  border: 1px dashed var(--rule-strong);
  padding: 2em;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* -----------------------------------------------------------
   Footer
----------------------------------------------------------- */
.site-footer{
  border-top: 1px solid var(--rule);
  padding: 2.5em 0;
  margin-top: clamp(2rem, 6vw, 4rem);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-footer__inner{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1em;
}
.site-footer a{ color: var(--ink-soft); }
.site-footer a:hover{ color: var(--gold); }

/* -----------------------------------------------------------
   404
----------------------------------------------------------- */
.not-found{ padding: 5em 0; text-align: left; }
