/* Shared styles for 7 Weekly Goals — index + privacy */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f0f4ff;
  color: #2d3561;
  overflow-x: hidden;
}

/* Focus — visible for keyboard users */
:focus-visible {
  outline: 2px solid #7ecec0;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip to content */
.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: #2d3561;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(240, 244, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(139, 159, 232, 0.12);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #2d3561;
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: rgba(45, 53, 97, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #2d3561;
}

.nav-cta {
  background: linear-gradient(135deg, #7ecec0, #a8e6cf) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 10px;
  font-weight: 600 !important;
  transition: all 0.2s !important;
  box-shadow: 0 2px 8px rgba(126, 206, 192, 0.3);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(126, 206, 192, 0.4);
  color: #fff !important;
}

/* Hamburger toggle (mobile only) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #2d3561;
  border-radius: 8px;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
}

.nav-toggle .icon-close {
  display: none;
}
nav.nav-open .nav-toggle .icon-open {
  display: none;
}
nav.nav-open .nav-toggle .icon-close {
  display: block;
}

/* Footer */
footer {
  padding: 40px 24px;
  text-align: center;
  background: #e8edf8;
  border-top: 1px solid rgba(139, 159, 232, 0.1);
}

footer p {
  color: rgba(45, 53, 97, 0.6);
  font-size: 0.85rem;
  margin: 0;
}

footer a {
  color: rgba(45, 53, 97, 0.75);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: #2d3561;
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 520px;
  margin: 0 auto;
  z-index: 200;
  background: #ffffff;
  border: 1px solid rgba(139, 159, 232, 0.18);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(45, 53, 97, 0.15);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: cookie-slide-in 0.35s ease both;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(45, 53, 97, 0.8);
}

.cookie-banner a {
  color: #5db5a7;
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cookie-btn {
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.cookie-btn-primary {
  background: linear-gradient(135deg, #7ecec0, #a8e6cf);
  color: #fff;
  box-shadow: 0 2px 8px rgba(126, 206, 192, 0.3);
}

.cookie-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(126, 206, 192, 0.4);
}

.cookie-btn-secondary {
  background: rgba(139, 159, 232, 0.1);
  color: #2d3561;
}

.cookie-btn-secondary:hover {
  background: rgba(139, 159, 232, 0.18);
}

@keyframes cookie-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive — shared nav/footer */
@media (max-width: 768px) {
  nav {
    padding: 12px 20px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 4px 8px;
    margin-top: 12px;
    border-top: 1px solid rgba(139, 159, 232, 0.12);
  }

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

  .nav-links a {
    width: 100%;
    padding: 10px 8px;
    border-radius: 8px;
  }

  .nav-cta {
    margin-top: 4px;
    text-align: center;
    width: 100%;
  }
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
