/* ============================================================
   Karen Simon — Fine Art
   Shared stylesheet for all pages
   ------------------------------------------------------------
   Palette is botanical: deep plum ink, dusty rose, eucalyptus
   sage, and a whisper of brass on warm ivory. The "floral"
   feeling lives in color and light, not in any drawn graphics.
   ============================================================ */

:root {
  --ivory:  #F8F4EF;   /* page background            */
  --blush:  #EFE4DE;   /* soft panels / tints        */
  --plum:   #3A2E34;   /* primary ink / text         */
  --plum-70:#3a2e34b3; /* muted ink                  */
  --rose:   #B07A83;   /* dusty rose accent          */
  --sage:   #7E8B6E;   /* eucalyptus accent          */
  --brass:  #A8895C;   /* fine metallic lines, sparing */
  --line:   #d8cabf;   /* hairline dividers          */

  --serif:  "Cormorant Garamond", Georgia, serif;
  --sans:   "Jost", "Helvetica Neue", Arial, sans-serif;
  --script: "Pinyon Script", "Cormorant Garamond", cursive;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--plum);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* the floral undertone: two barely-there color blooms in the
   corners of the page — pure color, no imagery */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(46vw 46vw at 8% -6%, rgba(176,122,131,0.14), transparent 60%),
    radial-gradient(50vw 50vw at 104% 108%, rgba(126,139,110,0.14), transparent 62%);
  pointer-events: none;
}

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

/* ---------- shared layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--rose);
  margin: 0 0 1.1rem;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0; }
h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: 0.005em; }
h3 { font-size: 1.5rem; }

p { margin: 0 0 1.2rem; }
.lead {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.1vw, 1.5rem);
  font-style: italic;
  color: var(--plum-70);
  line-height: 1.6;
}

.rule { height: 1px; width: 64px; background: var(--brass); border: 0; margin: 1.6rem 0; }
.rule.center { margin-left: auto; margin-right: auto; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ivory) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}
.brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--plum);
  white-space: nowrap;
}
.brand span { color: var(--rose); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.4rem);
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--plum);
  padding: 0.4rem 0;
  position: relative;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--brass);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--rose); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--rose); }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  padding: 0.5rem; margin: -0.5rem;
  color: var(--plum);
}
.nav-toggle svg { display: block; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;              /* closed: nothing shows but the KAREN SIMON bar */
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .nav-links.open { display: flex; }   /* hamburger tapped: show all five tabs */
  .nav-links a { width: 100%; padding: 0.8rem 0; font-size: 0.85rem; }
  /* Full-width links would stretch the active underline across the menu — drop it. */
  .nav-links a::after { display: none; }
}

/* ============================================================
   HERO (home)
   ============================================================ */
.hero {
  text-align: center;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem);
}
.hero .signature {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(3.6rem, 12vw, 8rem);
  line-height: 0.9;
  color: var(--plum);
  margin: 0;
}
.hero .flourish {
  width: clamp(120px, 22vw, 220px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
  margin: 1.6rem auto 1.4rem;
}
.hero .tagline {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.86rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--plum-70);
  margin: 0;
}

/* ============================================================
   IMAGE PLACEHOLDERS
   Elegant, self-explaining "drop the file here" frames.
   Remove the .is-placeholder class + inner label once a real
   <img> is dropped in; the frame styling stays.
   ============================================================ */
.frame {
  position: relative;
  background: var(--blush);
  border: 1px solid var(--line);
  overflow: hidden;
}
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.is-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--plum-70);
  border: 1px dashed color-mix(in srgb, var(--brass) 60%, transparent);
  background:
    repeating-linear-gradient(45deg,
      transparent, transparent 14px,
      rgba(168,137,92,0.05) 14px, rgba(168,137,92,0.05) 15px),
    var(--blush);
  padding: 1.5rem;
}
.is-placeholder .ph-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 0.5rem;
}
.is-placeholder .ph-hint {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--plum-70);
  max-width: 26ch;
  margin: 0 auto;
  line-height: 1.4;
}

/* aspect helpers */
.ratio-portrait  { aspect-ratio: 4 / 5; }
.ratio-landscape { aspect-ratio: 3 / 2; }
.ratio-square    { aspect-ratio: 1 / 1; }

