/* ===========================================================
   Genius Creative — shared stylesheet
   Elegant / Psychedelic design system
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;1,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #0b0a10;
  --bg-alt: #14121b;
  --bg-card: #1a1723;
  --line: rgba(245, 241, 232, 0.1);
  --text: #f5f1e8;
  --text-dim: #b7b0c2;
  --gold: #c9a24b;

  --psy-1: #ff5ecb;
  --psy-2: #6a5cff;
  --psy-3: #21e6c1;
  --psy-4: #ff9f45;

  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; color: var(--text-dim); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.85em;
  display: inline-block;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid var(--line);
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-ghost {
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
}

/* background+blur lives on a pseudo-element, not header.site itself, so
   header.site never becomes a containing block for its fixed-position
   mobile nav-links (a `filter`/`backdrop-filter` on an ancestor breaks
   position:fixed by making it relative to that ancestor instead of the
   viewport) */
header.site::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(11, 10, 16, 0.82);
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.brand span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.nav-links a { color: var(--text-dim); transition: color 0.2s ease; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 18px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  min-width: 200px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s ease;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a { display: block; padding: 10px 20px; color: var(--text-dim); }
.dropdown a:hover,
.dropdown a:focus-visible { color: var(--gold); background: rgba(255,255,255,0.03); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 32px 32px;
    transform: translateY(-110%);
    transition: transform 0.3s ease;
    border-top: 1px solid var(--line);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .has-dropdown .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    background: none; border: none; margin: 0; padding: 0 0 0 16px; display: none;
  }
  .has-dropdown.open .dropdown { display: block; }
  .nav-toggle { display: block; }
}

/* ---------- Psychedelic swirl backgrounds ---------- */

.swirl {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.swirl::before, .swirl::after {
  content: '';
  position: absolute;
  width: 140%;
  height: 140%;
  top: -20%;
  left: -20%;
  background: conic-gradient(from 0deg,
    var(--psy-1), var(--psy-2), var(--psy-3), var(--psy-4), var(--psy-1));
  filter: blur(110px) saturate(140%);
  opacity: 0.28;
  animation: spin 40s linear infinite;
}

.swirl::after {
  animation-duration: 60s;
  animation-direction: reverse;
  opacity: 0.16;
  width: 100%; height: 100%; top: 0; left: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .swirl::before, .swirl::after { animation: none; }
  .canvas .paint { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 140px 0 110px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-inner { position: relative; z-index: 1; max-width: 720px; }

.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  margin-bottom: 0.35em;
}

.hero .lede {
  font-size: 1.15rem;
  max-width: 560px;
  margin-bottom: 2em;
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.hero.small { padding: 96px 0 72px; }
.hero.small h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); }

/* ---------- Sections ---------- */

section { padding: 96px 0; }
section.tight { padding: 64px 0; }
section.alt { background: var(--bg-alt); }

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Painting canvas placeholder art ---------- */

.canvas {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #000;
}

.canvas .paint {
  position: absolute;
  inset: -25%;
  background: conic-gradient(from var(--a, 0deg) at 50% 50%,
    var(--c1, var(--psy-1)), var(--c2, var(--psy-2)), var(--c3, var(--psy-3)), var(--c4, var(--psy-4)), var(--c1, var(--psy-1)));
  filter: blur(38px) saturate(160%) contrast(115%);
  mix-blend-mode: screen;
  animation: spin 34s linear infinite;
}

.canvas img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.canvas::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.35) 100%);
}

.piece { display: flex; flex-direction: column; }

.piece .label {
  padding: 16px 2px 0;
}

.piece .label .t { font-family: var(--serif); font-size: 1rem; color: var(--text); }
.piece .label .m { font-size: 0.75rem; color: var(--text-dim); letter-spacing: 0.03em; margin-top: 3px; }

/* Real painting photography — natural aspect ratio, never cropped */
.artwork { background: #000; }
.artwork img { display: block; width: 100%; height: auto; }

/* only photography-journal frames and the painting-detail hero image zoom on click */
.photo-columns .artwork img,
.painting-detail .artwork img {
  cursor: zoom-in;
}
.photo-columns .artwork img:focus-visible,
.painting-detail .artwork img:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* a painting card (gallery grid, artist page, featured work) links to its detail page */
a.piece {
  display: flex;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
a.piece:hover { opacity: 0.85; }

/* ---------- Painting detail page ---------- */

.painting-detail {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: start;
}
.painting-media { position: sticky; top: 96px; }
.painting-info .painting-artist { font-size: 1.05rem; color: var(--text); margin-bottom: 0.2em; }
.painting-info .painting-artist a { color: var(--gold); }
.painting-info .painting-artist a:hover { text-decoration: underline; }
.painting-info .painting-dims { font-size: 0.85rem; letter-spacing: 0.03em; color: var(--text-dim); margin-bottom: 1.6em; }
@media (max-width: 860px) {
  .painting-detail { grid-template-columns: 1fr; gap: 32px; }
  .painting-media { position: static; }
}

/* ---------- Photo journal (masonry) ---------- */

.photo-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}
.photo-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(6,6,8,0.9) 0%, rgba(6,6,8,0.35) 45%, rgba(6,6,8,0.15) 70%, rgba(6,6,8,0.55) 100%);
}
.photo-hero-inner {
  position: relative;
  z-index: 1;
  padding-bottom: 72px;
}
.photo-hero h1 { font-size: clamp(3rem, 8vw, 6rem); margin-bottom: 0.2em; }
.photo-hero .lede { font-size: 1.05rem; max-width: 520px; }

