/* ============================================
   Christopher Wadsworth — wadsworth.art
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@300;400;600&display=swap');

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

:root {
  --black:   #282828;
  --mid:     #808080;
  --accent:  #e50076;
  --white:   #ffffff;
  --font:    'Titillium Web', sans-serif;

  --nav-h:   88px;   /* LOCKED — 10px top+bottom added to previous 68px */

  /* --gutter: header keyline inset ONLY. Do not use for page content padding. */
  --gutter:  110px;

  /* --page-pad: left/right padding inside .page-wrap and footer.
     Independent of --gutter. Body content area = --max-w with no deduction. */
  --page-pad: 40px;

  --max-w:   1300px;  /* content area = 1300 - 2x110px gutter = 1080px visible */
  --hero-h:  520px;

  --sp-xs:      10px;
  --sp-sm:      22px;
  --sp-md:      36px;
  --sp-section: 44px;
  --sp-lg:      52px;
  --sp-xl:      68px;

  --img-gap: 48px;
  --logo-h:  32px;
  --burg-w:  26px;
  --burg-h:  22px;

  --fs-hero:      46px;
  --fs-heading:   38px;
  --fs-body:      26px;
  --fs-secondary: 22px;
  --fs-nav:       22px;
  --fs-micro:     16px;
  --fs-btn:       14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-weight: 300;
  color: var(--black);
  background: var(--white);
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--black); text-decoration: none; }

