/* ============================================================
   Harmony Labs — Style Sheet
   Color palette inspired by Northern California farmland:
   deep earth tones, sage greens, golden amber accents.
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --bg-deep: #0b0f0d;
  --bg-surface: #111714;
  --bg-elevated: #182019;
  --bg-card: #151c17;

  --text-primary: #e4dfda;
  --text-secondary: #9a9590;
  --text-muted: #5c5854;

  --accent-sage: #7a9e80;
  --accent-sage-bright: #92b898;
  --accent-gold: #c49a6c;

  --border-subtle: rgba(122, 158, 128, 0.10);
  --border-medium: rgba(122, 158, 128, 0.18);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-max: 1120px;
  --container-pad: 24px;
}


/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle grain overlay for organic texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}


/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}


/* --- Header / Nav --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  background: linear-gradient(to bottom, var(--bg-deep) 60%, transparent);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-wordmark {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.nav-wordmark:hover {
  color: var(--accent-sage-bright);
}


/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-waves {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

.wave-svg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.wave {
  fill: none;
  stroke-width: 1;
  stroke-linecap: round;
}

.wave-1 {
  stroke: rgba(122, 158, 128, 0.12);
  animation: wave-drift-1 12s ease-in-out infinite;
}

.wave-2 {
  stroke: rgba(122, 158, 128, 0.09);
  animation: wave-drift-2 10s ease-in-out infinite;
}

.wave-3 {
  stroke: rgba(122, 158, 128, 0.06);
  animation: wave-drift-3 14s ease-in-out infinite;
}

.wave-4 {
  stroke: rgba(196, 154, 108, 0.07);
  animation: wave-drift-1 16s ease-in-out infinite reverse;
}

.wave-5 {
  stroke: rgba(196, 154, 108, 0.05);
  animation: wave-drift-2 11s ease-in-out infinite reverse;
}

@keyframes wave-drift-1 {
  0%, 100% {
    d: path("M0,240 C240,140 480,340 720,240 C960,140 1200,340 1440,240");
  }
  50% {
    d: path("M0,240 C240,320 480,160 720,240 C960,320 1200,160 1440,240");
  }
}

@keyframes wave-drift-2 {
  0%, 100% {
    d: path("M0,240 C240,180 480,300 720,240 C960,180 1200,300 1440,240");
  }
  50% {
    d: path("M0,240 C240,300 480,180 720,240 C960,300 1200,180 1440,240");
  }
}

@keyframes wave-drift-3 {
  0%, 100% {
    d: path("M0,240 C240,200 480,280 720,240 C960,200 1200,280 1440,240");
  }
  50% {
    d: path("M0,240 C240,280 480,200 720,240 C960,280 1200,200 1440,240");
  }
}

/* Radial glow behind hero content */
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(122, 158, 128, 0.06) 0%,
    rgba(122, 158, 128, 0.02) 40%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  animation: fade-up 1s ease-out both;
}

.hero-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-sage);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 28px;
}

.hero-description {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 40px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent-sage-bright);
  padding: 12px 28px;
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.hero-cta:hover {
  background: rgba(122, 158, 128, 0.08);
  border-color: var(--accent-sage);
  color: #fff;
}

.hero-cta svg {
  transition: transform 0.3s ease;
}

.hero-cta:hover svg {
  transform: translateX(4px);
}


/* --- Pillars --- */
.pillars {
  padding: 80px 0 100px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.pillar {
  padding: 36px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: all 0.4s ease, border-color 0.3s ease;
  opacity: 0;
  transform: translateY(24px);
}

.pillar.visible {
  opacity: 1;
  transform: translateY(0);
}

.pillar:hover {
  border-color: var(--border-medium);
  background: var(--bg-elevated);
}

.pillar-icon {
  color: var(--accent-sage);
  margin-bottom: 20px;
}

.pillar-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.pillar-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
}


/* --- Town Sign --- */
.sign-section {
  position: relative;
  padding: 60px 0 40px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.sign-wrapper {
  position: relative;
  z-index: 2;
  max-width: 480px;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

.sign-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
}

.town-sign {
  width: 100%;
  height: auto;
  display: block;
}


/* --- Divider --- */
.divider {
  padding: 20px 0;
}

.divider-line {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border-medium) 20%,
    var(--accent-sage) 50%,
    var(--border-medium) 80%,
    transparent
  );
  opacity: 0.4;
}


/* --- About --- */
.about {
  padding: 80px 0 120px;
}

.about-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 60px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.about-grid.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-sage);
}

.about-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 600px;
}

.about-text + .about-text {
  margin-top: 20px;
}


/* --- Footer --- */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border-subtle);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 40px;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.5s ease;
}

.footer-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.footer-wordmark {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

.footer-link {
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 2px;
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: var(--accent-sage-bright);
  border-color: var(--accent-sage);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
}


/* --- Animations --- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --container-pad: 20px;
  }

  .hero {
    min-height: 90vh;
    padding: 100px 0 60px;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pillar {
    padding: 28px 24px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-content {
    animation: none;
    opacity: 1;
  }

  .pillar, .sign-wrapper, .about-grid, .footer-content {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-cta {
    width: 100%;
    justify-content: center;
  }
}
