/* ========== bydevi.art ==========
   Palette pulled from an acrylic paint box on a lavender gesso ground. */
:root {
  --gesso: #ECE7F4;      /* page ground */
  --paper: #F8F5FC;      /* raised surfaces */
  --ink: #24163A;        /* violet-black text */
  --muted: #62567A;
  --petal: #D9336F;      /* quinacridone magenta */
  --cadmium: #F4BE32;    /* cadmium yellow */
  --phthalo: #12695A;    /* phthalo green */
  --line: rgba(36, 22, 58, .16);

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Literata", Georgia, "Times New Roman", serif;

  --wrap: min(1240px, 100% - 2.5rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--gesso);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--body);
  -webkit-font-smoothing: antialiased;
}
/* Canvas tooth: a faint woven grain over everything */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3  0 0 0 0 .25  0 0 0 0 .35  0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: 62ch; }

:focus-visible { outline: 3px solid var(--petal); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 200; }
.skip:focus { left: .5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font: 600 1rem/1 var(--display);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border: 0;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--petal); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: .9rem max(1.25rem, (100% - 1240px) / 2);
  background: rgba(236, 231, 244, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.logo { font: 800 1.35rem/1 var(--display); text-decoration: none; letter-spacing: -0.03em; }
.logo span { color: var(--petal); }
.nav { display: flex; gap: 1.75rem; align-items: center; font-family: var(--display); font-weight: 600; }
.nav a { text-decoration: none; }
.nav a:not(.nav-cta):hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--cadmium); text-underline-offset: 6px; }
.nav-cta { background: var(--ink); color: var(--paper); padding: .6rem 1.1rem; border-radius: 999px; }
.nav-cta:hover { background: var(--petal); }
.menu-toggle { display: none; font: 600 1rem var(--display); background: none; border: 2px solid var(--ink); border-radius: 999px; padding: .45rem 1rem; color: var(--ink); cursor: pointer; }

@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 1.1rem;
    padding: 1.5rem 1.25rem 2rem;
    background: var(--gesso);
    border-bottom: 1px solid var(--line);
    font-size: 1.4rem;
    display: none;
  }
  .nav.open { display: flex; }
}

