/* Root Variables */
:root {
  --color-sage: #8FA889;
  --color-teal: #6B9B94;
  --color-beige: #8A807A;
  --color-dark: #3B3532;
  --color-rust: #C08B6E;
  --color-gold: #B8A44C;
  --color-cream: #E8E0D2;
  --color-tan: #C4A882;

  --font-serif: 'EB Garamond', serif;
  --font-mono: 'Space Mono', monospace;
  --font-sans: 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: #F2EDE4;
  color: var(--color-dark);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

main {
  width: 100%;
}

/* Navigation */
.puzzle-nav {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 100;
}

.puzzle-toggle {
  width: 60px;
  height: 60px;
  background: none;
  border: 2px solid var(--color-sage);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-sage);
  transition: all 0.3s ease;
  position: relative;
}

.puzzle-toggle:hover {
  background-color: var(--color-sage);
  color: #F2EDE4;
  transform: scale(1.1);
}

.puzzle-toggle svg {
  width: 30px;
  height: 30px;
}

.radial-menu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.menu-item {
  position: absolute;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-cream);
  border: 2px solid var(--color-beige);
  border-radius: 50%;
  font-size: 1.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
}

.puzzle-nav.open .menu-item {
  pointer-events: auto;
  opacity: 1;
}

.menu-item:nth-child(1) { transform: translate(80px, -80px); }
.menu-item:nth-child(2) { transform: translate(80px, 80px); }
.menu-item:nth-child(3) { transform: translate(-80px, 80px); }
.menu-item:nth-child(4) { transform: translate(-80px, -80px); }

.menu-item:hover {
  background: var(--color-sage);
  border-color: var(--color-sage);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  position: relative;
  background-color: #F2EDE4;
  overflow: hidden;
}

.puzzle-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  opacity: 0;
  animation: bgFadeIn 2s ease-out 0.4s forwards;
}

@keyframes bgFadeIn {
  from { opacity: 0; }
  to { opacity: 0.15; }
}

.bg-piece {
  position: absolute;
  width: 150px;
  height: 150px;
  color: var(--color-sage);
  animation: pieceFloat 6s ease-in-out infinite;
}

.bg-piece:nth-child(1) {
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.bg-piece:nth-child(2) {
  bottom: 15%;
  left: 5%;
  animation-delay: 1s;
}

@keyframes pieceFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(20px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 1rem;
  animation: titleFadeIn 1s ease-out;
}

@keyframes titleFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--color-beige);
  font-style: italic;
  animation: subtitleFadeIn 1s ease-out 0.3s forwards;
  opacity: 0;
}

@keyframes subtitleFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Sections */
section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

section h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 3rem;
  text-align: center;
}

/* Collection Section */
.collection {
  background-color: #F2EDE4;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.puzzle-card {
  background-color: var(--color-cream);
  padding: 2rem;
  border: 2px solid var(--color-beige);
  clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 95%);
  transition: all 0.3s ease;
  animation: cardFadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.puzzle-card:nth-child(1) { animation-delay: 0.1s; }
.puzzle-card:nth-child(2) { animation-delay: 0.2s; }
.puzzle-card:nth-child(3) { animation-delay: 0.3s; }
.puzzle-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes cardFadeIn {
  from { opacity: 0; transform: translate(20px, 20px); }
  to { opacity: 1; transform: translate(0, 0); }
}

.puzzle-card:hover {
  border-color: var(--color-sage);
  transform: translateY(-8px);
}

.puzzle-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.puzzle-card p {
  color: var(--color-beige);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* About Section */
.about {
  background-color: #FFFAF2;
}

.about-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-dark);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

/* Vintage Section */
.vintage {
  background-color: #F2EDE4;
}

.vintage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.vintage-item {
  background-color: var(--color-cream);
  padding: 2rem;
  text-align: center;
  border: 2px solid var(--color-tan);
  position: relative;
  clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 95%);
  transition: all 0.3s ease;
  animation: itemFadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.vintage-item:nth-child(1) { animation-delay: 0.1s; }
.vintage-item:nth-child(2) { animation-delay: 0.2s; }
.vintage-item:nth-child(3) { animation-delay: 0.3s; }
.vintage-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes itemFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.vintage-item:hover {
  border-color: var(--color-rust);
  background-color: #FFFAF2;
}

.item-badge {
  display: inline-block;
  background-color: var(--color-rust);
  color: #F2EDE4;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.vintage-item p {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--color-dark);
}

/* Contact Section */
.contact {
  background-color: #FFFAF2;
  text-align: center;
}

.contact-box {
  background-color: var(--color-cream);
  padding: 2rem;
  border: 2px solid var(--color-beige);
  max-width: 500px;
  margin: 0 auto 2rem;
  border-radius: 4px;
}

.contact-box p {
  margin-bottom: 1rem;
  color: var(--color-dark);
  font-size: 0.95rem;
}

.contact-box strong {
  color: var(--color-dark);
  font-weight: 600;
}

.subscribe-btn {
  background-color: var(--color-sage);
  color: #F2EDE4;
  border: 2px solid var(--color-sage);
  padding: 1rem 2rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.subscribe-btn:hover {
  background-color: transparent;
  color: var(--color-sage);
}

/* Responsive */
@media (max-width: 768px) {
  section {
    padding: 3rem 1.5rem;
  }

  .puzzle-toggle {
    width: 50px;
    height: 50px;
  }

  .menu-item:nth-child(1) { transform: translate(60px, -60px); }
  .menu-item:nth-child(2) { transform: translate(60px, 60px); }
  .menu-item:nth-child(3) { transform: translate(-60px, 60px); }
  .menu-item:nth-child(4) { transform: translate(-60px, -60px); }

  .puzzle-grid,
  .vintage-grid {
    grid-template-columns: 1fr;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #F2EDE4;
}

::-webkit-scrollbar-thumb {
  background: var(--color-sage);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-teal);
}
