/* ========================================
   SIVA - Custom Styles
   Clean, minimal, addictive
   ======================================== */

[x-cloak] {
  display: none !important;
}

:root {
  --ink: #0a0a0a;
  --paper: #fafafa;
  --muted: #737373;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

/* Scroll Indicator */
.scroll-indicator .scroll-arrow {
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(6px);
  }

  60% {
    transform: translateY(3px);
  }
}

/* ========================================
   Masonry Grid
   ======================================== */
.masonry-grid {
  column-count: 1;
  column-gap: 1.5rem;
}

@media (min-width: 640px) {
  .masonry-grid {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .masonry-grid {
    column-count: 3;
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  display: block;
  transition: transform 0.3s ease;
}

.masonry-item:hover {
  transform: translateY(-3px);
}

.masonry-item img {
  transition: transform 0.4s ease;
}

.masonry-item:hover img {
  transform: scale(1.02);
}

/* ========================================
   Painting Image
   ======================================== */
.painting-image-wrapper {
  /* background & overflow removed to allow shadow to show */
}

.painting-image-wrapper img {
  display: block;
  transition: transform 0.5s ease;
}

.painting-image-wrapper:hover img {
  transform: scale(1.02);
}

/* ========================================
   BUTTONS - Fresh Start
   Simple, satisfying, consistent
   ======================================== */

/* Base button style */
.btn {
  display: inline-block;
  position: relative;
  padding: 1rem 2rem;
  font-family: 'Clash Display', sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark button (filled) */
.btn-dark {
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
}

.btn-dark:hover {
  background: var(--muted);
  border-color: var(--muted);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(10, 10, 10, 0.3);
}

.btn-dark:active {
  transform: translateY(0);
  box-shadow: 0 5px 15px -5px rgba(10, 10, 10, 0.2);
}

/* Light button (outline) */
.btn-light {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}

.btn-light:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(10, 10, 10, 0.3);
}

.btn-light:active {
  transform: translateY(0);
  box-shadow: 0 5px 15px -5px rgba(10, 10, 10, 0.2);
}

/* ========================================
   Text Links with Arrow
   ======================================== */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Clash Display', sans-serif;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

.link-arrow:hover {
  color: var(--muted);
}

.link-arrow .arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-arrow:hover .arrow {
  transform: translateX(4px);
}

/* Back arrow - slides left */
.link-back:hover .arrow {
  transform: translateX(-4px);
}

/* ========================================
   Prose & Focus
   ======================================== */
.prose p {
  margin-bottom: 1em;
}

.prose p:last-child {
  margin-bottom: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ========================================
   Painting Viewer - SIVA Aesthetic
   Clean, sharp, high-contrast, addictive
   ======================================== */

/* Floating Toolbar */
.painting-toolbar {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.2s ease;
  z-index: 30;
  border: 2px solid var(--ink);
  background: var(--ink);
  pointer-events: none;
}

.painting-image-wrapper:hover .painting-toolbar {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toolbar-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.toolbar-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.toolbar-btn.active {
  background: var(--ink);
  color: var(--paper);
}

/* Magnifier Lens - Sharp Square */
.magnifier-lens {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  border: 4px solid var(--ink);
  background-color: var(--paper);
  background-repeat: no-repeat;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

/* Fullscreen Overlay - Solid Ink */
.fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Close Button - Square & Bold */
.fullscreen-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 2px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.fullscreen-close:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--paper);
}

/* Zoom Controls - Sharp Rectangle */
.fullscreen-controls {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  background: var(--paper);
  border: 2px solid var(--ink);
  z-index: 10;
}

.control-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper);
}

.control-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.control-btn:not(:last-child),
.zoom-level {
  border-right: 2px solid var(--ink);
}

.zoom-level {
  font-family: 'Clash Display', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink);
  min-width: 70px;
  text-align: center;
  padding: 0 1rem;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fullscreen Image Container */
.fullscreen-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fullscreen-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  transition: transform 0.1s ease-out;
  user-select: none;
}

/* Title Overlay - Sharp Badge */
.fullscreen-title {
  position: absolute;
  top: 2rem;
  left: 2rem;
  padding: 1rem 2rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  color: var(--ink);
  font-family: 'Clash Display', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Painting Canvas */
.painting-canvas {
  cursor: crosshair;
}

.painting-canvas:has(.magnifier-lens:not([style*="display: none"])) {
  cursor: none;
}

/* ========================================
   Room Mockups Gallery (In Situ)
   ======================================== */

.room-mockups-gallery {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-top: 0.5rem;
  padding-bottom: 1rem;
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--ink) transparent;
}

.room-mockups-gallery::-webkit-scrollbar {
  height: 6px;
}

.room-mockups-gallery::-webkit-scrollbar-track {
  background: transparent;
}

.room-mockups-gallery::-webkit-scrollbar-thumb {
  background: var(--ink);
}

.room-mockup-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 300px;
  height: 220px;
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s ease;
}

.room-mockup-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.room-mockup-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.room-mockup-item:hover img {
  transform: scale(1.05);
}

@media (min-width: 768px) {
  .room-mockup-item {
    width: 400px;
    height: 280px;
  }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .painting-toolbar {
    opacity: 1;
    transform: translateY(0);
    bottom: 1rem;
    right: 1rem;
  }

  .toolbar-btn {
    width: 44px;
    height: 44px;
  }

  .fullscreen-controls {
    bottom: 1.5rem;
  }

  .fullscreen-close,
  .fullscreen-title {
    top: 1rem;
  }

  .fullscreen-close {
    right: 1rem;
    width: 48px;
    height: 48px;
  }

  .fullscreen-title {
    left: 1rem;
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    display: none;
    /* Hide title on very small screens to save space */
  }
}