/* ---------- Hero: the one bold moment ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 920px);
  display: flex; align-items: flex-end;
  overflow: hidden;
  cursor: crosshair;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-text {
  position: relative;
  width: var(--wrap);
  margin: 0 auto;
  padding-bottom: clamp(2rem, 6vh, 4rem);
  pointer-events: none;
}
.hero-text a { pointer-events: auto; }
.wordmark {
  font-size: clamp(5.5rem, 21vw, 19rem);
  font-weight: 800;
  line-height: .78;
  letter-spacing: -0.06em;
  color: var(--ink);
  mix-blend-mode: multiply;   /* ink sinks into the wet paint */
  margin-left: -0.05em;
}
.hero-sub {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  max-width: 30ch;
  margin: clamp(2rem, 4vw, 3.25rem) 0 1.75rem;
  background: rgba(236, 231, 244, .78);
  padding: .25rem .5rem;
  margin-left: -.5rem;
  box-decoration-break: clone;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.hint { margin: 0; font-style: italic; color: var(--muted); font-size: .95rem; }

/* ---------- Gallery ---------- */
.work-section { width: var(--wrap); margin: 0 auto; padding: clamp(4rem, 10vw, 8rem) 0 4rem; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip {
  font: 600 1rem/1 var(--display);
  padding: .7rem 1.2rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chip:hover:not([aria-pressed="true"]) { background: var(--cadmium); }
.legend { color: var(--muted); font-size: .95rem; margin: 1.25rem 0 2.5rem; display: flex; align-items: center; gap: .5rem; }
.dot { width: .7rem; height: .7rem; border-radius: 50%; background: #D2232A; display: inline-block; flex: none; }

.gallery { columns: 3 300px; column-gap: clamp(1.25rem, 3vw, 2.5rem); }
.work {
  break-inside: avoid;
  display: block; width: 100%;
  margin: 0 0 clamp(1.75rem, 4vw, 3rem);
  padding: 0; border: 0; background: none;
  text-align: left; color: inherit; font: inherit;
  cursor: zoom-in;
}
.work[hidden] { display: none; }
.work .frame {
  position: relative;
  box-shadow: 0 1px 0 rgba(36,22,58,.12), 0 22px 40px -26px rgba(36,22,58,.55);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
  background: var(--paper);
}
.work .frame img { width: 100%; height: auto; }
.work:hover .frame, .work:focus-visible .frame { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 1px 0 rgba(36,22,58,.12), 0 30px 50px -26px rgba(36,22,58,.6); }
.work .caption { display: flex; justify-content: space-between; gap: 1rem; margin-top: .9rem; }
.work .title { font: 600 1.15rem/1.25 var(--display); }
.work .meta, .meta { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.work .price { font-family: var(--display); font-weight: 600; white-space: nowrap; display: flex; align-items: center; gap: .4rem; }

/* ---------- About ---------- */
.about {
  width: var(--wrap); margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 0;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: center;
}
.portrait { margin: 0; transform: rotate(-2deg); }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: 0 30px 60px -30px rgba(36,22,58,.6); border: 12px solid var(--paper); }
.about-text h2 { margin-bottom: 1.5rem; }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; } .portrait { max-width: 420px; } }

/* ---------- Commissions ---------- */
.commissions {
  background: var(--phthalo);
  color: #EAF5F1;
  padding: clamp(4rem, 10vw, 7rem) max(1.25rem, (100% - 1240px) / 2);
}
.commissions .lead { font-size: 1.25rem; margin: 1.25rem 0 3rem; max-width: 46ch; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; }
.steps li { counter-increment: step; border-top: 3px solid var(--cadmium); padding-top: 1.25rem; }
.steps li::before { content: counter(step); display: block; font: 800 3rem/1 var(--display); color: var(--cadmium); margin-bottom: .75rem; }
.steps h3 { margin-bottom: .5rem; }
.steps p { color: #CFE6DF; font-size: 1rem; }

/* ---------- Contact ---------- */
.contact {
  width: var(--wrap); margin: 0 auto;
  padding: clamp(4rem, 10vw, 7rem) 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
}
.contact-intro h2 { margin-bottom: 1.5rem; }
.contact-links { font: 600 1.25rem/1.8 var(--display); }
.contact-links a { text-decoration-color: var(--petal); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.form { display: grid; gap: 1.25rem; }
.form label { display: grid; gap: .4rem; font: 600 .95rem var(--display); }
.form input, .form select, .form textarea {
  font: 400 1rem/1.5 var(--body);
  color: var(--ink);
  background: var(--paper);
  border: 2px solid transparent;
  border-bottom-color: var(--ink);
  padding: .8rem .9rem;
  border-radius: 6px 6px 0 0;
  width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--petal); }
.form .btn { justify-self: start; }
.form-status { min-height: 1.5em; margin: 0; font-family: var(--display); font-weight: 600; }
.form-status.error { color: #B3122E; }
.form-status.ok { color: var(--phthalo); }
@media (max-width: 800px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding: 2rem max(1.25rem, (100% - 1240px) / 2);
  border-top: 1px solid var(--line);
  font-size: .9rem; color: var(--muted);
}
.site-footer p { margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  border: 0; padding: 0;
  width: min(1180px, 100% - 2rem); max-height: calc(100% - 2rem);
  background: var(--paper); color: var(--ink);
  border-radius: 4px;
}
.lightbox::backdrop { background: rgba(36, 22, 58, .82); backdrop-filter: blur(4px); }
.lightbox[open] { animation: lb-in .3s cubic-bezier(.2,.7,.2,1); }
@keyframes lb-in { from { opacity: 0; transform: scale(.97); } }
.lb-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); }
.lb-art { background: #DCD5E8; display: grid; place-items: center; padding: clamp(1rem, 3vw, 2.5rem); }
.lb-art img { max-height: 78vh; width: auto; box-shadow: 0 20px 40px -20px rgba(36,22,58,.6); }
.lb-info { padding: clamp(1.5rem, 3vw, 2.5rem); display: flex; flex-direction: column; gap: .25rem; }
.lb-info h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; padding-right: 4rem; margin-bottom: .5rem; }
.lb-status { font-family: var(--display); font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.lb-info .btn { align-self: flex-start; margin-top: .5rem; }
.lb-nav { display: flex; gap: .5rem; margin-top: auto; padding-top: 2rem; }
.lb-nav button, .lb-close {
  font: 600 .95rem var(--display); background: none; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px; padding: .5rem 1rem; cursor: pointer;
}
.lb-nav button:hover, .lb-close:hover { background: var(--cadmium); }
.lb-close { position: absolute; top: 1rem; right: 1rem; background: var(--paper); }
@media (max-width: 800px) {
  .lb-inner { grid-template-columns: 1fr; }
  .lb-art img { max-height: 55vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
