/* PettyBot Shared Styles */

/* ===== CSS Variables ===== */
:root {
  --forest: #3D5A45;
  --forest-dark: #2E4535;
  --night-forest: #1E2D24;
  --parchment: #F8F5EC;
  --parchment-dark: #EDE8DB;
  --ochre: #C9A227;
  --gold: #D4AF37;
  --gold-light: #E5C766;
  --brown: #2B2520;
  --brown-light: #4A433D;
  --sage: #7A8B7A;
  --sage-light: #A3B0A3;
}

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

/* ===== Base ===== */
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(ellipse at 50% 20%, #FFFDF8 0%, var(--parchment) 40%, #E0D9CA 100%);
  color: var(--brown);
  line-height: 1.6;
}

/* ===== Header ===== */
header {
  background: radial-gradient(ellipse at 50% 100%, #4A6B52 0%, var(--forest) 60%, var(--forest-dark) 100%);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--ochre);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--night-forest);
  stroke-width: 3;
  fill: none;
}

.logo-text {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--parchment);
  letter-spacing: -0.02em;
}

/* ===== Navigation ===== */
nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--parchment);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav-link:hover {
  opacity: 1;
}

.nav-link.active {
  opacity: 1;
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ochre);
  border-radius: 1px;
}

.nav-cta {
  background: var(--ochre);
  color: var(--night-forest);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.nav-cta:hover {
  background: var(--gold);
}

/* ===== Nav Dropdown ===== */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  color: var(--parchment);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-dropdown-toggle::after {
  content: '';
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
  transition: transform 0.2s;
}

.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown:focus-within .nav-dropdown-toggle {
  opacity: 1;
}

.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown:focus-within .nav-dropdown-toggle::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(45, 42, 38, 0.12), 0 1px 3px rgba(45, 42, 38, 0.08);
  min-width: 160px;
  padding: 0.4rem 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--brown);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-menu a:hover {
  background: var(--parchment);
  color: var(--forest);
}

/* ===== Hamburger Menu ===== */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

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

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Footer ===== */
footer {
  background: var(--night-forest);
  color: var(--sage-light);
  padding: 1.5rem 2rem;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer-logo .logo-icon {
  width: 24px;
  height: 24px;
}

.footer-logo .logo-icon svg {
  width: 14px;
  height: 14px;
}

.footer-logo .logo-text {
  font-size: 1rem;
  color: var(--sage-light);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--sage-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sage);
  margin-top: 0.75rem;
  margin-bottom: 0.4rem;
}

footer p {
  font-size: 0.85rem;
  color: var(--sage);
}

footer a {
  color: var(--ochre);
}

/* ===== Signup Form (shared) ===== */
.signup-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.signup-form input {
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border: 2px solid var(--sage-light);
  border-radius: 8px;
  width: 300px;
  background: white;
  color: var(--brown);
  font-family: inherit;
  transition: border-color 0.2s;
}

.signup-form input:focus {
  outline: none;
  border-color: var(--forest);
}

.signup-form input::placeholder {
  color: var(--sage);
}

.signup-form button {
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--ochre);
  color: var(--night-forest);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s;
}

.signup-form button:hover {
  background: var(--gold);
}

.signup-form button:active {
  transform: scale(0.98);
}

.signup-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.signup-note {
  font-size: 0.9rem;
  color: var(--sage);
}

.signup-success {
  color: var(--forest);
  font-weight: 500;
}

.signup-error {
  color: #c44;
}

/* ===== Bottom CTA Section ===== */
.bottom-cta {
  background: radial-gradient(ellipse at 50% 50%, #4A6B52 0%, var(--forest) 50%, var(--forest-dark) 100%);
  padding: 4rem 2rem;
  text-align: center;
}

.bottom-cta h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--parchment);
  margin-bottom: 0.75rem;
}

.bottom-cta p {
  color: rgba(248, 245, 236, 0.8);
  margin-bottom: 1.5rem;
}

.bottom-cta .signup-form input {
  border: none;
}

.bottom-cta .signup-note {
  color: rgba(248, 245, 236, 0.5);
}

/* ===== Responsive - Shared ===== */
@media (max-width: 768px) {
  header {
    padding: 0.75rem 1rem;
  }

  .hamburger {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--forest);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 0.75rem;
    border-top: 1px solid var(--forest-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
    align-items: stretch;
    text-align: center;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu .nav-link {
    padding: 0.65rem 0;
    font-size: 1rem;
    opacity: 0.9;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-menu .nav-link:hover,
  .nav-menu .nav-link.active {
    opacity: 1;
  }

  .nav-menu .nav-link.active::after {
    display: none;
  }

  /* Mobile dropdown: flatten into sub-links */
  .nav-menu .nav-dropdown {
    position: static;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.65rem 0;
  }

  .nav-menu .nav-dropdown-toggle {
    font-size: 1rem;
    opacity: 0.9;
    pointer-events: none;
    justify-content: center;
  }

  .nav-menu .nav-dropdown-toggle::after {
    display: none;
  }

  .nav-menu .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    background: none;
    box-shadow: none;
    transform: none;
    padding: 0.25rem 0 0 0;
    min-width: 0;
  }

  .nav-menu .nav-dropdown-menu a {
    color: var(--parchment);
    opacity: 0.75;
    padding: 0.35rem 0;
    font-size: 0.9rem;
  }

  .nav-menu .nav-dropdown-menu a:hover {
    opacity: 1;
    background: none;
    color: var(--parchment);
  }

  header {
    position: relative;
  }

  nav {
    gap: 0.75rem;
  }

  .nav-cta {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  .signup-form {
    flex-direction: column;
    align-items: center;
  }

  .signup-form input {
    width: 100%;
    max-width: 300px;
  }

  .signup-form button {
    width: 100%;
    max-width: 300px;
  }

  .bottom-cta h2 {
    font-size: 1.75rem;
  }
}
