/* ═══════════════════════════════════════════════════════════
   Nano Farms — Custom Styles
   ═══════════════════════════════════════════════════════════ */

/* ── Base ── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background-color: rgba(212, 160, 23, 0.3);
  color: #3d173d;
}

/* ── Navbar ── */
#navbar {
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 12px rgba(61, 23, 61, 0.08);
}

#navbar.scrolled .font-serif {
  color: #3d173d !important;
}

#navbar.scrolled a:not([class*="bg-"]) {
  color: #501e50 !important;
}

#navbar.scrolled a:not([class*="bg-"]):hover {
  color: #b8860b !important;
}

/* ── Mobile menu button ── */
.menu-line {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 2px;
  background-color: #501e50;
  border-radius: 2px;
  transition: all 0.3s ease;
}

#navbar.scrolled .menu-line {
  background-color: #3d173d;
}

#menu-btn.active .menu-line.top-3 {
  transform: translate(-50%, 0) rotate(45deg);
}

#menu-btn.active .menu-line.middle {
  opacity: 0;
}

#menu-btn.active .menu-line.bottom-3 {
  transform: translate(-50%, 0) rotate(-45deg);
}

/* ── Mobile links ── */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  color: #501e50;
  font-size: 1rem;
  border-bottom: 1px solid #e8dce8;
  transition: color 0.2s ease;
}

.mobile-link:last-child {
  border-bottom: none;
}

.mobile-link:hover {
  color: #b8860b;
}

/* ── Hero orbs ── */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #d4a017 0%, transparent 70%);
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}

.hero-orb--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #a359a3 0%, transparent 70%);
  bottom: -5%;
  left: -5%;
  animation-delay: -3s;
}

.hero-orb--3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, #eab30a 0%, transparent 70%);
  top: 40%;
  left: 30%;
  animation-delay: -5s;
  opacity: 0.2;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Scroll reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Default visible state for reduced-motion or no-JS */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Form select arrow ── */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23501e50' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ── Subtle card hover lift ── */
.group:hover {
  transform: translateY(-2px);
}

.group {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ── Anchor offset for fixed nav ── */
section[id] {
  scroll-margin-top: 80px;
}

/* ── Utility ── */
@media (max-width: 640px) {
  section[id] {
    scroll-margin-top: 60px;
  }
}
