/* ============================================
   Anne-Marit Bergstrom — Dakota Drawings
   Modern artist portfolio theme
   ============================================ */

/* ---------- Custom Properties ---------- */
:root {
  --cream: #faf7f2;
  --cream-dark: #f0ebe0;
  --burgundy: #7b2d3b;
  --burgundy-light: #9c3a4a;
  --burgundy-pale: #f5eaec;
  --gold: #c49a3c;
  --text: #2c2420;
  --text-muted: #6b5c54;
  --border: #ddd3c7;
  --white: #ffffff;

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Lato', system-ui, -apple-system, sans-serif;

  --container: 1100px;
  --header-h: 70px;

  --radius: 4px;
  --shadow: 0 2px 12px rgba(44, 36, 32, 0.10);
  --shadow-lg: 0 8px 32px rgba(44, 36, 32, 0.18);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
}

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

a { color: var(--burgundy); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  font-weight: 500;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

/* ---------- Layout ---------- */
.page-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-main { min-height: calc(100vh - var(--header-h) - 120px); }

/* ---------- Header & Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--burgundy);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  height: var(--header-h);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.logo-sub {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav li.active a {
  color: var(--white);
  background: rgba(255,255,255,0.15);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 560px;
  background: var(--text);
}

.hero-slideshow {
  position: relative;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active { opacity: 1; }

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.hero-dot.active { background: var(--white); }

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 2.5rem;
  background: var(--burgundy);
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.1;
}

.hero-tagline {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  cursor: pointer;
}

.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn-primary {
  background: var(--white);
  color: var(--burgundy);
}
.btn-primary:hover { background: var(--cream); color: var(--burgundy); }

.btn-secondary {
  background: var(--burgundy);
  color: var(--white);
}
.btn-secondary:hover { background: var(--burgundy-light); color: var(--white); }

.btn-back {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.btn-back:hover { color: var(--burgundy); text-decoration: none; }

/* ---------- Home Sections ---------- */
.home-intro {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.intro-content {
  max-width: 780px;
}

.intro-content p { margin-bottom: 1.1rem; font-size: 1.05rem; }

.featured-gallery {
  padding: 4rem 0;
}

.featured-gallery h2,
.permanent-display h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin-bottom: 2rem;
}

.gallery-cta {
  margin-top: 2.5rem;
  text-align: center;
}

.permanent-display {
  padding: 4rem 0;
  background: var(--cream-dark);
}

.section-intro {
  max-width: 680px;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.collection-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.collection-item h3 {
  font-size: 1rem;
  font-family: var(--font-serif);
  margin-bottom: 0.35rem;
}

.collection-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- Painting Grid ---------- */
.painting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.painting-grid--large {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.painting-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}

.painting-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.painting-thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--cream-dark);
}

.painting-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.painting-card:hover .painting-thumb img { transform: scale(1.04); }

.painting-overlay {
  position: absolute;
  inset: 0;
  background: rgba(123, 45, 59, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.painting-card:hover .painting-overlay { opacity: 1; }

.overlay-zoom {
  color: var(--white);
  font-size: 2.5rem;
  line-height: 1;
}

.painting-info {
  padding: 0.9rem 1rem;
}

.painting-info h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  font-weight: 500;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.painting-medium {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.painting-collection {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------- Categories Grid ---------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.2s, transform 0.2s;
}

.category-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  text-decoration: none;
}

.category-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--cream-dark);
}

.category-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card:hover .category-thumb img { transform: scale(1.04); }

.category-info {
  padding: 1.1rem 1.25rem;
}

.category-info h2 {
  font-size: 1.3rem;
  font-family: var(--font-serif);
  margin-bottom: 0.3rem;
}

.category-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.painting-count {
  font-size: 0.78rem;
  color: var(--burgundy);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- Gallery Nav ---------- */
.gallery-nav {
  margin-bottom: 1.5rem;
}

/* ---------- Page Layout ---------- */
.page-article,
.page-container { padding-top: 3rem; padding-bottom: 4rem; }

.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--cream-dark);
}

.page-header h1 {
  font-family: var(--font-serif);
  font-weight: 400;
}

.page-description {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ---------- Prose ---------- */
.prose p { margin-bottom: 1.15rem; max-width: 72ch; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 { margin: 2rem 0 0.75rem; }
.prose h3 { margin: 1.5rem 0 0.5rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; }
.prose blockquote {
  border-left: 3px solid var(--burgundy);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.artist-photo {
  float: right;
  margin: 0 0 1.5rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 280px;
}

.contact-photo {
  display: block;
  margin: 0 auto 2.5rem;
  max-width: 340px;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 12, 10, 0.93);
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
  gap: 1rem;
}

#lightbox-img {
  max-width: 80vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lightbox-caption {
  color: var(--white);
  text-align: center;
  padding: 0 1rem;
}

#lightbox-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  font-style: italic;
  color: var(--white);
  margin-bottom: 0.35rem;
}

#lightbox-meta, #lightbox-collection {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin: 0;
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 1001;
}

.lightbox-close:hover { color: var(--white); }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--white);
  font-size: 1.75rem;
  width: 48px;
  height: 64px;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.2s;
  z-index: 1001;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.2); }

/* ---------- Page List (stories, etc.) ---------- */
.page-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.page-list-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.2s;
}

.page-list-item:hover {
  box-shadow: var(--shadow);
  text-decoration: none;
}

.page-list-item h2 {
  font-size: 1.2rem;
  font-family: var(--font-serif);
  margin-bottom: 0.4rem;
}

.page-list-item p { font-size: 0.9rem; color: var(--text-muted); }

/* ---------- Publications ---------- */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.pub-item:first-child { padding-top: 0; }
.pub-item:last-child { border-bottom: none; }

.pub-item img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

.pub-info h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.pub-info p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.pub-info p + p { margin-top: 0.75rem; color: var(--text); font-size: 0.95rem; }

@media (max-width: 600px) {
  .pub-item {
    grid-template-columns: 120px 1fr;
    gap: 1.25rem;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); }

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: 400px auto;
    min-height: auto;
  }

  .hero-slideshow { grid-row: 1; }

  .hero-text {
    padding: 2.5rem 1.5rem;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--burgundy);
    padding: 0.75rem 1rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  }

  .site-nav.open { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .site-nav ul li:last-child a { border-bottom: none; }

  .hero { grid-template-rows: 300px auto; }

  .hero-text h1 { font-size: 1.8rem; }

  .painting-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }

  .categories-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }

  #lightbox-img { max-width: 95vw; max-height: 60vh; }

  .lightbox-prev { left: 0.25rem; }
  .lightbox-next { right: 0.25rem; }

  .artist-photo {
    float: none;
    margin: 0 auto 1.5rem;
    max-width: 220px;
  }
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr; }
  .painting-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .collections-grid { grid-template-columns: 1fr; }
}