img {
  display: block;
  max-width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

/* ============================================
   HEADER
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  overflow: visible;
}
header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--black);
  pointer-events: none;
}

/* ============================================
   HAMBURGER
   Single button, always visible in the header.
   Animates burger → X in place when menu is open.
   All three lines are identical thickness (2px integer,
   no sub-pixel rendering issues).
   ============================================ */
.hamburger {
  position: relative;
  width: var(--burg-w);
  height: var(--burg-h);
  cursor: pointer;
  padding: 0;
  background: none;
  border: none;
  flex-shrink: 0;
  z-index: 200;  /* above nav panel */
}

.hamburger span {
  position: absolute;
  left: 0;
  width: var(--burg-w);
  height: 2px;   /* integer px — all three lines identical */
  background: var(--mid);
  transform-origin: center center;
  transition: top 0.28s ease 0.28s,      /* position moves after rotation clears */
              transform 0.28s ease 0s,    /* rotation starts immediately on close */
              opacity 0.18s ease,
              width 0.2s ease;
}

/* Burger state — three lines */
.hamburger .line-top    { top: 0; }
.hamburger .line-mid    { top: calc(50% - 1px); width: calc(var(--burg-w) * 0.7); }
.hamburger .line-bottom { top: calc(100% - 2px); }

/* X state — lines cross in the centre */
.hamburger.open span {
  transition: top 0.28s ease 0s,          /* position moves first */
              transform 0.28s ease 0.28s, /* rotation follows */
              opacity 0.18s ease,
              width 0.2s ease;
}
.hamburger.open .line-top    { top: calc(50% - 1px); transform: rotate(45deg); }
.hamburger.open .line-mid    { opacity: 0; width: 0; }
.hamburger.open .line-bottom { top: calc(50% - 1px); transform: rotate(-45deg); }

/* ============================================
   LOGO
   ============================================ */
.logo { display: flex; align-items: center; }
.logo img { height: var(--logo-h); width: auto; pointer-events: none; user-select: none; }

/* ============================================
   NAV PANEL
   Slides in from the left. Top padding pushes links
   down so they start below the header / burger area.
   Left padding aligns text with the burger icon's
   left edge (which sits at var(--gutter)).
   ============================================ */
.nav-overlay {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(40,40,40,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 150;
}
.nav-overlay.open { opacity: 1; pointer-events: all; }

.nav-drawer {
  position: fixed;
  top: var(--nav-h);   /* starts below the header — burger/X always visible */
  left: 0;
  width: 320px;
  height: calc(100% - var(--nav-h));
  background: var(--white);
  padding-top: var(--sp-md);
  padding-left: var(--gutter);
  padding-right: var(--sp-md);
  padding-bottom: var(--sp-lg);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 160;
  overflow-y: auto;
}
.nav-drawer.open { transform: translateX(0); }

.nav-drawer nav ul { list-style: none; }
.nav-drawer nav ul li a {
  display: block;
  padding: 10px 0;
  font-size: var(--fs-nav);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--black);
  border: none;
  transition: color 0.18s;
}
.nav-drawer nav ul li a:hover,
.nav-drawer nav ul li a.active { color: var(--accent); }

/* ============================================
   FOOTER
   ============================================ */
footer { margin-top: var(--sp-section); }

.footer-row {
  border-top: 1px solid var(--accent);
  padding-top: var(--sp-sm);
  padding-bottom: var(--sp-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
footer p {
  font-size: var(--fs-micro);
  color: var(--black);
  line-height: 1.2;
}

.instagram-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--mid);
  transition: color 0.2s ease;
}
.instagram-icon:hover { color: var(--accent); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  width: 100%;
  height: var(--hero-h);
  overflow: hidden;
  background: #c8c8c8;
}
.hero > picture { display: block; width: 100%; height: 100%; line-height: 0; }
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-content {
  position: absolute;
  bottom: var(--sp-md);
  left: var(--gutter);
  color: var(--black);
}
.hero-content .eyebrow {
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  color: var(--black);
}
.hero-content h2 {
  font-size: var(--fs-hero);
  font-weight: 300;
  line-height: 1;
  margin-bottom: 10px;
  margin-left: -3px;   /* compensates for Titillium Web left-bearing at large size */
  color: var(--black);
}

/* Series hero on category page */
.series-hero {
  position: relative;
  width: 100%;
  height: var(--hero-h);
  overflow: hidden;
  background: #c8c8c8;
}
.series-hero > a { display: block; width: 100%; height: 100%; }
.series-hero > a > picture { display: block; width: 100%; height: 100%; line-height: 0; }
.series-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.series-hero .hero-content {
  position: absolute;
  bottom: var(--sp-md);
  left: var(--gutter);
}

/* ============================================
   BUTTON
   ============================================ */
.btn {
  display: inline-block;
  padding: 4px 20px;
  border: 1px solid var(--black);
  font-family: var(--font);
  font-size: var(--fs-btn);
  text-transform: uppercase;
  color: var(--black);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.btn:hover { background: var(--black); color: var(--white); }

/* ============================================
   LAYOUT
   --max-w: 1300px. With --gutter: 110px each side,
   visible content area = 1300 - 220 = 1080px.
   padding is always applied so content never touches
   browser edges at any viewport width.
   ============================================ */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.post-hero-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: var(--sp-lg);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section-divider {
  border: none;
  border-top: 1px solid var(--black);
  margin-top: var(--sp-section);
  margin-bottom: var(--sp-section);
}

/* ============================================
   HOME + ABOUT
   ============================================ */
.home-bio,
.about-bio { padding: var(--sp-lg) 0 0; }

.home-bio p,
.about-bio p {
  max-width: 810px;   /* 75% of 1080px body — 270px space to the right */
  font-size: var(--fs-body);
  line-height: 1.2;
  color: var(--black);
  margin-bottom: 1em;
}

/* ============================================
   ABOUT — awards / exhibitions
   ============================================ */
.awards-section,
.exhibitions-section { padding: 0; }

.awards-section h2,
.exhibitions-section h2,
.collections-section h2 {
  font-size: var(--fs-heading);
  font-weight: 300;
  line-height: 1;
  color: var(--black);
  margin-bottom: var(--sp-sm);
}

.award-row,
.exhibition-row {
  display: flex;
  gap: 24px;
  padding: 4px 0;
  font-size: var(--fs-secondary);
  line-height: 1.2;
  color: var(--black);
}
.year { min-width: 38px; flex-shrink: 0; color: var(--black); }
.award-detail, .exhibition-detail { color: var(--black); }
.award-detail em, .exhibition-detail em { font-style: italic; }

/* ============================================
   CATEGORY PAGE
   ============================================ */
.page-heading {
  padding: var(--sp-lg) 0 var(--sp-section);
  font-size: var(--fs-heading);
  font-weight: 300;
  line-height: 1;
  color: var(--black);
}
.category-label {
  display: block;
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  color: var(--black);
  margin-top: 4px;
}

/* Space between full-width hero image and the keyline below it on category page.
   Uses --sp-lg (not --sp-section) to match the space the heading has above the hero. */
.post-hero-wrap .section-divider {
  margin-top: 0;  /* top space handled by post-hero-wrap padding-top */
}

/* Sculpture Collections h2 — same bottom space as page-heading above hero */
.collections-section { padding: 0; }
.collections-section h2 {
  margin-bottom: var(--sp-section);
}
.collections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: var(--img-gap);
  row-gap: var(--sp-xl);
  margin-top: 0;
}
.collection-card { display: flex; flex-direction: column; }
.collection-card > a { display: block; }

.collection-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  width: 100%;
}
.collection-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.collection-card:hover .collection-card-img img { transform: scale(1.03); }

