/* ========== Base Reset (light-touch) ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; }

/* ========== Theme ========== */
:root{
  --bg: #ffffff;
  --ink: #111111;
  --muted: #6b7280;          /* neutral gray */
  --line: #e5e7eb;           /* light divider */
  --accent: #bfaea3;         /* subtle warm accent, tweak to taste */
  --maxw: 1200px;
  --pad: 24px;

  /* Carousel sizing */
  --slide-w: 68vw;           /* central slide width */
  --gap: 24px;               /* gap between slides */
  --carousel-h: clamp(420px, 68vh, 900px);

  /* Arrow fallback = half carousel height */
  --arrow-fixed-top-fallback: calc(var(--carousel-h) / 2);
}

@media (min-width: 900px){
  :root{ --slide-w: 62vw; }
}
@media (min-width: 1200px){
  :root{ --slide-w: 800px; }
}

body{
  background: var(--bg);
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.5;
}

/* Utility */
.wrap{
  width: 100%;
  max-width: var(--maxw);
  padding: 0 var(--pad);
  margin: 0 auto;
}
.visually-hidden{
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); border: 0; padding: 0; margin: -1px;
}

/* ========== Header ========== */
.site-header{
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap{
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px;
}
.hero-intro {
  text-align: center;
  padding: 60px 20px 20px;
  background: var(--bg);
}
.hero-intro h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem);
  color: #111;
  letter-spacing: 0.02em;
  margin: 0;
}
.brand-link{
  font-weight: 700; letter-spacing: 0.08em; display: inline-block;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;;
}
.main-nav{
  display: flex; gap: 20px; flex-wrap: wrap;
}
.main-nav a{ padding: 8px 0; }
.main-nav a:hover{ color: var(--muted); }

/* Underline the active item in the TOP menu only */
.main-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* ========== Carousel Section ========== */
.carousel-section{ padding: 40px 0 20px; }
.carousel{
  position: relative;
  --arrow-fixed-top: calc(var(--carousel-h) / 2); /* CSS fallback; JS sets exact value */
}
.track-viewport{
  overflow: hidden;
  position: relative;
  height: var(--carousel-h);
}
.track{
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--gap);
  will-change: transform;
  transition: transform 400ms ease;
  padding: 12px 0;
}
.slide{
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 100%;
  flex: 0 0 var(--slide-w);
}
.slide img{
  width: auto;
  height: 100%;
  object-fit: contain;
}

