/* Artist on a Mountain: shared styles.
   Reproduces the original Divi layout (grid, spacing, type) without the theme.
   Page-specific spacing lives in a <style> block at the top of each page. */

:root {
  --text: #4a4a4a;        /* body copy (was #666, too light) */
  --heading: #272727;
  --link: #2ea3f2;
  --nav: #333;            /* menu text (was #777 on top of artwork) */
  --nav-current: #2f2a7b;
  --accent: #2ea3f2;
  --bg: #fff;
  --header-bg: rgba(255, 255, 255, 0.9);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding-bottom: 10px;
  color: var(--heading);
  font-weight: 600;
  line-height: 1.25;   /* was 1em, which made multi-line headings collide */
}
h1 { font-size: 42px; font-weight: 700; line-height: 1.1; }
h2 { font-size: 26px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 15px; }

h1, h2, h3, h4, h5, h6, .lede, blockquote, figcaption { text-wrap: balance; }
p, li, dd, td { text-wrap: pretty; }

p { margin: 0; padding-bottom: 1em; color: var(--heading); }
p:last-of-type { padding-bottom: 0; }
strong, b { font-weight: 700; }

.text ul, .text ol { margin: 0; padding: 0 0 23px 1.2em; line-height: 1.7; }
.text ul { list-style: disc; }

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

/* ------------------------------------------------------------ header */