.collection-overlay { position: absolute; bottom: 14px; left: 14px; }

.collection-label {
  margin-top: var(--sp-sm);
  font-size: var(--fs-secondary);
  font-weight: 300;
  line-height: 1.2;
  color: var(--black);
}
.collection-sub {
  font-size: var(--fs-micro);
  color: var(--black);
  letter-spacing: 0.06em;
  margin-top: 3px;
}

/* ============================================
   SERIES PAGE
   ============================================ */
.series-header { padding: var(--sp-lg) 0 var(--sp-section); }
.series-header h1 {
  font-size: var(--fs-heading);
  font-weight: 300;
  line-height: 1;
  color: var(--black);
  margin-bottom: 4px;
}
.series-tag {
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  color: var(--black);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: var(--img-gap);
  row-gap: var(--sp-lg);
}
.featured-grid > div { display: flex; flex-direction: column; }
.featured-grid a { display: block; }

.featured-img-wrap {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.featured-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-caption {
  font-size: var(--fs-secondary);
  color: var(--black);
  margin-top: var(--sp-sm);
  line-height: 1.2;
}

.series-description { max-width: 810px; }   /* 75% of 1080px body — 270px right space */
.series-description p {
  font-size: var(--fs-body);
  line-height: 1.2;
  color: var(--black);
  margin-bottom: 1em;
}
.series-description .secondary-body {
  font-size: var(--fs-secondary);
  line-height: 1.2;
  color: var(--black);
  margin-bottom: 0;
}

/* Artwork thumbnail grid — section wrapper needs no extra top padding;
   spacing comes from .section-divider margin-bottom above it */
.artwork-grid-section { padding: 0; }

.artwork-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: var(--img-gap);
  row-gap: var(--sp-lg);
}
.artwork-thumb { display: flex; flex-direction: column; }
.artwork-thumb a { display: block; }

.artwork-img-wrap {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.artwork-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s;
}
.artwork-thumb:hover .artwork-img-wrap img { opacity: 0.78; }

.artwork-thumb-title {
  font-size: var(--fs-secondary);
  line-height: 1.2;
  color: var(--black);
  margin-top: var(--sp-sm);
}

/* ============================================
   ARTWORK DETAIL PAGE
   ============================================ */
.artwork-detail { padding: var(--sp-lg) 0 0; }

.artwork-slideshow { cursor: pointer; }
.artwork-slideshow .slide { display: none; }
.artwork-slideshow .slide.active { display: block; }

