@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=IM+Fell+English:ital@0;1&family=Inter:wght@200;300;400&display=swap");

:root {
  --primary: #2d4739;
  --secondary: #665a4e;
  --bg: #fcfbf9;
  --accent: #ad8b55;
  --green: #2d4739;
  --gold: #ad8b55;
  --brown: #665a4e;
  --ink: #1a1a18;
  --parchment: #f5f2ed;
  --blush: #e8d5c4;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--primary);
  overflow-x: hidden;
  cursor: none;
}

/* ── CUSTOM CURSOR ── */
#cursor {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition:
    transform 0.1s,
    width 0.3s,
    height 0.3s,
    background 0.3s;
  mix-blend-mode: multiply;
}
#cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition:
    transform 0.18s ease,
    width 0.3s,
    height 0.3s,
    opacity 0.3s;
  opacity: 0.5;
}
body:hover #cursor {
  opacity: 1;
}

/* ── FLOATING PARTICLES ── */
.particle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1; /* Move behind content */
  overflow: hidden;
}

.bg-item {
  position: absolute;
  pointer-events: none;
  object-fit: contain;
  opacity: 0;
  transform-origin: center;
  filter: sepia(0.2) brightness(1.05);
  mix-blend-mode: multiply;
}
.particle {
  position: absolute;
  opacity: 0;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-10vh) rotate(360deg);
    opacity: 0;
  }
}

/* ── TYPOGRAPHY ── */
h1,
h2,
h3,
.vogue {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 300;
  letter-spacing: 0.1em;
}

/* ── NAV ── */
.nav-link {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--secondary);
  transition:
    opacity 0.2s,
    color 0.2s;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-link:hover {
  color: var(--accent);
}
.nav-link:hover::after {
  width: 100%;
}
.nav-link.active {
  color: var(--primary);
}
.nav-link.active::after {
  width: 100%;
}

/* ── PAGES ── */
.page {
  display: none !important;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.page.active-page {
  display: block !important;
  opacity: 1;
}
#index.active-page {
  display: flex !important;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}

.contact-page {
  display: none !important;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.contact-page.active-page {
  display: flex !important;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

/* ── SVG BACKGROUNDS ── */
.svg-bg-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.svg-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  display: none;
}
.svg-bg.active {
  display: block;
  opacity: 1;
}

/* ── BG PATTERN UTILITY ── */
.bg-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-repeat: repeat;
  background-size: 140px; /* Small size as requested */
  opacity: 0.06;
  mix-blend-mode: multiply;
  pointer-events: none;
}
@media (max-width: 768px) {
  .bg-pattern {
    background-size: 100px;
  }
}

/* ── INDEX HERO ── */
#index {
  position: relative;
  min-height: 100vh;
}

.hero-ornament {
  position: absolute;
  pointer-events: none;
}

.fade-hero {
  position: relative;
  z-index: 2;
}

/* Decorative lines around title */
.title-deco {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.title-deco-line {
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent));
}
.title-deco-line.right {
  background: linear-gradient(to left, transparent, var(--accent));
}

/* ── ABOUT ── */
.about-text p {
  margin-bottom: 1.5rem;
  line-height: 1.9;
}

/* ── ART GRID ── */
.art-grid {
  columns: 1;
  column-gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (min-width: 640px) {
  .art-grid {
    columns: 2;
  }
}
@media (min-width: 1024px) {
  .art-grid {
    columns: 3;
  }
}

.grid-item {
  width: 100%;
  margin-bottom: 1.5rem;
  break-inside: avoid;
  cursor: pointer;
  overflow: hidden;
  background-color: var(--parchment);
  position: relative;
}
.grid-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(173, 139, 85, 0.08) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s;
}
.grid-item:hover::after {
  opacity: 1;
}
.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.grid-item:hover img {
  transform: scale(1.04);
}

.year-marker {
  width: 100%;
  padding-bottom: 1rem;
  margin: 4rem 0 2rem;
  border-bottom: 1px solid rgba(173, 139, 85, 0.25);
  font-family: "Cormorant Garamond", serif;
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.55;
  column-span: all;
  break-inside: avoid;
  font-style: italic;
}