.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.site-header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 80%;
  max-width: 1080px;
  height: 94px;
  margin: 0 auto;
}
.logo { display: block; line-height: 0; margin-left: 4px; }
.logo img { width: 94px; height: auto; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; align-items: center; }
.site-nav > ul > li { position: relative; padding-right: 22px; }
.site-nav > ul > li:last-child { padding-right: 0; }
.site-nav > ul > li > a,
.sub-toggle {
  display: block;
  padding: 37px 0;
  color: var(--nav);
  font: 600 15px/20px 'Open Sans', Arial, sans-serif;
  background: none;
  border: 0;
  cursor: pointer;
  transition: opacity .4s ease-in-out;
}
.site-nav > ul > li > a:hover, .sub-toggle:hover { opacity: .7; text-decoration: none; }
.site-nav li.current > a { color: var(--nav-current); }
.site-nav li.current > .sub-toggle { color: var(--accent); }
.site-nav .sub-menu li.current > a { color: var(--nav-current); }
.sub-toggle::after {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  margin: 0 0 3px 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.sub-menu {
  position: absolute;
  top: 94px;
  left: 0;
  z-index: 10;
  width: 240px;
  padding: 20px 0 !important;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease-in-out, visibility .2s;
}
.has-sub:hover .sub-menu,
.has-sub:focus-within .sub-menu,
.has-sub.open .sub-menu { opacity: 1; visibility: visible; }
.sub-menu a {
  display: block;
  padding: 6px 20px;
  color: var(--nav);
  font: 600 15px/1.45 'Open Sans', Arial, sans-serif;
}
.sub-menu a:hover { background: rgba(0, 0, 0, .03); text-decoration: none; }

.menu-toggle { display: none; }

/* ------------------------------------------------------------ layout */

main { display: block; }

.section {
  position: relative;
  padding: 114px 0 4%;
  background-color: #fff;
}
.section.fullwidth { padding: 0; }

.row {
  position: relative;
  display: flex;
  align-items: flex-start;
  width: 80%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 2% 0;
}
.row:empty { display: none; }
.row.full { width: 100%; max-width: 100%; }

.col { position: relative; min-width: 0; margin-right: 5.5%; }
.col.last, .col:last-child { margin-right: 0; }
.col-4_4 { width: 100%; }
.col-1_2 { width: 47.25%; }
.col-1_3 { width: 29.6667%; }
.col-2_3 { width: 64.833%; }
.col-1_4 { width: 20.875%; }
.col-3_4 { width: 73.625%; }
.col-2_5 { width: 36.7%; }
.col-3_5 { width: 57.8%; }

.gutters1 .col, .row.gutters1 .col { margin-right: 0; }
.gutters1 .col-1_2, .row.gutters1 .col-1_2 { width: 50%; }
.gutters1 .col-1_3, .row.gutters1 .col-1_3 { width: 33.3333%; }
.gutters1 .col-2_3, .row.gutters1 .col-2_3 { width: 66.6667%; }
.gutters1 .col-1_4, .row.gutters1 .col-1_4 { width: 25%; }
.gutters1 .col-3_4, .row.gutters1 .col-3_4 { width: 75%; }
.gutters1 .col-2_5, .row.gutters1 .col-2_5 { width: 40%; }
.gutters1 .col-3_5, .row.gutters1 .col-3_5 { width: 60%; }

.mod { position: relative; margin-bottom: 2.75%; }
.col-1_2 > .mod { margin-bottom: 5.82%; }
.col-1_3 > .mod { margin-bottom: 9.27%; }
.gutters1 .mod, .row.gutters1 .mod { margin-bottom: 0; }
.col > .mod:last-child { margin-bottom: 0; }

.align-center { text-align: center; }

@media (min-width: 1350px) {
  .section { padding: 54px 0; }
  .section.fullwidth { padding: 0; }
  .row { padding: 27px 0; }
}

/* ------------------------------------------------------------ modules */

.image { line-height: 0; max-width: 100%; margin-left: auto; margin-right: auto; }
.img-wrap { display: inline-block; position: relative; max-width: 100%; }
.img-wrap a { display: block; }

.fwimage { line-height: 0; }
.fwimage img { width: 100%; }

.code form table { width: 100%; border: 1px solid #eee; border-collapse: collapse; margin-bottom: 14px; }
.code form td { padding: 6px 20px; border-top: 1px solid #eee; color: var(--heading); }
.code form select { max-width: 100%; font: inherit; font-size: 14px; padding: 2px 4px; }
.code form input[type=image] { margin-top: 4px; }

.divider { height: 23px; }
.divider::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  border-top: 1px solid #7ebec5;
}

.button .btn {
  display: inline-block;
  padding: .3em 1em;
  border: 2px solid currentColor;
  border-radius: 3px;
  color: var(--accent);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.7;
  transition: background .3s;
}
.button .btn:hover { background: rgba(0, 0, 0, .05); text-decoration: none; }

.video-box { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-box iframe, .video-box video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.section.has-video { min-height: 56.25vw; overflow: hidden; }

/* galleries */
.gallery-full { position: relative; overflow: hidden; line-height: 0; }
.gallery-full .gallery-items { display: flex; transition: transform .5s ease; }
.gallery-full .gallery-item { flex: 0 0 100%; }
.gallery-full img { width: 100%; }

.gallery-grid .gallery-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-grid img { width: 100%; }
.gallery-title { display: none; }

/* sliders */
.slider { position: relative; overflow: hidden; }
.slider .slides { position: relative; height: 100%; }
.slider .slide {
  position: absolute;
  inset: 0;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity .6s ease;
}
.slider .slide.active { opacity: 1; z-index: 1; }
.slider:not([data-slider]) .slide { opacity: 1; }
.slider.fullscreen { height: 100vh; height: 100svh; min-height: 600px; }

.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px; height: 64px;
  margin-top: -32px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, .6);
  color: #333;
  font-size: 44px;
  line-height: 60px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s, background .3s;
}
.slider-arrow.prev { left: 22px; }
.slider-arrow.next { right: 22px; }
.slider:hover .slider-arrow, .gallery-full:hover .slider-arrow, .slider-arrow:focus-visible { opacity: 1; }
.slider-arrow:hover { background: rgba(255, 255, 255, .9); }
.slider-dots {
  position: absolute;
  bottom: 20px; left: 0; right: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.slider-dots button {
  width: 9px; height: 9px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, .25);
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
}
.slider-dots button.active { background: #fff; }

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(11, 11, 11, .9);
  cursor: zoom-out;
}
.lightbox img { max-height: 100%; max-width: 100%; width: auto; box-shadow: 0 0 8px rgba(0, 0, 0, .6); }
.lightbox button {
  position: absolute;
  top: 10px; right: 14px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
}

/* ------------------------------------------------------------ tablet and below */

@media (max-width: 980px) {
  .site-header .container { height: 80px; }
  .logo img { width: 77px; }
  .menu-toggle {
    display: block;
    width: 44px; height: 44px;
    padding: 10px 7px;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .menu-toggle .bars,
  .menu-toggle .bars::before,
  .menu-toggle .bars::after {
    display: block;
    width: 30px; height: 3px;
    background: var(--nav);
    border-radius: 2px;
    content: '';
    transition: transform .2s;
  }
  .menu-toggle .bars { position: relative; }
  .menu-toggle .bars::before { position: absolute; top: -9px; }
  .menu-toggle .bars::after { position: absolute; top: 9px; }
  .menu-toggle[aria-expanded=true] .bars { background: transparent; }
  .menu-toggle[aria-expanded=true] .bars::before { transform: translateY(9px) rotate(45deg); }
  .menu-toggle[aria-expanded=true] .bars::after { transform: translateY(-9px) rotate(-45deg); }

  .site-nav {
    display: none;
    position: absolute;
    top: 80px; left: 0; right: 0;
    padding: 5%;
    background: #fff;
    border-top: 3px solid var(--accent);
    box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
  }
  .site-nav.open { display: block; }
  .site-nav > ul { display: block; }
  .site-nav > ul > li { padding: 0; }
  .site-nav > ul > li > a, .sub-toggle {
    width: 100%;
    padding: 10px 5%;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
  }
  .sub-toggle::after { display: none; }
  .sub-menu {
    position: static;
    width: auto;
    padding: 0 !important;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
  }
  .sub-menu a { padding: 10px 5% 10px 10%; border-bottom: 1px solid rgba(0, 0, 0, .05); }

  .section { padding: 114px 0 50px; }
  .section.fullwidth { padding: 0; }
  .row { display: block; padding: 30px 0; }
  .col { width: 100% !important; margin-right: 0; margin-bottom: 30px; }
  .col.last, .col:last-child { margin-bottom: 0; }
  .col.empty { display: none; }
  .mod, .col-1_2 > .mod, .col-1_3 > .mod { margin-bottom: 30px; }
  .gutters1 .mod, .row.gutters1 .mod { margin-bottom: 0; }
  .col > .mod:last-child { margin-bottom: 0; }
  .slider-arrow { opacity: 1; }
}

/* ------------------------------------------------------------ phone */

@media (max-width: 767px) {
  body { font-size: 16px; }
  h1 { font-size: 2.2em; }
  /* the original rows were 80% wide and some text ran off the screen edge */
  .row { width: auto; margin-left: 20px; margin-right: 20px; }
  .row.full { margin: 0; }
  .site-header .container { width: auto; margin: 0 20px; }
  .slider.fullscreen { min-height: 400px; }
  .gallery-grid .gallery-items { grid-template-columns: 1fr; }
}

/* Home: the first slide was set to its natural size in Divi, which left a
   white band under the painting on most screens. Fill the slide instead.
   The slider is capped in height so it doesn't grow huge on tall screens,
   and every painting is anchored to its top edge. */
/* The slider takes the shape of the paintings (1920 x 740), so none of them
   is cropped, and starts below the menu bar instead of behind it. */
.page-home .slider.fullscreen { height: auto; min-height: 0; }
.page-home .slider .slides { height: auto; margin-top: 94px; aspect-ratio: 1920 / 740; }
.page-home .slider .slide { background-size: cover !important; background-position: top center !important; }
/* The third painting is a taller shape: show all of it, on its own dark edge colour */
.page-home .slider .slide_2 { background-size: contain !important; background-color: #00040f !important; }
@media (max-width: 980px) { .page-home .slider .slides { margin-top: 80px; } }

/* Pencil-texture banner at the top of About, Commission, Draft Sketches and
   Price List: taller than the Divi original. It sits under the menu bar. */
main .section_0 > .row_0.full.two-col-m { padding: 0 0 394px !important; margin-top: 0 !important; background-size: cover; background-position: center; }
@media (max-width: 980px) { main .section_0 > .row_0.full.two-col-m { padding-bottom: 280px !important; } }
@media (max-width: 767px) { main .section_0 > .row_0.full.two-col-m { padding-bottom: 220px !important; } }

@media (max-width: 980px) {
  /* order forms had 50px side margins that pushed phones sideways */
  .mod.code { margin-left: 0 !important; margin-right: 0 !important; }
  .code form select { width: 100%; }
  .code form td { padding: 6px 12px; }
}
main { overflow-x: clip; }

/* block-editor content (Draft Sketches, Ojoraptorsaurus) */
.section.blocks { padding-top: 0; }
.blocks-content h2 { padding: 30px 0 14px; font-weight: 400; text-align: center; }
.blocks-content .has-text-align-center { text-align: center; }
.blocks-content .wp-block-image { margin: 0 0 12px; text-align: center; line-height: 0; }
.blocks-content figure { display: inline-block; margin: 0; max-width: 100%; }
.blocks-content p { padding-bottom: 1em; }
.blocks-content p:last-child { padding-bottom: 0; }
.section.fullwidth > .mod { margin-bottom: 0; }
.loose h2 { font-weight: 400; padding-top: 30px; }
/* self-hosted videos keep their own shape (YouTube embeds stay 16:9) */
.video-box:has(> video) { aspect-ratio: auto; background: none; line-height: 0; }
.video-box > video { position: static; height: auto; }

/* ------------------------------------------------------------ hover and focus
   Every clickable thing changes clearly on hover (pointer devices only, so
   touch screens don't get stuck states) and gets a matching keyboard focus. */

.site-nav > ul > li > a, .sub-toggle, .sub-menu a, .button .btn, .slider-arrow,
.slider-dots button, .menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after,
.lightbox button, .logo img, a[data-lightbox] img, .code input[type=image] {
  transition: color .2s, background-color .2s, border-color .2s, box-shadow .2s, transform .2s, opacity .2s, filter .2s;
}

@media (hover: hover) {
  .site-nav > ul > li > a:hover, .sub-toggle:hover { opacity: 1; color: var(--accent); }
  .sub-menu a:hover { background: #eef6fd; color: var(--accent); }
  .button .btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(46, 163, 242, .35); }
  .slider-arrow:hover { background: #333; color: #fff; }
  .slider-dots button:hover { background: var(--accent); border-color: var(--accent); }
  .menu-toggle:hover .bars, .menu-toggle:hover .bars::before, .menu-toggle:hover .bars::after { background: var(--accent); }
  .menu-toggle[aria-expanded=true]:hover .bars { background: transparent; }
  .lightbox button:hover { color: var(--accent); }
  .logo:hover img { opacity: .75; }
  a[data-lightbox]:hover img { opacity: .85; }
  .code input[type=image]:hover { transform: translateY(-2px); filter: brightness(1.08) drop-shadow(0 3px 5px rgba(0, 0, 0, .25)); }
}

.site-nav a:focus-visible, .sub-toggle:focus-visible, .button .btn:focus-visible, .slider-arrow:focus-visible,
.slider-dots button:focus-visible, .menu-toggle:focus-visible, .lightbox button:focus-visible, .logo:focus-visible,
a[data-lightbox]:focus-visible, .code input[type=image]:focus-visible, .code select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.site-nav > ul > li > a:focus-visible, .sub-toggle:focus-visible { color: var(--accent); }
.button .btn:focus-visible { background: var(--accent); color: #fff; }
.slider-arrow:focus-visible { background: #333; color: #fff; }
/* the Projects button is already blue on project pages, so hover goes dark instead */
@media (hover: hover) {
  .site-nav li.current > .sub-toggle:hover { color: var(--nav-current); }
}
.site-nav li.current > .sub-toggle:focus-visible { color: var(--nav-current); }

/* About: the Contact block was one Divi row per line, which spread it out.
   Pull the label and value pairs together. */
.page-about .row_5 { padding-bottom: 10px; }
.page-about .row_6, .page-about .row_7, .page-about .row_8, .page-about .row_9 { padding-top: 0; padding-bottom: 0; }
.page-about .row_6 p, .page-about .row_8 p { margin: 0 0 2px; padding: 0; }
.page-about .row_7 h4, .page-about .row_9 h4 { margin: 0; padding: 0; }
.page-about .row_7 { padding-bottom: 22px; }
.page-about .row_10 { display: none; }

/* Project pages open with a full-width painting: start it below the menu bar */
main .section_0.work > .row_0.full:not(.two-col-m) { margin-top: 94px !important; }
@media (max-width: 980px) { main .section_0.work > .row_0.full:not(.two-col-m) { margin-top: 80px !important; } }
/* Contact page: the heading and image started behind the menu bar */
.page-contact main .section_0 { padding-top: 124px !important; }
@media (max-width: 980px) { .page-contact main .section_0 { padding-top: 100px !important; } }

/* Virtual Gallery: the video starts below the menu bar and keeps its own
   1920 x 800 shape, so none of it is cropped */
.page-virtualgallery .slider.fullscreen { height: auto; min-height: 0; }
.page-virtualgallery .slider .slides { height: auto; margin-top: 94px; aspect-ratio: 1920 / 800; }
@media (max-width: 980px) { .page-virtualgallery .slider .slides { margin-top: 80px; } }