/* Artwork image container — full body width, fixed aspect ratio 1080:480.
   The container always fills the available width and maintains its
   proportions as the viewport narrows. The image sits inside it
   unconstrained at its natural proportions via object-fit:contain.
   No fixed heights, no width limits on the image — the container
   does all the sizing work and the image simply follows. */
.slide-img-wrap {
  width: 100%;
  aspect-ratio: 1080 / 480;
  background: transparent;
  display: block;
  position: relative;
}
.slide-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.slide-dots { display: flex; gap: 5px; margin-top: 12px; }
.dot {
  width: 7px;
  height: 7px;
  border-radius: 0;
  background: var(--mid);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.18s;
}
.dot.active { background: var(--black); }

.artwork-info {
  width: 100%;   /* full page-wrap width = 960px */
  margin-top: var(--sp-section);
  padding-top: var(--sp-section);
  border-top: 1px solid var(--black);
}
/* Inner content readable width */
.artwork-info-inner { max-width: 810px; }   /* 75% of 1080px — 270px right space */

.artwork-info h1 {
  font-size: var(--fs-heading);
  font-weight: 300;
  line-height:1;
  color: var(--black);
  margin-bottom: 16px;
}
.artwork-info .award-tag {
  font-size: var(--fs-secondary);
  color: var(--black);
  margin-bottom: var(--sp-sm);
  line-height: 1.2;
}
.artwork-meta {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 5px 12px;
  font-size: var(--fs-secondary);
  color: var(--black);
  line-height: 1.2;
  margin-bottom: var(--sp-sm);
}
.artwork-meta strong { font-weight: 600; color: var(--black); }

.availability {
  font-size: var(--fs-secondary);
  color: var(--black);
  display: block;
}

/* Additional Information section (code name — heading text varies per artwork page).
   On Racing Porsche page the heading reads "Judges' Comments".
   Full-width keyline, 810px inner text column. */
.additional-info {
  width: 100%;
  margin-top: var(--sp-section);
  padding-top: var(--sp-section);
  border-top: 1px solid var(--black);
}
.additional-info-inner { max-width: 810px; }   /* 75% of 1080px — 270px right space */

.additional-info h2 {
  font-size: var(--fs-heading);
  font-weight: 300;
  line-height: 1;
  color: var(--black);
  margin-bottom: var(--sp-md);
}
.judge-entry { margin-bottom: var(--sp-md); }
.judge-entry:last-child { margin-bottom: 0; }
.judge-name {
  font-size: var(--fs-secondary);
  font-weight: 600;
  color: var(--black);
  margin-bottom: 6px;
}
.judge-entry p {
  font-size: var(--fs-secondary);
  line-height: 1.2;
  color: var(--black);
}

/* Secondary body text inside additional-info (recipes, notes etc) */
.additional-info-body {
  max-width: 810px;
}
.additional-info-body p {
  font-size: var(--fs-secondary);
  line-height: 1.4;
  color: var(--black);
  margin-bottom: 0.8em;
}
.additional-info-body p:last-child { margin-bottom: 0; }
.additional-info-body .recipe-heading {
  font-weight: 600;
  margin-top: var(--sp-sm);
}
.additional-info-body ul {
  list-style: none;
  margin: 0.4em 0 0.8em;
  padding: 0;
}
.additional-info-body ul li {
  font-size: var(--fs-secondary);
  line-height: 1.4;
  color: var(--black);
}