/* ── LIGHTBOX ── */
#lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(252, 251, 249, 0.96);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
#lightbox.active {
  opacity: 1;
  pointer-events: auto;
}
#lightbox img {
  max-width: 88vw;
  max-height: 78vh;
  object-fit: contain;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(173, 139, 85, 0.3);
  font-size: 1.8rem;
  color: var(--primary);
  cursor: pointer;
  padding: 0.6rem 1rem;
  line-height: 1;
  z-index: 10;
  transition: all 0.2s;
  font-family: serif;
}
.lightbox-nav:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.lb-prev {
  left: 2rem;
}
.lb-next {
  right: 2rem;
}
.lb-close {
  position: absolute;
  top: 2rem;
  right: 2.5rem;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 10;
  color: var(--secondary);
  transition: color 0.2s;
  font-family: "Cormorant Garamond", serif;
}
.lb-close:hover {
  color: var(--accent);
}
.lb-caption {
  margin-top: 1.5rem;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--secondary);
}

/* ── DRAW PATHS ── */
.draw-path {
  fill: none;
  stroke: var(--accent);
  stroke-opacity: 0.25;
  stroke-width: 0.8;
}
.draw-path-thin {
  fill: none;
  stroke: var(--primary);
  stroke-opacity: 0.1;
  stroke-width: 0.5;
}

/* ── SECTION DECORATIVE ELEMENTS ── */
.section-ornament {
  text-align: center;
  margin: 0.5rem 0;
  color: var(--accent);
  opacity: 0.5;
  font-size: 0.7rem;
  letter-spacing: 0.5em;
}

/* ── FOOTER ── */
.site-footer {
  text-align: center;
  font-size: 0.7rem;
  background: white;
  padding: 1rem;
  color: var(--secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}
.site-footer a {
  color: inherit;
}

/* ── CONTACT FORM ── */
.contact-container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.4);
  padding: 3rem;
  border: 1px solid rgba(173, 139, 85, 0.15);
  position: relative;
}
@media (max-width: 640px) {
  .contact-container {
    padding: 2rem 1.5rem;
  }
}

.form-group {
  margin-bottom: 2rem;
  position: relative;
}

.form-label {
  display: block;
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--secondary);
  margin-bottom: 0.8rem;
  opacity: 0.8;
}

.form-input,
.form-textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(45, 71, 57, 0.2);
  padding: 0.6rem 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  color: var(--primary);
  transition: border-color 0.3s;
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
}

.form-textarea {
  height: 100px;
  resize: none;
}

.submit-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 1rem 3rem;
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
  display: block;
  width: 100%;
  margin-top: 1rem;
}

.submit-btn:hover {
  background: var(--accent);
  letter-spacing: 0.4em;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.submit-btn:disabled {
  background: var(--secondary);
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-status {
  margin-top: 1.5rem;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  text-align: center;
  min-height: 1.2rem;
  letter-spacing: 0.05em;
}

/* ── RESPONSIVE FORM REFINEMENTS ── */
@media (max-width: 640px) {
  .contact-container {
    padding: 2.5rem 1.5rem;
  }
  .form-group {
    margin-bottom: 1.5rem;
  }
  .form-input,
  .form-textarea {
    font-size: 1.1rem;
  }
  .submit-btn {
    padding: 0.8rem 2rem;
    font-size: 0.7rem;
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .art-grid {
    columns: 2;
    column-gap: 0.75rem;
  }
  .grid-item {
    margin-bottom: 0.75rem;
  }
  .lightbox-nav {
    font-size: 1.5rem;
    padding: 0.5rem 0.7rem;
  }
  .lb-prev {
    left: 0.5rem;
  }
  .lb-next {
    right: 0.5rem;
  }
  .lb-close {
    top: 1rem;
    right: 1rem;
  }
}

/* ── ANIMATED BRUSH STROKE UNDERLINE ── */
.brush-underline {
  position: relative;
  display: inline-block;
}
.brush-underline svg {
  position: absolute;
  bottom: -8px;
  left: -5%;
  width: 110%;
  height: 16px;
  overflow: visible;
}

/* ── SCROLL PROGRESS ── */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 200;
  width: 0%;
  transition: width 0.1s;
  opacity: 0.7;
}

/* ── CORNER DECO ── */
.corner-deco {
  position: fixed;
  pointer-events: none;
  z-index: 1;
  opacity: 0.25;
}
.corner-deco.tl {
  top: 1.5rem;
  left: 1.5rem;
}
.corner-deco.tr {
  top: 1.5rem;
  right: 1.5rem;
  transform: scaleX(-1);
}
.corner-deco.bl {
  bottom: 1.5rem;
  left: 1.5rem;
  transform: scaleY(-1);
}
.corner-deco.br {
  bottom: 1.5rem;
  right: 1.5rem;
  transform: scale(-1);
}