/* Arrows */
.arrow{
  position: absolute;
  top: var(--arrow-fixed-top, var(--arrow-fixed-top-fallback));
  transform: translateY(-50%);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  z-index: 5;
}
.arrow:hover{ background: #fff; }
.arrow-left{ left: 10px; }
.arrow-right{ right: 10px; }

.carousel-overlay-link{ position: absolute; inset: 0; z-index: 1; }

/* ========== CTA (About / Contact) ========== */
.cta-section{
  padding: 36px 0 64px;
  border-top: 1px solid var(--line);
}
.grid-2{ display: grid; gap: 28px; }
@media (min-width: 840px){
  .grid-2{ grid-template-columns: 1fr 1fr; }
}
.parallax-card{ display: grid; gap: 14px; color: inherit; }
.parallax{
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #f6f6f6;
  height: 360px;
  display: flex; align-items: center; justify-content: center;
}
.parallax img{
  width: 100%; height: 100%;
  object-fit: contain;
  transform: none !important;
}
@media (max-width: 640px){ 
  .parallax { height: 260px; } 

/* Header proportions on phones: give nav more room */
.site-header .wrap{
  display: flex;
  align-items: center;
}

/* shrink brand column, grow nav column */
.brand{               /* tweak 30–38% if you need more/less */
  flex: 0 0 34%;
  min-width: 0;
}
.main-nav{
  flex: 1 1 66%;      /* nav gets the rest */
  min-width: 0;
  flex-wrap: nowrap;  /* keep all links on one line */
  justify-content: space-between;
  gap: 10px;          /* you already asked for 10px */
}
.main-nav a{
  white-space: nowrap; /* don’t allow per-link wraps */
}

 /* Hero padding on phones */
  .hero-intro{
    padding: 20px 20px 20px; /* top right/left bottom */
  }

}

.card-text h2{ margin: 0 0 4px 0; font-size: 1.25rem; }
.card-text p{ margin: 0; color: var(--muted); }
.arrow-cta{ display: inline-block; margin-top: 8px; border-bottom: 1px solid currentColor; }

/* ===== Footer (2 columns with floats) ===== */
.site-footer{
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: 0.96rem;
}
.site-footer a{
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  color: inherit;
  margin-left: 10px;
}
.footer-two-cols::after{ content: ""; display: block; clear: both; }
.footer-left{ float: left; width: 50%; }
.footer-right{ float: right; width: 50%; }
.brand-small{ font-weight: 700; letter-spacing: 0.08em; color: var(--ink); margin-bottom: 4px;font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif; }
.footer-legal{ margin-top: 8px; }
.footer-right .label{ display: block; margin-bottom: 6px; color: var(--muted); }
.footer-extra{ margin-top: 12px; white-space: nowrap; }
@media (max-width: 640px){
  .footer-left, .footer-right{ float:none; width:100%; text-align:left; }
  .footer-extra{ white-space: normal; }
}

/* === Portfolio grid === */
.portfolio-section { padding: 24px 0 64px; }
/* narrower left/right padding only on the portfolio page */
.portfolio-section .wrap { padding-left: 12px; padding-right: 12px; }
@media (min-width: 760px){
  .portfolio-section .wrap { padding-left: 16px; padding-right: 16px; }
}
.portfolio-grid{
  display: grid;
  grid-template-columns: 1fr;           /* phones: 1 per row */
  gap: 20px;
}
@media (min-width: 760px){
  .portfolio-grid{ grid-template-columns: repeat(3, 1fr); }
}
/* Square thumbnails with centered crop */
.art-card{ display: block; color: inherit; text-decoration: none; }
.art-thumb{
  background: #f6f6f6;
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
}
.art-thumb img{
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.art-title{
  text-align: center;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
  margin-top: 8px;
  font-weight: 500;
}
.art-card:hover .art-title{ text-decoration: underline; }

/* ===== Artwork detail page ===== */
.artwork-top { padding: 28px 0 20px; }
.artwork-grid{ display: grid; gap: 28px; }
@media (min-width: 900px){
  .artwork-grid{
    grid-template-columns: 1.6fr 1fr; /* left = title/type, right = description */
    align-items: start;
  }
}
/* Big title styled like the home hero */
.artwork-title{
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: 0.02em;
  margin: 0 0 18px 0;
  color: var(--ink);
}
/* Field blocks */
.field-label{ color: var(--muted); margin-bottom: 6px; }
.field-value{ color: var(--ink); }
.artwork-desc{ line-height: 1.6; }
/* Big image block */
/* Big image block */
.artwork-image-section{ padding: 18px 0 64px; }

.artwork-figure{
  margin: 0;
  background: #f6f6f6;
  overflow: hidden;
  display: flex;                 /* center the image */
  align-items: center;
  justify-content: center;
}

.artwork-figure img{
  width: auto;                   /* preserve aspect ratio */
  max-width: 100%;
  height: auto;
  /* cap image height to the screen */
  max-height: 100vh;             /* fallback */
  max-height: 100svh;            /* small viewport units (iOS) */
  max-height: 100dvh;            /* dynamic viewport (mobile toolbars) */
  object-fit: contain;
}

/* Pager under artwork image */
.artwork-pager{
  display: flex;
  justify-content: space-between;      /* left + right */
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}
.artwork-pager .pager-link{
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}




/* ===== About page — tuned and safe within container ===== */
/* ===== About page — full-image, common width, free height ===== */
.about-section { padding: 48px 0 80px; }

/* 3 columns (image | text | image), 2 rows */
.about-grid{
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(480px, 60ch) minmax(0,1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "left-top  text right-top"
    "left-bot  text right-bot";
  column-gap: clamp(28px, 5vw, 64px);
  row-gap: clamp(48px, 7vw, 120px);
  align-items: center;
}

/* placement */
.img-left-top    { grid-area: left-top;  justify-self: start; align-self: start; }
.img-right-top   { grid-area: right-top; justify-self: end;   align-self: start; }
.img-left-bottom { grid-area: left-bot;  justify-self: start; align-self: end;   }
.img-right-bottom{ grid-area: right-bot; justify-self: end;   align-self: end;   }
.about-text      { grid-area: text; }

/* shared image box — same width for all, natural height */
.about-img{
  margin: 0;
  width: min(100%, clamp(260px, 28vw, 380px)); /* ← common width */
  background: transparent;
  overflow: visible;                           /* do not crop */
}

/* show the entire image (no cropping); free height */
.about-img img{
  display: block;
  width: 100%;
  height: auto;           /* ← natural height */
  object-fit: contain;    /* in case constraints apply */
  object-position: center;
}

/* neutralize any old aspect-ratio helpers so they don't force a crop */
.ar-1-1, .ar-3-4, .ar-4-3, .ar-16-9 { aspect-ratio: auto; }

/* centered text block */
.about-text{
  text-align: center;
  margin: 0 auto;
}
.about-text h2{
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: #b33b2e;
  margin: 0 0 16px 0;
}
.about-text p{
  line-height: 1.85;
  font-size: clamp(1rem, 1.25vw, 1.25rem);
  margin: 0;
}

/* Mobile: stack nicely */
@media (max-width: 860px){
  .about-grid{
    grid-template-columns: 1fr;
    grid-template-areas:
      "left-top"
      "right-top"
      "text"
      "left-bot"
      "right-bot";
    row-gap: 22px;
  }
  .about-img{ width: 88%; justify-self: center; }
}

/* ===== Contact page ===== */
.contact-section { padding: 48px 0 72px; }

.contact-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); /* image | panel */
  gap: 24px;
  align-items: start;   /* don't stretch the panel; let it auto-size */
}

/* Left photo: keep aspect, don't force column height */
.contact-photo{
  margin: 0;
  overflow: hidden;
  background: #f6f6f6;
}
.contact-photo img{
  width: 100%;
  height: auto;           /* ← critical: image defines its own height */
  display: block;
  object-fit: cover;      /* safe even with height:auto */
  object-position: center;
}

/* Right panel: auto height, 20px padding, light grey */
.contact-panel{
  background: #f3f4f6;
  padding: 20px;          /* as requested */
  align-self: start;      /* stay aligned to top of row */
  display: block;         /* no flex so height = content */
}

.contact-panel h1{
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 400;
  color: #b33b2e;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 12px 0;
}
.contact-panel p{
  line-height: 1.85;
  font-size: clamp(1rem, 1.15vw, 1.2rem);
  margin: 0;
}

/* Stack on phones */
@media (max-width: 840px){
  .contact-grid{
    grid-template-columns: 1fr;
  }
  /* give the photo some presence on mobile */
  .contact-photo{ max-height: 52vh; }
  .contact-photo img{ width: 100%; height: auto; }
}



/* ===== Phone tweaks (≤640px) ===== */
@media (max-width: 640px){

  /* 1) Header "wrap" spans full screen width */
  .site-header .wrap{
    max-width: none;   /* no constraint by --maxw */
    width: 100%;
    padding-left: 10px;
    padding-right: 0px;
  }

  /* 2) Tighter spacing between menu items */
  .main-nav{ gap: 10px; }

  /* 3) No padding around the carousel */
  .carousel-section{ padding: 0; }
  .track{ padding: 0; }

  /* 4) Carousel height = 1.5 × screen width */
  :root{ --carousel-h: 120vw; }        /* update the variable used by the viewport */
  .track-viewport{ height: var(--carousel-h); }
}