/* featured painting on the home page */
.featured {
  max-width: 620px;
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
  box-shadow: 0 34px 70px -30px rgba(58,46,52,0.55);
  border-color: color-mix(in srgb, var(--plum) 20%, var(--line));
}

/* short intro beneath the featured painting on the home page */
.home-intro {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  padding-bottom: clamp(4rem, 9vw, 6.5rem);
}
.home-intro .lead { margin-bottom: 2rem; }

.text-link {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--rose);
  border-bottom: 1px solid var(--brass);
  padding-bottom: 3px;
  transition: color 0.25s ease;
}
.text-link:hover { color: var(--plum); }

/* ============================================================
   PAGE HEADER (interior pages)
   ============================================================ */
.page-head {
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
}
.page-head h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); font-weight: 500; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
.about-portrait { position: sticky; top: 100px; }
.about-body p { font-size: 1.05rem; }
.about-body .lead { margin-bottom: 1.8rem; }
@media (max-width: 800px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { position: static; max-width: 420px; margin: 0 auto; }
}

/* ============================================================
   GALLERY GRIDS (Art Collection + Gallery-in-practice)
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.4vw, 1.8rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
.grid.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid, .grid.two { grid-template-columns: 1fr; } }

.piece { display: flex; flex-direction: column; }
.piece .frame { transition: transform 0.4s ease; }
.piece:hover .frame { transform: translateY(-4px); }
.piece:hover .frame img { transform: scale(1.03); }
.piece .frame img { transition: transform 0.6s ease; }

.piece .caption {
  padding: 0.9rem 0.2rem 0;
  text-align: center;
}
.piece .caption .title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--plum);
  line-height: 1.2;
}
.piece .caption .meta {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plum-70);
  margin-top: 0.35rem;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: clamp(4rem, 9vw, 7rem);
}
.contact .lead { margin-bottom: 2.6rem; }
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  align-items: center;
}
.contact-link {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--plum);
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.contact-link .k {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rose);
  min-width: 90px;
  text-align: right;
}
.contact-link:hover { color: var(--rose); border-color: var(--brass); }
@media (max-width: 480px) {
  .contact-link { flex-direction: column; gap: 0.25rem; align-items: center; }
  .contact-link .k { text-align: center; min-width: 0; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 2.4rem 0;
  text-align: center;
}
.site-foot .fname {
  font-family: var(--script);
  font-size: 1.9rem;
  color: var(--plum);
  line-height: 1;
}
.site-foot .fmeta {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--plum-70);
  margin-top: 0.7rem;
}
.site-foot .fcontact {
  margin-top: 1.1rem;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--plum-70);
}
.site-foot .fcontact a {
  color: var(--plum-70);
  text-decoration: none;
  transition: color 0.25s ease;
}
.site-foot .fcontact a:hover { color: var(--rose); }
.site-foot .fcontact .dot { margin: 0 0.6rem; color: var(--brass); }
@media (max-width: 440px) {
  .site-foot .fcontact .dot { display: block; height: 0.4rem; margin: 0; overflow: hidden; }
}

/* ============================================================
   COLLECTION MASONRY — keeps each painting's true proportions
   ============================================================ */
.collection-masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.6rem, 1.4vw, 1rem);
  grid-auto-flow: row;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