/* Gallery link — inline, inherits text colour, underlined */
.gallery-link {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gallery-link:hover { color: var(--accent); }

/* Certificate of authenticity — full width keyline, 810px inner text */
.certificate-section {
  width: 100%;
  margin-top: var(--sp-section);
  padding-top: var(--sp-section);
  border-top: 1px solid var(--black);
}
.certificate-section p {
  max-width: 810px;
  font-size: var(--fs-secondary);
  line-height: 1.2;
  color: var(--black);
}

/* Back link — no bottom margin (footer margin-top handles the gap) */
.back-link {
  display: inline-block;
  margin-top: var(--sp-section);
  margin-bottom: 0;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-section {
  padding: var(--sp-lg) 0 var(--sp-section);
  max-width: 810px;   /* 75% of 1080px — 270px right space */
}
.contact-section h1 {
  font-size: var(--fs-heading);
  font-weight: 300;
  line-height: 1;
  color: var(--black);
  margin-bottom: var(--sp-sm);
}
.contact-section > p {
  font-size: var(--fs-body);
  line-height: 1.2;
  color: var(--black);
  margin-bottom: 1em;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  margin-top: var(--sp-md);
}
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label {
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
}
.form-group input,
.form-group textarea {
  font-family: var(--font);
  font-weight: 300;
  font-size: var(--fs-secondary);
  padding: 8px 0;
  border: none;
  border-bottom: 1px solid var(--black);
  background: transparent;
  color: var(--black);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { min-height: 110px; }
.form-submit { margin-top: var(--sp-xs); }
.form-submit .btn { padding: 10px 30px; }
.captcha-wrap { margin-top: 4px; }

/* ============================================
   RESPONSIVE
   Only the custom property values change at each
   breakpoint — every element uses var(--fs-*) so
   all sizes update automatically.

   Desktop  (default):  hero=46  head=38  body=28  sec=22  nav=22  micro=16  btn=14
   768px  (tablet):     hero=40  head=32  body=24  sec=20  nav=20  micro=14  btn=14
   480px  (mobile):     hero=36  head=28  body=22  sec=18  nav=18  micro=12  btn=12
   ============================================ */

@media (max-width: 1300px) {
  :root { --gutter: 72px; }
}

/* Artwork image box: progressively taller ratio on smaller viewports
   so images get more vertical space as the body width shrinks.
   Body widths at each trigger:
     960px viewport  → ~820px body  → ratio 2:1
     800px viewport  → ~680px body  → ratio 16:9 (as specified)
     500px viewport  → ~420px body  → ratio 4:3
*/
@media (max-width: 960px) {
  :root {
    --gutter:  60px;
    --img-gap: 36px;
    --hero-h:  440px;
  }
  .logo img { height: 28px; }   /* LOCKED: 28px at 960px */
  .slide-img-wrap { aspect-ratio: 2 / 1; }
}

@media (max-width: 800px) {
  .slide-img-wrap { aspect-ratio: 16 / 9; }
}

@media (max-width: 768px) {
  :root {
    --gutter:     40px;
    --img-gap:    24px;
    --hero-h:     340px;
    --sp-xl:      52px;
    --sp-lg:      40px;
    --sp-md:      28px;
    --sp-section: 32px;

    --fs-hero:      40px;
    --fs-heading:   32px;
    --fs-body:      24px;
    --fs-secondary: 20px;
    --fs-nav:       20px;
    --fs-micro:     14px;
    --fs-btn:       14px;
  }
  .logo img { height: 24px; }   /* LOCKED: 24px at 768px */
  .collections-grid,
  .featured-grid,
  .artwork-grid { grid-template-columns: 1fr; }
  .award-row, .exhibition-row { gap: 14px; }
}

@media (max-width: 500px) {
  .slide-img-wrap { aspect-ratio: 4 / 3; }
}

@media (max-width: 480px) {
  :root {
    --gutter:     24px;
    --img-gap:    16px;
    --hero-h:     240px;
    --sp-lg:      32px;
    --sp-md:      20px;
    --sp-section: 26px;

    --fs-hero:      36px;
    --fs-heading:   28px;
    --fs-body:      22px;
    --fs-secondary: 18px;
    --fs-nav:       18px;
    --fs-micro:     12px;
    --fs-btn:       12px;
  }
  .logo img { height: 20px; }   /* LOCKED: 20px at 480px */
  .award-row, .exhibition-row { flex-direction: column; gap: 0; }
  .year { min-width: unset; }
}

/* ============================================
   UTILITIES
   ============================================ */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.text-accent { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