.photo-columns {
  column-count: 3;
  column-gap: 18px;
}
.photo-columns > * {
  break-inside: avoid;
  margin-bottom: 18px;
}
@media (max-width: 900px) {
  .photo-columns { column-count: 2; }
}
@media (max-width: 620px) {
  .photo-columns { column-count: 1; }
  .photo-hero { min-height: 72vh; }
}

/* ---------- Lightbox (native-resolution artwork view) ---------- */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: rgba(6, 6, 8, 0.94);
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover,
.lightbox-close:focus-visible { border-color: var(--gold); color: var(--gold); }
.lightbox-close:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
@media (max-width: 620px) {
  .lightbox { padding: 20px; }
}

/* ---------- Grids ---------- */

.grid {
  display: grid;
  gap: 28px;
  align-items: start;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- Cards ---------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 32px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.card:hover { border-color: var(--gold); transform: translateY(-3px); }
.card h3 { font-size: 1.25rem; }
.card .eyebrow { margin-bottom: 0.6em; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); }
.pillars .card { border: none; border-right: 1px solid var(--line); }
.pillars .card:last-child { border-right: none; }
.pillars .card:hover { transform: none; }
@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; }
  .pillars .card { border-right: none; border-bottom: 1px solid var(--line); }
}

/* ---------- Filters ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}
.filter-sep {
  width: 1px;
  align-self: stretch;
  background: var(--line);
  margin: 0 4px;
}
@media (max-width: 620px) { .filter-sep { display: none; } }

.filter-select {
  padding: 9px 34px 9px 18px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23b7b0c2'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--sans);
}
.filter-select:hover { color: var(--text); border-color: var(--text-dim); }
.filter-select:focus { border-color: var(--gold); color: var(--text); }
.filter-select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.filter-select option { background: var(--bg-card); color: var(--text); }
.filter-btn {
  padding: 9px 18px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--sans);
}
.filter-btn:hover { color: var(--text); border-color: var(--text-dim); }
.filter-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.filter-btn.active { color: var(--bg); background: var(--gold); border-color: var(--gold); }

.hidden { display: none !important; }

/* ---------- Before/After ---------- */

.ba {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
}
.ba > div { padding: 0; }
.ba .canvas { aspect-ratio: 1 / 1; }
.ba .tag {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 12px; background: rgba(0,0,0,0.55); border: 1px solid var(--line);
}
@media (max-width: 620px) { .ba { grid-template-columns: 1fr; } }

/* ---------- Person / Artist header ---------- */

.person-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.person-hero .canvas { aspect-ratio: 1 / 1; }
@media (max-width: 860px) {
  .person-hero { grid-template-columns: 1fr; }
}

.role-tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 5px 12px;
  margin-bottom: 1em;
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- Forms ---------- */

.form-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
@media (max-width: 860px) { .form-panels { grid-template-columns: 1fr; } }

.panel {
  border: 1px solid var(--line);
  background: var(--bg-card);
  padding: 40px;
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 0.95rem;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--gold);
}
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible,
.btn:focus-visible,
.nav-links a:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.field textarea { resize: vertical; min-height: 110px; }

.panel.panel-highlight {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(201, 162, 75, 0.35);
}
.form-status {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.form-status.ok { color: var(--psy-3); }
.form-status.err { color: #ff7b7b; }

.sample-note {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 4px 10px;
  margin-bottom: 0.75em;
}

/* ---------- Footer ---------- */

footer.site {
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  background: var(--bg-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1em;
}
.footer-grid a, .footer-grid p { display: block; color: var(--text-dim); font-size: 0.9rem; margin-bottom: 0.6em; }
.footer-grid a:hover { color: var(--text); }
.foot-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.78rem; color: var(--text-dim); padding-top: 24px; border-top: 1px solid var(--line);
}

/* ---------- Utility ---------- */

.mt-0 { margin-top: 0; }
.center { text-align: center; }
.max-60 { max-width: 640px; }