@media (max-width: 1100px) { .collection-masonry { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .collection-masonry { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px)  { .collection-masonry { grid-template-columns: repeat(2, 1fr); } }

.collection-masonry .masonry-item {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-self: start;
}
.collection-masonry .tile {
  width: 100%;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 2px;
  line-height: 0;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.collection-masonry .tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.collection-masonry .tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -18px rgba(58,46,52,0.55);
}
.collection-masonry .art-meta {
  padding: 0.55rem 0.4rem 0.2rem;
  text-align: center;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.collection-masonry .art-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.02rem;
  color: #3a2e34;
}
.collection-masonry .art-detail {
  font-family: "Jost", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #8a8073;
}
.collection-masonry .masonry-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -18px rgba(58,46,52,0.55);
}

/* ============================================================
   GALLERY WALL — dense grid for many photos (up to 80+)
   ============================================================ */
.gallery-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.5rem, 1.4vw, 1rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
@media (max-width: 900px) { .gallery-wall { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .gallery-wall { grid-template-columns: repeat(2, 1fr); } }

.gallery-wall .frame {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.gallery-wall .frame:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px -18px rgba(58,46,52,0.5);
}
.gallery-wall .frame img { transition: transform 0.5s ease; }
.gallery-wall .frame:hover img { transform: scale(1.04); }

.ph-num {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--rose);
  opacity: 0.55;
}

/* ============================================================
   TAB SECTIONS — single-page navigation
   Only the active section is shown; switching fades it in.
   ============================================================ */
.tab-section { display: none; }
.tab-section.active { display: block; animation: tabIn 0.55s ease both; }
@keyframes tabIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   MOTION — quiet entrance, respectful of preferences
   ============================================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .tab-section.active { animation: none; }
  .piece:hover .frame, .piece:hover .frame img { transform: none; }
}

/* ============================================================
   CLICKABLE TILES + LIGHTBOX  (added for click-to-enlarge)
   ============================================================ */
.tile {
  border: 0; padding: 0; background: none; cursor: pointer;
  display: block; width: 100%; font: inherit; color: inherit;
  margin: 0 0 clamp(0.6rem, 1.4vw, 1rem);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.collection-masonry .tile { break-inside: avoid; }
.tile img { display: block; width: 100%; height: auto; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -18px rgba(58,46,52,0.55); }
.tile:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }

.subhead {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--plum);
  margin: 0;
}

.stationery-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.9rem, 2.2vw, 1.6rem);
  max-width: 720px; margin: 0 auto;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
@media (max-width: 560px) { .stationery-grid { grid-template-columns: 1fr; max-width: 360px; } }
.stationery-grid .tile img { box-shadow: 0 12px 28px -16px rgba(58,46,52,0.5); }

/* --- lightbox overlay --- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center;
  background: rgba(33,26,30,0.93);
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.open { display: flex; }
.lb-stage {
  margin: 0; max-width: min(92vw, 1100px); max-height: 88vh;
  display: flex; align-items: center; justify-content: center;
}
.lb-img {
  max-width: 100%; max-height: 88vh; width: auto; height: auto;
  display: block; border-radius: 2px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}
.lb-btn {
  position: absolute; background: rgba(255,255,255,0.10); color: #fff;
  border: 1px solid rgba(255,255,255,0.25); cursor: pointer; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
}
.lb-btn:hover { background: rgba(255,255,255,0.22); }
.lb-close { top: clamp(1rem,3vw,2rem); right: clamp(1rem,3vw,2rem); width: 44px; height: 44px; font-size: 1.9rem; line-height: 1; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; line-height: 1; }
.lb-prev { left: clamp(0.5rem,2vw,2rem); }
.lb-next { right: clamp(0.5rem,2vw,2rem); }
@media (max-width: 560px) { .lb-prev, .lb-next { width: 42px; height: 42px; font-size: 1.5rem; } }

/* ============================================================
   GALLERY — "in practice" collage, grouped by category
   ============================================================ */
.gallery-cat { margin-bottom: clamp(2.6rem, 6vw, 4.5rem); }
.gallery-cat .subhead { text-align: center; margin: 0 0 clamp(1.2rem, 3vw, 2rem); }
.gallery-collage {
  column-count: 3;
  column-gap: clamp(0.6rem, 1.4vw, 1rem);
}
@media (max-width: 900px) { .gallery-collage { column-count: 2; } }
@media (max-width: 560px) { .gallery-collage { column-count: 1; max-width: 460px; margin: 0 auto; } }
.gallery-collage .g-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  margin: 0 0 clamp(0.6rem, 1.4vw, 1rem);
  break-inside: avoid;
  border-radius: 3px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  line-height: 0;
  box-shadow: 0 2px 12px -2px rgba(58,46,52,0.16);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.gallery-collage .g-item img { width: 100%; height: auto; display: block; }
.gallery-collage .g-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -16px rgba(58,46,52,0.5);
}

/* Prevent the browser from anchoring scroll to shifting content when tabs switch */
html, body { overflow-anchor: none; }
